Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / lib / server.js
index 7b383428b3b03966719dc843e07ef8ac6d1e375b..785193819c97fd643ce53914db0ce1cc00849385 100644 (file)
@@ -81,7 +81,7 @@
 /******/
 /******/
 /******/       // Load entry module and return exports
-/******/       return __webpack_require__(__webpack_require__.s = 33);
+/******/       return __webpack_require__(__webpack_require__.s = 39);
 /******/ })
 /************************************************************************/
 /******/ ([
@@ -99,16112 +99,10725 @@ module.exports = require("fs");
 
 /***/ }),
 /* 3 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ (function(module, exports) {
 
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-function __export(m) {\r
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r
-}\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;\r
-exports.ResponseError = vscode_jsonrpc_1.ResponseError;\r
-exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;\r
-exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;\r
-exports.Disposable = vscode_jsonrpc_1.Disposable;\r
-exports.Event = vscode_jsonrpc_1.Event;\r
-exports.Emitter = vscode_jsonrpc_1.Emitter;\r
-exports.Trace = vscode_jsonrpc_1.Trace;\r
-exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;\r
-exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;\r
-exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;\r
-exports.RequestType = vscode_jsonrpc_1.RequestType;\r
-exports.RequestType0 = vscode_jsonrpc_1.RequestType0;\r
-exports.NotificationType = vscode_jsonrpc_1.NotificationType;\r
-exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;\r
-exports.MessageReader = vscode_jsonrpc_1.MessageReader;\r
-exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;\r
-exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;\r
-exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;\r
-exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;\r
-exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;\r
-exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;\r
-exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;\r
-exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;\r
-exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;\r
-exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;\r
-exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;\r
-__export(__webpack_require__(17));\r
-__export(__webpack_require__(18));\r
-const callHierarchy = __webpack_require__(27);\r
-const progress = __webpack_require__(28);\r
-const sr = __webpack_require__(29);\r
-var Proposed;\r
-(function (Proposed) {\r
-    let SelectionRangeRequest;\r
-    (function (SelectionRangeRequest) {\r
-        SelectionRangeRequest.type = sr.SelectionRangeRequest.type;\r
-    })(SelectionRangeRequest = Proposed.SelectionRangeRequest || (Proposed.SelectionRangeRequest = {}));\r
-    let CallHierarchyRequest;\r
-    (function (CallHierarchyRequest) {\r
-        CallHierarchyRequest.type = callHierarchy.CallHierarchyRequest.type;\r
-    })(CallHierarchyRequest = Proposed.CallHierarchyRequest || (Proposed.CallHierarchyRequest = {}));\r
-    let CallHierarchyDirection;\r
-    (function (CallHierarchyDirection) {\r
-        CallHierarchyDirection.CallsFrom = callHierarchy.CallHierarchyDirection.CallsFrom;\r
-        CallHierarchyDirection.CallsTo = callHierarchy.CallHierarchyDirection.CallsTo;\r
-    })(CallHierarchyDirection = Proposed.CallHierarchyDirection || (Proposed.CallHierarchyDirection = {}));\r
-    let ProgressStartNotification;\r
-    (function (ProgressStartNotification) {\r
-        ProgressStartNotification.type = progress.ProgressStartNotification.type;\r
-    })(ProgressStartNotification = Proposed.ProgressStartNotification || (Proposed.ProgressStartNotification = {}));\r
-    let ProgressReportNotification;\r
-    (function (ProgressReportNotification) {\r
-        ProgressReportNotification.type = progress.ProgressReportNotification.type;\r
-    })(ProgressReportNotification = Proposed.ProgressReportNotification || (Proposed.ProgressReportNotification = {}));\r
-    let ProgressDoneNotification;\r
-    (function (ProgressDoneNotification) {\r
-        ProgressDoneNotification.type = progress.ProgressDoneNotification.type;\r
-    })(ProgressDoneNotification = Proposed.ProgressDoneNotification || (Proposed.ProgressDoneNotification = {}));\r
-    let ProgressCancelNotification;\r
-    (function (ProgressCancelNotification) {\r
-        ProgressCancelNotification.type = progress.ProgressCancelNotification.type;\r
-    })(ProgressCancelNotification = Proposed.ProgressCancelNotification || (Proposed.ProgressCancelNotification = {}));\r
-})(Proposed = exports.Proposed || (exports.Proposed = {}));\r
-function createProtocolConnection(reader, writer, logger, strategy) {\r
-    return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);\r
-}\r
-exports.createProtocolConnection = createProtocolConnection;\r
+module.exports = require("util");
+
+/***/ }),
+/* 4 */,
+/* 5 */,
+/* 6 */,
+/* 7 */,
+/* 8 */,
+/* 9 */,
+/* 10 */,
+/* 11 */,
+/* 12 */,
+/* 13 */,
+/* 14 */
+/***/ (function(module, exports) {
 
+module.exports = require("os");
 
 /***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 15 */
+/***/ (function(module, exports) {
+
+module.exports = require("crypto");
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports) {
+
+module.exports = require("net");
+
+/***/ }),
+/* 17 */,
+/* 18 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
 /* --------------------------------------------------------------------------------------------\r
  * Copyright (c) Microsoft Corporation. All rights reserved.\r
  * Licensed under the MIT License. See License.txt in the project root for license information.\r
  * ------------------------------------------------------------------------------------------ */\r
-/// <reference path="./thenable.ts" />\r
 \r
-function __export(m) {\r
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r
-}\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const Is = __webpack_require__(5);\r
-const messages_1 = __webpack_require__(6);\r
-exports.RequestType = messages_1.RequestType;\r
-exports.RequestType0 = messages_1.RequestType0;\r
-exports.RequestType1 = messages_1.RequestType1;\r
-exports.RequestType2 = messages_1.RequestType2;\r
-exports.RequestType3 = messages_1.RequestType3;\r
-exports.RequestType4 = messages_1.RequestType4;\r
-exports.RequestType5 = messages_1.RequestType5;\r
-exports.RequestType6 = messages_1.RequestType6;\r
-exports.RequestType7 = messages_1.RequestType7;\r
-exports.RequestType8 = messages_1.RequestType8;\r
-exports.RequestType9 = messages_1.RequestType9;\r
-exports.ResponseError = messages_1.ResponseError;\r
-exports.ErrorCodes = messages_1.ErrorCodes;\r
-exports.NotificationType = messages_1.NotificationType;\r
-exports.NotificationType0 = messages_1.NotificationType0;\r
-exports.NotificationType1 = messages_1.NotificationType1;\r
-exports.NotificationType2 = messages_1.NotificationType2;\r
-exports.NotificationType3 = messages_1.NotificationType3;\r
-exports.NotificationType4 = messages_1.NotificationType4;\r
-exports.NotificationType5 = messages_1.NotificationType5;\r
-exports.NotificationType6 = messages_1.NotificationType6;\r
-exports.NotificationType7 = messages_1.NotificationType7;\r
-exports.NotificationType8 = messages_1.NotificationType8;\r
-exports.NotificationType9 = messages_1.NotificationType9;\r
-const messageReader_1 = __webpack_require__(7);\r
-exports.MessageReader = messageReader_1.MessageReader;\r
-exports.StreamMessageReader = messageReader_1.StreamMessageReader;\r
-exports.IPCMessageReader = messageReader_1.IPCMessageReader;\r
-exports.SocketMessageReader = messageReader_1.SocketMessageReader;\r
-const messageWriter_1 = __webpack_require__(9);\r
-exports.MessageWriter = messageWriter_1.MessageWriter;\r
-exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;\r
-exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;\r
-exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;\r
-const events_1 = __webpack_require__(8);\r
-exports.Disposable = events_1.Disposable;\r
-exports.Event = events_1.Event;\r
-exports.Emitter = events_1.Emitter;\r
-const cancellation_1 = __webpack_require__(10);\r
-exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;\r
-exports.CancellationToken = cancellation_1.CancellationToken;\r
-const linkedMap_1 = __webpack_require__(11);\r
-__export(__webpack_require__(12));\r
-__export(__webpack_require__(16));\r
-var CancelNotification;\r
-(function (CancelNotification) {\r
-    CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');\r
-})(CancelNotification || (CancelNotification = {}));\r
-exports.NullLogger = Object.freeze({\r
-    error: () => { },\r
-    warn: () => { },\r
-    info: () => { },\r
-    log: () => { }\r
-});\r
-var Trace;\r
-(function (Trace) {\r
-    Trace[Trace["Off"] = 0] = "Off";\r
-    Trace[Trace["Messages"] = 1] = "Messages";\r
-    Trace[Trace["Verbose"] = 2] = "Verbose";\r
-})(Trace = exports.Trace || (exports.Trace = {}));\r
-(function (Trace) {\r
-    function fromString(value) {\r
-        value = value.toLowerCase();\r
-        switch (value) {\r
-            case 'off':\r
-                return Trace.Off;\r
-            case 'messages':\r
-                return Trace.Messages;\r
-            case 'verbose':\r
-                return Trace.Verbose;\r
-            default:\r
-                return Trace.Off;\r
-        }\r
+/**\r
+ * The Position namespace provides helper functions to work with\r
+ * [Position](#Position) literals.\r
+ */\r
+var Position;\r
+(function (Position) {\r
+    /**\r
+     * Creates a new Position literal from the given line and character.\r
+     * @param line The position's line.\r
+     * @param character The position's character.\r
+     */\r
+    function create(line, character) {\r
+        return { line: line, character: character };\r
     }\r
-    Trace.fromString = fromString;\r
-    function toString(value) {\r
-        switch (value) {\r
-            case Trace.Off:\r
-                return 'off';\r
-            case Trace.Messages:\r
-                return 'messages';\r
-            case Trace.Verbose:\r
-                return 'verbose';\r
-            default:\r
-                return 'off';\r
-        }\r
+    Position.create = create;\r
+    /**\r
+     * Checks whether the given liternal conforms to the [Position](#Position) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r
     }\r
-    Trace.toString = toString;\r
-})(Trace = exports.Trace || (exports.Trace = {}));\r
-var TraceFormat;\r
-(function (TraceFormat) {\r
-    TraceFormat["Text"] = "text";\r
-    TraceFormat["JSON"] = "json";\r
-})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\r
-(function (TraceFormat) {\r
-    function fromString(value) {\r
-        value = value.toLowerCase();\r
-        if (value === 'json') {\r
-            return TraceFormat.JSON;\r
+    Position.is = is;\r
+})(Position || (Position = {}));\r
+/**\r
+ * The Range namespace provides helper functions to work with\r
+ * [Range](#Range) literals.\r
+ */\r
+var Range;\r
+(function (Range) {\r
+    function create(one, two, three, four) {\r
+        if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {\r
+            return { start: Position.create(one, two), end: Position.create(three, four) };\r
+        }\r
+        else if (Position.is(one) && Position.is(two)) {\r
+            return { start: one, end: two };\r
         }\r
         else {\r
-            return TraceFormat.Text;\r
+            throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");\r
         }\r
     }\r
-    TraceFormat.fromString = fromString;\r
-})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\r
-var SetTraceNotification;\r
-(function (SetTraceNotification) {\r
-    SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');\r
-})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));\r
-var LogTraceNotification;\r
-(function (LogTraceNotification) {\r
-    LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');\r
-})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));\r
-var ConnectionErrors;\r
-(function (ConnectionErrors) {\r
+    Range.create = create;\r
     /**\r
-     * The connection is closed.\r
+     * Checks whether the given literal conforms to the [Range](#Range) interface.\r
      */\r
-    ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r
+    }\r
+    Range.is = is;\r
+})(Range || (Range = {}));\r
+/**\r
+ * The Location namespace provides helper functions to work with\r
+ * [Location](#Location) literals.\r
+ */\r
+var Location;\r
+(function (Location) {\r
     /**\r
-     * The connection got disposed.\r
+     * Creates a Location literal.\r
+     * @param uri The location's uri.\r
+     * @param range The location's range.\r
      */\r
-    ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";\r
+    function create(uri, range) {\r
+        return { uri: uri, range: range };\r
+    }\r
+    Location.create = create;\r
     /**\r
-     * The connection is already in listening mode.\r
+     * Checks whether the given literal conforms to the [Location](#Location) interface.\r
      */\r
-    ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";\r
-})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));\r
-class ConnectionError extends Error {\r
-    constructor(code, message) {\r
-        super(message);\r
-        this.code = code;\r
-        Object.setPrototypeOf(this, ConnectionError.prototype);\r
-    }\r
-}\r
-exports.ConnectionError = ConnectionError;\r
-var ConnectionStrategy;\r
-(function (ConnectionStrategy) {\r
     function is(value) {\r
-        let candidate = value;\r
-        return candidate && Is.func(candidate.cancelUndispatched);\r
-    }\r
-    ConnectionStrategy.is = is;\r
-})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));\r
-var ConnectionState;\r
-(function (ConnectionState) {\r
-    ConnectionState[ConnectionState["New"] = 1] = "New";\r
-    ConnectionState[ConnectionState["Listening"] = 2] = "Listening";\r
-    ConnectionState[ConnectionState["Closed"] = 3] = "Closed";\r
-    ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";\r
-})(ConnectionState || (ConnectionState = {}));\r
-function _createMessageConnection(messageReader, messageWriter, logger, strategy) {\r
-    let sequenceNumber = 0;\r
-    let notificationSquenceNumber = 0;\r
-    let unknownResponseSquenceNumber = 0;\r
-    const version = '2.0';\r
-    let starRequestHandler = undefined;\r
-    let requestHandlers = Object.create(null);\r
-    let starNotificationHandler = undefined;\r
-    let notificationHandlers = Object.create(null);\r
-    let timer;\r
-    let messageQueue = new linkedMap_1.LinkedMap();\r
-    let responsePromises = Object.create(null);\r
-    let requestTokens = Object.create(null);\r
-    let trace = Trace.Off;\r
-    let traceFormat = TraceFormat.Text;\r
-    let tracer;\r
-    let state = ConnectionState.New;\r
-    let errorEmitter = new events_1.Emitter();\r
-    let closeEmitter = new events_1.Emitter();\r
-    let unhandledNotificationEmitter = new events_1.Emitter();\r
-    let disposeEmitter = new events_1.Emitter();\r
-    function createRequestQueueKey(id) {\r
-        return 'req-' + id.toString();\r
-    }\r
-    function createResponseQueueKey(id) {\r
-        if (id === null) {\r
-            return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();\r
-        }\r
-        else {\r
-            return 'res-' + id.toString();\r
-        }\r
-    }\r
-    function createNotificationQueueKey() {\r
-        return 'not-' + (++notificationSquenceNumber).toString();\r
-    }\r
-    function addMessageToQueue(queue, message) {\r
-        if (messages_1.isRequestMessage(message)) {\r
-            queue.set(createRequestQueueKey(message.id), message);\r
-        }\r
-        else if (messages_1.isResponseMessage(message)) {\r
-            queue.set(createResponseQueueKey(message.id), message);\r
-        }\r
-        else {\r
-            queue.set(createNotificationQueueKey(), message);\r
-        }\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\r
     }\r
-    function cancelUndispatched(_message) {\r
-        return undefined;\r
+    Location.is = is;\r
+})(Location || (Location = {}));\r
+/**\r
+ * The LocationLink namespace provides helper functions to work with\r
+ * [LocationLink](#LocationLink) literals.\r
+ */\r
+var LocationLink;\r
+(function (LocationLink) {\r
+    /**\r
+     * Creates a LocationLink literal.\r
+     * @param targetUri The definition's uri.\r
+     * @param targetRange The full range of the definition.\r
+     * @param targetSelectionRange The span of the symbol definition at the target.\r
+     * @param originSelectionRange The span of the symbol being defined in the originating source file.\r
+     */\r
+    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\r
+        return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\r
     }\r
-    function isListening() {\r
-        return state === ConnectionState.Listening;\r
+    LocationLink.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\r
+            && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))\r
+            && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\r
     }\r
-    function isClosed() {\r
-        return state === ConnectionState.Closed;\r
+    LocationLink.is = is;\r
+})(LocationLink || (LocationLink = {}));\r
+/**\r
+ * The Color namespace provides helper functions to work with\r
+ * [Color](#Color) literals.\r
+ */\r
+var Color;\r
+(function (Color) {\r
+    /**\r
+     * Creates a new Color literal.\r
+     */\r
+    function create(red, green, blue, alpha) {\r
+        return {\r
+            red: red,\r
+            green: green,\r
+            blue: blue,\r
+            alpha: alpha,\r
+        };\r
     }\r
-    function isDisposed() {\r
-        return state === ConnectionState.Disposed;\r
+    Color.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [Color](#Color) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.number(candidate.red)\r
+            && Is.number(candidate.green)\r
+            && Is.number(candidate.blue)\r
+            && Is.number(candidate.alpha);\r
     }\r
-    function closeHandler() {\r
-        if (state === ConnectionState.New || state === ConnectionState.Listening) {\r
-            state = ConnectionState.Closed;\r
-            closeEmitter.fire(undefined);\r
-        }\r
-        // If the connection is disposed don't sent close events.\r
+    Color.is = is;\r
+})(Color || (Color = {}));\r
+/**\r
+ * The ColorInformation namespace provides helper functions to work with\r
+ * [ColorInformation](#ColorInformation) literals.\r
+ */\r
+var ColorInformation;\r
+(function (ColorInformation) {\r
+    /**\r
+     * Creates a new ColorInformation literal.\r
+     */\r
+    function create(range, color) {\r
+        return {\r
+            range: range,\r
+            color: color,\r
+        };\r
     }\r
-    ;\r
-    function readErrorHandler(error) {\r
-        errorEmitter.fire([error, undefined, undefined]);\r
+    ColorInformation.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Range.is(candidate.range) && Color.is(candidate.color);\r
     }\r
-    function writeErrorHandler(data) {\r
-        errorEmitter.fire(data);\r
+    ColorInformation.is = is;\r
+})(ColorInformation || (ColorInformation = {}));\r
+/**\r
+ * The Color namespace provides helper functions to work with\r
+ * [ColorPresentation](#ColorPresentation) literals.\r
+ */\r
+var ColorPresentation;\r
+(function (ColorPresentation) {\r
+    /**\r
+     * Creates a new ColorInformation literal.\r
+     */\r
+    function create(label, textEdit, additionalTextEdits) {\r
+        return {\r
+            label: label,\r
+            textEdit: textEdit,\r
+            additionalTextEdits: additionalTextEdits,\r
+        };\r
     }\r
-    messageReader.onClose(closeHandler);\r
-    messageReader.onError(readErrorHandler);\r
-    messageWriter.onClose(closeHandler);\r
-    messageWriter.onError(writeErrorHandler);\r
-    function triggerMessageQueue() {\r
-        if (timer || messageQueue.size === 0) {\r
-            return;\r
-        }\r
-        timer = setImmediate(() => {\r
-            timer = undefined;\r
-            processMessageQueue();\r
-        });\r
+    ColorPresentation.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.string(candidate.label)\r
+            && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\r
+            && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\r
     }\r
-    function processMessageQueue() {\r
-        if (messageQueue.size === 0) {\r
-            return;\r
+    ColorPresentation.is = is;\r
+})(ColorPresentation || (ColorPresentation = {}));\r
+/**\r
+ * Enum of known range kinds\r
+ */\r
+var FoldingRangeKind;\r
+(function (FoldingRangeKind) {\r
+    /**\r
+     * Folding range for a comment\r
+     */\r
+    FoldingRangeKind["Comment"] = "comment";\r
+    /**\r
+     * Folding range for a imports or includes\r
+     */\r
+    FoldingRangeKind["Imports"] = "imports";\r
+    /**\r
+     * Folding range for a region (e.g. `#region`)\r
+     */\r
+    FoldingRangeKind["Region"] = "region";\r
+})(FoldingRangeKind || (FoldingRangeKind = {}));\r
+/**\r
+ * The folding range namespace provides helper functions to work with\r
+ * [FoldingRange](#FoldingRange) literals.\r
+ */\r
+var FoldingRange;\r
+(function (FoldingRange) {\r
+    /**\r
+     * Creates a new FoldingRange literal.\r
+     */\r
+    function create(startLine, endLine, startCharacter, endCharacter, kind) {\r
+        var result = {\r
+            startLine: startLine,\r
+            endLine: endLine\r
+        };\r
+        if (Is.defined(startCharacter)) {\r
+            result.startCharacter = startCharacter;\r
         }\r
-        let message = messageQueue.shift();\r
-        try {\r
-            if (messages_1.isRequestMessage(message)) {\r
-                handleRequest(message);\r
-            }\r
-            else if (messages_1.isNotificationMessage(message)) {\r
-                handleNotification(message);\r
-            }\r
-            else if (messages_1.isResponseMessage(message)) {\r
-                handleResponse(message);\r
-            }\r
-            else {\r
-                handleInvalidMessage(message);\r
-            }\r
+        if (Is.defined(endCharacter)) {\r
+            result.endCharacter = endCharacter;\r
         }\r
-        finally {\r
-            triggerMessageQueue();\r
+        if (Is.defined(kind)) {\r
+            result.kind = kind;\r
         }\r
+        return result;\r
     }\r
-    let callback = (message) => {\r
-        try {\r
-            // We have received a cancellation message. Check if the message is still in the queue\r
-            // and cancel it if allowed to do so.\r
-            if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {\r
-                let key = createRequestQueueKey(message.params.id);\r
-                let toCancel = messageQueue.get(key);\r
-                if (messages_1.isRequestMessage(toCancel)) {\r
-                    let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);\r
-                    if (response && (response.error !== void 0 || response.result !== void 0)) {\r
-                        messageQueue.delete(key);\r
-                        response.id = toCancel.id;\r
-                        traceSendingResponse(response, message.method, Date.now());\r
-                        messageWriter.write(response);\r
-                        return;\r
-                    }\r
-                }\r
-            }\r
-            addMessageToQueue(messageQueue, message);\r
-        }\r
-        finally {\r
-            triggerMessageQueue();\r
-        }\r
-    };\r
-    function handleRequest(requestMessage) {\r
-        if (isDisposed()) {\r
-            // we return here silently since we fired an event when the\r
-            // connection got disposed.\r
-            return;\r
-        }\r
-        function reply(resultOrError, method, startTime) {\r
-            let message = {\r
-                jsonrpc: version,\r
-                id: requestMessage.id\r
-            };\r
-            if (resultOrError instanceof messages_1.ResponseError) {\r
-                message.error = resultOrError.toJson();\r
-            }\r
-            else {\r
-                message.result = resultOrError === void 0 ? null : resultOrError;\r
-            }\r
-            traceSendingResponse(message, method, startTime);\r
-            messageWriter.write(message);\r
-        }\r
-        function replyError(error, method, startTime) {\r
-            let message = {\r
-                jsonrpc: version,\r
-                id: requestMessage.id,\r
-                error: error.toJson()\r
-            };\r
-            traceSendingResponse(message, method, startTime);\r
-            messageWriter.write(message);\r
-        }\r
-        function replySuccess(result, method, startTime) {\r
-            // The JSON RPC defines that a response must either have a result or an error\r
-            // So we can't treat undefined as a valid response result.\r
-            if (result === void 0) {\r
-                result = null;\r
-            }\r
-            let message = {\r
-                jsonrpc: version,\r
-                id: requestMessage.id,\r
-                result: result\r
-            };\r
-            traceSendingResponse(message, method, startTime);\r
-            messageWriter.write(message);\r
-        }\r
-        traceReceivedRequest(requestMessage);\r
-        let element = requestHandlers[requestMessage.method];\r
-        let type;\r
-        let requestHandler;\r
-        if (element) {\r
-            type = element.type;\r
-            requestHandler = element.handler;\r
-        }\r
-        let startTime = Date.now();\r
-        if (requestHandler || starRequestHandler) {\r
-            let cancellationSource = new cancellation_1.CancellationTokenSource();\r
-            let tokenKey = String(requestMessage.id);\r
-            requestTokens[tokenKey] = cancellationSource;\r
-            try {\r
-                let handlerResult;\r
-                if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r
-                    handlerResult = requestHandler\r
-                        ? requestHandler(cancellationSource.token)\r
-                        : starRequestHandler(requestMessage.method, cancellationSource.token);\r
-                }\r
-                else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {\r
-                    handlerResult = requestHandler\r
-                        ? requestHandler(...requestMessage.params, cancellationSource.token)\r
-                        : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);\r
-                }\r
-                else {\r
-                    handlerResult = requestHandler\r
-                        ? requestHandler(requestMessage.params, cancellationSource.token)\r
-                        : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);\r
-                }\r
-                let promise = handlerResult;\r
-                if (!handlerResult) {\r
-                    delete requestTokens[tokenKey];\r
-                    replySuccess(handlerResult, requestMessage.method, startTime);\r
-                }\r
-                else if (promise.then) {\r
-                    promise.then((resultOrError) => {\r
-                        delete requestTokens[tokenKey];\r
-                        reply(resultOrError, requestMessage.method, startTime);\r
-                    }, error => {\r
-                        delete requestTokens[tokenKey];\r
-                        if (error instanceof messages_1.ResponseError) {\r
-                            replyError(error, requestMessage.method, startTime);\r
-                        }\r
-                        else if (error && Is.string(error.message)) {\r
-                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\r
-                        }\r
-                        else {\r
-                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\r
-                        }\r
-                    });\r
-                }\r
-                else {\r
-                    delete requestTokens[tokenKey];\r
-                    reply(handlerResult, requestMessage.method, startTime);\r
-                }\r
-            }\r
-            catch (error) {\r
-                delete requestTokens[tokenKey];\r
-                if (error instanceof messages_1.ResponseError) {\r
-                    reply(error, requestMessage.method, startTime);\r
-                }\r
-                else if (error && Is.string(error.message)) {\r
-                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\r
-                }\r
-                else {\r
-                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\r
-                }\r
-            }\r
-        }\r
-        else {\r
-            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);\r
-        }\r
+    FoldingRange.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.number(candidate.startLine) && Is.number(candidate.startLine)\r
+            && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))\r
+            && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))\r
+            && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\r
     }\r
-    function handleResponse(responseMessage) {\r
-        if (isDisposed()) {\r
-            // See handle request.\r
-            return;\r
-        }\r
-        if (responseMessage.id === null) {\r
-            if (responseMessage.error) {\r
-                logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);\r
-            }\r
-            else {\r
-                logger.error(`Received response message without id. No further error information provided.`);\r
-            }\r
-        }\r
-        else {\r
-            let key = String(responseMessage.id);\r
-            let responsePromise = responsePromises[key];\r
-            traceReceivedResponse(responseMessage, responsePromise);\r
-            if (responsePromise) {\r
-                delete responsePromises[key];\r
-                try {\r
-                    if (responseMessage.error) {\r
-                        let error = responseMessage.error;\r
-                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\r
-                    }\r
-                    else if (responseMessage.result !== void 0) {\r
-                        responsePromise.resolve(responseMessage.result);\r
-                    }\r
-                    else {\r
-                        throw new Error('Should never happen.');\r
-                    }\r
-                }\r
-                catch (error) {\r
-                    if (error.message) {\r
-                        logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);\r
-                    }\r
-                    else {\r
-                        logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);\r
-                    }\r
-                }\r
-            }\r
-        }\r
+    FoldingRange.is = is;\r
+})(FoldingRange || (FoldingRange = {}));\r
+/**\r
+ * The DiagnosticRelatedInformation namespace provides helper functions to work with\r
+ * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\r
+ */\r
+var DiagnosticRelatedInformation;\r
+(function (DiagnosticRelatedInformation) {\r
+    /**\r
+     * Creates a new DiagnosticRelatedInformation literal.\r
+     */\r
+    function create(location, message) {\r
+        return {\r
+            location: location,\r
+            message: message\r
+        };\r
     }\r
-    function handleNotification(message) {\r
-        if (isDisposed()) {\r
-            // See handle request.\r
-            return;\r
-        }\r
-        let type = undefined;\r
-        let notificationHandler;\r
-        if (message.method === CancelNotification.type.method) {\r
-            notificationHandler = (params) => {\r
-                let id = params.id;\r
-                let source = requestTokens[String(id)];\r
-                if (source) {\r
-                    source.cancel();\r
-                }\r
-            };\r
-        }\r
-        else {\r
-            let element = notificationHandlers[message.method];\r
-            if (element) {\r
-                notificationHandler = element.handler;\r
-                type = element.type;\r
-            }\r
-        }\r
-        if (notificationHandler || starNotificationHandler) {\r
-            try {\r
-                traceReceivedNotification(message);\r
-                if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {\r
-                    notificationHandler ? notificationHandler() : starNotificationHandler(message.method);\r
-                }\r
-                else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {\r
-                    notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);\r
-                }\r
-                else {\r
-                    notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);\r
-                }\r
-            }\r
-            catch (error) {\r
-                if (error.message) {\r
-                    logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);\r
-                }\r
-                else {\r
-                    logger.error(`Notification handler '${message.method}' failed unexpectedly.`);\r
-                }\r
-            }\r
-        }\r
-        else {\r
-            unhandledNotificationEmitter.fire(message);\r
-        }\r
+    DiagnosticRelatedInformation.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\r
     }\r
-    function handleInvalidMessage(message) {\r
-        if (!message) {\r
-            logger.error('Received empty message.');\r
-            return;\r
-        }\r
-        logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);\r
-        // Test whether we find an id to reject the promise\r
-        let responseMessage = message;\r
-        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {\r
-            let key = String(responseMessage.id);\r
-            let responseHandler = responsePromises[key];\r
-            if (responseHandler) {\r
-                responseHandler.reject(new Error('The received response has neither a result nor an error property.'));\r
-            }\r
+    DiagnosticRelatedInformation.is = is;\r
+})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\r
+/**\r
+ * The diagnostic's severity.\r
+ */\r
+var DiagnosticSeverity;\r
+(function (DiagnosticSeverity) {\r
+    /**\r
+     * Reports an error.\r
+     */\r
+    DiagnosticSeverity.Error = 1;\r
+    /**\r
+     * Reports a warning.\r
+     */\r
+    DiagnosticSeverity.Warning = 2;\r
+    /**\r
+     * Reports an information.\r
+     */\r
+    DiagnosticSeverity.Information = 3;\r
+    /**\r
+     * Reports a hint.\r
+     */\r
+    DiagnosticSeverity.Hint = 4;\r
+})(DiagnosticSeverity || (DiagnosticSeverity = {}));\r
+/**\r
+ * The diagnostic tags.\r
+ *\r
+ * @since 3.15.0\r
+ */\r
+var DiagnosticTag;\r
+(function (DiagnosticTag) {\r
+    /**\r
+     * Unused or unnecessary code.\r
+     *\r
+     * Clients are allowed to render diagnostics with this tag faded out instead of having\r
+     * an error squiggle.\r
+     */\r
+    DiagnosticTag.Unnecessary = 1;\r
+    /**\r
+     * Deprecated or obsolete code.\r
+     *\r
+     * Clients are allowed to rendered diagnostics with this tag strike through.\r
+     */\r
+    DiagnosticTag.Deprecated = 2;\r
+})(DiagnosticTag || (DiagnosticTag = {}));\r
+/**\r
+ * The Diagnostic namespace provides helper functions to work with\r
+ * [Diagnostic](#Diagnostic) literals.\r
+ */\r
+var Diagnostic;\r
+(function (Diagnostic) {\r
+    /**\r
+     * Creates a new Diagnostic literal.\r
+     */\r
+    function create(range, message, severity, code, source, relatedInformation) {\r
+        var result = { range: range, message: message };\r
+        if (Is.defined(severity)) {\r
+            result.severity = severity;\r
         }\r
-    }\r
-    function traceSendingRequest(message) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
+        if (Is.defined(code)) {\r
+            result.code = code;\r
         }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose && message.params) {\r
-                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-            }\r
-            tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);\r
+        if (Is.defined(source)) {\r
+            result.source = source;\r
         }\r
-        else {\r
-            logLSPMessage('send-request', message);\r
+        if (Is.defined(relatedInformation)) {\r
+            result.relatedInformation = relatedInformation;\r
         }\r
+        return result;\r
     }\r
-    function traceSendingNotification(message) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.params) {\r
-                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    data = 'No parameters provided.\n\n';\r
-                }\r
-            }\r
-            tracer.log(`Sending notification '${message.method}'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('send-notification', message);\r
-        }\r
+    Diagnostic.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate)\r
+            && Range.is(candidate.range)\r
+            && Is.string(candidate.message)\r
+            && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\r
+            && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\r
+            && (Is.string(candidate.source) || Is.undefined(candidate.source))\r
+            && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\r
     }\r
-    function traceSendingResponse(message, method, startTime) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.error && message.error.data) {\r
-                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    if (message.result) {\r
-                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;\r
-                    }\r
-                    else if (message.error === void 0) {\r
-                        data = 'No result returned.\n\n';\r
-                    }\r
-                }\r
-            }\r
-            tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);\r
+    Diagnostic.is = is;\r
+})(Diagnostic || (Diagnostic = {}));\r
+/**\r
+ * The Command namespace provides helper functions to work with\r
+ * [Command](#Command) literals.\r
+ */\r
+var Command;\r
+(function (Command) {\r
+    /**\r
+     * Creates a new Command literal.\r
+     */\r
+    function create(title, command) {\r
+        var args = [];\r
+        for (var _i = 2; _i < arguments.length; _i++) {\r
+            args[_i - 2] = arguments[_i];\r
         }\r
-        else {\r
-            logLSPMessage('send-response', message);\r
+        var result = { title: title, command: command };\r
+        if (Is.defined(args) && args.length > 0) {\r
+            result.arguments = args;\r
         }\r
+        return result;\r
     }\r
-    function traceReceivedRequest(message) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose && message.params) {\r
-                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-            }\r
-            tracer.log(`Received request '${message.method} - (${message.id})'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('receive-request', message);\r
-        }\r
+    Command.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [Command](#Command) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\r
     }\r
-    function traceReceivedNotification(message) {\r
-        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.params) {\r
-                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    data = 'No parameters provided.\n\n';\r
-                }\r
-            }\r
-            tracer.log(`Received notification '${message.method}'.`, data);\r
-        }\r
-        else {\r
-            logLSPMessage('receive-notification', message);\r
-        }\r
+    Command.is = is;\r
+})(Command || (Command = {}));\r
+/**\r
+ * The TextEdit namespace provides helper function to create replace,\r
+ * insert and delete edits more easily.\r
+ */\r
+var TextEdit;\r
+(function (TextEdit) {\r
+    /**\r
+     * Creates a replace text edit.\r
+     * @param range The range of text to be replaced.\r
+     * @param newText The new text.\r
+     */\r
+    function replace(range, newText) {\r
+        return { range: range, newText: newText };\r
     }\r
-    function traceReceivedResponse(message, responsePromise) {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        if (traceFormat === TraceFormat.Text) {\r
-            let data = undefined;\r
-            if (trace === Trace.Verbose) {\r
-                if (message.error && message.error.data) {\r
-                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;\r
-                }\r
-                else {\r
-                    if (message.result) {\r
-                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;\r
-                    }\r
-                    else if (message.error === void 0) {\r
-                        data = 'No result returned.\n\n';\r
-                    }\r
-                }\r
-            }\r
-            if (responsePromise) {\r
-                let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';\r
-                tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);\r
-            }\r
-            else {\r
-                tracer.log(`Received response ${message.id} without active response promise.`, data);\r
-            }\r
-        }\r
-        else {\r
-            logLSPMessage('receive-response', message);\r
-        }\r
+    TextEdit.replace = replace;\r
+    /**\r
+     * Creates a insert text edit.\r
+     * @param position The position to insert the text at.\r
+     * @param newText The text to be inserted.\r
+     */\r
+    function insert(position, newText) {\r
+        return { range: { start: position, end: position }, newText: newText };\r
     }\r
-    function logLSPMessage(type, message) {\r
-        if (!tracer || trace === Trace.Off) {\r
-            return;\r
-        }\r
-        const lspMessage = {\r
-            isLSPMessage: true,\r
-            type,\r
-            message,\r
-            timestamp: Date.now()\r
-        };\r
-        tracer.log(lspMessage);\r
+    TextEdit.insert = insert;\r
+    /**\r
+     * Creates a delete text edit.\r
+     * @param range The range of text to be deleted.\r
+     */\r
+    function del(range) {\r
+        return { range: range, newText: '' };\r
     }\r
-    function throwIfClosedOrDisposed() {\r
-        if (isClosed()) {\r
-            throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');\r
-        }\r
-        if (isDisposed()) {\r
-            throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');\r
-        }\r
+    TextEdit.del = del;\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.objectLiteral(candidate)\r
+            && Is.string(candidate.newText)\r
+            && Range.is(candidate.range);\r
     }\r
-    function throwIfListening() {\r
-        if (isListening()) {\r
-            throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');\r
-        }\r
+    TextEdit.is = is;\r
+})(TextEdit || (TextEdit = {}));\r
+/**\r
+ * The TextDocumentEdit namespace provides helper function to create\r
+ * an edit that manipulates a text document.\r
+ */\r
+var TextDocumentEdit;\r
+(function (TextDocumentEdit) {\r
+    /**\r
+     * Creates a new `TextDocumentEdit`\r
+     */\r
+    function create(textDocument, edits) {\r
+        return { textDocument: textDocument, edits: edits };\r
     }\r
-    function throwIfNotListening() {\r
-        if (!isListening()) {\r
-            throw new Error('Call listen() first.');\r
-        }\r
+    TextDocumentEdit.create = create;\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate)\r
+            && VersionedTextDocumentIdentifier.is(candidate.textDocument)\r
+            && Array.isArray(candidate.edits);\r
     }\r
-    function undefinedToNull(param) {\r
-        if (param === void 0) {\r
-            return null;\r
+    TextDocumentEdit.is = is;\r
+})(TextDocumentEdit || (TextDocumentEdit = {}));\r
+var CreateFile;\r
+(function (CreateFile) {\r
+    function create(uri, options) {\r
+        var result = {\r
+            kind: 'create',\r
+            uri: uri\r
+        };\r
+        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {\r
+            result.options = options;\r
         }\r
-        else {\r
-            return param;\r
+        return result;\r
+    }\r
+    CreateFile.create = create;\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&\r
+            (candidate.options === void 0 ||\r
+                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));\r
+    }\r
+    CreateFile.is = is;\r
+})(CreateFile || (CreateFile = {}));\r
+var RenameFile;\r
+(function (RenameFile) {\r
+    function create(oldUri, newUri, options) {\r
+        var result = {\r
+            kind: 'rename',\r
+            oldUri: oldUri,\r
+            newUri: newUri\r
+        };\r
+        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {\r
+            result.options = options;\r
         }\r
+        return result;\r
     }\r
-    function computeMessageParams(type, params) {\r
-        let result;\r
-        let numberOfParams = type.numberOfParams;\r
-        switch (numberOfParams) {\r
-            case 0:\r
-                result = null;\r
-                break;\r
-            case 1:\r
-                result = undefinedToNull(params[0]);\r
-                break;\r
-            default:\r
-                result = [];\r
-                for (let i = 0; i < params.length && i < numberOfParams; i++) {\r
-                    result.push(undefinedToNull(params[i]));\r
-                }\r
-                if (params.length < numberOfParams) {\r
-                    for (let i = params.length; i < numberOfParams; i++) {\r
-                        result.push(null);\r
-                    }\r
-                }\r
-                break;\r
+    RenameFile.create = create;\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&\r
+            (candidate.options === void 0 ||\r
+                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));\r
+    }\r
+    RenameFile.is = is;\r
+})(RenameFile || (RenameFile = {}));\r
+var DeleteFile;\r
+(function (DeleteFile) {\r
+    function create(uri, options) {\r
+        var result = {\r
+            kind: 'delete',\r
+            uri: uri\r
+        };\r
+        if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {\r
+            result.options = options;\r
         }\r
         return result;\r
     }\r
-    let connection = {\r
-        sendNotification: (type, ...params) => {\r
-            throwIfClosedOrDisposed();\r
-            let method;\r
-            let messageParams;\r
-            if (Is.string(type)) {\r
-                method = type;\r
-                switch (params.length) {\r
-                    case 0:\r
-                        messageParams = null;\r
-                        break;\r
-                    case 1:\r
-                        messageParams = params[0];\r
-                        break;\r
-                    default:\r
-                        messageParams = params;\r
-                        break;\r
-                }\r
-            }\r
-            else {\r
-                method = type.method;\r
-                messageParams = computeMessageParams(type, params);\r
-            }\r
-            let notificationMessage = {\r
-                jsonrpc: version,\r
-                method: method,\r
-                params: messageParams\r
-            };\r
-            traceSendingNotification(notificationMessage);\r
-            messageWriter.write(notificationMessage);\r
-        },\r
-        onNotification: (type, handler) => {\r
-            throwIfClosedOrDisposed();\r
-            if (Is.func(type)) {\r
-                starNotificationHandler = type;\r
-            }\r
-            else if (handler) {\r
-                if (Is.string(type)) {\r
-                    notificationHandlers[type] = { type: undefined, handler };\r
-                }\r
-                else {\r
-                    notificationHandlers[type.method] = { type, handler };\r
-                }\r
-            }\r
-        },\r
-        sendRequest: (type, ...params) => {\r
-            throwIfClosedOrDisposed();\r
-            throwIfNotListening();\r
-            let method;\r
-            let messageParams;\r
-            let token = undefined;\r
-            if (Is.string(type)) {\r
-                method = type;\r
-                switch (params.length) {\r
-                    case 0:\r
-                        messageParams = null;\r
-                        break;\r
-                    case 1:\r
-                        // The cancellation token is optional so it can also be undefined.\r
-                        if (cancellation_1.CancellationToken.is(params[0])) {\r
-                            messageParams = null;\r
-                            token = params[0];\r
-                        }\r
-                        else {\r
-                            messageParams = undefinedToNull(params[0]);\r
-                        }\r
-                        break;\r
-                    default:\r
-                        const last = params.length - 1;\r
-                        if (cancellation_1.CancellationToken.is(params[last])) {\r
-                            token = params[last];\r
-                            if (params.length === 2) {\r
-                                messageParams = undefinedToNull(params[0]);\r
-                            }\r
-                            else {\r
-                                messageParams = params.slice(0, last).map(value => undefinedToNull(value));\r
-                            }\r
-                        }\r
-                        else {\r
-                            messageParams = params.map(value => undefinedToNull(value));\r
-                        }\r
-                        break;\r
-                }\r
-            }\r
-            else {\r
-                method = type.method;\r
-                messageParams = computeMessageParams(type, params);\r
-                let numberOfParams = type.numberOfParams;\r
-                token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;\r
-            }\r
-            let id = sequenceNumber++;\r
-            let result = new Promise((resolve, reject) => {\r
-                let requestMessage = {\r
-                    jsonrpc: version,\r
-                    id: id,\r
-                    method: method,\r
-                    params: messageParams\r
-                };\r
-                let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };\r
-                traceSendingRequest(requestMessage);\r
-                try {\r
-                    messageWriter.write(requestMessage);\r
-                }\r
-                catch (e) {\r
-                    // Writing the message failed. So we need to reject the promise.\r
-                    responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));\r
-                    responsePromise = null;\r
-                }\r
-                if (responsePromise) {\r
-                    responsePromises[String(id)] = responsePromise;\r
-                }\r
-            });\r
-            if (token) {\r
-                token.onCancellationRequested(() => {\r
-                    connection.sendNotification(CancelNotification.type, { id });\r
-                });\r
-            }\r
-            return result;\r
-        },\r
-        onRequest: (type, handler) => {\r
-            throwIfClosedOrDisposed();\r
-            if (Is.func(type)) {\r
-                starRequestHandler = type;\r
-            }\r
-            else if (handler) {\r
-                if (Is.string(type)) {\r
-                    requestHandlers[type] = { type: undefined, handler };\r
-                }\r
-                else {\r
-                    requestHandlers[type.method] = { type, handler };\r
-                }\r
-            }\r
-        },\r
-        trace: (_value, _tracer, sendNotificationOrTraceOptions) => {\r
-            let _sendNotification = false;\r
-            let _traceFormat = TraceFormat.Text;\r
-            if (sendNotificationOrTraceOptions !== void 0) {\r
-                if (Is.boolean(sendNotificationOrTraceOptions)) {\r
-                    _sendNotification = sendNotificationOrTraceOptions;\r
+    DeleteFile.create = create;\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&\r
+            (candidate.options === void 0 ||\r
+                ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));\r
+    }\r
+    DeleteFile.is = is;\r
+})(DeleteFile || (DeleteFile = {}));\r
+var WorkspaceEdit;\r
+(function (WorkspaceEdit) {\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate &&\r
+            (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&\r
+            (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {\r
+                if (Is.string(change.kind)) {\r
+                    return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\r
                 }\r
                 else {\r
-                    _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;\r
-                    _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;\r
+                    return TextDocumentEdit.is(change);\r
                 }\r
-            }\r
-            trace = _value;\r
-            traceFormat = _traceFormat;\r
-            if (trace === Trace.Off) {\r
-                tracer = undefined;\r
-            }\r
-            else {\r
-                tracer = _tracer;\r
-            }\r
-            if (_sendNotification && !isClosed() && !isDisposed()) {\r
-                connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });\r
-            }\r
-        },\r
-        onError: errorEmitter.event,\r
-        onClose: closeEmitter.event,\r
-        onUnhandledNotification: unhandledNotificationEmitter.event,\r
-        onDispose: disposeEmitter.event,\r
-        dispose: () => {\r
-            if (isDisposed()) {\r
-                return;\r
-            }\r
-            state = ConnectionState.Disposed;\r
-            disposeEmitter.fire(undefined);\r
-            let error = new Error('Connection got disposed.');\r
-            Object.keys(responsePromises).forEach((key) => {\r
-                responsePromises[key].reject(error);\r
-            });\r
-            responsePromises = Object.create(null);\r
-            requestTokens = Object.create(null);\r
-            messageQueue = new linkedMap_1.LinkedMap();\r
-            // Test for backwards compatibility\r
-            if (Is.func(messageWriter.dispose)) {\r
-                messageWriter.dispose();\r
-            }\r
-            if (Is.func(messageReader.dispose)) {\r
-                messageReader.dispose();\r
-            }\r
-        },\r
-        listen: () => {\r
-            throwIfClosedOrDisposed();\r
-            throwIfListening();\r
-            state = ConnectionState.Listening;\r
-            messageReader.listen(callback);\r
-        },\r
-        inspect: () => {\r
-            console.log("inspect");\r
-        }\r
-    };\r
-    connection.onNotification(LogTraceNotification.type, (params) => {\r
-        if (trace === Trace.Off || !tracer) {\r
-            return;\r
-        }\r
-        tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);\r
-    });\r
-    return connection;\r
-}\r
-function isMessageReader(value) {\r
-    return value.listen !== void 0 && value.read === void 0;\r
-}\r
-function isMessageWriter(value) {\r
-    return value.write !== void 0 && value.end === void 0;\r
-}\r
-function createMessageConnection(input, output, logger, strategy) {\r
-    if (!logger) {\r
-        logger = exports.NullLogger;\r
+            }));\r
     }\r
-    let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);\r
-    let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);\r
-    return _createMessageConnection(reader, writer, logger, strategy);\r
-}\r
-exports.createMessageConnection = createMessageConnection;\r
-
-
-/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-function boolean(value) {\r
-    return value === true || value === false;\r
-}\r
-exports.boolean = boolean;\r
-function string(value) {\r
-    return typeof value === 'string' || value instanceof String;\r
-}\r
-exports.string = string;\r
-function number(value) {\r
-    return typeof value === 'number' || value instanceof Number;\r
-}\r
-exports.number = number;\r
-function error(value) {\r
-    return value instanceof Error;\r
-}\r
-exports.error = error;\r
-function func(value) {\r
-    return typeof value === 'function';\r
-}\r
-exports.func = func;\r
-function array(value) {\r
-    return Array.isArray(value);\r
-}\r
-exports.array = array;\r
-function stringArray(value) {\r
-    return array(value) && value.every(elem => string(elem));\r
-}\r
-exports.stringArray = stringArray;\r
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const is = __webpack_require__(5);\r
+    WorkspaceEdit.is = is;\r
+})(WorkspaceEdit || (WorkspaceEdit = {}));\r
+var TextEditChangeImpl = /** @class */ (function () {\r
+    function TextEditChangeImpl(edits) {\r
+        this.edits = edits;\r
+    }\r
+    TextEditChangeImpl.prototype.insert = function (position, newText) {\r
+        this.edits.push(TextEdit.insert(position, newText));\r
+    };\r
+    TextEditChangeImpl.prototype.replace = function (range, newText) {\r
+        this.edits.push(TextEdit.replace(range, newText));\r
+    };\r
+    TextEditChangeImpl.prototype.delete = function (range) {\r
+        this.edits.push(TextEdit.del(range));\r
+    };\r
+    TextEditChangeImpl.prototype.add = function (edit) {\r
+        this.edits.push(edit);\r
+    };\r
+    TextEditChangeImpl.prototype.all = function () {\r
+        return this.edits;\r
+    };\r
+    TextEditChangeImpl.prototype.clear = function () {\r
+        this.edits.splice(0, this.edits.length);\r
+    };\r
+    return TextEditChangeImpl;\r
+}());\r
 /**\r
- * Predefined error codes.\r
+ * A workspace change helps constructing changes to a workspace.\r
  */\r
-var ErrorCodes;\r
-(function (ErrorCodes) {\r
-    // Defined by JSON RPC\r
-    ErrorCodes.ParseError = -32700;\r
-    ErrorCodes.InvalidRequest = -32600;\r
-    ErrorCodes.MethodNotFound = -32601;\r
-    ErrorCodes.InvalidParams = -32602;\r
-    ErrorCodes.InternalError = -32603;\r
-    ErrorCodes.serverErrorStart = -32099;\r
-    ErrorCodes.serverErrorEnd = -32000;\r
-    ErrorCodes.ServerNotInitialized = -32002;\r
-    ErrorCodes.UnknownErrorCode = -32001;\r
-    // Defined by the protocol.\r
-    ErrorCodes.RequestCancelled = -32800;\r
-    ErrorCodes.ContentModified = -32801;\r
-    // Defined by VSCode library.\r
-    ErrorCodes.MessageWriteError = 1;\r
-    ErrorCodes.MessageReadError = 2;\r
-})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));\r
+var WorkspaceChange = /** @class */ (function () {\r
+    function WorkspaceChange(workspaceEdit) {\r
+        var _this = this;\r
+        this._textEditChanges = Object.create(null);\r
+        if (workspaceEdit) {\r
+            this._workspaceEdit = workspaceEdit;\r
+            if (workspaceEdit.documentChanges) {\r
+                workspaceEdit.documentChanges.forEach(function (change) {\r
+                    if (TextDocumentEdit.is(change)) {\r
+                        var textEditChange = new TextEditChangeImpl(change.edits);\r
+                        _this._textEditChanges[change.textDocument.uri] = textEditChange;\r
+                    }\r
+                });\r
+            }\r
+            else if (workspaceEdit.changes) {\r
+                Object.keys(workspaceEdit.changes).forEach(function (key) {\r
+                    var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\r
+                    _this._textEditChanges[key] = textEditChange;\r
+                });\r
+            }\r
+        }\r
+    }\r
+    Object.defineProperty(WorkspaceChange.prototype, "edit", {\r
+        /**\r
+         * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\r
+         * use to be returned from a workspace edit operation like rename.\r
+         */\r
+        get: function () {\r
+            return this._workspaceEdit;\r
+        },\r
+        enumerable: true,\r
+        configurable: true\r
+    });\r
+    WorkspaceChange.prototype.getTextEditChange = function (key) {\r
+        if (VersionedTextDocumentIdentifier.is(key)) {\r
+            if (!this._workspaceEdit) {\r
+                this._workspaceEdit = {\r
+                    documentChanges: []\r
+                };\r
+            }\r
+            if (!this._workspaceEdit.documentChanges) {\r
+                throw new Error('Workspace edit is not configured for document changes.');\r
+            }\r
+            var textDocument = key;\r
+            var result = this._textEditChanges[textDocument.uri];\r
+            if (!result) {\r
+                var edits = [];\r
+                var textDocumentEdit = {\r
+                    textDocument: textDocument,\r
+                    edits: edits\r
+                };\r
+                this._workspaceEdit.documentChanges.push(textDocumentEdit);\r
+                result = new TextEditChangeImpl(edits);\r
+                this._textEditChanges[textDocument.uri] = result;\r
+            }\r
+            return result;\r
+        }\r
+        else {\r
+            if (!this._workspaceEdit) {\r
+                this._workspaceEdit = {\r
+                    changes: Object.create(null)\r
+                };\r
+            }\r
+            if (!this._workspaceEdit.changes) {\r
+                throw new Error('Workspace edit is not configured for normal text edit changes.');\r
+            }\r
+            var result = this._textEditChanges[key];\r
+            if (!result) {\r
+                var edits = [];\r
+                this._workspaceEdit.changes[key] = edits;\r
+                result = new TextEditChangeImpl(edits);\r
+                this._textEditChanges[key] = result;\r
+            }\r
+            return result;\r
+        }\r
+    };\r
+    WorkspaceChange.prototype.createFile = function (uri, options) {\r
+        this.checkDocumentChanges();\r
+        this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));\r
+    };\r
+    WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {\r
+        this.checkDocumentChanges();\r
+        this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));\r
+    };\r
+    WorkspaceChange.prototype.deleteFile = function (uri, options) {\r
+        this.checkDocumentChanges();\r
+        this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));\r
+    };\r
+    WorkspaceChange.prototype.checkDocumentChanges = function () {\r
+        if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {\r
+            throw new Error('Workspace edit is not configured for document changes.');\r
+        }\r
+    };\r
+    return WorkspaceChange;\r
+}());\r
+\r
 /**\r
- * An error object return in a response in case a request\r
- * has failed.\r
+ * The TextDocumentIdentifier namespace provides helper functions to work with\r
+ * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\r
  */\r
-class ResponseError extends Error {\r
-    constructor(code, message, data) {\r
-        super(message);\r
-        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;\r
-        this.data = data;\r
-        Object.setPrototypeOf(this, ResponseError.prototype);\r
+var TextDocumentIdentifier;\r
+(function (TextDocumentIdentifier) {\r
+    /**\r
+     * Creates a new TextDocumentIdentifier literal.\r
+     * @param uri The document's uri.\r
+     */\r
+    function create(uri) {\r
+        return { uri: uri };\r
     }\r
-    toJson() {\r
-        return {\r
-            code: this.code,\r
-            message: this.message,\r
-            data: this.data,\r
-        };\r
+    TextDocumentIdentifier.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.string(candidate.uri);\r
     }\r
-}\r
-exports.ResponseError = ResponseError;\r
+    TextDocumentIdentifier.is = is;\r
+})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\r
 /**\r
- * An abstract implementation of a MessageType.\r
+ * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\r
+ * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\r
  */\r
-class AbstractMessageType {\r
-    constructor(_method, _numberOfParams) {\r
-        this._method = _method;\r
-        this._numberOfParams = _numberOfParams;\r
-    }\r
-    get method() {\r
-        return this._method;\r
+var VersionedTextDocumentIdentifier;\r
+(function (VersionedTextDocumentIdentifier) {\r
+    /**\r
+     * Creates a new VersionedTextDocumentIdentifier literal.\r
+     * @param uri The document's uri.\r
+     * @param uri The document's text.\r
+     */\r
+    function create(uri, version) {\r
+        return { uri: uri, version: version };\r
     }\r
-    get numberOfParams() {\r
-        return this._numberOfParams;\r
+    VersionedTextDocumentIdentifier.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));\r
     }\r
-}\r
-exports.AbstractMessageType = AbstractMessageType;\r
+    VersionedTextDocumentIdentifier.is = is;\r
+})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\r
 /**\r
- * Classes to type request response pairs\r
+ * The TextDocumentItem namespace provides helper functions to work with\r
+ * [TextDocumentItem](#TextDocumentItem) literals.\r
  */\r
-class RequestType0 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 0);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType0 = RequestType0;\r
-class RequestType extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType = RequestType;\r
-class RequestType1 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType1 = RequestType1;\r
-class RequestType2 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 2);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType2 = RequestType2;\r
-class RequestType3 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 3);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType3 = RequestType3;\r
-class RequestType4 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 4);\r
-        this._ = undefined;\r
+var TextDocumentItem;\r
+(function (TextDocumentItem) {\r
+    /**\r
+     * Creates a new TextDocumentItem literal.\r
+     * @param uri The document's uri.\r
+     * @param languageId The document's language identifier.\r
+     * @param version The document's version number.\r
+     * @param text The document's text.\r
+     */\r
+    function create(uri, languageId, version, text) {\r
+        return { uri: uri, languageId: languageId, version: version, text: text };\r
     }\r
-}\r
-exports.RequestType4 = RequestType4;\r
-class RequestType5 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 5);\r
-        this._ = undefined;\r
+    TextDocumentItem.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);\r
     }\r
-}\r
-exports.RequestType5 = RequestType5;\r
-class RequestType6 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 6);\r
-        this._ = undefined;\r
+    TextDocumentItem.is = is;\r
+})(TextDocumentItem || (TextDocumentItem = {}));\r
+/**\r
+ * Describes the content type that a client supports in various\r
+ * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\r
+ *\r
+ * Please note that `MarkupKinds` must not start with a `$`. This kinds\r
+ * are reserved for internal usage.\r
+ */\r
+var MarkupKind;\r
+(function (MarkupKind) {\r
+    /**\r
+     * Plain text is supported as a content format\r
+     */\r
+    MarkupKind.PlainText = 'plaintext';\r
+    /**\r
+     * Markdown is supported as a content format\r
+     */\r
+    MarkupKind.Markdown = 'markdown';\r
+})(MarkupKind || (MarkupKind = {}));\r
+(function (MarkupKind) {\r
+    /**\r
+     * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\r
     }\r
-}\r
-exports.RequestType6 = RequestType6;\r
-class RequestType7 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 7);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType7 = RequestType7;\r
-class RequestType8 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 8);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType8 = RequestType8;\r
-class RequestType9 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 9);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.RequestType9 = RequestType9;\r
-class NotificationType extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType = NotificationType;\r
-class NotificationType0 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 0);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType0 = NotificationType0;\r
-class NotificationType1 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 1);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType1 = NotificationType1;\r
-class NotificationType2 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 2);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType2 = NotificationType2;\r
-class NotificationType3 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 3);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType3 = NotificationType3;\r
-class NotificationType4 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 4);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType4 = NotificationType4;\r
-class NotificationType5 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 5);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType5 = NotificationType5;\r
-class NotificationType6 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 6);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType6 = NotificationType6;\r
-class NotificationType7 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 7);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType7 = NotificationType7;\r
-class NotificationType8 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 8);\r
-        this._ = undefined;\r
-    }\r
-}\r
-exports.NotificationType8 = NotificationType8;\r
-class NotificationType9 extends AbstractMessageType {\r
-    constructor(method) {\r
-        super(method, 9);\r
-        this._ = undefined;\r
+    MarkupKind.is = is;\r
+})(MarkupKind || (MarkupKind = {}));\r
+var MarkupContent;\r
+(function (MarkupContent) {\r
+    /**\r
+     * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r
     }\r
-}\r
-exports.NotificationType9 = NotificationType9;\r
+    MarkupContent.is = is;\r
+})(MarkupContent || (MarkupContent = {}));\r
 /**\r
- * Tests if the given message is a request message\r
+ * The kind of a completion entry.\r
  */\r
-function isRequestMessage(message) {\r
-    let candidate = message;\r
-    return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\r
-}\r
-exports.isRequestMessage = isRequestMessage;\r
+var CompletionItemKind;\r
+(function (CompletionItemKind) {\r
+    CompletionItemKind.Text = 1;\r
+    CompletionItemKind.Method = 2;\r
+    CompletionItemKind.Function = 3;\r
+    CompletionItemKind.Constructor = 4;\r
+    CompletionItemKind.Field = 5;\r
+    CompletionItemKind.Variable = 6;\r
+    CompletionItemKind.Class = 7;\r
+    CompletionItemKind.Interface = 8;\r
+    CompletionItemKind.Module = 9;\r
+    CompletionItemKind.Property = 10;\r
+    CompletionItemKind.Unit = 11;\r
+    CompletionItemKind.Value = 12;\r
+    CompletionItemKind.Enum = 13;\r
+    CompletionItemKind.Keyword = 14;\r
+    CompletionItemKind.Snippet = 15;\r
+    CompletionItemKind.Color = 16;\r
+    CompletionItemKind.File = 17;\r
+    CompletionItemKind.Reference = 18;\r
+    CompletionItemKind.Folder = 19;\r
+    CompletionItemKind.EnumMember = 20;\r
+    CompletionItemKind.Constant = 21;\r
+    CompletionItemKind.Struct = 22;\r
+    CompletionItemKind.Event = 23;\r
+    CompletionItemKind.Operator = 24;\r
+    CompletionItemKind.TypeParameter = 25;\r
+})(CompletionItemKind || (CompletionItemKind = {}));\r
 /**\r
- * Tests if the given message is a notification message\r
+ * Defines whether the insert text in a completion item should be interpreted as\r
+ * plain text or a snippet.\r
  */\r
-function isNotificationMessage(message) {\r
-    let candidate = message;\r
-    return candidate && is.string(candidate.method) && message.id === void 0;\r
-}\r
-exports.isNotificationMessage = isNotificationMessage;\r
+var InsertTextFormat;\r
+(function (InsertTextFormat) {\r
+    /**\r
+     * The primary text to be inserted is treated as a plain string.\r
+     */\r
+    InsertTextFormat.PlainText = 1;\r
+    /**\r
+     * The primary text to be inserted is treated as a snippet.\r
+     *\r
+     * A snippet can define tab stops and placeholders with `$1`, `$2`\r
+     * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\r
+     * the end of the snippet. Placeholders with equal identifiers are linked,\r
+     * that is typing in one will update others too.\r
+     *\r
+     * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md\r
+     */\r
+    InsertTextFormat.Snippet = 2;\r
+})(InsertTextFormat || (InsertTextFormat = {}));\r
 /**\r
- * Tests if the given message is a response message\r
+ * Completion item tags are extra annotations that tweak the rendering of a completion\r
+ * item.\r
+ *\r
+ * @since 3.15.0\r
  */\r
-function isResponseMessage(message) {\r
-    let candidate = message;\r
-    return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\r
-}\r
-exports.isResponseMessage = isResponseMessage;\r
-
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const events_1 = __webpack_require__(8);\r
-const Is = __webpack_require__(5);\r
-let DefaultSize = 8192;\r
-let CR = Buffer.from('\r', 'ascii')[0];\r
-let LF = Buffer.from('\n', 'ascii')[0];\r
-let CRLF = '\r\n';\r
-class MessageBuffer {\r
-    constructor(encoding = 'utf8') {\r
-        this.encoding = encoding;\r
-        this.index = 0;\r
-        this.buffer = Buffer.allocUnsafe(DefaultSize);\r
-    }\r
-    append(chunk) {\r
-        var toAppend = chunk;\r
-        if (typeof (chunk) === 'string') {\r
-            var str = chunk;\r
-            var bufferLen = Buffer.byteLength(str, this.encoding);\r
-            toAppend = Buffer.allocUnsafe(bufferLen);\r
-            toAppend.write(str, 0, bufferLen, this.encoding);\r
-        }\r
-        if (this.buffer.length - this.index >= toAppend.length) {\r
-            toAppend.copy(this.buffer, this.index, 0, toAppend.length);\r
-        }\r
-        else {\r
-            var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;\r
-            if (this.index === 0) {\r
-                this.buffer = Buffer.allocUnsafe(newSize);\r
-                toAppend.copy(this.buffer, 0, 0, toAppend.length);\r
-            }\r
-            else {\r
-                this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);\r
-            }\r
-        }\r
-        this.index += toAppend.length;\r
-    }\r
-    tryReadHeaders() {\r
-        let result = undefined;\r
-        let current = 0;\r
-        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
-            current++;\r
-        }\r
-        // No header / body separator found (e.g CRLFCRLF)\r
-        if (current + 3 >= this.index) {\r
-            return result;\r
-        }\r
-        result = Object.create(null);\r
-        let headers = this.buffer.toString('ascii', 0, current).split(CRLF);\r
-        headers.forEach((header) => {\r
-            let index = header.indexOf(':');\r
-            if (index === -1) {\r
-                throw new Error('Message header must separate key and value using :');\r
-            }\r
-            let key = header.substr(0, index);\r
-            let value = header.substr(index + 1).trim();\r
-            result[key] = value;\r
-        });\r
-        let nextStart = current + 4;\r
-        this.buffer = this.buffer.slice(nextStart);\r
-        this.index = this.index - nextStart;\r
-        return result;\r
+var CompletionItemTag;\r
+(function (CompletionItemTag) {\r
+    /**\r
+     * Render a completion as obsolete, usually using a strike-out.\r
+     */\r
+    CompletionItemTag.Deprecated = 1;\r
+})(CompletionItemTag || (CompletionItemTag = {}));\r
+/**\r
+ * The CompletionItem namespace provides functions to deal with\r
+ * completion items.\r
+ */\r
+var CompletionItem;\r
+(function (CompletionItem) {\r
+    /**\r
+     * Create a completion item and seed it with a label.\r
+     * @param label The completion item's label\r
+     */\r
+    function create(label) {\r
+        return { label: label };\r
     }\r
-    tryReadContent(length) {\r
-        if (this.index < length) {\r
-            return null;\r
-        }\r
-        let result = this.buffer.toString(this.encoding, 0, length);\r
-        let nextStart = length;\r
-        this.buffer.copy(this.buffer, 0, nextStart);\r
-        this.index = this.index - nextStart;\r
-        return result;\r
+    CompletionItem.create = create;\r
+})(CompletionItem || (CompletionItem = {}));\r
+/**\r
+ * The CompletionList namespace provides functions to deal with\r
+ * completion lists.\r
+ */\r
+var CompletionList;\r
+(function (CompletionList) {\r
+    /**\r
+     * Creates a new completion list.\r
+     *\r
+     * @param items The completion items.\r
+     * @param isIncomplete The list is not complete.\r
+     */\r
+    function create(items, isIncomplete) {\r
+        return { items: items ? items : [], isIncomplete: !!isIncomplete };\r
     }\r
-    get numberOfBytes() {\r
-        return this.index;\r
+    CompletionList.create = create;\r
+})(CompletionList || (CompletionList = {}));\r
+var MarkedString;\r
+(function (MarkedString) {\r
+    /**\r
+     * Creates a marked string from plain text.\r
+     *\r
+     * @param plainText The plain text.\r
+     */\r
+    function fromPlainText(plainText) {\r
+        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\r
     }\r
-}\r
-var MessageReader;\r
-(function (MessageReader) {\r
+    MarkedString.fromPlainText = fromPlainText;\r
+    /**\r
+     * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\r
+     */\r
     function is(value) {\r
-        let candidate = value;\r
-        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&\r
-            Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);\r
-    }\r
-    MessageReader.is = is;\r
-})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));\r
-class AbstractMessageReader {\r
-    constructor() {\r
-        this.errorEmitter = new events_1.Emitter();\r
-        this.closeEmitter = new events_1.Emitter();\r
-        this.partialMessageEmitter = new events_1.Emitter();\r
-    }\r
-    dispose() {\r
-        this.errorEmitter.dispose();\r
-        this.closeEmitter.dispose();\r
-    }\r
-    get onError() {\r
-        return this.errorEmitter.event;\r
-    }\r
-    fireError(error) {\r
-        this.errorEmitter.fire(this.asError(error));\r
-    }\r
-    get onClose() {\r
-        return this.closeEmitter.event;\r
-    }\r
-    fireClose() {\r
-        this.closeEmitter.fire(undefined);\r
+        var candidate = value;\r
+        return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\r
     }\r
-    get onPartialMessage() {\r
-        return this.partialMessageEmitter.event;\r
+    MarkedString.is = is;\r
+})(MarkedString || (MarkedString = {}));\r
+var Hover;\r
+(function (Hover) {\r
+    /**\r
+     * Checks whether the given value conforms to the [Hover](#Hover) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\r
+            MarkedString.is(candidate.contents) ||\r
+            Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));\r
     }\r
-    firePartialMessage(info) {\r
-        this.partialMessageEmitter.fire(info);\r
+    Hover.is = is;\r
+})(Hover || (Hover = {}));\r
+/**\r
+ * The ParameterInformation namespace provides helper functions to work with\r
+ * [ParameterInformation](#ParameterInformation) literals.\r
+ */\r
+var ParameterInformation;\r
+(function (ParameterInformation) {\r
+    /**\r
+     * Creates a new parameter information literal.\r
+     *\r
+     * @param label A label string.\r
+     * @param documentation A doc string.\r
+     */\r
+    function create(label, documentation) {\r
+        return documentation ? { label: label, documentation: documentation } : { label: label };\r
     }\r
-    asError(error) {\r
-        if (error instanceof Error) {\r
-            return error;\r
-        }\r
-        else {\r
-            return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\r
+    ParameterInformation.create = create;\r
+})(ParameterInformation || (ParameterInformation = {}));\r
+/**\r
+ * The SignatureInformation namespace provides helper functions to work with\r
+ * [SignatureInformation](#SignatureInformation) literals.\r
+ */\r
+var SignatureInformation;\r
+(function (SignatureInformation) {\r
+    function create(label, documentation) {\r
+        var parameters = [];\r
+        for (var _i = 2; _i < arguments.length; _i++) {\r
+            parameters[_i - 2] = arguments[_i];\r
         }\r
-    }\r
-}\r
-exports.AbstractMessageReader = AbstractMessageReader;\r
-class StreamMessageReader extends AbstractMessageReader {\r
-    constructor(readable, encoding = 'utf8') {\r
-        super();\r
-        this.readable = readable;\r
-        this.buffer = new MessageBuffer(encoding);\r
-        this._partialMessageTimeout = 10000;\r
-    }\r
-    set partialMessageTimeout(timeout) {\r
-        this._partialMessageTimeout = timeout;\r
-    }\r
-    get partialMessageTimeout() {\r
-        return this._partialMessageTimeout;\r
-    }\r
-    listen(callback) {\r
-        this.nextMessageLength = -1;\r
-        this.messageToken = 0;\r
-        this.partialMessageTimer = undefined;\r
-        this.callback = callback;\r
-        this.readable.on('data', (data) => {\r
-            this.onData(data);\r
-        });\r
-        this.readable.on('error', (error) => this.fireError(error));\r
-        this.readable.on('close', () => this.fireClose());\r
-    }\r
-    onData(data) {\r
-        this.buffer.append(data);\r
-        while (true) {\r
-            if (this.nextMessageLength === -1) {\r
-                let headers = this.buffer.tryReadHeaders();\r
-                if (!headers) {\r
-                    return;\r
-                }\r
-                let contentLength = headers['Content-Length'];\r
-                if (!contentLength) {\r
-                    throw new Error('Header must provide a Content-Length property.');\r
-                }\r
-                let length = parseInt(contentLength);\r
-                if (isNaN(length)) {\r
-                    throw new Error('Content-Length value must be a number.');\r
-                }\r
-                this.nextMessageLength = length;\r
-                // Take the encoding form the header. For compatibility\r
-                // treat both utf-8 and utf8 as node utf8\r
-            }\r
-            var msg = this.buffer.tryReadContent(this.nextMessageLength);\r
-            if (msg === null) {\r
-                /** We haven't received the full message yet. */\r
-                this.setPartialMessageTimer();\r
-                return;\r
-            }\r
-            this.clearPartialMessageTimer();\r
-            this.nextMessageLength = -1;\r
-            this.messageToken++;\r
-            var json = JSON.parse(msg);\r
-            this.callback(json);\r
+        var result = { label: label };\r
+        if (Is.defined(documentation)) {\r
+            result.documentation = documentation;\r
         }\r
-    }\r
-    clearPartialMessageTimer() {\r
-        if (this.partialMessageTimer) {\r
-            clearTimeout(this.partialMessageTimer);\r
-            this.partialMessageTimer = undefined;\r
+        if (Is.defined(parameters)) {\r
+            result.parameters = parameters;\r
         }\r
-    }\r
-    setPartialMessageTimer() {\r
-        this.clearPartialMessageTimer();\r
-        if (this._partialMessageTimeout <= 0) {\r
-            return;\r
+        else {\r
+            result.parameters = [];\r
         }\r
-        this.partialMessageTimer = setTimeout((token, timeout) => {\r
-            this.partialMessageTimer = undefined;\r
-            if (token === this.messageToken) {\r
-                this.firePartialMessage({ messageToken: token, waitingTime: timeout });\r
-                this.setPartialMessageTimer();\r
-            }\r
-        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);\r
-    }\r
-}\r
-exports.StreamMessageReader = StreamMessageReader;\r
-class IPCMessageReader extends AbstractMessageReader {\r
-    constructor(process) {\r
-        super();\r
-        this.process = process;\r
-        let eventEmitter = this.process;\r
-        eventEmitter.on('error', (error) => this.fireError(error));\r
-        eventEmitter.on('close', () => this.fireClose());\r
-    }\r
-    listen(callback) {\r
-        this.process.on('message', callback);\r
-    }\r
-}\r
-exports.IPCMessageReader = IPCMessageReader;\r
-class SocketMessageReader extends StreamMessageReader {\r
-    constructor(socket, encoding = 'utf-8') {\r
-        super(socket, encoding);\r
+        return result;\r
     }\r
-}\r
-exports.SocketMessageReader = SocketMessageReader;\r
-
-
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-var Disposable;\r
-(function (Disposable) {\r
-    function create(func) {\r
-        return {\r
-            dispose: func\r
-        };\r
-    }\r
-    Disposable.create = create;\r
-})(Disposable = exports.Disposable || (exports.Disposable = {}));\r
-var Event;\r
-(function (Event) {\r
-    const _disposable = { dispose() { } };\r
-    Event.None = function () { return _disposable; };\r
-})(Event = exports.Event || (exports.Event = {}));\r
-class CallbackList {\r
-    add(callback, context = null, bucket) {\r
-        if (!this._callbacks) {\r
-            this._callbacks = [];\r
-            this._contexts = [];\r
-        }\r
-        this._callbacks.push(callback);\r
-        this._contexts.push(context);\r
-        if (Array.isArray(bucket)) {\r
-            bucket.push({ dispose: () => this.remove(callback, context) });\r
+    SignatureInformation.create = create;\r
+})(SignatureInformation || (SignatureInformation = {}));\r
+/**\r
+ * A document highlight kind.\r
+ */\r
+var DocumentHighlightKind;\r
+(function (DocumentHighlightKind) {\r
+    /**\r
+     * A textual occurrence.\r
+     */\r
+    DocumentHighlightKind.Text = 1;\r
+    /**\r
+     * Read-access of a symbol, like reading a variable.\r
+     */\r
+    DocumentHighlightKind.Read = 2;\r
+    /**\r
+     * Write-access of a symbol, like writing to a variable.\r
+     */\r
+    DocumentHighlightKind.Write = 3;\r
+})(DocumentHighlightKind || (DocumentHighlightKind = {}));\r
+/**\r
+ * DocumentHighlight namespace to provide helper functions to work with\r
+ * [DocumentHighlight](#DocumentHighlight) literals.\r
+ */\r
+var DocumentHighlight;\r
+(function (DocumentHighlight) {\r
+    /**\r
+     * Create a DocumentHighlight object.\r
+     * @param range The range the highlight applies to.\r
+     */\r
+    function create(range, kind) {\r
+        var result = { range: range };\r
+        if (Is.number(kind)) {\r
+            result.kind = kind;\r
         }\r
+        return result;\r
     }\r
-    remove(callback, context = null) {\r
-        if (!this._callbacks) {\r
-            return;\r
-        }\r
-        var foundCallbackWithDifferentContext = false;\r
-        for (var i = 0, len = this._callbacks.length; i < len; i++) {\r
-            if (this._callbacks[i] === callback) {\r
-                if (this._contexts[i] === context) {\r
-                    // callback & context match => remove it\r
-                    this._callbacks.splice(i, 1);\r
-                    this._contexts.splice(i, 1);\r
-                    return;\r
-                }\r
-                else {\r
-                    foundCallbackWithDifferentContext = true;\r
-                }\r
-            }\r
-        }\r
-        if (foundCallbackWithDifferentContext) {\r
-            throw new Error('When adding a listener with a context, you should remove it with the same context');\r
+    DocumentHighlight.create = create;\r
+})(DocumentHighlight || (DocumentHighlight = {}));\r
+/**\r
+ * A symbol kind.\r
+ */\r
+var SymbolKind;\r
+(function (SymbolKind) {\r
+    SymbolKind.File = 1;\r
+    SymbolKind.Module = 2;\r
+    SymbolKind.Namespace = 3;\r
+    SymbolKind.Package = 4;\r
+    SymbolKind.Class = 5;\r
+    SymbolKind.Method = 6;\r
+    SymbolKind.Property = 7;\r
+    SymbolKind.Field = 8;\r
+    SymbolKind.Constructor = 9;\r
+    SymbolKind.Enum = 10;\r
+    SymbolKind.Interface = 11;\r
+    SymbolKind.Function = 12;\r
+    SymbolKind.Variable = 13;\r
+    SymbolKind.Constant = 14;\r
+    SymbolKind.String = 15;\r
+    SymbolKind.Number = 16;\r
+    SymbolKind.Boolean = 17;\r
+    SymbolKind.Array = 18;\r
+    SymbolKind.Object = 19;\r
+    SymbolKind.Key = 20;\r
+    SymbolKind.Null = 21;\r
+    SymbolKind.EnumMember = 22;\r
+    SymbolKind.Struct = 23;\r
+    SymbolKind.Event = 24;\r
+    SymbolKind.Operator = 25;\r
+    SymbolKind.TypeParameter = 26;\r
+})(SymbolKind || (SymbolKind = {}));\r
+/**\r
+ * Symbol tags are extra annotations that tweak the rendering of a symbol.\r
+ * @since 3.15\r
+ */\r
+var SymbolTag;\r
+(function (SymbolTag) {\r
+    /**\r
+     * Render a symbol as obsolete, usually using a strike-out.\r
+     */\r
+    SymbolTag.Deprecated = 1;\r
+})(SymbolTag || (SymbolTag = {}));\r
+var SymbolInformation;\r
+(function (SymbolInformation) {\r
+    /**\r
+     * Creates a new symbol information literal.\r
+     *\r
+     * @param name The name of the symbol.\r
+     * @param kind The kind of the symbol.\r
+     * @param range The range of the location of the symbol.\r
+     * @param uri The resource of the location of symbol, defaults to the current document.\r
+     * @param containerName The name of the symbol containing the symbol.\r
+     */\r
+    function create(name, kind, range, uri, containerName) {\r
+        var result = {\r
+            name: name,\r
+            kind: kind,\r
+            location: { uri: uri, range: range }\r
+        };\r
+        if (containerName) {\r
+            result.containerName = containerName;\r
         }\r
+        return result;\r
     }\r
-    invoke(...args) {\r
-        if (!this._callbacks) {\r
-            return [];\r
-        }\r
-        var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\r
-        for (var i = 0, len = callbacks.length; i < len; i++) {\r
-            try {\r
-                ret.push(callbacks[i].apply(contexts[i], args));\r
-            }\r
-            catch (e) {\r
-                console.error(e);\r
-            }\r
+    SymbolInformation.create = create;\r
+})(SymbolInformation || (SymbolInformation = {}));\r
+var DocumentSymbol;\r
+(function (DocumentSymbol) {\r
+    /**\r
+     * Creates a new symbol information literal.\r
+     *\r
+     * @param name The name of the symbol.\r
+     * @param detail The detail of the symbol.\r
+     * @param kind The kind of the symbol.\r
+     * @param range The range of the symbol.\r
+     * @param selectionRange The selectionRange of the symbol.\r
+     * @param children Children of the symbol.\r
+     */\r
+    function create(name, detail, kind, range, selectionRange, children) {\r
+        var result = {\r
+            name: name,\r
+            detail: detail,\r
+            kind: kind,\r
+            range: range,\r
+            selectionRange: selectionRange\r
+        };\r
+        if (children !== void 0) {\r
+            result.children = children;\r
         }\r
-        return ret;\r
-    }\r
-    isEmpty() {\r
-        return !this._callbacks || this._callbacks.length === 0;\r
-    }\r
-    dispose() {\r
-        this._callbacks = undefined;\r
-        this._contexts = undefined;\r
+        return result;\r
     }\r
-}\r
-class Emitter {\r
-    constructor(_options) {\r
-        this._options = _options;\r
+    DocumentSymbol.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate &&\r
+            Is.string(candidate.name) && Is.number(candidate.kind) &&\r
+            Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\r
+            (candidate.detail === void 0 || Is.string(candidate.detail)) &&\r
+            (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&\r
+            (candidate.children === void 0 || Array.isArray(candidate.children));\r
     }\r
+    DocumentSymbol.is = is;\r
+})(DocumentSymbol || (DocumentSymbol = {}));\r
+/**\r
+ * A set of predefined code action kinds\r
+ */\r
+var CodeActionKind;\r
+(function (CodeActionKind) {\r
     /**\r
-     * For the public to allow to subscribe\r
-     * to events from this Emitter\r
+     * Empty kind.\r
      */\r
-    get event() {\r
-        if (!this._event) {\r
-            this._event = (listener, thisArgs, disposables) => {\r
-                if (!this._callbacks) {\r
-                    this._callbacks = new CallbackList();\r
-                }\r
-                if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {\r
-                    this._options.onFirstListenerAdd(this);\r
-                }\r
-                this._callbacks.add(listener, thisArgs);\r
-                let result;\r
-                result = {\r
-                    dispose: () => {\r
-                        this._callbacks.remove(listener, thisArgs);\r
-                        result.dispose = Emitter._noop;\r
-                        if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {\r
-                            this._options.onLastListenerRemove(this);\r
-                        }\r
-                    }\r
-                };\r
-                if (Array.isArray(disposables)) {\r
-                    disposables.push(result);\r
-                }\r
-                return result;\r
-            };\r
+    CodeActionKind.Empty = '';\r
+    /**\r
+     * Base kind for quickfix actions: 'quickfix'\r
+     */\r
+    CodeActionKind.QuickFix = 'quickfix';\r
+    /**\r
+     * Base kind for refactoring actions: 'refactor'\r
+     */\r
+    CodeActionKind.Refactor = 'refactor';\r
+    /**\r
+     * Base kind for refactoring extraction actions: 'refactor.extract'\r
+     *\r
+     * Example extract actions:\r
+     *\r
+     * - Extract method\r
+     * - Extract function\r
+     * - Extract variable\r
+     * - Extract interface from class\r
+     * - ...\r
+     */\r
+    CodeActionKind.RefactorExtract = 'refactor.extract';\r
+    /**\r
+     * Base kind for refactoring inline actions: 'refactor.inline'\r
+     *\r
+     * Example inline actions:\r
+     *\r
+     * - Inline function\r
+     * - Inline variable\r
+     * - Inline constant\r
+     * - ...\r
+     */\r
+    CodeActionKind.RefactorInline = 'refactor.inline';\r
+    /**\r
+     * Base kind for refactoring rewrite actions: 'refactor.rewrite'\r
+     *\r
+     * Example rewrite actions:\r
+     *\r
+     * - Convert JavaScript function to class\r
+     * - Add or remove parameter\r
+     * - Encapsulate field\r
+     * - Make method static\r
+     * - Move method to base class\r
+     * - ...\r
+     */\r
+    CodeActionKind.RefactorRewrite = 'refactor.rewrite';\r
+    /**\r
+     * Base kind for source actions: `source`\r
+     *\r
+     * Source code actions apply to the entire file.\r
+     */\r
+    CodeActionKind.Source = 'source';\r
+    /**\r
+     * Base kind for an organize imports source action: `source.organizeImports`\r
+     */\r
+    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\r
+    /**\r
+     * Base kind for auto-fix source actions: `source.fixAll`.\r
+     *\r
+     * Fix all actions automatically fix errors that have a clear fix that do not require user input.\r
+     * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\r
+     *\r
+     * @since 3.15.0\r
+     */\r
+    CodeActionKind.SourceFixAll = 'source.fixAll';\r
+})(CodeActionKind || (CodeActionKind = {}));\r
+/**\r
+ * The CodeActionContext namespace provides helper functions to work with\r
+ * [CodeActionContext](#CodeActionContext) literals.\r
+ */\r
+var CodeActionContext;\r
+(function (CodeActionContext) {\r
+    /**\r
+     * Creates a new CodeActionContext literal.\r
+     */\r
+    function create(diagnostics, only) {\r
+        var result = { diagnostics: diagnostics };\r
+        if (only !== void 0 && only !== null) {\r
+            result.only = only;\r
         }\r
-        return this._event;\r
+        return result;\r
     }\r
+    CodeActionContext.create = create;\r
     /**\r
-     * To be kept private to fire an event to\r
-     * subscribers\r
+     * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\r
      */\r
-    fire(event) {\r
-        if (this._callbacks) {\r
-            this._callbacks.invoke.call(this._callbacks, event);\r
-        }\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));\r
     }\r
-    dispose() {\r
-        if (this._callbacks) {\r
-            this._callbacks.dispose();\r
-            this._callbacks = undefined;\r
-        }\r
-    }\r
-}\r
-Emitter._noop = function () { };\r
-exports.Emitter = Emitter;\r
-
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const events_1 = __webpack_require__(8);\r
-const Is = __webpack_require__(5);\r
-let ContentLength = 'Content-Length: ';\r
-let CRLF = '\r\n';\r
-var MessageWriter;\r
-(function (MessageWriter) {\r
-    function is(value) {\r
-        let candidate = value;\r
-        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&\r
-            Is.func(candidate.onError) && Is.func(candidate.write);\r
-    }\r
-    MessageWriter.is = is;\r
-})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));\r
-class AbstractMessageWriter {\r
-    constructor() {\r
-        this.errorEmitter = new events_1.Emitter();\r
-        this.closeEmitter = new events_1.Emitter();\r
-    }\r
-    dispose() {\r
-        this.errorEmitter.dispose();\r
-        this.closeEmitter.dispose();\r
-    }\r
-    get onError() {\r
-        return this.errorEmitter.event;\r
-    }\r
-    fireError(error, message, count) {\r
-        this.errorEmitter.fire([this.asError(error), message, count]);\r
-    }\r
-    get onClose() {\r
-        return this.closeEmitter.event;\r
-    }\r
-    fireClose() {\r
-        this.closeEmitter.fire(undefined);\r
-    }\r
-    asError(error) {\r
-        if (error instanceof Error) {\r
-            return error;\r
-        }\r
-        else {\r
-            return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\r
-        }\r
-    }\r
-}\r
-exports.AbstractMessageWriter = AbstractMessageWriter;\r
-class StreamMessageWriter extends AbstractMessageWriter {\r
-    constructor(writable, encoding = 'utf8') {\r
-        super();\r
-        this.writable = writable;\r
-        this.encoding = encoding;\r
-        this.errorCount = 0;\r
-        this.writable.on('error', (error) => this.fireError(error));\r
-        this.writable.on('close', () => this.fireClose());\r
-    }\r
-    write(msg) {\r
-        let json = JSON.stringify(msg);\r
-        let contentLength = Buffer.byteLength(json, this.encoding);\r
-        let headers = [\r
-            ContentLength, contentLength.toString(), CRLF,\r
-            CRLF\r
-        ];\r
-        try {\r
-            // Header must be written in ASCII encoding\r
-            this.writable.write(headers.join(''), 'ascii');\r
-            // Now write the content. This can be written in any encoding\r
-            this.writable.write(json, this.encoding);\r
-            this.errorCount = 0;\r
-        }\r
-        catch (error) {\r
-            this.errorCount++;\r
-            this.fireError(error, msg, this.errorCount);\r
-        }\r
-    }\r
-}\r
-exports.StreamMessageWriter = StreamMessageWriter;\r
-class IPCMessageWriter extends AbstractMessageWriter {\r
-    constructor(process) {\r
-        super();\r
-        this.process = process;\r
-        this.errorCount = 0;\r
-        this.queue = [];\r
-        this.sending = false;\r
-        let eventEmitter = this.process;\r
-        eventEmitter.on('error', (error) => this.fireError(error));\r
-        eventEmitter.on('close', () => this.fireClose);\r
-    }\r
-    write(msg) {\r
-        if (!this.sending && this.queue.length === 0) {\r
-            // See https://github.com/nodejs/node/issues/7657\r
-            this.doWriteMessage(msg);\r
-        }\r
-        else {\r
-            this.queue.push(msg);\r
-        }\r
-    }\r
-    doWriteMessage(msg) {\r
-        try {\r
-            if (this.process.send) {\r
-                this.sending = true;\r
-                this.process.send(msg, undefined, undefined, (error) => {\r
-                    this.sending = false;\r
-                    if (error) {\r
-                        this.errorCount++;\r
-                        this.fireError(error, msg, this.errorCount);\r
-                    }\r
-                    else {\r
-                        this.errorCount = 0;\r
-                    }\r
-                    if (this.queue.length > 0) {\r
-                        this.doWriteMessage(this.queue.shift());\r
-                    }\r
-                });\r
-            }\r
-        }\r
-        catch (error) {\r
-            this.errorCount++;\r
-            this.fireError(error, msg, this.errorCount);\r
-        }\r
-    }\r
-}\r
-exports.IPCMessageWriter = IPCMessageWriter;\r
-class SocketMessageWriter extends AbstractMessageWriter {\r
-    constructor(socket, encoding = 'utf8') {\r
-        super();\r
-        this.socket = socket;\r
-        this.queue = [];\r
-        this.sending = false;\r
-        this.encoding = encoding;\r
-        this.errorCount = 0;\r
-        this.socket.on('error', (error) => this.fireError(error));\r
-        this.socket.on('close', () => this.fireClose());\r
-    }\r
-    dispose() {\r
-        super.dispose();\r
-        this.socket.destroy();\r
-    }\r
-    write(msg) {\r
-        if (!this.sending && this.queue.length === 0) {\r
-            // See https://github.com/nodejs/node/issues/7657\r
-            this.doWriteMessage(msg);\r
+    CodeActionContext.is = is;\r
+})(CodeActionContext || (CodeActionContext = {}));\r
+var CodeAction;\r
+(function (CodeAction) {\r
+    function create(title, commandOrEdit, kind) {\r
+        var result = { title: title };\r
+        if (Command.is(commandOrEdit)) {\r
+            result.command = commandOrEdit;\r
         }\r
         else {\r
-            this.queue.push(msg);\r
-        }\r
-    }\r
-    doWriteMessage(msg) {\r
-        let json = JSON.stringify(msg);\r
-        let contentLength = Buffer.byteLength(json, this.encoding);\r
-        let headers = [\r
-            ContentLength, contentLength.toString(), CRLF,\r
-            CRLF\r
-        ];\r
-        try {\r
-            // Header must be written in ASCII encoding\r
-            this.sending = true;\r
-            this.socket.write(headers.join(''), 'ascii', (error) => {\r
-                if (error) {\r
-                    this.handleError(error, msg);\r
-                }\r
-                try {\r
-                    // Now write the content. This can be written in any encoding\r
-                    this.socket.write(json, this.encoding, (error) => {\r
-                        this.sending = false;\r
-                        if (error) {\r
-                            this.handleError(error, msg);\r
-                        }\r
-                        else {\r
-                            this.errorCount = 0;\r
-                        }\r
-                        if (this.queue.length > 0) {\r
-                            this.doWriteMessage(this.queue.shift());\r
-                        }\r
-                    });\r
-                }\r
-                catch (error) {\r
-                    this.handleError(error, msg);\r
-                }\r
-            });\r
+            result.edit = commandOrEdit;\r
         }\r
-        catch (error) {\r
-            this.handleError(error, msg);\r
+        if (kind !== void 0) {\r
+            result.kind = kind;\r
         }\r
+        return result;\r
     }\r
-    handleError(error, msg) {\r
-        this.errorCount++;\r
-        this.fireError(error, msg, this.errorCount);\r
-    }\r
-}\r
-exports.SocketMessageWriter = SocketMessageWriter;\r
-
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const events_1 = __webpack_require__(8);\r
-const Is = __webpack_require__(5);\r
-var CancellationToken;\r
-(function (CancellationToken) {\r
-    CancellationToken.None = Object.freeze({\r
-        isCancellationRequested: false,\r
-        onCancellationRequested: events_1.Event.None\r
-    });\r
-    CancellationToken.Cancelled = Object.freeze({\r
-        isCancellationRequested: true,\r
-        onCancellationRequested: events_1.Event.None\r
-    });\r
+    CodeAction.create = create;\r
     function is(value) {\r
-        let candidate = value;\r
-        return candidate && (candidate === CancellationToken.None\r
-            || candidate === CancellationToken.Cancelled\r
-            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));\r
-    }\r
-    CancellationToken.is = is;\r
-})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));\r
-const shortcutEvent = Object.freeze(function (callback, context) {\r
-    let handle = setTimeout(callback.bind(context), 0);\r
-    return { dispose() { clearTimeout(handle); } };\r
-});\r
-class MutableToken {\r
-    constructor() {\r
-        this._isCancelled = false;\r
-    }\r
-    cancel() {\r
-        if (!this._isCancelled) {\r
-            this._isCancelled = true;\r
-            if (this._emitter) {\r
-                this._emitter.fire(undefined);\r
-                this.dispose();\r
-            }\r
-        }\r
-    }\r
-    get isCancellationRequested() {\r
-        return this._isCancelled;\r
-    }\r
-    get onCancellationRequested() {\r
-        if (this._isCancelled) {\r
-            return shortcutEvent;\r
-        }\r
-        if (!this._emitter) {\r
-            this._emitter = new events_1.Emitter();\r
-        }\r
-        return this._emitter.event;\r
+        var candidate = value;\r
+        return candidate && Is.string(candidate.title) &&\r
+            (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\r
+            (candidate.kind === void 0 || Is.string(candidate.kind)) &&\r
+            (candidate.edit !== void 0 || candidate.command !== void 0) &&\r
+            (candidate.command === void 0 || Command.is(candidate.command)) &&\r
+            (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&\r
+            (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));\r
     }\r
-    dispose() {\r
-        if (this._emitter) {\r
-            this._emitter.dispose();\r
-            this._emitter = undefined;\r
+    CodeAction.is = is;\r
+})(CodeAction || (CodeAction = {}));\r
+/**\r
+ * The CodeLens namespace provides helper functions to work with\r
+ * [CodeLens](#CodeLens) literals.\r
+ */\r
+var CodeLens;\r
+(function (CodeLens) {\r
+    /**\r
+     * Creates a new CodeLens literal.\r
+     */\r
+    function create(range, data) {\r
+        var result = { range: range };\r
+        if (Is.defined(data)) {\r
+            result.data = data;\r
         }\r
+        return result;\r
     }\r
-}\r
-class CancellationTokenSource {\r
-    get token() {\r
-        if (!this._token) {\r
-            // be lazy and create the token only when\r
-            // actually needed\r
-            this._token = new MutableToken();\r
-        }\r
-        return this._token;\r
+    CodeLens.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\r
     }\r
-    cancel() {\r
-        if (!this._token) {\r
-            // save an object by returning the default\r
-            // cancelled token when cancellation happens\r
-            // before someone asks for the token\r
-            this._token = CancellationToken.Cancelled;\r
-        }\r
-        else {\r
-            this._token.cancel();\r
-        }\r
+    CodeLens.is = is;\r
+})(CodeLens || (CodeLens = {}));\r
+/**\r
+ * The FormattingOptions namespace provides helper functions to work with\r
+ * [FormattingOptions](#FormattingOptions) literals.\r
+ */\r
+var FormattingOptions;\r
+(function (FormattingOptions) {\r
+    /**\r
+     * Creates a new FormattingOptions literal.\r
+     */\r
+    function create(tabSize, insertSpaces) {\r
+        return { tabSize: tabSize, insertSpaces: insertSpaces };\r
     }\r
-    dispose() {\r
-        if (!this._token) {\r
-            // ensure to initialize with an empty token if we had none\r
-            this._token = CancellationToken.None;\r
-        }\r
-        else if (this._token instanceof MutableToken) {\r
-            // actually dispose\r
-            this._token.dispose();\r
-        }\r
+    FormattingOptions.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\r
     }\r
-}\r
-exports.CancellationTokenSource = CancellationTokenSource;\r
-
-
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-\r
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-var Touch;\r
-(function (Touch) {\r
-    Touch.None = 0;\r
-    Touch.First = 1;\r
-    Touch.Last = 2;\r
-})(Touch = exports.Touch || (exports.Touch = {}));\r
-class LinkedMap {\r
-    constructor() {\r
-        this._map = new Map();\r
-        this._head = undefined;\r
-        this._tail = undefined;\r
-        this._size = 0;\r
+    FormattingOptions.is = is;\r
+})(FormattingOptions || (FormattingOptions = {}));\r
+/**\r
+ * The DocumentLink namespace provides helper functions to work with\r
+ * [DocumentLink](#DocumentLink) literals.\r
+ */\r
+var DocumentLink;\r
+(function (DocumentLink) {\r
+    /**\r
+     * Creates a new DocumentLink literal.\r
+     */\r
+    function create(range, target, data) {\r
+        return { range: range, target: target, data: data };\r
     }\r
-    clear() {\r
-        this._map.clear();\r
-        this._head = undefined;\r
-        this._tail = undefined;\r
-        this._size = 0;\r
+    DocumentLink.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\r
     }\r
-    isEmpty() {\r
-        return !this._head && !this._tail;\r
+    DocumentLink.is = is;\r
+})(DocumentLink || (DocumentLink = {}));\r
+/**\r
+ * The SelectionRange namespace provides helper function to work with\r
+ * SelectionRange literals.\r
+ */\r
+var SelectionRange;\r
+(function (SelectionRange) {\r
+    /**\r
+     * Creates a new SelectionRange\r
+     * @param range the range.\r
+     * @param parent an optional parent.\r
+     */\r
+    function create(range, parent) {\r
+        return { range: range, parent: parent };\r
     }\r
-    get size() {\r
-        return this._size;\r
+    SelectionRange.create = create;\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\r
     }\r
-    has(key) {\r
-        return this._map.has(key);\r
+    SelectionRange.is = is;\r
+})(SelectionRange || (SelectionRange = {}));\r
+var EOL = ['\n', '\r\n', '\r'];\r
+/**\r
+ * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\r
+ */\r
+var TextDocument;\r
+(function (TextDocument) {\r
+    /**\r
+     * Creates a new ITextDocument literal from the given uri and content.\r
+     * @param uri The document's uri.\r
+     * @param languageId  The document's language Id.\r
+     * @param content The document's content.\r
+     */\r
+    function create(uri, languageId, version, content) {\r
+        return new FullTextDocument(uri, languageId, version, content);\r
     }\r
-    get(key) {\r
-        const item = this._map.get(key);\r
-        if (!item) {\r
-            return undefined;\r
-        }\r
-        return item.value;\r
+    TextDocument.create = create;\r
+    /**\r
+     * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\r
+     */\r
+    function is(value) {\r
+        var candidate = value;\r
+        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)\r
+            && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\r
     }\r
-    set(key, value, touch = Touch.None) {\r
-        let item = this._map.get(key);\r
-        if (item) {\r
-            item.value = value;\r
-            if (touch !== Touch.None) {\r
-                this.touch(item, touch);\r
+    TextDocument.is = is;\r
+    function applyEdits(document, edits) {\r
+        var text = document.getText();\r
+        var sortedEdits = mergeSort(edits, function (a, b) {\r
+            var diff = a.range.start.line - b.range.start.line;\r
+            if (diff === 0) {\r
+                return a.range.start.character - b.range.start.character;\r
             }\r
-        }\r
-        else {\r
-            item = { key, value, next: undefined, previous: undefined };\r
-            switch (touch) {\r
-                case Touch.None:\r
-                    this.addItemLast(item);\r
-                    break;\r
-                case Touch.First:\r
-                    this.addItemFirst(item);\r
-                    break;\r
-                case Touch.Last:\r
-                    this.addItemLast(item);\r
-                    break;\r
-                default:\r
-                    this.addItemLast(item);\r
-                    break;\r
+            return diff;\r
+        });\r
+        var lastModifiedOffset = text.length;\r
+        for (var i = sortedEdits.length - 1; i >= 0; i--) {\r
+            var e = sortedEdits[i];\r
+            var startOffset = document.offsetAt(e.range.start);\r
+            var endOffset = document.offsetAt(e.range.end);\r
+            if (endOffset <= lastModifiedOffset) {\r
+                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\r
             }\r
-            this._map.set(key, item);\r
-            this._size++;\r
-        }\r
-    }\r
-    delete(key) {\r
-        const item = this._map.get(key);\r
-        if (!item) {\r
-            return false;\r
+            else {\r
+                throw new Error('Overlapping edit');\r
+            }\r
+            lastModifiedOffset = startOffset;\r
         }\r
-        this._map.delete(key);\r
-        this.removeItem(item);\r
-        this._size--;\r
-        return true;\r
+        return text;\r
     }\r
-    shift() {\r
-        if (!this._head && !this._tail) {\r
-            return undefined;\r
-        }\r
-        if (!this._head || !this._tail) {\r
-            throw new Error('Invalid list');\r
+    TextDocument.applyEdits = applyEdits;\r
+    function mergeSort(data, compare) {\r
+        if (data.length <= 1) {\r
+            // sorted\r
+            return data;\r
         }\r
-        const item = this._head;\r
-        this._map.delete(item.key);\r
-        this.removeItem(item);\r
-        this._size--;\r
-        return item.value;\r
-    }\r
-    forEach(callbackfn, thisArg) {\r
-        let current = this._head;\r
-        while (current) {\r
-            if (thisArg) {\r
-                callbackfn.bind(thisArg)(current.value, current.key, this);\r
+        var p = (data.length / 2) | 0;\r
+        var left = data.slice(0, p);\r
+        var right = data.slice(p);\r
+        mergeSort(left, compare);\r
+        mergeSort(right, compare);\r
+        var leftIdx = 0;\r
+        var rightIdx = 0;\r
+        var i = 0;\r
+        while (leftIdx < left.length && rightIdx < right.length) {\r
+            var ret = compare(left[leftIdx], right[rightIdx]);\r
+            if (ret <= 0) {\r
+                // smaller_equal -> take left to preserve order\r
+                data[i++] = left[leftIdx++];\r
             }\r
             else {\r
-                callbackfn(current.value, current.key, this);\r
+                // greater -> take right\r
+                data[i++] = right[rightIdx++];\r
             }\r
-            current = current.next;\r
         }\r
-    }\r
-    forEachReverse(callbackfn, thisArg) {\r
-        let current = this._tail;\r
-        while (current) {\r
-            if (thisArg) {\r
-                callbackfn.bind(thisArg)(current.value, current.key, this);\r
-            }\r
-            else {\r
-                callbackfn(current.value, current.key, this);\r
-            }\r
-            current = current.previous;\r
+        while (leftIdx < left.length) {\r
+            data[i++] = left[leftIdx++];\r
         }\r
-    }\r
-    values() {\r
-        let result = [];\r
-        let current = this._head;\r
-        while (current) {\r
-            result.push(current.value);\r
-            current = current.next;\r
+        while (rightIdx < right.length) {\r
+            data[i++] = right[rightIdx++];\r
         }\r
-        return result;\r
+        return data;\r
     }\r
-    keys() {\r
-        let result = [];\r
-        let current = this._head;\r
-        while (current) {\r
-            result.push(current.key);\r
-            current = current.next;\r
-        }\r
-        return result;\r
+})(TextDocument || (TextDocument = {}));\r
+var FullTextDocument = /** @class */ (function () {\r
+    function FullTextDocument(uri, languageId, version, content) {\r
+        this._uri = uri;\r
+        this._languageId = languageId;\r
+        this._version = version;\r
+        this._content = content;\r
+        this._lineOffsets = undefined;\r
     }\r
-    /* JSON RPC run on es5 which has no Symbol.iterator\r
-    public keys(): IterableIterator<K> {\r
-        let current = this._head;\r
-        let iterator: IterableIterator<K> = {\r
-            [Symbol.iterator]() {\r
-                return iterator;\r
-            },\r
-            next():IteratorResult<K> {\r
-                if (current) {\r
-                    let result = { value: current.key, done: false };\r
-                    current = current.next;\r
-                    return result;\r
-                } else {\r
-                    return { value: undefined, done: true };\r
+    Object.defineProperty(FullTextDocument.prototype, "uri", {\r
+        get: function () {\r
+            return this._uri;\r
+        },\r
+        enumerable: true,\r
+        configurable: true\r
+    });\r
+    Object.defineProperty(FullTextDocument.prototype, "languageId", {\r
+        get: function () {\r
+            return this._languageId;\r
+        },\r
+        enumerable: true,\r
+        configurable: true\r
+    });\r
+    Object.defineProperty(FullTextDocument.prototype, "version", {\r
+        get: function () {\r
+            return this._version;\r
+        },\r
+        enumerable: true,\r
+        configurable: true\r
+    });\r
+    FullTextDocument.prototype.getText = function (range) {\r
+        if (range) {\r
+            var start = this.offsetAt(range.start);\r
+            var end = this.offsetAt(range.end);\r
+            return this._content.substring(start, end);\r
+        }\r
+        return this._content;\r
+    };\r
+    FullTextDocument.prototype.update = function (event, version) {\r
+        this._content = event.text;\r
+        this._version = version;\r
+        this._lineOffsets = undefined;\r
+    };\r
+    FullTextDocument.prototype.getLineOffsets = function () {\r
+        if (this._lineOffsets === undefined) {\r
+            var lineOffsets = [];\r
+            var text = this._content;\r
+            var isLineStart = true;\r
+            for (var i = 0; i < text.length; i++) {\r
+                if (isLineStart) {\r
+                    lineOffsets.push(i);\r
+                    isLineStart = false;\r
                 }\r
-            }\r
-        };\r
-        return iterator;\r
-    }\r
-\r
-    public values(): IterableIterator<V> {\r
-        let current = this._head;\r
-        let iterator: IterableIterator<V> = {\r
-            [Symbol.iterator]() {\r
-                return iterator;\r
-            },\r
-            next():IteratorResult<V> {\r
-                if (current) {\r
-                    let result = { value: current.value, done: false };\r
-                    current = current.next;\r
-                    return result;\r
-                } else {\r
-                    return { value: undefined, done: true };\r
+                var ch = text.charAt(i);\r
+                isLineStart = (ch === '\r' || ch === '\n');\r
+                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {\r
+                    i++;\r
                 }\r
             }\r
-        };\r
-        return iterator;\r
-    }\r
-    */\r
-    addItemFirst(item) {\r
-        // First time Insert\r
-        if (!this._head && !this._tail) {\r
-            this._tail = item;\r
-        }\r
-        else if (!this._head) {\r
-            throw new Error('Invalid list');\r
-        }\r
-        else {\r
-            item.next = this._head;\r
-            this._head.previous = item;\r
-        }\r
-        this._head = item;\r
-    }\r
-    addItemLast(item) {\r
-        // First time Insert\r
-        if (!this._head && !this._tail) {\r
-            this._head = item;\r
-        }\r
-        else if (!this._tail) {\r
-            throw new Error('Invalid list');\r
-        }\r
-        else {\r
-            item.previous = this._tail;\r
-            this._tail.next = item;\r
-        }\r
-        this._tail = item;\r
-    }\r
-    removeItem(item) {\r
-        if (item === this._head && item === this._tail) {\r
-            this._head = undefined;\r
-            this._tail = undefined;\r
-        }\r
-        else if (item === this._head) {\r
-            this._head = item.next;\r
-        }\r
-        else if (item === this._tail) {\r
-            this._tail = item.previous;\r
-        }\r
-        else {\r
-            const next = item.next;\r
-            const previous = item.previous;\r
-            if (!next || !previous) {\r
-                throw new Error('Invalid list');\r
+            if (isLineStart && text.length > 0) {\r
+                lineOffsets.push(text.length);\r
             }\r
-            next.previous = previous;\r
-            previous.next = next;\r
-        }\r
-    }\r
-    touch(item, touch) {\r
-        if (!this._head || !this._tail) {\r
-            throw new Error('Invalid list');\r
+            this._lineOffsets = lineOffsets;\r
         }\r
-        if ((touch !== Touch.First && touch !== Touch.Last)) {\r
-            return;\r
+        return this._lineOffsets;\r
+    };\r
+    FullTextDocument.prototype.positionAt = function (offset) {\r
+        offset = Math.max(Math.min(offset, this._content.length), 0);\r
+        var lineOffsets = this.getLineOffsets();\r
+        var low = 0, high = lineOffsets.length;\r
+        if (high === 0) {\r
+            return Position.create(0, offset);\r
         }\r
-        if (touch === Touch.First) {\r
-            if (item === this._head) {\r
-                return;\r
-            }\r
-            const next = item.next;\r
-            const previous = item.previous;\r
-            // Unlink the item\r
-            if (item === this._tail) {\r
-                // previous must be defined since item was not head but is tail\r
-                // So there are more than on item in the map\r
-                previous.next = undefined;\r
-                this._tail = previous;\r
+        while (low < high) {\r
+            var mid = Math.floor((low + high) / 2);\r
+            if (lineOffsets[mid] > offset) {\r
+                high = mid;\r
             }\r
             else {\r
-                // Both next and previous are not undefined since item was neither head nor tail.\r
-                next.previous = previous;\r
-                previous.next = next;\r
+                low = mid + 1;\r
             }\r
-            // Insert the node at head\r
-            item.previous = undefined;\r
-            item.next = this._head;\r
-            this._head.previous = item;\r
-            this._head = item;\r
         }\r
-        else if (touch === Touch.Last) {\r
-            if (item === this._tail) {\r
-                return;\r
-            }\r
-            const next = item.next;\r
-            const previous = item.previous;\r
-            // Unlink the item.\r
-            if (item === this._head) {\r
-                // next must be defined since item was not tail but is head\r
-                // So there are more than on item in the map\r
-                next.previous = undefined;\r
-                this._head = next;\r
-            }\r
-            else {\r
-                // Both next and previous are not undefined since item was neither head nor tail.\r
-                next.previous = previous;\r
-                previous.next = next;\r
-            }\r
-            item.next = undefined;\r
-            item.previous = this._tail;\r
-            this._tail.next = item;\r
-            this._tail = item;\r
+        // low is the least x for which the line offset is larger than the current offset\r
+        // or array.length if no line offset is larger than the current offset\r
+        var line = low - 1;\r
+        return Position.create(line, offset - lineOffsets[line]);\r
+    };\r
+    FullTextDocument.prototype.offsetAt = function (position) {\r
+        var lineOffsets = this.getLineOffsets();\r
+        if (position.line >= lineOffsets.length) {\r
+            return this._content.length;\r
+        }\r
+        else if (position.line < 0) {\r
+            return 0;\r
         }\r
+        var lineOffset = lineOffsets[position.line];\r
+        var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\r
+        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\r
+    };\r
+    Object.defineProperty(FullTextDocument.prototype, "lineCount", {\r
+        get: function () {\r
+            return this.getLineOffsets().length;\r
+        },\r
+        enumerable: true,\r
+        configurable: true\r
+    });\r
+    return FullTextDocument;\r
+}());\r
+var Is;\r
+(function (Is) {\r
+    var toString = Object.prototype.toString;\r
+    function defined(value) {\r
+        return typeof value !== 'undefined';\r
     }\r
-}\r
-exports.LinkedMap = LinkedMap;\r
-
-
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const path_1 = __webpack_require__(1);\r
-const os_1 = __webpack_require__(13);\r
-const crypto_1 = __webpack_require__(14);\r
-const net_1 = __webpack_require__(15);\r
-const messageReader_1 = __webpack_require__(7);\r
-const messageWriter_1 = __webpack_require__(9);\r
-function generateRandomPipeName() {\r
-    const randomSuffix = crypto_1.randomBytes(21).toString('hex');\r
-    if (process.platform === 'win32') {\r
-        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;\r
+    Is.defined = defined;\r
+    function undefined(value) {\r
+        return typeof value === 'undefined';\r
     }\r
-    else {\r
-        // Mac/Unix: use socket file\r
-        return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);\r
+    Is.undefined = undefined;\r
+    function boolean(value) {\r
+        return value === true || value === false;\r
     }\r
-}\r
-exports.generateRandomPipeName = generateRandomPipeName;\r
-function createClientPipeTransport(pipeName, encoding = 'utf-8') {\r
-    let connectResolve;\r
-    let connected = new Promise((resolve, _reject) => {\r
-        connectResolve = resolve;\r
-    });\r
-    return new Promise((resolve, reject) => {\r
-        let server = net_1.createServer((socket) => {\r
-            server.close();\r
-            connectResolve([\r
-                new messageReader_1.SocketMessageReader(socket, encoding),\r
-                new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-            ]);\r
-        });\r
-        server.on('error', reject);\r
-        server.listen(pipeName, () => {\r
-            server.removeListener('error', reject);\r
-            resolve({\r
-                onConnected: () => { return connected; }\r
-            });\r
-        });\r
-    });\r
-}\r
-exports.createClientPipeTransport = createClientPipeTransport;\r
-function createServerPipeTransport(pipeName, encoding = 'utf-8') {\r
-    const socket = net_1.createConnection(pipeName);\r
-    return [\r
-        new messageReader_1.SocketMessageReader(socket, encoding),\r
-        new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-    ];\r
-}\r
-exports.createServerPipeTransport = createServerPipeTransport;\r
-
-
-/***/ }),
-/* 13 */
-/***/ (function(module, exports) {
-
-module.exports = require("os");
-
-/***/ }),
-/* 14 */
-/***/ (function(module, exports) {
-
-module.exports = require("crypto");
-
-/***/ }),
-/* 15 */
-/***/ (function(module, exports) {
-
-module.exports = require("net");
-
-/***/ }),
-/* 16 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const net_1 = __webpack_require__(15);\r
-const messageReader_1 = __webpack_require__(7);\r
-const messageWriter_1 = __webpack_require__(9);\r
-function createClientSocketTransport(port, encoding = 'utf-8') {\r
-    let connectResolve;\r
-    let connected = new Promise((resolve, _reject) => {\r
-        connectResolve = resolve;\r
-    });\r
-    return new Promise((resolve, reject) => {\r
-        let server = net_1.createServer((socket) => {\r
-            server.close();\r
-            connectResolve([\r
-                new messageReader_1.SocketMessageReader(socket, encoding),\r
-                new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-            ]);\r
-        });\r
-        server.on('error', reject);\r
-        server.listen(port, '127.0.0.1', () => {\r
-            server.removeListener('error', reject);\r
-            resolve({\r
-                onConnected: () => { return connected; }\r
-            });\r
-        });\r
-    });\r
-}\r
-exports.createClientSocketTransport = createClientSocketTransport;\r
-function createServerSocketTransport(port, encoding = 'utf-8') {\r
-    const socket = net_1.createConnection(port, '127.0.0.1');\r
-    return [\r
-        new messageReader_1.SocketMessageReader(socket, encoding),\r
-        new messageWriter_1.SocketMessageWriter(socket, encoding)\r
-    ];\r
-}\r
-exports.createServerSocketTransport = createServerSocketTransport;\r
+    Is.boolean = boolean;\r
+    function string(value) {\r
+        return toString.call(value) === '[object String]';\r
+    }\r
+    Is.string = string;\r
+    function number(value) {\r
+        return toString.call(value) === '[object Number]';\r
+    }\r
+    Is.number = number;\r
+    function func(value) {\r
+        return toString.call(value) === '[object Function]';\r
+    }\r
+    Is.func = func;\r
+    function objectLiteral(value) {\r
+        // Strictly speaking class instances pass this check as well. Since the LSP\r
+        // doesn't use classes we ignore this for now. If we do we need to add something\r
+        // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\r
+        return value !== null && typeof value === 'object';\r
+    }\r
+    Is.objectLiteral = objectLiteral;\r
+    function typedArray(value, check) {\r
+        return Array.isArray(value) && value.every(check);\r
+    }\r
+    Is.typedArray = typedArray;\r
+})(Is || (Is = {}));\r
 
 
 /***/ }),
-/* 17 */
+/* 19 */,
+/* 20 */,
+/* 21 */,
+/* 22 */,
+/* 23 */,
+/* 24 */,
+/* 25 */,
+/* 26 */,
+/* 27 */,
+/* 28 */,
+/* 29 */,
+/* 30 */,
+/* 31 */,
+/* 32 */,
+/* 33 */,
+/* 34 */,
+/* 35 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentSaveReason", function() { return TextDocumentSaveReason; });
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-/**\r
- * The Position namespace provides helper functions to work with\r
- * [Position](#Position) literals.\r
- */\r
-var Position;\r
-(function (Position) {\r
-    /**\r
-     * Creates a new Position literal from the given line and character.\r
-     * @param line The position's line.\r
-     * @param character The position's character.\r
-     */\r
-    function create(line, character) {\r
-        return { line: line, character: character };\r
-    }\r
-    Position.create = create;\r
-    /**\r
-     * Checks whether the given liternal conforms to the [Position](#Position) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r
-    }\r
-    Position.is = is;\r
-})(Position || (Position = {}));\r
-/**\r
- * The Range namespace provides helper functions to work with\r
- * [Range](#Range) literals.\r
- */\r
-var Range;\r
-(function (Range) {\r
-    function create(one, two, three, four) {\r
-        if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {\r
-            return { start: Position.create(one, two), end: Position.create(three, four) };\r
-        }\r
-        else if (Position.is(one) && Position.is(two)) {\r
-            return { start: one, end: two };\r
-        }\r
-        else {\r
-            throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");\r
-        }\r
-    }\r
-    Range.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [Range](#Range) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r
-    }\r
-    Range.is = is;\r
-})(Range || (Range = {}));\r
-/**\r
- * The Location namespace provides helper functions to work with\r
- * [Location](#Location) literals.\r
- */\r
-var Location;\r
-(function (Location) {\r
-    /**\r
-     * Creates a Location literal.\r
-     * @param uri The location's uri.\r
-     * @param range The location's range.\r
-     */\r
-    function create(uri, range) {\r
-        return { uri: uri, range: range };\r
-    }\r
-    Location.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [Location](#Location) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\r
-    }\r
-    Location.is = is;\r
-})(Location || (Location = {}));\r
-/**\r
- * The LocationLink namespace provides helper functions to work with\r
- * [LocationLink](#LocationLink) literals.\r
- */\r
-var LocationLink;\r
-(function (LocationLink) {\r
-    /**\r
-     * Creates a LocationLink literal.\r
-     * @param targetUri The definition's uri.\r
-     * @param targetRange The full range of the definition.\r
-     * @param targetSelectionRange The span of the symbol definition at the target.\r
-     * @param originSelectionRange The span of the symbol being defined in the originating source file.\r
-     */\r
-    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\r
-        return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\r
-    }\r
-    LocationLink.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\r
-            && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))\r
-            && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\r
-    }\r
-    LocationLink.is = is;\r
-})(LocationLink || (LocationLink = {}));\r
-/**\r
- * The Color namespace provides helper functions to work with\r
- * [Color](#Color) literals.\r
- */\r
-var Color;\r
-(function (Color) {\r
-    /**\r
-     * Creates a new Color literal.\r
-     */\r
-    function create(red, green, blue, alpha) {\r
-        return {\r
-            red: red,\r
-            green: green,\r
-            blue: blue,\r
-            alpha: alpha,\r
-        };\r
-    }\r
-    Color.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [Color](#Color) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.number(candidate.red)\r
-            && Is.number(candidate.green)\r
-            && Is.number(candidate.blue)\r
-            && Is.number(candidate.alpha);\r
-    }\r
-    Color.is = is;\r
-})(Color || (Color = {}));\r
-/**\r
- * The ColorInformation namespace provides helper functions to work with\r
- * [ColorInformation](#ColorInformation) literals.\r
- */\r
-var ColorInformation;\r
-(function (ColorInformation) {\r
-    /**\r
-     * Creates a new ColorInformation literal.\r
-     */\r
-    function create(range, color) {\r
-        return {\r
-            range: range,\r
-            color: color,\r
-        };\r
-    }\r
-    ColorInformation.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Range.is(candidate.range) && Color.is(candidate.color);\r
-    }\r
-    ColorInformation.is = is;\r
-})(ColorInformation || (ColorInformation = {}));\r
-/**\r
- * The Color namespace provides helper functions to work with\r
- * [ColorPresentation](#ColorPresentation) literals.\r
- */\r
-var ColorPresentation;\r
-(function (ColorPresentation) {\r
-    /**\r
-     * Creates a new ColorInformation literal.\r
-     */\r
-    function create(label, textEdit, additionalTextEdits) {\r
-        return {\r
-            label: label,\r
-            textEdit: textEdit,\r
-            additionalTextEdits: additionalTextEdits,\r
-        };\r
-    }\r
-    ColorPresentation.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.string(candidate.label)\r
-            && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\r
-            && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\r
-    }\r
-    ColorPresentation.is = is;\r
-})(ColorPresentation || (ColorPresentation = {}));\r
-/**\r
- * Enum of known range kinds\r
- */\r
-var FoldingRangeKind;\r
-(function (FoldingRangeKind) {\r
-    /**\r
-     * Folding range for a comment\r
-     */\r
-    FoldingRangeKind["Comment"] = "comment";\r
-    /**\r
-     * Folding range for a imports or includes\r
-     */\r
-    FoldingRangeKind["Imports"] = "imports";\r
-    /**\r
-     * Folding range for a region (e.g. `#region`)\r
-     */\r
-    FoldingRangeKind["Region"] = "region";\r
-})(FoldingRangeKind || (FoldingRangeKind = {}));\r
-/**\r
- * The folding range namespace provides helper functions to work with\r
- * [FoldingRange](#FoldingRange) literals.\r
- */\r
-var FoldingRange;\r
-(function (FoldingRange) {\r
-    /**\r
-     * Creates a new FoldingRange literal.\r
-     */\r
-    function create(startLine, endLine, startCharacter, endCharacter, kind) {\r
-        var result = {\r
-            startLine: startLine,\r
-            endLine: endLine\r
-        };\r
-        if (Is.defined(startCharacter)) {\r
-            result.startCharacter = startCharacter;\r
-        }\r
-        if (Is.defined(endCharacter)) {\r
-            result.endCharacter = endCharacter;\r
-        }\r
-        if (Is.defined(kind)) {\r
-            result.kind = kind;\r
-        }\r
-        return result;\r
-    }\r
-    FoldingRange.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.number(candidate.startLine) && Is.number(candidate.startLine)\r
-            && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))\r
-            && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))\r
-            && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\r
-    }\r
-    FoldingRange.is = is;\r
-})(FoldingRange || (FoldingRange = {}));\r
-/**\r
- * The DiagnosticRelatedInformation namespace provides helper functions to work with\r
- * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\r
- */\r
-var DiagnosticRelatedInformation;\r
-(function (DiagnosticRelatedInformation) {\r
-    /**\r
-     * Creates a new DiagnosticRelatedInformation literal.\r
-     */\r
-    function create(location, message) {\r
-        return {\r
-            location: location,\r
-            message: message\r
-        };\r
-    }\r
-    DiagnosticRelatedInformation.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\r
-    }\r
-    DiagnosticRelatedInformation.is = is;\r
-})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\r
-/**\r
- * The diagnostic's severity.\r
- */\r
-var DiagnosticSeverity;\r
-(function (DiagnosticSeverity) {\r
-    /**\r
-     * Reports an error.\r
-     */\r
-    DiagnosticSeverity.Error = 1;\r
-    /**\r
-     * Reports a warning.\r
-     */\r
-    DiagnosticSeverity.Warning = 2;\r
-    /**\r
-     * Reports an information.\r
-     */\r
-    DiagnosticSeverity.Information = 3;\r
-    /**\r
-     * Reports a hint.\r
-     */\r
-    DiagnosticSeverity.Hint = 4;\r
-})(DiagnosticSeverity || (DiagnosticSeverity = {}));\r
-var DiagnosticTag;\r
-(function (DiagnosticTag) {\r
-    /**\r
-     * Unused or unnecessary code.\r
-     *\r
-     * Clients are allowed to render diagnostics with this tag faded out instead of having\r
-     * an error squiggle.\r
-     */\r
-    DiagnosticTag.Unnecessary = 1;\r
-})(DiagnosticTag || (DiagnosticTag = {}));\r
-/**\r
- * The Diagnostic namespace provides helper functions to work with\r
- * [Diagnostic](#Diagnostic) literals.\r
- */\r
-var Diagnostic;\r
-(function (Diagnostic) {\r
-    /**\r
-     * Creates a new Diagnostic literal.\r
-     */\r
-    function create(range, message, severity, code, source, relatedInformation) {\r
-        var result = { range: range, message: message };\r
-        if (Is.defined(severity)) {\r
-            result.severity = severity;\r
-        }\r
-        if (Is.defined(code)) {\r
-            result.code = code;\r
-        }\r
-        if (Is.defined(source)) {\r
-            result.source = source;\r
-        }\r
-        if (Is.defined(relatedInformation)) {\r
-            result.relatedInformation = relatedInformation;\r
-        }\r
-        return result;\r
-    }\r
-    Diagnostic.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate)\r
-            && Range.is(candidate.range)\r
-            && Is.string(candidate.message)\r
-            && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\r
-            && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\r
-            && (Is.string(candidate.source) || Is.undefined(candidate.source))\r
-            && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\r
-    }\r
-    Diagnostic.is = is;\r
-})(Diagnostic || (Diagnostic = {}));\r
-/**\r
- * The Command namespace provides helper functions to work with\r
- * [Command](#Command) literals.\r
- */\r
-var Command;\r
-(function (Command) {\r
-    /**\r
-     * Creates a new Command literal.\r
-     */\r
-    function create(title, command) {\r
-        var args = [];\r
-        for (var _i = 2; _i < arguments.length; _i++) {\r
-            args[_i - 2] = arguments[_i];\r
-        }\r
-        var result = { title: title, command: command };\r
-        if (Is.defined(args) && args.length > 0) {\r
-            result.arguments = args;\r
-        }\r
-        return result;\r
-    }\r
-    Command.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [Command](#Command) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\r
-    }\r
-    Command.is = is;\r
-})(Command || (Command = {}));\r
-/**\r
- * The TextEdit namespace provides helper function to create replace,\r
- * insert and delete edits more easily.\r
- */\r
-var TextEdit;\r
-(function (TextEdit) {\r
-    /**\r
-     * Creates a replace text edit.\r
-     * @param range The range of text to be replaced.\r
-     * @param newText The new text.\r
-     */\r
-    function replace(range, newText) {\r
-        return { range: range, newText: newText };\r
-    }\r
-    TextEdit.replace = replace;\r
-    /**\r
-     * Creates a insert text edit.\r
-     * @param position The position to insert the text at.\r
-     * @param newText The text to be inserted.\r
-     */\r
-    function insert(position, newText) {\r
-        return { range: { start: position, end: position }, newText: newText };\r
-    }\r
-    TextEdit.insert = insert;\r
-    /**\r
-     * Creates a delete text edit.\r
-     * @param range The range of text to be deleted.\r
-     */\r
-    function del(range) {\r
-        return { range: range, newText: '' };\r
-    }\r
-    TextEdit.del = del;\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.objectLiteral(candidate)\r
-            && Is.string(candidate.newText)\r
-            && Range.is(candidate.range);\r
-    }\r
-    TextEdit.is = is;\r
-})(TextEdit || (TextEdit = {}));\r
-/**\r
- * The TextDocumentEdit namespace provides helper function to create\r
- * an edit that manipulates a text document.\r
- */\r
-var TextDocumentEdit;\r
-(function (TextDocumentEdit) {\r
-    /**\r
-     * Creates a new `TextDocumentEdit`\r
-     */\r
-    function create(textDocument, edits) {\r
-        return { textDocument: textDocument, edits: edits };\r
-    }\r
-    TextDocumentEdit.create = create;\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate)\r
-            && VersionedTextDocumentIdentifier.is(candidate.textDocument)\r
-            && Array.isArray(candidate.edits);\r
-    }\r
-    TextDocumentEdit.is = is;\r
-})(TextDocumentEdit || (TextDocumentEdit = {}));\r
-var CreateFile;\r
-(function (CreateFile) {\r
-    function create(uri, options) {\r
-        var result = {\r
-            kind: 'create',\r
-            uri: uri\r
-        };\r
-        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {\r
-            result.options = options;\r
-        }\r
-        return result;\r
-    }\r
-    CreateFile.create = create;\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&\r
-            (candidate.options === void 0 ||\r
-                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));\r
-    }\r
-    CreateFile.is = is;\r
-})(CreateFile || (CreateFile = {}));\r
-var RenameFile;\r
-(function (RenameFile) {\r
-    function create(oldUri, newUri, options) {\r
-        var result = {\r
-            kind: 'rename',\r
-            oldUri: oldUri,\r
-            newUri: newUri\r
-        };\r
-        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {\r
-            result.options = options;\r
-        }\r
-        return result;\r
-    }\r
-    RenameFile.create = create;\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&\r
-            (candidate.options === void 0 ||\r
-                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));\r
-    }\r
-    RenameFile.is = is;\r
-})(RenameFile || (RenameFile = {}));\r
-var DeleteFile;\r
-(function (DeleteFile) {\r
-    function create(uri, options) {\r
-        var result = {\r
-            kind: 'delete',\r
-            uri: uri\r
-        };\r
-        if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {\r
-            result.options = options;\r
-        }\r
-        return result;\r
-    }\r
-    DeleteFile.create = create;\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&\r
-            (candidate.options === void 0 ||\r
-                ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));\r
-    }\r
-    DeleteFile.is = is;\r
-})(DeleteFile || (DeleteFile = {}));\r
-var WorkspaceEdit;\r
-(function (WorkspaceEdit) {\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate &&\r
-            (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&\r
-            (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {\r
-                if (Is.string(change.kind)) {\r
-                    return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\r
-                }\r
-                else {\r
-                    return TextDocumentEdit.is(change);\r
-                }\r
-            }));\r
-    }\r
-    WorkspaceEdit.is = is;\r
-})(WorkspaceEdit || (WorkspaceEdit = {}));\r
-var TextEditChangeImpl = /** @class */ (function () {\r
-    function TextEditChangeImpl(edits) {\r
-        this.edits = edits;\r
-    }\r
-    TextEditChangeImpl.prototype.insert = function (position, newText) {\r
-        this.edits.push(TextEdit.insert(position, newText));\r
-    };\r
-    TextEditChangeImpl.prototype.replace = function (range, newText) {\r
-        this.edits.push(TextEdit.replace(range, newText));\r
-    };\r
-    TextEditChangeImpl.prototype.delete = function (range) {\r
-        this.edits.push(TextEdit.del(range));\r
-    };\r
-    TextEditChangeImpl.prototype.add = function (edit) {\r
-        this.edits.push(edit);\r
-    };\r
-    TextEditChangeImpl.prototype.all = function () {\r
-        return this.edits;\r
-    };\r
-    TextEditChangeImpl.prototype.clear = function () {\r
-        this.edits.splice(0, this.edits.length);\r
-    };\r
-    return TextEditChangeImpl;\r
-}());\r
-/**\r
- * A workspace change helps constructing changes to a workspace.\r
- */\r
-var WorkspaceChange = /** @class */ (function () {\r
-    function WorkspaceChange(workspaceEdit) {\r
-        var _this = this;\r
-        this._textEditChanges = Object.create(null);\r
-        if (workspaceEdit) {\r
-            this._workspaceEdit = workspaceEdit;\r
-            if (workspaceEdit.documentChanges) {\r
-                workspaceEdit.documentChanges.forEach(function (change) {\r
-                    if (TextDocumentEdit.is(change)) {\r
-                        var textEditChange = new TextEditChangeImpl(change.edits);\r
-                        _this._textEditChanges[change.textDocument.uri] = textEditChange;\r
-                    }\r
-                });\r
-            }\r
-            else if (workspaceEdit.changes) {\r
-                Object.keys(workspaceEdit.changes).forEach(function (key) {\r
-                    var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\r
-                    _this._textEditChanges[key] = textEditChange;\r
-                });\r
-            }\r
-        }\r
-    }\r
-    Object.defineProperty(WorkspaceChange.prototype, "edit", {\r
-        /**\r
-         * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\r
-         * use to be returned from a workspace edit operation like rename.\r
-         */\r
-        get: function () {\r
-            return this._workspaceEdit;\r
-        },\r
-        enumerable: true,\r
-        configurable: true\r
-    });\r
-    WorkspaceChange.prototype.getTextEditChange = function (key) {\r
-        if (VersionedTextDocumentIdentifier.is(key)) {\r
-            if (!this._workspaceEdit) {\r
-                this._workspaceEdit = {\r
-                    documentChanges: []\r
-                };\r
-            }\r
-            if (!this._workspaceEdit.documentChanges) {\r
-                throw new Error('Workspace edit is not configured for document changes.');\r
-            }\r
-            var textDocument = key;\r
-            var result = this._textEditChanges[textDocument.uri];\r
-            if (!result) {\r
-                var edits = [];\r
-                var textDocumentEdit = {\r
-                    textDocument: textDocument,\r
-                    edits: edits\r
-                };\r
-                this._workspaceEdit.documentChanges.push(textDocumentEdit);\r
-                result = new TextEditChangeImpl(edits);\r
-                this._textEditChanges[textDocument.uri] = result;\r
-            }\r
-            return result;\r
-        }\r
-        else {\r
-            if (!this._workspaceEdit) {\r
-                this._workspaceEdit = {\r
-                    changes: Object.create(null)\r
-                };\r
-            }\r
-            if (!this._workspaceEdit.changes) {\r
-                throw new Error('Workspace edit is not configured for normal text edit changes.');\r
-            }\r
-            var result = this._textEditChanges[key];\r
-            if (!result) {\r
-                var edits = [];\r
-                this._workspaceEdit.changes[key] = edits;\r
-                result = new TextEditChangeImpl(edits);\r
-                this._textEditChanges[key] = result;\r
-            }\r
-            return result;\r
-        }\r
-    };\r
-    WorkspaceChange.prototype.createFile = function (uri, options) {\r
-        this.checkDocumentChanges();\r
-        this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));\r
-    };\r
-    WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {\r
-        this.checkDocumentChanges();\r
-        this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));\r
-    };\r
-    WorkspaceChange.prototype.deleteFile = function (uri, options) {\r
-        this.checkDocumentChanges();\r
-        this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));\r
-    };\r
-    WorkspaceChange.prototype.checkDocumentChanges = function () {\r
-        if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {\r
-            throw new Error('Workspace edit is not configured for document changes.');\r
-        }\r
-    };\r
-    return WorkspaceChange;\r
-}());\r
-\r
-/**\r
- * The TextDocumentIdentifier namespace provides helper functions to work with\r
- * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\r
- */\r
-var TextDocumentIdentifier;\r
-(function (TextDocumentIdentifier) {\r
-    /**\r
-     * Creates a new TextDocumentIdentifier literal.\r
-     * @param uri The document's uri.\r
-     */\r
-    function create(uri) {\r
-        return { uri: uri };\r
-    }\r
-    TextDocumentIdentifier.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.string(candidate.uri);\r
-    }\r
-    TextDocumentIdentifier.is = is;\r
-})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\r
-/**\r
- * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\r
- * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\r
- */\r
-var VersionedTextDocumentIdentifier;\r
-(function (VersionedTextDocumentIdentifier) {\r
-    /**\r
-     * Creates a new VersionedTextDocumentIdentifier literal.\r
-     * @param uri The document's uri.\r
-     * @param uri The document's text.\r
-     */\r
-    function create(uri, version) {\r
-        return { uri: uri, version: version };\r
-    }\r
-    VersionedTextDocumentIdentifier.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));\r
-    }\r
-    VersionedTextDocumentIdentifier.is = is;\r
-})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\r
-/**\r
- * The TextDocumentItem namespace provides helper functions to work with\r
- * [TextDocumentItem](#TextDocumentItem) literals.\r
- */\r
-var TextDocumentItem;\r
-(function (TextDocumentItem) {\r
-    /**\r
-     * Creates a new TextDocumentItem literal.\r
-     * @param uri The document's uri.\r
-     * @param languageId The document's language identifier.\r
-     * @param version The document's version number.\r
-     * @param text The document's text.\r
-     */\r
-    function create(uri, languageId, version, text) {\r
-        return { uri: uri, languageId: languageId, version: version, text: text };\r
-    }\r
-    TextDocumentItem.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);\r
-    }\r
-    TextDocumentItem.is = is;\r
-})(TextDocumentItem || (TextDocumentItem = {}));\r
-/**\r
- * Describes the content type that a client supports in various\r
- * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\r
- *\r
- * Please note that `MarkupKinds` must not start with a `$`. This kinds\r
- * are reserved for internal usage.\r
- */\r
-var MarkupKind;\r
-(function (MarkupKind) {\r
-    /**\r
-     * Plain text is supported as a content format\r
-     */\r
-    MarkupKind.PlainText = 'plaintext';\r
-    /**\r
-     * Markdown is supported as a content format\r
-     */\r
-    MarkupKind.Markdown = 'markdown';\r
-})(MarkupKind || (MarkupKind = {}));\r
-(function (MarkupKind) {\r
-    /**\r
-     * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\r
-    }\r
-    MarkupKind.is = is;\r
-})(MarkupKind || (MarkupKind = {}));\r
-var MarkupContent;\r
-(function (MarkupContent) {\r
-    /**\r
-     * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r
-    }\r
-    MarkupContent.is = is;\r
-})(MarkupContent || (MarkupContent = {}));\r
-/**\r
- * The kind of a completion entry.\r
- */\r
-var CompletionItemKind;\r
-(function (CompletionItemKind) {\r
-    CompletionItemKind.Text = 1;\r
-    CompletionItemKind.Method = 2;\r
-    CompletionItemKind.Function = 3;\r
-    CompletionItemKind.Constructor = 4;\r
-    CompletionItemKind.Field = 5;\r
-    CompletionItemKind.Variable = 6;\r
-    CompletionItemKind.Class = 7;\r
-    CompletionItemKind.Interface = 8;\r
-    CompletionItemKind.Module = 9;\r
-    CompletionItemKind.Property = 10;\r
-    CompletionItemKind.Unit = 11;\r
-    CompletionItemKind.Value = 12;\r
-    CompletionItemKind.Enum = 13;\r
-    CompletionItemKind.Keyword = 14;\r
-    CompletionItemKind.Snippet = 15;\r
-    CompletionItemKind.Color = 16;\r
-    CompletionItemKind.File = 17;\r
-    CompletionItemKind.Reference = 18;\r
-    CompletionItemKind.Folder = 19;\r
-    CompletionItemKind.EnumMember = 20;\r
-    CompletionItemKind.Constant = 21;\r
-    CompletionItemKind.Struct = 22;\r
-    CompletionItemKind.Event = 23;\r
-    CompletionItemKind.Operator = 24;\r
-    CompletionItemKind.TypeParameter = 25;\r
-})(CompletionItemKind || (CompletionItemKind = {}));\r
-/**\r
- * Defines whether the insert text in a completion item should be interpreted as\r
- * plain text or a snippet.\r
- */\r
-var InsertTextFormat;\r
-(function (InsertTextFormat) {\r
-    /**\r
-     * The primary text to be inserted is treated as a plain string.\r
-     */\r
-    InsertTextFormat.PlainText = 1;\r
-    /**\r
-     * The primary text to be inserted is treated as a snippet.\r
-     *\r
-     * A snippet can define tab stops and placeholders with `$1`, `$2`\r
-     * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\r
-     * the end of the snippet. Placeholders with equal identifiers are linked,\r
-     * that is typing in one will update others too.\r
-     *\r
-     * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md\r
-     */\r
-    InsertTextFormat.Snippet = 2;\r
-})(InsertTextFormat || (InsertTextFormat = {}));\r
-/**\r
- * The CompletionItem namespace provides functions to deal with\r
- * completion items.\r
- */\r
-var CompletionItem;\r
-(function (CompletionItem) {\r
-    /**\r
-     * Create a completion item and seed it with a label.\r
-     * @param label The completion item's label\r
-     */\r
-    function create(label) {\r
-        return { label: label };\r
-    }\r
-    CompletionItem.create = create;\r
-})(CompletionItem || (CompletionItem = {}));\r
-/**\r
- * The CompletionList namespace provides functions to deal with\r
- * completion lists.\r
- */\r
-var CompletionList;\r
-(function (CompletionList) {\r
-    /**\r
-     * Creates a new completion list.\r
-     *\r
-     * @param items The completion items.\r
-     * @param isIncomplete The list is not complete.\r
-     */\r
-    function create(items, isIncomplete) {\r
-        return { items: items ? items : [], isIncomplete: !!isIncomplete };\r
-    }\r
-    CompletionList.create = create;\r
-})(CompletionList || (CompletionList = {}));\r
-var MarkedString;\r
-(function (MarkedString) {\r
-    /**\r
-     * Creates a marked string from plain text.\r
-     *\r
-     * @param plainText The plain text.\r
-     */\r
-    function fromPlainText(plainText) {\r
-        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\r
-    }\r
-    MarkedString.fromPlainText = fromPlainText;\r
-    /**\r
-     * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\r
-    }\r
-    MarkedString.is = is;\r
-})(MarkedString || (MarkedString = {}));\r
-var Hover;\r
-(function (Hover) {\r
-    /**\r
-     * Checks whether the given value conforms to the [Hover](#Hover) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\r
-            MarkedString.is(candidate.contents) ||\r
-            Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));\r
-    }\r
-    Hover.is = is;\r
-})(Hover || (Hover = {}));\r
-/**\r
- * The ParameterInformation namespace provides helper functions to work with\r
- * [ParameterInformation](#ParameterInformation) literals.\r
- */\r
-var ParameterInformation;\r
-(function (ParameterInformation) {\r
-    /**\r
-     * Creates a new parameter information literal.\r
-     *\r
-     * @param label A label string.\r
-     * @param documentation A doc string.\r
-     */\r
-    function create(label, documentation) {\r
-        return documentation ? { label: label, documentation: documentation } : { label: label };\r
-    }\r
-    ParameterInformation.create = create;\r
-    ;\r
-})(ParameterInformation || (ParameterInformation = {}));\r
-/**\r
- * The SignatureInformation namespace provides helper functions to work with\r
- * [SignatureInformation](#SignatureInformation) literals.\r
- */\r
-var SignatureInformation;\r
-(function (SignatureInformation) {\r
-    function create(label, documentation) {\r
-        var parameters = [];\r
-        for (var _i = 2; _i < arguments.length; _i++) {\r
-            parameters[_i - 2] = arguments[_i];\r
-        }\r
-        var result = { label: label };\r
-        if (Is.defined(documentation)) {\r
-            result.documentation = documentation;\r
-        }\r
-        if (Is.defined(parameters)) {\r
-            result.parameters = parameters;\r
-        }\r
-        else {\r
-            result.parameters = [];\r
-        }\r
-        return result;\r
-    }\r
-    SignatureInformation.create = create;\r
-})(SignatureInformation || (SignatureInformation = {}));\r
-/**\r
- * A document highlight kind.\r
- */\r
-var DocumentHighlightKind;\r
-(function (DocumentHighlightKind) {\r
-    /**\r
-     * A textual occurrence.\r
-     */\r
-    DocumentHighlightKind.Text = 1;\r
-    /**\r
-     * Read-access of a symbol, like reading a variable.\r
-     */\r
-    DocumentHighlightKind.Read = 2;\r
-    /**\r
-     * Write-access of a symbol, like writing to a variable.\r
-     */\r
-    DocumentHighlightKind.Write = 3;\r
-})(DocumentHighlightKind || (DocumentHighlightKind = {}));\r
-/**\r
- * DocumentHighlight namespace to provide helper functions to work with\r
- * [DocumentHighlight](#DocumentHighlight) literals.\r
- */\r
-var DocumentHighlight;\r
-(function (DocumentHighlight) {\r
-    /**\r
-     * Create a DocumentHighlight object.\r
-     * @param range The range the highlight applies to.\r
-     */\r
-    function create(range, kind) {\r
-        var result = { range: range };\r
-        if (Is.number(kind)) {\r
-            result.kind = kind;\r
-        }\r
-        return result;\r
-    }\r
-    DocumentHighlight.create = create;\r
-})(DocumentHighlight || (DocumentHighlight = {}));\r
-/**\r
- * A symbol kind.\r
- */\r
-var SymbolKind;\r
-(function (SymbolKind) {\r
-    SymbolKind.File = 1;\r
-    SymbolKind.Module = 2;\r
-    SymbolKind.Namespace = 3;\r
-    SymbolKind.Package = 4;\r
-    SymbolKind.Class = 5;\r
-    SymbolKind.Method = 6;\r
-    SymbolKind.Property = 7;\r
-    SymbolKind.Field = 8;\r
-    SymbolKind.Constructor = 9;\r
-    SymbolKind.Enum = 10;\r
-    SymbolKind.Interface = 11;\r
-    SymbolKind.Function = 12;\r
-    SymbolKind.Variable = 13;\r
-    SymbolKind.Constant = 14;\r
-    SymbolKind.String = 15;\r
-    SymbolKind.Number = 16;\r
-    SymbolKind.Boolean = 17;\r
-    SymbolKind.Array = 18;\r
-    SymbolKind.Object = 19;\r
-    SymbolKind.Key = 20;\r
-    SymbolKind.Null = 21;\r
-    SymbolKind.EnumMember = 22;\r
-    SymbolKind.Struct = 23;\r
-    SymbolKind.Event = 24;\r
-    SymbolKind.Operator = 25;\r
-    SymbolKind.TypeParameter = 26;\r
-})(SymbolKind || (SymbolKind = {}));\r
-var SymbolInformation;\r
-(function (SymbolInformation) {\r
-    /**\r
-     * Creates a new symbol information literal.\r
-     *\r
-     * @param name The name of the symbol.\r
-     * @param kind The kind of the symbol.\r
-     * @param range The range of the location of the symbol.\r
-     * @param uri The resource of the location of symbol, defaults to the current document.\r
-     * @param containerName The name of the symbol containing the symbol.\r
-     */\r
-    function create(name, kind, range, uri, containerName) {\r
-        var result = {\r
-            name: name,\r
-            kind: kind,\r
-            location: { uri: uri, range: range }\r
-        };\r
-        if (containerName) {\r
-            result.containerName = containerName;\r
-        }\r
-        return result;\r
-    }\r
-    SymbolInformation.create = create;\r
-})(SymbolInformation || (SymbolInformation = {}));\r
-/**\r
- * Represents programming constructs like variables, classes, interfaces etc.\r
- * that appear in a document. Document symbols can be hierarchical and they\r
- * have two ranges: one that encloses its definition and one that points to\r
- * its most interesting range, e.g. the range of an identifier.\r
- */\r
-var DocumentSymbol = /** @class */ (function () {\r
-    function DocumentSymbol() {\r
-    }\r
-    return DocumentSymbol;\r
-}());\r
-\r
-(function (DocumentSymbol) {\r
-    /**\r
-     * Creates a new symbol information literal.\r
-     *\r
-     * @param name The name of the symbol.\r
-     * @param detail The detail of the symbol.\r
-     * @param kind The kind of the symbol.\r
-     * @param range The range of the symbol.\r
-     * @param selectionRange The selectionRange of the symbol.\r
-     * @param children Children of the symbol.\r
-     */\r
-    function create(name, detail, kind, range, selectionRange, children) {\r
-        var result = {\r
-            name: name,\r
-            detail: detail,\r
-            kind: kind,\r
-            range: range,\r
-            selectionRange: selectionRange\r
-        };\r
-        if (children !== void 0) {\r
-            result.children = children;\r
-        }\r
-        return result;\r
-    }\r
-    DocumentSymbol.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate &&\r
-            Is.string(candidate.name) && Is.number(candidate.kind) &&\r
-            Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\r
-            (candidate.detail === void 0 || Is.string(candidate.detail)) &&\r
-            (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&\r
-            (candidate.children === void 0 || Array.isArray(candidate.children));\r
-    }\r
-    DocumentSymbol.is = is;\r
-})(DocumentSymbol || (DocumentSymbol = {}));\r
-/**\r
- * A set of predefined code action kinds\r
- */\r
-var CodeActionKind;\r
-(function (CodeActionKind) {\r
-    /**\r
-     * Base kind for quickfix actions: 'quickfix'\r
-     */\r
-    CodeActionKind.QuickFix = 'quickfix';\r
-    /**\r
-     * Base kind for refactoring actions: 'refactor'\r
-     */\r
-    CodeActionKind.Refactor = 'refactor';\r
-    /**\r
-     * Base kind for refactoring extraction actions: 'refactor.extract'\r
-     *\r
-     * Example extract actions:\r
-     *\r
-     * - Extract method\r
-     * - Extract function\r
-     * - Extract variable\r
-     * - Extract interface from class\r
-     * - ...\r
-     */\r
-    CodeActionKind.RefactorExtract = 'refactor.extract';\r
-    /**\r
-     * Base kind for refactoring inline actions: 'refactor.inline'\r
-     *\r
-     * Example inline actions:\r
-     *\r
-     * - Inline function\r
-     * - Inline variable\r
-     * - Inline constant\r
-     * - ...\r
-     */\r
-    CodeActionKind.RefactorInline = 'refactor.inline';\r
-    /**\r
-     * Base kind for refactoring rewrite actions: 'refactor.rewrite'\r
-     *\r
-     * Example rewrite actions:\r
-     *\r
-     * - Convert JavaScript function to class\r
-     * - Add or remove parameter\r
-     * - Encapsulate field\r
-     * - Make method static\r
-     * - Move method to base class\r
-     * - ...\r
-     */\r
-    CodeActionKind.RefactorRewrite = 'refactor.rewrite';\r
-    /**\r
-     * Base kind for source actions: `source`\r
-     *\r
-     * Source code actions apply to the entire file.\r
-     */\r
-    CodeActionKind.Source = 'source';\r
-    /**\r
-     * Base kind for an organize imports source action: `source.organizeImports`\r
-     */\r
-    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\r
-})(CodeActionKind || (CodeActionKind = {}));\r
-/**\r
- * The CodeActionContext namespace provides helper functions to work with\r
- * [CodeActionContext](#CodeActionContext) literals.\r
- */\r
-var CodeActionContext;\r
-(function (CodeActionContext) {\r
-    /**\r
-     * Creates a new CodeActionContext literal.\r
-     */\r
-    function create(diagnostics, only) {\r
-        var result = { diagnostics: diagnostics };\r
-        if (only !== void 0 && only !== null) {\r
-            result.only = only;\r
-        }\r
-        return result;\r
-    }\r
-    CodeActionContext.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));\r
-    }\r
-    CodeActionContext.is = is;\r
-})(CodeActionContext || (CodeActionContext = {}));\r
-var CodeAction;\r
-(function (CodeAction) {\r
-    function create(title, commandOrEdit, kind) {\r
-        var result = { title: title };\r
-        if (Command.is(commandOrEdit)) {\r
-            result.command = commandOrEdit;\r
-        }\r
-        else {\r
-            result.edit = commandOrEdit;\r
-        }\r
-        if (kind !== void null) {\r
-            result.kind = kind;\r
-        }\r
-        return result;\r
-    }\r
-    CodeAction.create = create;\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate && Is.string(candidate.title) &&\r
-            (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\r
-            (candidate.kind === void 0 || Is.string(candidate.kind)) &&\r
-            (candidate.edit !== void 0 || candidate.command !== void 0) &&\r
-            (candidate.command === void 0 || Command.is(candidate.command)) &&\r
-            (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));\r
-    }\r
-    CodeAction.is = is;\r
-})(CodeAction || (CodeAction = {}));\r
-/**\r
- * The CodeLens namespace provides helper functions to work with\r
- * [CodeLens](#CodeLens) literals.\r
- */\r
-var CodeLens;\r
-(function (CodeLens) {\r
-    /**\r
-     * Creates a new CodeLens literal.\r
-     */\r
-    function create(range, data) {\r
-        var result = { range: range };\r
-        if (Is.defined(data))\r
-            result.data = data;\r
-        return result;\r
-    }\r
-    CodeLens.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\r
-    }\r
-    CodeLens.is = is;\r
-})(CodeLens || (CodeLens = {}));\r
-/**\r
- * The FormattingOptions namespace provides helper functions to work with\r
- * [FormattingOptions](#FormattingOptions) literals.\r
- */\r
-var FormattingOptions;\r
-(function (FormattingOptions) {\r
-    /**\r
-     * Creates a new FormattingOptions literal.\r
-     */\r
-    function create(tabSize, insertSpaces) {\r
-        return { tabSize: tabSize, insertSpaces: insertSpaces };\r
-    }\r
-    FormattingOptions.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\r
-    }\r
-    FormattingOptions.is = is;\r
-})(FormattingOptions || (FormattingOptions = {}));\r
-/**\r
- * A document link is a range in a text document that links to an internal or external resource, like another\r
- * text document or a web site.\r
- */\r
-var DocumentLink = /** @class */ (function () {\r
-    function DocumentLink() {\r
-    }\r
-    return DocumentLink;\r
-}());\r
-\r
-/**\r
- * The DocumentLink namespace provides helper functions to work with\r
- * [DocumentLink](#DocumentLink) literals.\r
- */\r
-(function (DocumentLink) {\r
-    /**\r
-     * Creates a new DocumentLink literal.\r
-     */\r
-    function create(range, target, data) {\r
-        return { range: range, target: target, data: data };\r
-    }\r
-    DocumentLink.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\r
-    }\r
-    DocumentLink.is = is;\r
-})(DocumentLink || (DocumentLink = {}));\r
-var EOL = ['\n', '\r\n', '\r'];\r
-var TextDocument;\r
-(function (TextDocument) {\r
-    /**\r
-     * Creates a new ITextDocument literal from the given uri and content.\r
-     * @param uri The document's uri.\r
-     * @param languageId  The document's language Id.\r
-     * @param content The document's content.\r
-     */\r
-    function create(uri, languageId, version, content) {\r
-        return new FullTextDocument(uri, languageId, version, content);\r
-    }\r
-    TextDocument.create = create;\r
-    /**\r
-     * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\r
-     */\r
-    function is(value) {\r
-        var candidate = value;\r
-        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)\r
-            && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\r
-    }\r
-    TextDocument.is = is;\r
-    function applyEdits(document, edits) {\r
-        var text = document.getText();\r
-        var sortedEdits = mergeSort(edits, function (a, b) {\r
-            var diff = a.range.start.line - b.range.start.line;\r
-            if (diff === 0) {\r
-                return a.range.start.character - b.range.start.character;\r
-            }\r
-            return diff;\r
-        });\r
-        var lastModifiedOffset = text.length;\r
-        for (var i = sortedEdits.length - 1; i >= 0; i--) {\r
-            var e = sortedEdits[i];\r
-            var startOffset = document.offsetAt(e.range.start);\r
-            var endOffset = document.offsetAt(e.range.end);\r
-            if (endOffset <= lastModifiedOffset) {\r
-                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\r
-            }\r
-            else {\r
-                throw new Error('Overlapping edit');\r
-            }\r
-            lastModifiedOffset = startOffset;\r
-        }\r
-        return text;\r
-    }\r
-    TextDocument.applyEdits = applyEdits;\r
-    function mergeSort(data, compare) {\r
-        if (data.length <= 1) {\r
-            // sorted\r
-            return data;\r
-        }\r
-        var p = (data.length / 2) | 0;\r
-        var left = data.slice(0, p);\r
-        var right = data.slice(p);\r
-        mergeSort(left, compare);\r
-        mergeSort(right, compare);\r
-        var leftIdx = 0;\r
-        var rightIdx = 0;\r
-        var i = 0;\r
-        while (leftIdx < left.length && rightIdx < right.length) {\r
-            var ret = compare(left[leftIdx], right[rightIdx]);\r
-            if (ret <= 0) {\r
-                // smaller_equal -> take left to preserve order\r
-                data[i++] = left[leftIdx++];\r
-            }\r
-            else {\r
-                // greater -> take right\r
-                data[i++] = right[rightIdx++];\r
-            }\r
-        }\r
-        while (leftIdx < left.length) {\r
-            data[i++] = left[leftIdx++];\r
-        }\r
-        while (rightIdx < right.length) {\r
-            data[i++] = right[rightIdx++];\r
-        }\r
-        return data;\r
-    }\r
-})(TextDocument || (TextDocument = {}));\r
-/**\r
- * Represents reasons why a text document is saved.\r
- */\r
-var TextDocumentSaveReason;\r
-(function (TextDocumentSaveReason) {\r
-    /**\r
-     * Manually triggered, e.g. by the user pressing save, by starting debugging,\r
-     * or by an API call.\r
-     */\r
-    TextDocumentSaveReason.Manual = 1;\r
-    /**\r
-     * Automatic after a delay.\r
-     */\r
-    TextDocumentSaveReason.AfterDelay = 2;\r
-    /**\r
-     * When the editor lost focus.\r
-     */\r
-    TextDocumentSaveReason.FocusOut = 3;\r
-})(TextDocumentSaveReason || (TextDocumentSaveReason = {}));\r
-var FullTextDocument = /** @class */ (function () {\r
-    function FullTextDocument(uri, languageId, version, content) {\r
-        this._uri = uri;\r
-        this._languageId = languageId;\r
-        this._version = version;\r
-        this._content = content;\r
-        this._lineOffsets = null;\r
-    }\r
-    Object.defineProperty(FullTextDocument.prototype, "uri", {\r
-        get: function () {\r
-            return this._uri;\r
-        },\r
-        enumerable: true,\r
-        configurable: true\r
-    });\r
-    Object.defineProperty(FullTextDocument.prototype, "languageId", {\r
-        get: function () {\r
-            return this._languageId;\r
-        },\r
-        enumerable: true,\r
-        configurable: true\r
-    });\r
-    Object.defineProperty(FullTextDocument.prototype, "version", {\r
-        get: function () {\r
-            return this._version;\r
-        },\r
-        enumerable: true,\r
-        configurable: true\r
-    });\r
-    FullTextDocument.prototype.getText = function (range) {\r
-        if (range) {\r
-            var start = this.offsetAt(range.start);\r
-            var end = this.offsetAt(range.end);\r
-            return this._content.substring(start, end);\r
-        }\r
-        return this._content;\r
-    };\r
-    FullTextDocument.prototype.update = function (event, version) {\r
-        this._content = event.text;\r
-        this._version = version;\r
-        this._lineOffsets = null;\r
-    };\r
-    FullTextDocument.prototype.getLineOffsets = function () {\r
-        if (this._lineOffsets === null) {\r
-            var lineOffsets = [];\r
-            var text = this._content;\r
-            var isLineStart = true;\r
-            for (var i = 0; i < text.length; i++) {\r
-                if (isLineStart) {\r
-                    lineOffsets.push(i);\r
-                    isLineStart = false;\r
-                }\r
-                var ch = text.charAt(i);\r
-                isLineStart = (ch === '\r' || ch === '\n');\r
-                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {\r
-                    i++;\r
-                }\r
-            }\r
-            if (isLineStart && text.length > 0) {\r
-                lineOffsets.push(text.length);\r
-            }\r
-            this._lineOffsets = lineOffsets;\r
-        }\r
-        return this._lineOffsets;\r
-    };\r
-    FullTextDocument.prototype.positionAt = function (offset) {\r
-        offset = Math.max(Math.min(offset, this._content.length), 0);\r
-        var lineOffsets = this.getLineOffsets();\r
-        var low = 0, high = lineOffsets.length;\r
-        if (high === 0) {\r
-            return Position.create(0, offset);\r
-        }\r
-        while (low < high) {\r
-            var mid = Math.floor((low + high) / 2);\r
-            if (lineOffsets[mid] > offset) {\r
-                high = mid;\r
-            }\r
-            else {\r
-                low = mid + 1;\r
-            }\r
-        }\r
-        // low is the least x for which the line offset is larger than the current offset\r
-        // or array.length if no line offset is larger than the current offset\r
-        var line = low - 1;\r
-        return Position.create(line, offset - lineOffsets[line]);\r
-    };\r
-    FullTextDocument.prototype.offsetAt = function (position) {\r
-        var lineOffsets = this.getLineOffsets();\r
-        if (position.line >= lineOffsets.length) {\r
-            return this._content.length;\r
-        }\r
-        else if (position.line < 0) {\r
-            return 0;\r
-        }\r
-        var lineOffset = lineOffsets[position.line];\r
-        var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\r
-        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\r
-    };\r
-    Object.defineProperty(FullTextDocument.prototype, "lineCount", {\r
-        get: function () {\r
-            return this.getLineOffsets().length;\r
-        },\r
-        enumerable: true,\r
-        configurable: true\r
-    });\r
-    return FullTextDocument;\r
-}());\r
-var Is;\r
-(function (Is) {\r
-    var toString = Object.prototype.toString;\r
-    function defined(value) {\r
-        return typeof value !== 'undefined';\r
-    }\r
-    Is.defined = defined;\r
-    function undefined(value) {\r
-        return typeof value === 'undefined';\r
-    }\r
-    Is.undefined = undefined;\r
-    function boolean(value) {\r
-        return value === true || value === false;\r
-    }\r
-    Is.boolean = boolean;\r
-    function string(value) {\r
-        return toString.call(value) === '[object String]';\r
-    }\r
-    Is.string = string;\r
-    function number(value) {\r
-        return toString.call(value) === '[object Number]';\r
-    }\r
-    Is.number = number;\r
-    function func(value) {\r
-        return toString.call(value) === '[object Function]';\r
-    }\r
-    Is.func = func;\r
-    function objectLiteral(value) {\r
-        // Strictly speaking class instances pass this check as well. Since the LSP\r
-        // doesn't use classes we ignore this for now. If we do we need to add something\r
-        // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\r
-        return value !== null && typeof value === 'object';\r
-    }\r
-    Is.objectLiteral = objectLiteral;\r
-    function typedArray(value, check) {\r
-        return Array.isArray(value) && value.every(check);\r
-    }\r
-    Is.typedArray = typedArray;\r
-})(Is || (Is = {}));\r
-
-
-/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const Is = __webpack_require__(19);\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-const protocol_implementation_1 = __webpack_require__(20);\r
-exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;\r
-const protocol_typeDefinition_1 = __webpack_require__(21);\r
-exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;\r
-const protocol_workspaceFolders_1 = __webpack_require__(22);\r
-exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;\r
-exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;\r
-const protocol_configuration_1 = __webpack_require__(23);\r
-exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;\r
-const protocol_colorProvider_1 = __webpack_require__(24);\r
-exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;\r
-exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;\r
-const protocol_foldingRange_1 = __webpack_require__(25);\r
-exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;\r
-const protocol_declaration_1 = __webpack_require__(26);\r
-exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;\r
-// @ts-ignore: to avoid inlining LocatioLink as dynamic import\r
-let __noDynamicImport;\r
-var DocumentFilter;\r
-(function (DocumentFilter) {\r
-    function is(value) {\r
-        let candidate = value;\r
-        return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);\r
-    }\r
-    DocumentFilter.is = is;\r
-})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));\r
-/**\r
- * The `client/registerCapability` request is sent from the server to the client to register a new capability\r
- * handler on the client side.\r
- */\r
-var RegistrationRequest;\r
-(function (RegistrationRequest) {\r
-    RegistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/registerCapability');\r
-})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));\r
-/**\r
- * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability\r
- * handler on the client side.\r
- */\r
-var UnregistrationRequest;\r
-(function (UnregistrationRequest) {\r
-    UnregistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/unregisterCapability');\r
-})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));\r
-var ResourceOperationKind;\r
-(function (ResourceOperationKind) {\r
-    /**\r
-     * Supports creating new files and folders.\r
-     */\r
-    ResourceOperationKind.Create = 'create';\r
-    /**\r
-     * Supports renaming existing files and folders.\r
-     */\r
-    ResourceOperationKind.Rename = 'rename';\r
-    /**\r
-     * Supports deleting existing files and folders.\r
-     */\r
-    ResourceOperationKind.Delete = 'delete';\r
-})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));\r
-var FailureHandlingKind;\r
-(function (FailureHandlingKind) {\r
-    /**\r
-     * Applying the workspace change is simply aborted if one of the changes provided\r
-     * fails. All operations executed before the failing operation stay executed.\r
-     */\r
-    FailureHandlingKind.Abort = 'abort';\r
-    /**\r
-     * All operations are executed transactional. That means they either all\r
-     * succeed or no changes at all are applied to the workspace.\r
-     */\r
-    FailureHandlingKind.Transactional = 'transactional';\r
-    /**\r
-     * If the workspace edit contains only textual file changes they are executed transactional.\r
-     * If resource changes (create, rename or delete file) are part of the change the failure\r
-     * handling startegy is abort.\r
-     */\r
-    FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';\r
-    /**\r
-     * The client tries to undo the operations already executed. But there is no\r
-     * guaruntee that this is succeeding.\r
-     */\r
-    FailureHandlingKind.Undo = 'undo';\r
-})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));\r
-/**\r
- * Defines how the host (editor) should sync\r
- * document changes to the language server.\r
- */\r
-var TextDocumentSyncKind;\r
-(function (TextDocumentSyncKind) {\r
-    /**\r
-     * Documents should not be synced at all.\r
-     */\r
-    TextDocumentSyncKind.None = 0;\r
-    /**\r
-     * Documents are synced by always sending the full content\r
-     * of the document.\r
-     */\r
-    TextDocumentSyncKind.Full = 1;\r
-    /**\r
-     * Documents are synced by sending the full content on open.\r
-     * After that only incremental updates to the document are\r
-     * send.\r
-     */\r
-    TextDocumentSyncKind.Incremental = 2;\r
-})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));\r
-/**\r
- * The initialize request is sent from the client to the server.\r
- * It is sent once as the request after starting up the server.\r
- * The requests parameter is of type [InitializeParams](#InitializeParams)\r
- * the response if of type [InitializeResult](#InitializeResult) of a Thenable that\r
- * resolves to such.\r
- */\r
-var InitializeRequest;\r
-(function (InitializeRequest) {\r
-    InitializeRequest.type = new vscode_jsonrpc_1.RequestType('initialize');\r
-})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));\r
-/**\r
- * Known error codes for an `InitializeError`;\r
- */\r
-var InitializeError;\r
-(function (InitializeError) {\r
-    /**\r
-     * If the protocol version provided by the client can't be handled by the server.\r
-     * @deprecated This initialize error got replaced by client capabilities. There is\r
-     * no version handshake in version 3.0x\r
-     */\r
-    InitializeError.unknownProtocolVersion = 1;\r
-})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));\r
-/**\r
- * The intialized notification is sent from the client to the\r
- * server after the client is fully initialized and the server\r
- * is allowed to send requests from the server to the client.\r
- */\r
-var InitializedNotification;\r
-(function (InitializedNotification) {\r
-    InitializedNotification.type = new vscode_jsonrpc_1.NotificationType('initialized');\r
-})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));\r
-//---- Shutdown Method ----\r
-/**\r
- * A shutdown request is sent from the client to the server.\r
- * It is sent once when the client decides to shutdown the\r
- * server. The only notification that is sent after a shutdown request\r
- * is the exit event.\r
- */\r
-var ShutdownRequest;\r
-(function (ShutdownRequest) {\r
-    ShutdownRequest.type = new vscode_jsonrpc_1.RequestType0('shutdown');\r
-})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));\r
-//---- Exit Notification ----\r
-/**\r
- * The exit event is sent from the client to the server to\r
- * ask the server to exit its process.\r
- */\r
-var ExitNotification;\r
-(function (ExitNotification) {\r
-    ExitNotification.type = new vscode_jsonrpc_1.NotificationType0('exit');\r
-})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));\r
-//---- Configuration notification ----\r
-/**\r
- * The configuration change notification is sent from the client to the server\r
- * when the client's configuration has changed. The notification contains\r
- * the changed configuration as defined by the language client.\r
- */\r
-var DidChangeConfigurationNotification;\r
-(function (DidChangeConfigurationNotification) {\r
-    DidChangeConfigurationNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeConfiguration');\r
-})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));\r
-//---- Message show and log notifications ----\r
-/**\r
- * The message type\r
- */\r
-var MessageType;\r
-(function (MessageType) {\r
-    /**\r
-     * An error message.\r
-     */\r
-    MessageType.Error = 1;\r
-    /**\r
-     * A warning message.\r
-     */\r
-    MessageType.Warning = 2;\r
-    /**\r
-     * An information message.\r
-     */\r
-    MessageType.Info = 3;\r
-    /**\r
-     * A log message.\r
-     */\r
-    MessageType.Log = 4;\r
-})(MessageType = exports.MessageType || (exports.MessageType = {}));\r
-/**\r
- * The show message notification is sent from a server to a client to ask\r
- * the client to display a particular message in the user interface.\r
- */\r
-var ShowMessageNotification;\r
-(function (ShowMessageNotification) {\r
-    ShowMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/showMessage');\r
-})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));\r
-/**\r
- * The show message request is sent from the server to the client to show a message\r
- * and a set of options actions to the user.\r
- */\r
-var ShowMessageRequest;\r
-(function (ShowMessageRequest) {\r
-    ShowMessageRequest.type = new vscode_jsonrpc_1.RequestType('window/showMessageRequest');\r
-})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));\r
-/**\r
- * The log message notification is sent from the server to the client to ask\r
- * the client to log a particular message.\r
- */\r
-var LogMessageNotification;\r
-(function (LogMessageNotification) {\r
-    LogMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/logMessage');\r
-})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));\r
-//---- Telemetry notification\r
-/**\r
- * The telemetry event notification is sent from the server to the client to ask\r
- * the client to log telemetry data.\r
- */\r
-var TelemetryEventNotification;\r
-(function (TelemetryEventNotification) {\r
-    TelemetryEventNotification.type = new vscode_jsonrpc_1.NotificationType('telemetry/event');\r
-})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));\r
-/**\r
- * The document open notification is sent from the client to the server to signal\r
- * newly opened text documents. The document's truth is now managed by the client\r
- * and the server must not try to read the document's truth using the document's\r
- * uri. Open in this sense means it is managed by the client. It doesn't necessarily\r
- * mean that its content is presented in an editor. An open notification must not\r
- * be sent more than once without a corresponding close notification send before.\r
- * This means open and close notification must be balanced and the max open count\r
- * is one.\r
- */\r
-var DidOpenTextDocumentNotification;\r
-(function (DidOpenTextDocumentNotification) {\r
-    DidOpenTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didOpen');\r
-})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));\r
-/**\r
- * The document change notification is sent from the client to the server to signal\r
- * changes to a text document.\r
- */\r
-var DidChangeTextDocumentNotification;\r
-(function (DidChangeTextDocumentNotification) {\r
-    DidChangeTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didChange');\r
-})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));\r
-/**\r
- * The document close notification is sent from the client to the server when\r
- * the document got closed in the client. The document's truth now exists where\r
- * the document's uri points to (e.g. if the document's uri is a file uri the\r
- * truth now exists on disk). As with the open notification the close notification\r
- * is about managing the document's content. Receiving a close notification\r
- * doesn't mean that the document was open in an editor before. A close\r
- * notification requires a previous open notification to be sent.\r
- */\r
-var DidCloseTextDocumentNotification;\r
-(function (DidCloseTextDocumentNotification) {\r
-    DidCloseTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didClose');\r
-})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));\r
-/**\r
- * The document save notification is sent from the client to the server when\r
- * the document got saved in the client.\r
- */\r
-var DidSaveTextDocumentNotification;\r
-(function (DidSaveTextDocumentNotification) {\r
-    DidSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didSave');\r
-})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));\r
-/**\r
- * A document will save notification is sent from the client to the server before\r
- * the document is actually saved.\r
- */\r
-var WillSaveTextDocumentNotification;\r
-(function (WillSaveTextDocumentNotification) {\r
-    WillSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/willSave');\r
-})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));\r
-/**\r
- * A document will save request is sent from the client to the server before\r
- * the document is actually saved. The request can return an array of TextEdits\r
- * which will be applied to the text document before it is saved. Please note that\r
- * clients might drop results if computing the text edits took too long or if a\r
- * server constantly fails on this request. This is done to keep the save fast and\r
- * reliable.\r
- */\r
-var WillSaveTextDocumentWaitUntilRequest;\r
-(function (WillSaveTextDocumentWaitUntilRequest) {\r
-    WillSaveTextDocumentWaitUntilRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/willSaveWaitUntil');\r
-})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));\r
-//---- File eventing ----\r
-/**\r
- * The watched files notification is sent from the client to the server when\r
- * the client detects changes to file watched by the language client.\r
- */\r
-var DidChangeWatchedFilesNotification;\r
-(function (DidChangeWatchedFilesNotification) {\r
-    DidChangeWatchedFilesNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWatchedFiles');\r
-})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));\r
-/**\r
- * The file event type\r
- */\r
-var FileChangeType;\r
-(function (FileChangeType) {\r
-    /**\r
-     * The file got created.\r
-     */\r
-    FileChangeType.Created = 1;\r
-    /**\r
-     * The file got changed.\r
-     */\r
-    FileChangeType.Changed = 2;\r
-    /**\r
-     * The file got deleted.\r
-     */\r
-    FileChangeType.Deleted = 3;\r
-})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));\r
-var WatchKind;\r
-(function (WatchKind) {\r
-    /**\r
-     * Interested in create events.\r
-     */\r
-    WatchKind.Create = 1;\r
-    /**\r
-     * Interested in change events\r
-     */\r
-    WatchKind.Change = 2;\r
-    /**\r
-     * Interested in delete events\r
-     */\r
-    WatchKind.Delete = 4;\r
-})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));\r
-//---- Diagnostic notification ----\r
-/**\r
- * Diagnostics notification are sent from the server to the client to signal\r
- * results of validation runs.\r
- */\r
-var PublishDiagnosticsNotification;\r
-(function (PublishDiagnosticsNotification) {\r
-    PublishDiagnosticsNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/publishDiagnostics');\r
-})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));\r
-/**\r
- * How a completion was triggered\r
- */\r
-var CompletionTriggerKind;\r
-(function (CompletionTriggerKind) {\r
-    /**\r
-     * Completion was triggered by typing an identifier (24x7 code\r
-     * complete), manual invocation (e.g Ctrl+Space) or via API.\r
-     */\r
-    CompletionTriggerKind.Invoked = 1;\r
-    /**\r
-     * Completion was triggered by a trigger character specified by\r
-     * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.\r
-     */\r
-    CompletionTriggerKind.TriggerCharacter = 2;\r
-    /**\r
-     * Completion was re-triggered as current completion list is incomplete\r
-     */\r
-    CompletionTriggerKind.TriggerForIncompleteCompletions = 3;\r
-})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));\r
-/**\r
- * Request to request completion at a given text document position. The request's\r
- * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response\r
- * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)\r
- * or a Thenable that resolves to such.\r
- *\r
- * The request can delay the computation of the [`detail`](#CompletionItem.detail)\r
- * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`\r
- * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,\r
- * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.\r
- */\r
-var CompletionRequest;\r
-(function (CompletionRequest) {\r
-    CompletionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/completion');\r
-})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));\r
-/**\r
- * Request to resolve additional information for a given completion item.The request's\r
- * parameter is of type [CompletionItem](#CompletionItem) the response\r
- * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.\r
- */\r
-var CompletionResolveRequest;\r
-(function (CompletionResolveRequest) {\r
-    CompletionResolveRequest.type = new vscode_jsonrpc_1.RequestType('completionItem/resolve');\r
-})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));\r
-//---- Hover Support -------------------------------\r
-/**\r
- * Request to request hover information at a given text document position. The request's\r
- * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of\r
- * type [Hover](#Hover) or a Thenable that resolves to such.\r
- */\r
-var HoverRequest;\r
-(function (HoverRequest) {\r
-    HoverRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/hover');\r
-})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));\r
-var SignatureHelpRequest;\r
-(function (SignatureHelpRequest) {\r
-    SignatureHelpRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/signatureHelp');\r
-})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));\r
-//---- Goto Definition -------------------------------------\r
-/**\r
- * A request to resolve the definition location of a symbol at a given text\r
- * document position. The request's parameter is of type [TextDocumentPosition]\r
- * (#TextDocumentPosition) the response is of either type [Definition](#Definition)\r
- * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves\r
- * to such.\r
- */\r
-var DefinitionRequest;\r
-(function (DefinitionRequest) {\r
-    DefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/definition');\r
-})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));\r
-/**\r
- * A request to resolve project-wide references for the symbol denoted\r
- * by the given text document position. The request's parameter is of\r
- * type [ReferenceParams](#ReferenceParams) the response is of type\r
- * [Location[]](#Location) or a Thenable that resolves to such.\r
- */\r
-var ReferencesRequest;\r
-(function (ReferencesRequest) {\r
-    ReferencesRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/references');\r
-})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));\r
-//---- Document Highlight ----------------------------------\r
-/**\r
- * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given\r
- * text document position. The request's parameter is of type [TextDocumentPosition]\r
- * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]\r
- * (#DocumentHighlight) or a Thenable that resolves to such.\r
- */\r
-var DocumentHighlightRequest;\r
-(function (DocumentHighlightRequest) {\r
-    DocumentHighlightRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentHighlight');\r
-})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));\r
-//---- Document Symbol Provider ---------------------------\r
-/**\r
- * A request to list all symbols found in a given text document. The request's\r
- * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the\r
- * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable\r
- * that resolves to such.\r
- */\r
-var DocumentSymbolRequest;\r
-(function (DocumentSymbolRequest) {\r
-    DocumentSymbolRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentSymbol');\r
-})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));\r
-//---- Workspace Symbol Provider ---------------------------\r
-/**\r
- * A request to list project-wide symbols matching the query string given\r
- * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is\r
- * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that\r
- * resolves to such.\r
- */\r
-var WorkspaceSymbolRequest;\r
-(function (WorkspaceSymbolRequest) {\r
-    WorkspaceSymbolRequest.type = new vscode_jsonrpc_1.RequestType('workspace/symbol');\r
-})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));\r
-/**\r
- * A request to provide commands for the given text document and range.\r
- */\r
-var CodeActionRequest;\r
-(function (CodeActionRequest) {\r
-    CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction');\r
-})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));\r
-/**\r
- * A request to provide code lens for the given text document.\r
- */\r
-var CodeLensRequest;\r
-(function (CodeLensRequest) {\r
-    CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens');\r
-})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));\r
-/**\r
- * A request to resolve a command for a given code lens.\r
- */\r
-var CodeLensResolveRequest;\r
-(function (CodeLensResolveRequest) {\r
-    CodeLensResolveRequest.type = new vscode_jsonrpc_1.RequestType('codeLens/resolve');\r
-})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));\r
-/**\r
- * A request to to format a whole document.\r
- */\r
-var DocumentFormattingRequest;\r
-(function (DocumentFormattingRequest) {\r
-    DocumentFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/formatting');\r
-})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));\r
-/**\r
- * A request to to format a range in a document.\r
- */\r
-var DocumentRangeFormattingRequest;\r
-(function (DocumentRangeFormattingRequest) {\r
-    DocumentRangeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rangeFormatting');\r
-})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));\r
-/**\r
- * A request to format a document on type.\r
- */\r
-var DocumentOnTypeFormattingRequest;\r
-(function (DocumentOnTypeFormattingRequest) {\r
-    DocumentOnTypeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/onTypeFormatting');\r
-})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));\r
-/**\r
- * A request to rename a symbol.\r
- */\r
-var RenameRequest;\r
-(function (RenameRequest) {\r
-    RenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rename');\r
-})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));\r
-/**\r
- * A request to test and perform the setup necessary for a rename.\r
- */\r
-var PrepareRenameRequest;\r
-(function (PrepareRenameRequest) {\r
-    PrepareRenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareRename');\r
-})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));\r
-/**\r
- * A request to provide document links\r
- */\r
-var DocumentLinkRequest;\r
-(function (DocumentLinkRequest) {\r
-    DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink');\r
-})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));\r
-/**\r
- * Request to resolve additional information for a given document link. The request's\r
- * parameter is of type [DocumentLink](#DocumentLink) the response\r
- * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.\r
- */\r
-var DocumentLinkResolveRequest;\r
-(function (DocumentLinkResolveRequest) {\r
-    DocumentLinkResolveRequest.type = new vscode_jsonrpc_1.RequestType('documentLink/resolve');\r
-})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));\r
-/**\r
- * A request send from the client to the server to execute a command. The request might return\r
- * a workspace edit which the client will apply to the workspace.\r
- */\r
-var ExecuteCommandRequest;\r
-(function (ExecuteCommandRequest) {\r
-    ExecuteCommandRequest.type = new vscode_jsonrpc_1.RequestType('workspace/executeCommand');\r
-})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));\r
-/**\r
- * A request sent from the server to the client to modified certain resources.\r
- */\r
-var ApplyWorkspaceEditRequest;\r
-(function (ApplyWorkspaceEditRequest) {\r
-    ApplyWorkspaceEditRequest.type = new vscode_jsonrpc_1.RequestType('workspace/applyEdit');\r
-})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));\r
-
-
-/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-function boolean(value) {\r
-    return value === true || value === false;\r
-}\r
-exports.boolean = boolean;\r
-function string(value) {\r
-    return typeof value === 'string' || value instanceof String;\r
-}\r
-exports.string = string;\r
-function number(value) {\r
-    return typeof value === 'number' || value instanceof Number;\r
-}\r
-exports.number = number;\r
-function error(value) {\r
-    return value instanceof Error;\r
-}\r
-exports.error = error;\r
-function func(value) {\r
-    return typeof value === 'function';\r
-}\r
-exports.func = func;\r
-function array(value) {\r
-    return Array.isArray(value);\r
-}\r
-exports.array = array;\r
-function stringArray(value) {\r
-    return array(value) && value.every(elem => string(elem));\r
-}\r
-exports.stringArray = stringArray;\r
-function typedArray(value, check) {\r
-    return Array.isArray(value) && value.every(check);\r
-}\r
-exports.typedArray = typedArray;\r
-function thenable(value) {\r
-    return value && func(value.then);\r
-}\r
-exports.thenable = thenable;\r
-
-
-/***/ }),
-/* 20 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-// @ts-ignore: to avoid inlining LocatioLink as dynamic import\r
-let __noDynamicImport;\r
-/**\r
- * A request to resolve the implementation locations of a symbol at a given text\r
- * document position. The request's parameter is of type [TextDocumentPositioParams]\r
- * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a\r
- * Thenable that resolves to such.\r
- */\r
-var ImplementationRequest;\r
-(function (ImplementationRequest) {\r
-    ImplementationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/implementation');\r
-})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));\r
-
-
-/***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-// @ts-ignore: to avoid inlining LocatioLink as dynamic import\r
-let __noDynamicImport;\r
-/**\r
- * A request to resolve the type definition locations of a symbol at a given text\r
- * document position. The request's parameter is of type [TextDocumentPositioParams]\r
- * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a\r
- * Thenable that resolves to such.\r
- */\r
-var TypeDefinitionRequest;\r
-(function (TypeDefinitionRequest) {\r
-    TypeDefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/typeDefinition');\r
-})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));\r
-
-
-/***/ }),
-/* 22 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-/**\r
- * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.\r
- */\r
-var WorkspaceFoldersRequest;\r
-(function (WorkspaceFoldersRequest) {\r
-    WorkspaceFoldersRequest.type = new vscode_jsonrpc_1.RequestType0('workspace/workspaceFolders');\r
-})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));\r
-/**\r
- * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace\r
- * folder configuration changes.\r
- */\r
-var DidChangeWorkspaceFoldersNotification;\r
-(function (DidChangeWorkspaceFoldersNotification) {\r
-    DidChangeWorkspaceFoldersNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWorkspaceFolders');\r
-})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));\r
-
-
-/***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-/**\r
- * The 'workspace/configuration' request is sent from the server to the client to fetch a certain\r
- * configuration setting.\r
- *\r
- * This pull model replaces the old push model were the client signaled configuration change via an\r
- * event. If the server still needs to react to configuration changes (since the server caches the\r
- * result of `workspace/configuration` requests) the server should register for an empty configuration\r
- * change event and empty the cache if such an event is received.\r
- */\r
-var ConfigurationRequest;\r
-(function (ConfigurationRequest) {\r
-    ConfigurationRequest.type = new vscode_jsonrpc_1.RequestType('workspace/configuration');\r
-})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));\r
-
-
-/***/ }),
-/* 24 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-/**\r
- * A request to list all color symbols found in a given text document. The request's\r
- * parameter is of type [DocumentColorParams](#DocumentColorParams) the\r
- * response is of type [ColorInformation[]](#ColorInformation) or a Thenable\r
- * that resolves to such.\r
- */\r
-var DocumentColorRequest;\r
-(function (DocumentColorRequest) {\r
-    DocumentColorRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentColor');\r
-})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));\r
-/**\r
- * A request to list all presentation for a color. The request's\r
- * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the\r
- * response is of type [ColorInformation[]](#ColorInformation) or a Thenable\r
- * that resolves to such.\r
- */\r
-var ColorPresentationRequest;\r
-(function (ColorPresentationRequest) {\r
-    ColorPresentationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/colorPresentation');\r
-})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));\r
-
-
-/***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-\r
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-/**\r
- * Enum of known range kinds\r
- */\r
-var FoldingRangeKind;\r
-(function (FoldingRangeKind) {\r
-    /**\r
-     * Folding range for a comment\r
-     */\r
-    FoldingRangeKind["Comment"] = "comment";\r
-    /**\r
-     * Folding range for a imports or includes\r
-     */\r
-    FoldingRangeKind["Imports"] = "imports";\r
-    /**\r
-     * Folding range for a region (e.g. `#region`)\r
-     */\r
-    FoldingRangeKind["Region"] = "region";\r
-})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));\r
-/**\r
- * A request to provide folding ranges in a document. The request's\r
- * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the\r
- * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable\r
- * that resolves to such.\r
- */\r
-var FoldingRangeRequest;\r
-(function (FoldingRangeRequest) {\r
-    FoldingRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/foldingRange');\r
-})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));\r
-
-
-/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-// @ts-ignore: to avoid inlining LocatioLink as dynamic import\r
-let __noDynamicImport;\r
-/**\r
- * A request to resolve the type definition locations of a symbol at a given text\r
- * document position. The request's parameter is of type [TextDocumentPositioParams]\r
- * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)\r
- * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves\r
- * to such.\r
- */\r
-var DeclarationRequest;\r
-(function (DeclarationRequest) {\r
-    DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration');\r
-})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));\r
-
-
-/***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) TypeFox and others. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-/**\r
- * The direction of a call hierarchy request.\r
- */\r
-var CallHierarchyDirection;\r
-(function (CallHierarchyDirection) {\r
-    /**\r
-     * The callers\r
-     */\r
-    CallHierarchyDirection.CallsFrom = 1;\r
-    /**\r
-     * The callees\r
-     */\r
-    CallHierarchyDirection.CallsTo = 2;\r
-})(CallHierarchyDirection = exports.CallHierarchyDirection || (exports.CallHierarchyDirection = {}));\r
-/**\r
- * Request to provide the call hierarchy at a given text document position.\r
- *\r
- * The request's parameter is of type [CallHierarchyParams](#CallHierarchyParams). The response\r
- * is of type [CallHierarchyCall[]](#CallHierarchyCall) or a Thenable that resolves to such.\r
- *\r
- * Evaluates the symbol defined (or referenced) at the given position, and returns all incoming or outgoing calls to the symbol(s).\r
- */\r
-var CallHierarchyRequest;\r
-(function (CallHierarchyRequest) {\r
-    CallHierarchyRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/callHierarchy');\r
-})(CallHierarchyRequest = exports.CallHierarchyRequest || (exports.CallHierarchyRequest = {}));\r
-
-
-/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-/**\r
- * The `window/progress/start` notification is sent from the server to the client\r
- * to initiate a progress.\r
- */\r
-var ProgressStartNotification;\r
-(function (ProgressStartNotification) {\r
-    ProgressStartNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/start');\r
-})(ProgressStartNotification = exports.ProgressStartNotification || (exports.ProgressStartNotification = {}));\r
-/**\r
- * The `window/progress/report` notification is sent from the server to the client\r
- * to initiate a progress.\r
- */\r
-var ProgressReportNotification;\r
-(function (ProgressReportNotification) {\r
-    ProgressReportNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/report');\r
-})(ProgressReportNotification = exports.ProgressReportNotification || (exports.ProgressReportNotification = {}));\r
-/**\r
- * The `window/progress/done` notification is sent from the server to the client\r
- * to initiate a progress.\r
- */\r
-var ProgressDoneNotification;\r
-(function (ProgressDoneNotification) {\r
-    ProgressDoneNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/done');\r
-})(ProgressDoneNotification = exports.ProgressDoneNotification || (exports.ProgressDoneNotification = {}));\r
-/**\r
- * The `window/progress/cancel` notification is sent client to the server to cancel a progress\r
- * initiated on the server side.\r
- */\r
-var ProgressCancelNotification;\r
-(function (ProgressCancelNotification) {\r
-    ProgressCancelNotification.type = new vscode_jsonrpc_1.NotificationType('window/progress/cancel');\r
-})(ProgressCancelNotification = exports.ProgressCancelNotification || (exports.ProgressCancelNotification = {}));\r
-
-
-/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-\r
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_jsonrpc_1 = __webpack_require__(4);\r
-const vscode_languageserver_types_1 = __webpack_require__(17);\r
-/**\r
- * The SelectionRange namespace provides helper function to work with\r
- * SelectionRange literals.\r
- */\r
-var SelectionRange;\r
-(function (SelectionRange) {\r
-    /**\r
-     * Creates a new SelectionRange\r
-     * @param range the range.\r
-     * @param parent an optional parent.\r
-     */\r
-    function create(range, parent) {\r
-        return { range, parent };\r
-    }\r
-    SelectionRange.create = create;\r
-    function is(value) {\r
-        let candidate = value;\r
-        return candidate !== undefined && vscode_languageserver_types_1.Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\r
-    }\r
-    SelectionRange.is = is;\r
-})(SelectionRange = exports.SelectionRange || (exports.SelectionRange = {}));\r
-/**\r
- * A request to provide selection ranges in a document. The request's\r
- * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the\r
- * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable\r
- * that resolves to such.\r
- */\r
-var SelectionRangeRequest;\r
-(function (SelectionRangeRequest) {\r
-    SelectionRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/selectionRange');\r
-})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));\r
-
-
-/***/ }),
-/* 30 */,
-/* 31 */,
-/* 32 */,
-/* 33 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
-    return new (P || (P = Promise))(function (resolve, reject) {
-        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
-        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
-        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-    });
-};
-var __importStar = (this && this.__importStar) || function (mod) {
-    if (mod && mod.__esModule) return mod;
-    var result = {};
-    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
-    result["default"] = mod;
-    return result;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_languageserver_1 = __webpack_require__(34);
-const request_light_1 = __webpack_require__(49);
-const fs = __importStar(__webpack_require__(2));
-const vscode_uri_1 = __webpack_require__(77);
-const URL = __importStar(__webpack_require__(40));
-const runner_1 = __webpack_require__(78);
-const vscode_json_languageservice_1 = __webpack_require__(79);
-const languageModelCache_1 = __webpack_require__(101);
-var SchemaAssociationNotification;
-(function (SchemaAssociationNotification) {
-    SchemaAssociationNotification.type = new vscode_languageserver_1.NotificationType('json/schemaAssociations');
-})(SchemaAssociationNotification || (SchemaAssociationNotification = {}));
-var VSCodeContentRequest;
-(function (VSCodeContentRequest) {
-    VSCodeContentRequest.type = new vscode_languageserver_1.RequestType('vscode/content');
-})(VSCodeContentRequest || (VSCodeContentRequest = {}));
-var SchemaContentChangeNotification;
-(function (SchemaContentChangeNotification) {
-    SchemaContentChangeNotification.type = new vscode_languageserver_1.NotificationType('json/schemaContent');
-})(SchemaContentChangeNotification || (SchemaContentChangeNotification = {}));
-var ForceValidateRequest;
-(function (ForceValidateRequest) {
-    ForceValidateRequest.type = new vscode_languageserver_1.RequestType('json/validate');
-})(ForceValidateRequest || (ForceValidateRequest = {}));
-// Create a connection for the server
-const connection = vscode_languageserver_1.createConnection();
-process.on('unhandledRejection', (e) => {
-    console.error(runner_1.formatError(`Unhandled exception`, e));
-});
-process.on('uncaughtException', (e) => {
-    console.error(runner_1.formatError(`Unhandled exception`, e));
-});
-console.log = connection.console.log.bind(connection.console);
-console.error = connection.console.error.bind(connection.console);
-const workspaceContext = {
-    resolveRelativePath: (relativePath, resource) => {
-        return URL.resolve(resource, relativePath);
-    }
-};
-function getSchemaRequestService(handledSchemas) {
-    return (uri) => {
-        const protocol = uri.substr(0, uri.indexOf(':'));
-        if (!handledSchemas || handledSchemas[protocol]) {
-            if (protocol === 'file') {
-                const fsPath = vscode_uri_1.URI.parse(uri).fsPath;
-                return new Promise((c, e) => {
-                    fs.readFile(fsPath, 'UTF-8', (err, result) => {
-                        err ? e(err.message || err.toString()) : c(result.toString());
-                    });
-                });
-            }
-            else if (protocol === 'http' || protocol === 'https') {
-                if (uri.indexOf('//schema.management.azure.com/') !== -1) {
-                    /* __GDPR__
-                        "json.schema" : {
-                            "schemaURL" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
-                        }
-                     */
-                    connection.telemetry.logEvent({
-                        key: 'json.schema',
-                        value: {
-                            schemaURL: uri
-                        }
-                    });
-                }
-                const headers = { 'Accept-Encoding': 'gzip, deflate' };
-                return request_light_1.xhr({ url: uri, followRedirects: 5, headers }).then(response => {
-                    return response.responseText;
-                }, (error) => {
-                    return Promise.reject(error.responseText || request_light_1.getErrorStatusDescription(error.status) || error.toString());
-                });
-            }
-        }
-        return connection.sendRequest(VSCodeContentRequest.type, uri).then(responseText => {
-            return responseText;
-        }, error => {
-            return Promise.reject(error.message);
-        });
-    };
-}
-// create the JSON language service
-let languageService = vscode_json_languageservice_1.getLanguageService({
-    workspaceContext,
-    contributions: [],
-});
-// Create a simple text document manager. The text document manager
-// supports full document sync only
-const documents = new vscode_languageserver_1.TextDocuments();
-// Make the text document manager listen on the connection
-// for open, change and close text document events
-documents.listen(connection);
-let clientSnippetSupport = false;
-let clientDynamicRegisterSupport = false;
-let foldingRangeLimit = Number.MAX_VALUE;
-let hierarchicalDocumentSymbolSupport = false;
-// After the server has started the client sends an initialize request. The server receives
-// in the passed params the rootPath of the workspace plus the client capabilities.
-connection.onInitialize((params) => {
-    const handledProtocols = params.initializationOptions && params.initializationOptions['handledSchemaProtocols'];
-    languageService = vscode_json_languageservice_1.getLanguageService({
-        schemaRequestService: getSchemaRequestService(handledProtocols),
-        workspaceContext,
-        contributions: [],
-        clientCapabilities: params.capabilities
-    });
-    function getClientCapability(name, def) {
-        const keys = name.split('.');
-        let c = params.capabilities;
-        for (let i = 0; c && i < keys.length; i++) {
-            if (!c.hasOwnProperty(keys[i])) {
-                return def;
-            }
-            c = c[keys[i]];
-        }
-        return c;
-    }
-    clientSnippetSupport = getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
-    clientDynamicRegisterSupport = getClientCapability('workspace.symbol.dynamicRegistration', false);
-    foldingRangeLimit = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
-    hierarchicalDocumentSymbolSupport = getClientCapability('textDocument.documentSymbol.hierarchicalDocumentSymbolSupport', false);
-    const capabilities = {
-        // Tell the client that the server works in FULL text document sync mode
-        textDocumentSync: documents.syncKind,
-        completionProvider: clientSnippetSupport ? { resolveProvider: true, triggerCharacters: ['"', ':'] } : undefined,
-        hoverProvider: true,
-        documentSymbolProvider: true,
-        documentRangeFormattingProvider: false,
-        colorProvider: {},
-        foldingRangeProvider: true
-    };
-    return { capabilities };
-});
-let jsonConfigurationSettings = undefined;
-let schemaAssociations = undefined;
-let formatterRegistration = null;
-// The settings have changed. Is send on server activation as well.
-connection.onDidChangeConfiguration((change) => {
-    let settings = change.settings;
-    request_light_1.configure(settings.http && settings.http.proxy, settings.http && settings.http.proxyStrictSSL);
-    jsonConfigurationSettings = settings.json && settings.json.schemas;
-    updateConfiguration();
-    // dynamically enable & disable the formatter
-    if (clientDynamicRegisterSupport) {
-        const enableFormatter = settings && settings.json && settings.json.format && settings.json.format.enable;
-        if (enableFormatter) {
-            if (!formatterRegistration) {
-                formatterRegistration = connection.client.register(vscode_languageserver_1.DocumentRangeFormattingRequest.type, { documentSelector: [{ language: 'json' }, { language: 'jsonc' }] });
-            }
-        }
-        else if (formatterRegistration) {
-            formatterRegistration.then(r => r.dispose());
-            formatterRegistration = null;
-        }
-    }
-});
-// The jsonValidation extension configuration has changed
-connection.onNotification(SchemaAssociationNotification.type, associations => {
-    schemaAssociations = associations;
-    updateConfiguration();
-});
-// A schema has changed
-connection.onNotification(SchemaContentChangeNotification.type, uri => {
-    languageService.resetSchema(uri);
-});
-// Retry schema validation on all open documents
-connection.onRequest(ForceValidateRequest.type, uri => {
-    return new Promise(resolve => {
-        const document = documents.get(uri);
-        if (document) {
-            updateConfiguration();
-            validateTextDocument(document, diagnostics => {
-                resolve(diagnostics);
-            });
-        }
-        else {
-            resolve([]);
-        }
-    });
-});
-function updateConfiguration() {
-    const languageSettings = {
-        validate: true,
-        allowComments: true,
-        schemas: new Array()
-    };
-    if (schemaAssociations) {
-        for (const pattern in schemaAssociations) {
-            const association = schemaAssociations[pattern];
-            if (Array.isArray(association)) {
-                association.forEach(uri => {
-                    languageSettings.schemas.push({ uri, fileMatch: [pattern] });
-                });
-            }
-        }
-    }
-    if (jsonConfigurationSettings) {
-        jsonConfigurationSettings.forEach((schema, index) => {
-            let uri = schema.url;
-            if (!uri && schema.schema) {
-                uri = schema.schema.id || `vscode://schemas/custom/${index}`;
-            }
-            if (uri) {
-                languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema });
-            }
-        });
-    }
-    languageService.configure(languageSettings);
-    // Revalidate any open text documents
-    documents.all().forEach(triggerValidation);
-}
-// The content of a text document has changed. This event is emitted
-// when the text document first opened or when its content has changed.
-documents.onDidChangeContent((change) => {
-    triggerValidation(change.document);
-});
-// a document has closed: clear all diagnostics
-documents.onDidClose(event => {
-    cleanPendingValidation(event.document);
-    connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
-});
-const pendingValidationRequests = {};
-const validationDelayMs = 500;
-function cleanPendingValidation(textDocument) {
-    const request = pendingValidationRequests[textDocument.uri];
-    if (request) {
-        clearTimeout(request);
-        delete pendingValidationRequests[textDocument.uri];
-    }
-}
-function triggerValidation(textDocument) {
-    cleanPendingValidation(textDocument);
-    pendingValidationRequests[textDocument.uri] = setTimeout(() => {
-        delete pendingValidationRequests[textDocument.uri];
-        validateTextDocument(textDocument);
-    }, validationDelayMs);
-}
-function validateTextDocument(textDocument, callback) {
-    const respond = (diagnostics) => {
-        connection.sendDiagnostics({ uri: textDocument.uri, diagnostics });
-        if (callback) {
-            callback(diagnostics);
-        }
-    };
-    if (textDocument.getText().length === 0) {
-        respond([]); // ignore empty documents
-        return;
-    }
-    const jsonDocument = getJSONDocument(textDocument);
-    const version = textDocument.version;
-    const documentSettings = textDocument.languageId === 'jsonc' ? { comments: 'ignore', trailingCommas: 'ignore' } : { comments: 'error', trailingCommas: 'error' };
-    languageService.doValidation(textDocument, jsonDocument, documentSettings).then(diagnostics => {
-        setTimeout(() => {
-            const currDocument = documents.get(textDocument.uri);
-            if (currDocument && currDocument.version === version) {
-                respond(diagnostics); // Send the computed diagnostics to VSCode.
-            }
-        }, 100);
-    }, error => {
-        connection.console.error(runner_1.formatError(`Error while validating ${textDocument.uri}`, error));
-    });
-}
-connection.onDidChangeWatchedFiles((change) => {
-    // Monitored files have changed in VSCode
-    let hasChanges = false;
-    change.changes.forEach(c => {
-        if (languageService.resetSchema(c.uri)) {
-            hasChanges = true;
-        }
-    });
-    if (hasChanges) {
-        documents.all().forEach(triggerValidation);
-    }
-});
-const jsonDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => languageService.parseJSONDocument(document));
-documents.onDidClose(e => {
-    jsonDocuments.onDocumentRemoved(e.document);
-});
-connection.onShutdown(() => {
-    jsonDocuments.dispose();
-});
-function getJSONDocument(document) {
-    return jsonDocuments.get(document);
-}
-connection.onCompletion((textDocumentPosition, token) => {
-    return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
-        const document = documents.get(textDocumentPosition.textDocument.uri);
-        if (document) {
-            const jsonDocument = getJSONDocument(document);
-            return languageService.doComplete(document, textDocumentPosition.position, jsonDocument);
-        }
-        return null;
-    }), null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`, token);
-});
-connection.onCompletionResolve((completionItem, token) => {
-    return runner_1.runSafeAsync(() => {
-        return languageService.doResolve(completionItem);
-    }, completionItem, `Error while resolving completion proposal`, token);
-});
-connection.onHover((textDocumentPositionParams, token) => {
-    return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
-        const document = documents.get(textDocumentPositionParams.textDocument.uri);
-        if (document) {
-            const jsonDocument = getJSONDocument(document);
-            return languageService.doHover(document, textDocumentPositionParams.position, jsonDocument);
-        }
-        return null;
-    }), null, `Error while computing hover for ${textDocumentPositionParams.textDocument.uri}`, token);
-});
-connection.onDocumentSymbol((documentSymbolParams, token) => {
-    return runner_1.runSafe(() => {
-        const document = documents.get(documentSymbolParams.textDocument.uri);
-        if (document) {
-            const jsonDocument = getJSONDocument(document);
-            if (hierarchicalDocumentSymbolSupport) {
-                return languageService.findDocumentSymbols2(document, jsonDocument);
-            }
-            else {
-                return languageService.findDocumentSymbols(document, jsonDocument);
-            }
-        }
-        return [];
-    }, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token);
-});
-connection.onDocumentRangeFormatting((formatParams, token) => {
-    return runner_1.runSafe(() => {
-        const document = documents.get(formatParams.textDocument.uri);
-        if (document) {
-            return languageService.format(document, formatParams.range, formatParams.options);
-        }
-        return [];
-    }, [], `Error while formatting range for ${formatParams.textDocument.uri}`, token);
-});
-connection.onDocumentColor((params, token) => {
-    return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
-        const document = documents.get(params.textDocument.uri);
-        if (document) {
-            const jsonDocument = getJSONDocument(document);
-            return languageService.findDocumentColors(document, jsonDocument);
-        }
-        return [];
-    }), [], `Error while computing document colors for ${params.textDocument.uri}`, token);
-});
-connection.onColorPresentation((params, token) => {
-    return runner_1.runSafe(() => {
-        const document = documents.get(params.textDocument.uri);
-        if (document) {
-            const jsonDocument = getJSONDocument(document);
-            return languageService.getColorPresentations(document, jsonDocument, params.color, params.range);
-        }
-        return [];
-    }, [], `Error while computing color presentations for ${params.textDocument.uri}`, token);
-});
-connection.onFoldingRanges((params, token) => {
-    return runner_1.runSafe(() => {
-        const document = documents.get(params.textDocument.uri);
-        if (document) {
-            return languageService.getFoldingRanges(document, { rangeLimit: foldingRangeLimit });
-        }
-        return null;
-    }, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
-});
-connection.onRequest('$/textDocument/selectionRanges', (params, token) => __awaiter(this, void 0, void 0, function* () {
-    return runner_1.runSafe(() => {
-        const document = documents.get(params.textDocument.uri);
-        if (document) {
-            const jsonDocument = getJSONDocument(document);
-            return languageService.getSelectionRanges(document, params.positions, jsonDocument);
-        }
-        return [];
-    }, [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
-}));
-// Listen on the connection
-connection.listen();
-
-
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-/// <reference path="./thenable.ts" />\r
-\r
-function __export(m) {\r
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r
-}\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_languageserver_protocol_1 = __webpack_require__(3);\r
-exports.Event = vscode_languageserver_protocol_1.Event;\r
-const configuration_1 = __webpack_require__(35);\r
-const workspaceFolders_1 = __webpack_require__(37);\r
-const Is = __webpack_require__(36);\r
-const UUID = __webpack_require__(38);\r
-// ------------- Reexport the API surface of the language worker API ----------------------\r
-__export(__webpack_require__(3));\r
-const fm = __webpack_require__(39);\r
-const vscode_textbuffer_1 = __webpack_require__(42);\r
-const range_1 = __webpack_require__(47);\r
-var Files;\r
-(function (Files) {\r
-    Files.uriToFilePath = fm.uriToFilePath;\r
-    Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;\r
-    Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;\r
-    Files.resolve = fm.resolve;\r
-    Files.resolveModulePath = fm.resolveModulePath;\r
-})(Files = exports.Files || (exports.Files = {}));\r
-let shutdownReceived = false;\r
-let exitTimer = undefined;\r
-function setupExitTimer() {\r
-    const argName = '--clientProcessId';\r
-    function runTimer(value) {\r
-        try {\r
-            let processId = parseInt(value);\r
-            if (!isNaN(processId)) {\r
-                exitTimer = setInterval(() => {\r
-                    try {\r
-                        process.kill(processId, 0);\r
-                    }\r
-                    catch (ex) {\r
-                        // Parent process doesn't exist anymore. Exit the server.\r
-                        process.exit(shutdownReceived ? 0 : 1);\r
-                    }\r
-                }, 3000);\r
-            }\r
-        }\r
-        catch (e) {\r
-            // Ignore errors;\r
-        }\r
-    }\r
-    for (let i = 2; i < process.argv.length; i++) {\r
-        let arg = process.argv[i];\r
-        if (arg === argName && i + 1 < process.argv.length) {\r
-            runTimer(process.argv[i + 1]);\r
-            return;\r
-        }\r
-        else {\r
-            let args = arg.split('=');\r
-            if (args[0] === argName) {\r
-                runTimer(args[1]);\r
-            }\r
-        }\r
-    }\r
-}\r
-setupExitTimer();\r
-function null2Undefined(value) {\r
-    if (value === null) {\r
-        return void 0;\r
-    }\r
-    return value;\r
-}\r
-/**\r
- * Incrementally-synchronized Text Document implementation that leverages a\r
- * "Piece Tree" as text buffer. See the following for details:\r
- *  - https://github.com/microsoft/vscode-textbuffer\r
- *  - https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation\r
- *\r
- * This text document implementation only supports "Incremental" text document\r
- * sync. If you wish to use "Full" text document sync, use FullTextDocument, as it\r
- * uses a simple JS string as an underlying text buffer, since the full text gets\r
- * swapped out on every update.\r
- */\r
-class IncrementalTextDocument {\r
-    constructor(uri, languageId, version, content) {\r
-        this._uri = uri;\r
-        this._languageId = languageId;\r
-        this._version = version;\r
-        // Prepare Piece Tree\r
-        const ptBuilder = new vscode_textbuffer_1.PieceTreeTextBufferBuilder();\r
-        ptBuilder.acceptChunk(content);\r
-        const ptFactory = ptBuilder.finish(true);\r
-        this._tree = ptFactory.create(1 /* LF */);\r
-    }\r
-    get uri() {\r
-        return this._uri;\r
-    }\r
-    get languageId() {\r
-        return this._languageId;\r
-    }\r
-    get version() {\r
-        return this._version;\r
-    }\r
-    getText(range) {\r
-        if (range) {\r
-            const { start, end } = range;\r
-            // Clamp last line and last character appropriately when\r
-            // given range is beyond the document's end\r
-            const [clampedEndLine, clampedEndChar] = end.line + 1 > this.lineCount\r
-                ? [this.lineCount, this._tree.getLineLength(this.lineCount) + 1]\r
-                : [end.line + 1, end.character + 1];\r
-            const ptRange = new range_1.Range(start.line + 1, start.character + 1, clampedEndLine, clampedEndChar);\r
-            return this._tree.getValueInRange(ptRange);\r
-        }\r
-        return this._tree.getLinesRawContent();\r
-    }\r
-    update(event, version) {\r
-        const { text, range } = event;\r
-        if (range == null) {\r
-            throw new Error(`FullPieceTreeTextDocument#update called with invalid event range ${range}`);\r
-        }\r
-        const startOffset = this.offsetAt(range.start);\r
-        const endOffset = this.offsetAt(range.end);\r
-        // Delete previous text at range and insert new text at appropriate offset\r
-        this._tree.delete(startOffset, endOffset - startOffset);\r
-        this._tree.insert(startOffset, text);\r
-        this._version = version;\r
-    }\r
-    positionAt(offset) {\r
-        const clampedOffset = Math.min(offset, this._tree.getLength());\r
-        const ptPosition = this._tree.getPositionAt(clampedOffset);\r
-        return vscode_languageserver_protocol_1.Position.create(ptPosition.lineNumber - 1, ptPosition.column - 1);\r
-    }\r
-    offsetAt(position) {\r
-        if (position.line < 0) {\r
-            return 0;\r
-        }\r
-        const clampedChar = Math.max(1, position.character + 1);\r
-        return Math.min(this._tree.getOffsetAt(position.line + 1, clampedChar), this._tree.getLength());\r
-    }\r
-    get lineCount() {\r
-        return this._tree.getLineCount();\r
-    }\r
-}\r
-/**\r
- * A manager for simple text documents\r
- */\r
-class TextDocuments {\r
-    /**\r
-     * Create a new text document manager.\r
-     */\r
-    constructor(syncKind = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) {\r
-        this._documents = Object.create(null);\r
-        this._syncKind = syncKind;\r
-        this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();\r
-        this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();\r
-        this._onDidClose = new vscode_languageserver_protocol_1.Emitter();\r
-        this._onDidSave = new vscode_languageserver_protocol_1.Emitter();\r
-        this._onWillSave = new vscode_languageserver_protocol_1.Emitter();\r
-    }\r
-    /**\r
-     * Returns the [TextDocumentSyncKind](#TextDocumentSyncKind) used by\r
-     * this text document manager.\r
-     */\r
-    get syncKind() {\r
-        return this._syncKind;\r
-    }\r
-    /**\r
-     * An event that fires when a text document managed by this manager\r
-     * has been opened or the content changes.\r
-     */\r
-    get onDidChangeContent() {\r
-        return this._onDidChangeContent.event;\r
-    }\r
-    /**\r
-     * An event that fires when a text document managed by this manager\r
-     * has been opened.\r
-     */\r
-    get onDidOpen() {\r
-        return this._onDidOpen.event;\r
-    }\r
-    /**\r
-     * An event that fires when a text document managed by this manager\r
-     * will be saved.\r
-     */\r
-    get onWillSave() {\r
-        return this._onWillSave.event;\r
-    }\r
-    /**\r
-     * Sets a handler that will be called if a participant wants to provide\r
-     * edits during a text document save.\r
-     */\r
-    onWillSaveWaitUntil(handler) {\r
-        this._willSaveWaitUntil = handler;\r
-    }\r
-    /**\r
-     * An event that fires when a text document managed by this manager\r
-     * has been saved.\r
-     */\r
-    get onDidSave() {\r
-        return this._onDidSave.event;\r
-    }\r
-    /**\r
-     * An event that fires when a text document managed by this manager\r
-     * has been closed.\r
-     */\r
-    get onDidClose() {\r
-        return this._onDidClose.event;\r
-    }\r
-    /**\r
-     * Returns the document for the given URI. Returns undefined if\r
-     * the document is not mananged by this instance.\r
-     *\r
-     * @param uri The text document's URI to retrieve.\r
-     * @return the text document or `undefined`.\r
-     */\r
-    get(uri) {\r
-        return this._documents[uri];\r
-    }\r
-    /**\r
-     * Returns all text documents managed by this instance.\r
-     *\r
-     * @return all text documents.\r
-     */\r
-    all() {\r
-        return Object.keys(this._documents).map(key => this._documents[key]);\r
-    }\r
-    /**\r
-     * Returns the URIs of all text documents managed by this instance.\r
-     *\r
-     * @return the URI's of all text documents.\r
-     */\r
-    keys() {\r
-        return Object.keys(this._documents);\r
-    }\r
-    /**\r
-     * Listens for `low level` notification on the given connection to\r
-     * update the text documents managed by this instance.\r
-     *\r
-     * @param connection The connection to listen on.\r
-     */\r
-    listen(connection) {\r
-        function isUpdateableDocument(value) {\r
-            return Is.func(value.update);\r
-        }\r
-        connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;\r
-        connection.onDidOpenTextDocument((event) => {\r
-            let td = event.textDocument;\r
-            let document;\r
-            switch (this.syncKind) {\r
-                case vscode_languageserver_protocol_1.TextDocumentSyncKind.Full:\r
-                    document = vscode_languageserver_protocol_1.TextDocument.create(td.uri, td.languageId, td.version, td.text);\r
-                    break;\r
-                case vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental:\r
-                    document = new IncrementalTextDocument(td.uri, td.languageId, td.version, td.text);\r
-                    break;\r
-                default:\r
-                    throw new Error(`Invalid TextDocumentSyncKind: ${this.syncKind}`);\r
-            }\r
-            this._documents[td.uri] = document;\r
-            let toFire = Object.freeze({ document });\r
-            this._onDidOpen.fire(toFire);\r
-            this._onDidChangeContent.fire(toFire);\r
-        });\r
-        connection.onDidChangeTextDocument((event) => {\r
-            let td = event.textDocument;\r
-            let changes = event.contentChanges;\r
-            if (changes.length === 0) {\r
-                return;\r
-            }\r
-            let document = this._documents[td.uri];\r
-            if (!document || !isUpdateableDocument(document)) {\r
-                return;\r
-            }\r
-            const { version } = td;\r
-            if (version == null || version === void 0) {\r
-                throw new Error(`Received document change event for ${td.uri} without valid version identifier`);\r
-            }\r
-            switch (this.syncKind) {\r
-                case vscode_languageserver_protocol_1.TextDocumentSyncKind.Full:\r
-                    let last = changes[changes.length - 1];\r
-                    document.update(last, version);\r
-                    this._onDidChangeContent.fire(Object.freeze({ document }));\r
-                    break;\r
-                case vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental:\r
-                    let updatedDoc = changes.reduce((workingTextDoc, change) => {\r
-                        workingTextDoc.update(change, version);\r
-                        return workingTextDoc;\r
-                    }, document);\r
-                    this._onDidChangeContent.fire(Object.freeze({ document: updatedDoc }));\r
-                    break;\r
-                case vscode_languageserver_protocol_1.TextDocumentSyncKind.None:\r
-                    break;\r
-            }\r
-        });\r
-        connection.onDidCloseTextDocument((event) => {\r
-            let document = this._documents[event.textDocument.uri];\r
-            if (document) {\r
-                delete this._documents[event.textDocument.uri];\r
-                this._onDidClose.fire(Object.freeze({ document }));\r
-            }\r
-        });\r
-        connection.onWillSaveTextDocument((event) => {\r
-            let document = this._documents[event.textDocument.uri];\r
-            if (document) {\r
-                this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));\r
-            }\r
-        });\r
-        connection.onWillSaveTextDocumentWaitUntil((event, token) => {\r
-            let document = this._documents[event.textDocument.uri];\r
-            if (document && this._willSaveWaitUntil) {\r
-                return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);\r
-            }\r
-            else {\r
-                return [];\r
-            }\r
-        });\r
-        connection.onDidSaveTextDocument((event) => {\r
-            let document = this._documents[event.textDocument.uri];\r
-            if (document) {\r
-                this._onDidSave.fire(Object.freeze({ document }));\r
-            }\r
-        });\r
-    }\r
-}\r
-exports.TextDocuments = TextDocuments;\r
-/**\r
- * Helps tracking error message. Equal occurences of the same\r
- * message are only stored once. This class is for example\r
- * useful if text documents are validated in a loop and equal\r
- * error message should be folded into one.\r
- */\r
-class ErrorMessageTracker {\r
-    constructor() {\r
-        this._messages = Object.create(null);\r
-    }\r
-    /**\r
-     * Add a message to the tracker.\r
-     *\r
-     * @param message The message to add.\r
-     */\r
-    add(message) {\r
-        let count = this._messages[message];\r
-        if (!count) {\r
-            count = 0;\r
-        }\r
-        count++;\r
-        this._messages[message] = count;\r
-    }\r
-    /**\r
-     * Send all tracked messages to the connection's window.\r
-     *\r
-     * @param connection The connection established between client and server.\r
-     */\r
-    sendErrors(connection) {\r
-        Object.keys(this._messages).forEach(message => {\r
-            connection.window.showErrorMessage(message);\r
-        });\r
-    }\r
-}\r
-exports.ErrorMessageTracker = ErrorMessageTracker;\r
-var BulkRegistration;\r
-(function (BulkRegistration) {\r
-    /**\r
-     * Creates a new bulk registration.\r
-     * @return an empty bulk registration.\r
-     */\r
-    function create() {\r
-        return new BulkRegistrationImpl();\r
-    }\r
-    BulkRegistration.create = create;\r
-})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));\r
-class BulkRegistrationImpl {\r
-    constructor() {\r
-        this._registrations = [];\r
-        this._registered = new Set();\r
-    }\r
-    add(type, registerOptions) {\r
-        const method = Is.string(type) ? type : type.method;\r
-        if (this._registered.has(method)) {\r
-            throw new Error(`${method} is already added to this registration`);\r
-        }\r
-        const id = UUID.generateUuid();\r
-        this._registrations.push({\r
-            id: id,\r
-            method: method,\r
-            registerOptions: registerOptions || {}\r
-        });\r
-        this._registered.add(method);\r
-    }\r
-    asRegistrationParams() {\r
-        return {\r
-            registrations: this._registrations\r
-        };\r
-    }\r
-}\r
-var BulkUnregistration;\r
-(function (BulkUnregistration) {\r
-    function create() {\r
-        return new BulkUnregistrationImpl(undefined, []);\r
-    }\r
-    BulkUnregistration.create = create;\r
-})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));\r
-class BulkUnregistrationImpl {\r
-    constructor(_connection, unregistrations) {\r
-        this._connection = _connection;\r
-        this._unregistrations = new Map();\r
-        unregistrations.forEach(unregistration => {\r
-            this._unregistrations.set(unregistration.method, unregistration);\r
-        });\r
-    }\r
-    get isAttached() {\r
-        return !!this._connection;\r
-    }\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    add(unregistration) {\r
-        this._unregistrations.set(unregistration.method, unregistration);\r
-    }\r
-    dispose() {\r
-        let unregistrations = [];\r
-        for (let unregistration of this._unregistrations.values()) {\r
-            unregistrations.push(unregistration);\r
-        }\r
-        let params = {\r
-            unregisterations: unregistrations\r
-        };\r
-        this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {\r
-            this._connection.console.info(`Bulk unregistration failed.`);\r
-        });\r
-    }\r
-    disposeSingle(arg) {\r
-        const method = Is.string(arg) ? arg : arg.method;\r
-        const unregistration = this._unregistrations.get(method);\r
-        if (!unregistration) {\r
-            return false;\r
-        }\r
-        let params = {\r
-            unregisterations: [unregistration]\r
-        };\r
-        this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {\r
-            this._unregistrations.delete(method);\r
-        }, (_error) => {\r
-            this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);\r
-        });\r
-        return true;\r
-    }\r
-}\r
-class ConnectionLogger {\r
-    constructor() {\r
-    }\r
-    rawAttach(connection) {\r
-        this._rawConnection = connection;\r
-    }\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    get connection() {\r
-        if (!this._connection) {\r
-            throw new Error('Remote is not attached to a connection yet.');\r
-        }\r
-        return this._connection;\r
-    }\r
-    fillServerCapabilities(_capabilities) {\r
-    }\r
-    initialize(_capabilities) {\r
-    }\r
-    error(message) {\r
-        this.send(vscode_languageserver_protocol_1.MessageType.Error, message);\r
-    }\r
-    warn(message) {\r
-        this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);\r
-    }\r
-    info(message) {\r
-        this.send(vscode_languageserver_protocol_1.MessageType.Info, message);\r
-    }\r
-    log(message) {\r
-        this.send(vscode_languageserver_protocol_1.MessageType.Log, message);\r
-    }\r
-    send(type, message) {\r
-        if (this._rawConnection) {\r
-            this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });\r
-        }\r
-    }\r
-}\r
-class RemoteWindowImpl {\r
-    constructor() {\r
-    }\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    get connection() {\r
-        if (!this._connection) {\r
-            throw new Error('Remote is not attached to a connection yet.');\r
-        }\r
-        return this._connection;\r
-    }\r
-    initialize(_capabilities) {\r
-    }\r
-    fillServerCapabilities(_capabilities) {\r
-    }\r
-    showErrorMessage(message, ...actions) {\r
-        let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);\r
-    }\r
-    showWarningMessage(message, ...actions) {\r
-        let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);\r
-    }\r
-    showInformationMessage(message, ...actions) {\r
-        let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);\r
-    }\r
-}\r
-class RemoteClientImpl {\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    get connection() {\r
-        if (!this._connection) {\r
-            throw new Error('Remote is not attached to a connection yet.');\r
-        }\r
-        return this._connection;\r
-    }\r
-    initialize(_capabilities) {\r
-    }\r
-    fillServerCapabilities(_capabilities) {\r
-    }\r
-    register(typeOrRegistrations, registerOptionsOrType, registerOptions) {\r
-        if (typeOrRegistrations instanceof BulkRegistrationImpl) {\r
-            return this.registerMany(typeOrRegistrations);\r
-        }\r
-        else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {\r
-            return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);\r
-        }\r
-        else {\r
-            return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);\r
-        }\r
-    }\r
-    registerSingle1(unregistration, type, registerOptions) {\r
-        const method = Is.string(type) ? type : type.method;\r
-        const id = UUID.generateUuid();\r
-        let params = {\r
-            registrations: [{ id, method, registerOptions: registerOptions || {} }]\r
-        };\r
-        if (!unregistration.isAttached) {\r
-            unregistration.attach(this._connection);\r
-        }\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {\r
-            unregistration.add({ id: id, method: method });\r
-            return unregistration;\r
-        }, (_error) => {\r
-            this.connection.console.info(`Registering request handler for ${method} failed.`);\r
-            return Promise.reject(_error);\r
-        });\r
-    }\r
-    registerSingle2(type, registerOptions) {\r
-        const method = Is.string(type) ? type : type.method;\r
-        const id = UUID.generateUuid();\r
-        let params = {\r
-            registrations: [{ id, method, registerOptions: registerOptions || {} }]\r
-        };\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {\r
-            return vscode_languageserver_protocol_1.Disposable.create(() => {\r
-                this.unregisterSingle(id, method);\r
-            });\r
-        }, (_error) => {\r
-            this.connection.console.info(`Registering request handler for ${method} failed.`);\r
-            return Promise.reject(_error);\r
-        });\r
-    }\r
-    unregisterSingle(id, method) {\r
-        let params = {\r
-            unregisterations: [{ id, method }]\r
-        };\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {\r
-            this.connection.console.info(`Unregistering request handler for ${id} failed.`);\r
-        });\r
-    }\r
-    registerMany(registrations) {\r
-        let params = registrations.asRegistrationParams();\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {\r
-            return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));\r
-        }, (_error) => {\r
-            this.connection.console.info(`Bulk registration failed.`);\r
-            return Promise.reject(_error);\r
-        });\r
-    }\r
-}\r
-class _RemoteWorkspaceImpl {\r
-    constructor() {\r
-    }\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    get connection() {\r
-        if (!this._connection) {\r
-            throw new Error('Remote is not attached to a connection yet.');\r
-        }\r
-        return this._connection;\r
-    }\r
-    initialize(_capabilities) {\r
-    }\r
-    fillServerCapabilities(_capabilities) {\r
-    }\r
-    applyEdit(paramOrEdit) {\r
-        function isApplyWorkspaceEditParams(value) {\r
-            return value && !!value.edit;\r
-        }\r
-        let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };\r
-        return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);\r
-    }\r
-}\r
-const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));\r
-class TracerImpl {\r
-    constructor() {\r
-        this._trace = vscode_languageserver_protocol_1.Trace.Off;\r
-    }\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    get connection() {\r
-        if (!this._connection) {\r
-            throw new Error('Remote is not attached to a connection yet.');\r
-        }\r
-        return this._connection;\r
-    }\r
-    initialize(_capabilities) {\r
-    }\r
-    fillServerCapabilities(_capabilities) {\r
-    }\r
-    set trace(value) {\r
-        this._trace = value;\r
-    }\r
-    log(message, verbose) {\r
-        if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {\r
-            return;\r
-        }\r
-        this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {\r
-            message: message,\r
-            verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined\r
-        });\r
-    }\r
-}\r
-class TelemetryImpl {\r
-    constructor() {\r
-    }\r
-    attach(connection) {\r
-        this._connection = connection;\r
-    }\r
-    get connection() {\r
-        if (!this._connection) {\r
-            throw new Error('Remote is not attached to a connection yet.');\r
-        }\r
-        return this._connection;\r
-    }\r
-    initialize(_capabilities) {\r
-    }\r
-    fillServerCapabilities(_capabilities) {\r
-    }\r
-    logEvent(data) {\r
-        this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);\r
-    }\r
-}\r
-function combineConsoleFeatures(one, two) {\r
-    return function (Base) {\r
-        return two(one(Base));\r
-    };\r
-}\r
-exports.combineConsoleFeatures = combineConsoleFeatures;\r
-function combineTelemetryFeatures(one, two) {\r
-    return function (Base) {\r
-        return two(one(Base));\r
-    };\r
-}\r
-exports.combineTelemetryFeatures = combineTelemetryFeatures;\r
-function combineTracerFeatures(one, two) {\r
-    return function (Base) {\r
-        return two(one(Base));\r
-    };\r
-}\r
-exports.combineTracerFeatures = combineTracerFeatures;\r
-function combineClientFeatures(one, two) {\r
-    return function (Base) {\r
-        return two(one(Base));\r
-    };\r
-}\r
-exports.combineClientFeatures = combineClientFeatures;\r
-function combineWindowFeatures(one, two) {\r
-    return function (Base) {\r
-        return two(one(Base));\r
-    };\r
-}\r
-exports.combineWindowFeatures = combineWindowFeatures;\r
-function combineWorkspaceFeatures(one, two) {\r
-    return function (Base) {\r
-        return two(one(Base));\r
-    };\r
-}\r
-exports.combineWorkspaceFeatures = combineWorkspaceFeatures;\r
-function combineFeatures(one, two) {\r
-    function combine(one, two, func) {\r
-        if (one && two) {\r
-            return func(one, two);\r
-        }\r
-        else if (one) {\r
-            return one;\r
-        }\r
-        else {\r
-            return two;\r
-        }\r
-    }\r
-    let result = {\r
-        __brand: 'features',\r
-        console: combine(one.console, two.console, combineConsoleFeatures),\r
-        tracer: combine(one.tracer, two.tracer, combineTracerFeatures),\r
-        telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),\r
-        client: combine(one.client, two.client, combineClientFeatures),\r
-        window: combine(one.window, two.window, combineWindowFeatures),\r
-        workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)\r
-    };\r
-    return result;\r
-}\r
-exports.combineFeatures = combineFeatures;\r
-function createConnection(arg1, arg2, arg3, arg4) {\r
-    let factories;\r
-    let input;\r
-    let output;\r
-    let strategy;\r
-    if (arg1 !== void 0 && arg1.__brand === 'features') {\r
-        factories = arg1;\r
-        arg1 = arg2;\r
-        arg2 = arg3;\r
-        arg3 = arg4;\r
-    }\r
-    if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {\r
-        strategy = arg1;\r
-    }\r
-    else {\r
-        input = arg1;\r
-        output = arg2;\r
-        strategy = arg3;\r
-    }\r
-    return _createConnection(input, output, strategy, factories);\r
-}\r
-exports.createConnection = createConnection;\r
-function _createConnection(input, output, strategy, factories) {\r
-    if (!input && !output && process.argv.length > 2) {\r
-        let port = void 0;\r
-        let pipeName = void 0;\r
-        let argv = process.argv.slice(2);\r
-        for (let i = 0; i < argv.length; i++) {\r
-            let arg = argv[i];\r
-            if (arg === '--node-ipc') {\r
-                input = new vscode_languageserver_protocol_1.IPCMessageReader(process);\r
-                output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);\r
-                break;\r
-            }\r
-            else if (arg === '--stdio') {\r
-                input = process.stdin;\r
-                output = process.stdout;\r
-                break;\r
-            }\r
-            else if (arg === '--socket') {\r
-                port = parseInt(argv[i + 1]);\r
-                break;\r
-            }\r
-            else if (arg === '--pipe') {\r
-                pipeName = argv[i + 1];\r
-                break;\r
-            }\r
-            else {\r
-                var args = arg.split('=');\r
-                if (args[0] === '--socket') {\r
-                    port = parseInt(args[1]);\r
-                    break;\r
-                }\r
-                else if (args[0] === '--pipe') {\r
-                    pipeName = args[1];\r
-                    break;\r
-                }\r
-            }\r
-        }\r
-        if (port) {\r
-            let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);\r
-            input = transport[0];\r
-            output = transport[1];\r
-        }\r
-        else if (pipeName) {\r
-            let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);\r
-            input = transport[0];\r
-            output = transport[1];\r
-        }\r
-    }\r
-    var commandLineMessage = "Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";\r
-    if (!input) {\r
-        throw new Error("Connection input stream is not set. " + commandLineMessage);\r
-    }\r
-    if (!output) {\r
-        throw new Error("Connection output stream is not set. " + commandLineMessage);\r
-    }\r
-    // Backwards compatibility\r
-    if (Is.func(input.read) && Is.func(input.on)) {\r
-        let inputStream = input;\r
-        inputStream.on('end', () => {\r
-            process.exit(shutdownReceived ? 0 : 1);\r
-        });\r
-        inputStream.on('close', () => {\r
-            process.exit(shutdownReceived ? 0 : 1);\r
-        });\r
-    }\r
-    const logger = (factories && factories.console ? new (factories.console(ConnectionLogger))() : new ConnectionLogger());\r
-    const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);\r
-    logger.rawAttach(connection);\r
-    const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());\r
-    const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());\r
-    const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());\r
-    const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());\r
-    const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());\r
-    const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace];\r
-    function asThenable(value) {\r
-        if (Is.thenable(value)) {\r
-            return value;\r
-        }\r
-        else {\r
-            return Promise.resolve(value);\r
-        }\r
-    }\r
-    let shutdownHandler = undefined;\r
-    let initializeHandler = undefined;\r
-    let exitHandler = undefined;\r
-    let protocolConnection = {\r
-        listen: () => connection.listen(),\r
-        sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),\r
-        onRequest: (type, handler) => connection.onRequest(type, handler),\r
-        sendNotification: (type, param) => {\r
-            const method = Is.string(type) ? type : type.method;\r
-            if (arguments.length === 1) {\r
-                connection.sendNotification(method);\r
-            }\r
-            else {\r
-                connection.sendNotification(method, param);\r
-            }\r
-        },\r
-        onNotification: (type, handler) => connection.onNotification(type, handler),\r
-        onInitialize: (handler) => initializeHandler = handler,\r
-        onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),\r
-        onShutdown: (handler) => shutdownHandler = handler,\r
-        onExit: (handler) => exitHandler = handler,\r
-        get console() { return logger; },\r
-        get telemetry() { return telemetry; },\r
-        get tracer() { return tracer; },\r
-        get client() { return client; },\r
-        get window() { return remoteWindow; },\r
-        get workspace() { return workspace; },\r
-        onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),\r
-        onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),\r
-        __textDocumentSync: undefined,\r
-        onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),\r
-        onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),\r
-        onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),\r
-        onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),\r
-        onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),\r
-        onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),\r
-        sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),\r
-        onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, handler),\r
-        onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, handler),\r
-        onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),\r
-        onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, handler),\r
-        onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, handler),\r
-        onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, handler),\r
-        onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, handler),\r
-        onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, handler),\r
-        onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, handler),\r
-        onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, handler),\r
-        onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, handler),\r
-        onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, handler),\r
-        onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, handler),\r
-        onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, handler),\r
-        onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, handler),\r
-        onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, handler),\r
-        onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, handler),\r
-        onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, handler),\r
-        onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, handler),\r
-        onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, handler),\r
-        onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, handler),\r
-        onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, handler),\r
-        onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, handler),\r
-        onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, handler),\r
-        onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, handler),\r
-        onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, handler),\r
-        dispose: () => connection.dispose()\r
-    };\r
-    for (let remote of allRemotes) {\r
-        remote.attach(protocolConnection);\r
-    }\r
-    connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {\r
-        const processId = params.processId;\r
-        if (Is.number(processId) && exitTimer === void 0) {\r
-            // We received a parent process id. Set up a timer to periodically check\r
-            // if the parent is still alive.\r
-            setInterval(() => {\r
-                try {\r
-                    process.kill(processId, 0);\r
-                }\r
-                catch (ex) {\r
-                    // Parent process doesn't exist anymore. Exit the server.\r
-                    process.exit(shutdownReceived ? 0 : 1);\r
-                }\r
-            }, 3000);\r
-        }\r
-        if (Is.string(params.trace)) {\r
-            tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);\r
-        }\r
-        for (let remote of allRemotes) {\r
-            remote.initialize(params.capabilities);\r
-        }\r
-        if (initializeHandler) {\r
-            let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token);\r
-            return asThenable(result).then((value) => {\r
-                if (value instanceof vscode_languageserver_protocol_1.ResponseError) {\r
-                    return value;\r
-                }\r
-                let result = value;\r
-                if (!result) {\r
-                    result = { capabilities: {} };\r
-                }\r
-                let capabilities = result.capabilities;\r
-                if (!capabilities) {\r
-                    capabilities = {};\r
-                    result.capabilities = capabilities;\r
-                }\r
-                if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {\r
-                    capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;\r
-                }\r
-                else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {\r
-                    capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;\r
-                }\r
-                for (let remote of allRemotes) {\r
-                    remote.fillServerCapabilities(capabilities);\r
-                }\r
-                return result;\r
-            });\r
-        }\r
-        else {\r
-            let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };\r
-            for (let remote of allRemotes) {\r
-                remote.fillServerCapabilities(result.capabilities);\r
-            }\r
-            return result;\r
-        }\r
-    });\r
-    connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {\r
-        shutdownReceived = true;\r
-        if (shutdownHandler) {\r
-            return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);\r
-        }\r
-        else {\r
-            return undefined;\r
-        }\r
-    });\r
-    connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {\r
-        try {\r
-            if (exitHandler) {\r
-                exitHandler();\r
-            }\r
-        }\r
-        finally {\r
-            if (shutdownReceived) {\r
-                process.exit(0);\r
-            }\r
-            else {\r
-                process.exit(1);\r
-            }\r
-        }\r
-    });\r
-    connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {\r
-        tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);\r
-    });\r
-    return protocolConnection;\r
-}\r
-// Export the protocol currently in proposed state.\r
-const proposed_progress_1 = __webpack_require__(48);\r
-var ProposedFeatures;\r
-(function (ProposedFeatures) {\r
-    ProposedFeatures.all = {\r
-        __brand: 'features',\r
-        window: proposed_progress_1.ProgressFeature\r
-    };\r
-})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));\r
-
-
-/***/ }),
-/* 35 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_languageserver_protocol_1 = __webpack_require__(3);\r
-const Is = __webpack_require__(36);\r
-exports.ConfigurationFeature = (Base) => {\r
-    return class extends Base {\r
-        getConfiguration(arg) {\r
-            if (!arg) {\r
-                return this._getConfiguration({});\r
-            }\r
-            else if (Is.string(arg)) {\r
-                return this._getConfiguration({ section: arg });\r
-            }\r
-            else {\r
-                return this._getConfiguration(arg);\r
-            }\r
-        }\r
-        _getConfiguration(arg) {\r
-            let params = {\r
-                items: Array.isArray(arg) ? arg : [arg]\r
-            };\r
-            return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {\r
-                return Array.isArray(arg) ? result : result[0];\r
-            });\r
-        }\r
-    };\r
-};\r
-
-
-/***/ }),
-/* 36 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-function boolean(value) {\r
-    return value === true || value === false;\r
-}\r
-exports.boolean = boolean;\r
-function string(value) {\r
-    return typeof value === 'string' || value instanceof String;\r
-}\r
-exports.string = string;\r
-function number(value) {\r
-    return typeof value === 'number' || value instanceof Number;\r
-}\r
-exports.number = number;\r
-function error(value) {\r
-    return value instanceof Error;\r
-}\r
-exports.error = error;\r
-function func(value) {\r
-    return typeof value === 'function';\r
-}\r
-exports.func = func;\r
-function array(value) {\r
-    return Array.isArray(value);\r
-}\r
-exports.array = array;\r
-function stringArray(value) {\r
-    return array(value) && value.every(elem => string(elem));\r
-}\r
-exports.stringArray = stringArray;\r
-function typedArray(value, check) {\r
-    return Array.isArray(value) && value.every(check);\r
-}\r
-exports.typedArray = typedArray;\r
-function thenable(value) {\r
-    return value && func(value.then);\r
-}\r
-exports.thenable = thenable;\r
-
-
-/***/ }),
-/* 37 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_languageserver_protocol_1 = __webpack_require__(3);\r
-exports.WorkspaceFoldersFeature = (Base) => {\r
-    return class extends Base {\r
-        initialize(capabilities) {\r
-            let workspaceCapabilities = capabilities.workspace;\r
-            if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {\r
-                this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();\r
-                this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {\r
-                    this._onDidChangeWorkspaceFolders.fire(params.event);\r
-                });\r
-            }\r
-        }\r
-        getWorkspaceFolders() {\r
-            return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);\r
-        }\r
-        get onDidChangeWorkspaceFolders() {\r
-            if (!this._onDidChangeWorkspaceFolders) {\r
-                throw new Error('Client doesn\'t support sending workspace folder change events.');\r
-            }\r
-            if (!this._unregistration) {\r
-                this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);\r
-            }\r
-            return this._onDidChangeWorkspaceFolders.event;\r
-        }\r
-    };\r
-};\r
-
-
-/***/ }),
-/* 38 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/*---------------------------------------------------------------------------------------------\r
- *  Copyright (c) Microsoft Corporation. All rights reserved.\r
- *  Licensed under the MIT License. See License.txt in the project root for license information.\r
- *--------------------------------------------------------------------------------------------*/\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-class ValueUUID {\r
-    constructor(_value) {\r
-        this._value = _value;\r
-        // empty\r
-    }\r
-    asHex() {\r
-        return this._value;\r
-    }\r
-    equals(other) {\r
-        return this.asHex() === other.asHex();\r
-    }\r
-}\r
-class V4UUID extends ValueUUID {\r
-    constructor() {\r
-        super([\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            '-',\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            '-',\r
-            '4',\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            '-',\r
-            V4UUID._oneOf(V4UUID._timeHighBits),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            '-',\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-            V4UUID._randomHex(),\r
-        ].join(''));\r
-    }\r
-    static _oneOf(array) {\r
-        return array[Math.floor(array.length * Math.random())];\r
-    }\r
-    static _randomHex() {\r
-        return V4UUID._oneOf(V4UUID._chars);\r
-    }\r
-}\r
-V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\r
-V4UUID._timeHighBits = ['8', '9', 'a', 'b'];\r
-/**\r
- * An empty UUID that contains only zeros.\r
- */\r
-exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');\r
-function v4() {\r
-    return new V4UUID();\r
-}\r
-exports.v4 = v4;\r
-const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\r
-function isUUID(value) {\r
-    return _UUIDPattern.test(value);\r
-}\r
-exports.isUUID = isUUID;\r
-/**\r
- * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.\r
- * @param value A uuid string.\r
- */\r
-function parse(value) {\r
-    if (!isUUID(value)) {\r
-        throw new Error('invalid uuid');\r
-    }\r
-    return new ValueUUID(value);\r
-}\r
-exports.parse = parse;\r
-function generateUuid() {\r
-    return v4().asHex();\r
-}\r
-exports.generateUuid = generateUuid;\r
-
-
-/***/ }),
-/* 39 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(__filename) {/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const url = __webpack_require__(40);\r
-const path = __webpack_require__(1);\r
-const fs = __webpack_require__(2);\r
-const child_process_1 = __webpack_require__(41);\r
-/**\r
- * @deprecated Use the `vscode-uri` npm module which provides a more\r
- * complete implementation of handling VS Code URIs.\r
- */\r
-function uriToFilePath(uri) {\r
-    let parsed = url.parse(uri);\r
-    if (parsed.protocol !== 'file:' || !parsed.path) {\r
-        return undefined;\r
-    }\r
-    let segments = parsed.path.split('/');\r
-    for (var i = 0, len = segments.length; i < len; i++) {\r
-        segments[i] = decodeURIComponent(segments[i]);\r
-    }\r
-    if (process.platform === 'win32' && segments.length > 1) {\r
-        let first = segments[0];\r
-        let second = segments[1];\r
-        // Do we have a drive letter and we started with a / which is the\r
-        // case if the first segement is empty (see split above)\r
-        if (first.length === 0 && second.length > 1 && second[1] === ':') {\r
-            // Remove first slash\r
-            segments.shift();\r
-        }\r
-    }\r
-    return path.normalize(segments.join('/'));\r
-}\r
-exports.uriToFilePath = uriToFilePath;\r
-function isWindows() {\r
-    return process.platform === 'win32';\r
-}\r
-function resolve(moduleName, nodePath, cwd, tracer) {\r
-    const nodePathKey = 'NODE_PATH';\r
-    const app = [\r
-        "var p = process;",\r
-        "p.on('message',function(m){",\r
-        "if(m.c==='e'){",\r
-        "p.exit(0);",\r
-        "}",\r
-        "else if(m.c==='rs'){",\r
-        "try{",\r
-        "var r=require.resolve(m.a);",\r
-        "p.send({c:'r',s:true,r:r});",\r
-        "}",\r
-        "catch(err){",\r
-        "p.send({c:'r',s:false});",\r
-        "}",\r
-        "}",\r
-        "});"\r
-    ].join('');\r
-    return new Promise((resolve, reject) => {\r
-        let env = process.env;\r
-        let newEnv = Object.create(null);\r
-        Object.keys(env).forEach(key => newEnv[key] = env[key]);\r
-        if (nodePath) {\r
-            if (newEnv[nodePathKey]) {\r
-                newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];\r
-            }\r
-            else {\r
-                newEnv[nodePathKey] = nodePath;\r
-            }\r
-            if (tracer) {\r
-                tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);\r
-            }\r
-        }\r
-        newEnv['ELECTRON_RUN_AS_NODE'] = '1';\r
-        try {\r
-            let cp = child_process_1.fork('', [], {\r
-                cwd: cwd,\r
-                env: newEnv,\r
-                execArgv: ['-e', app]\r
-            });\r
-            if (cp.pid === void 0) {\r
-                reject(new Error(`Starting process to resolve node module  ${moduleName} failed`));\r
-                return;\r
-            }\r
-            cp.on('error', (error) => {\r
-                reject(error);\r
-            });\r
-            cp.on('message', (message) => {\r
-                if (message.c === 'r') {\r
-                    cp.send({ c: 'e' });\r
-                    if (message.s) {\r
-                        resolve(message.r);\r
-                    }\r
-                    else {\r
-                        reject(new Error(`Failed to resolve module: ${moduleName}`));\r
-                    }\r
-                }\r
-            });\r
-            let message = {\r
-                c: 'rs',\r
-                a: moduleName\r
-            };\r
-            cp.send(message);\r
-        }\r
-        catch (error) {\r
-            reject(error);\r
-        }\r
-    });\r
-}\r
-exports.resolve = resolve;\r
-function resolveGlobalNodePath(tracer) {\r
-    let npmCommand = 'npm';\r
-    let options = {\r
-        encoding: 'utf8'\r
-    };\r
-    if (isWindows()) {\r
-        npmCommand = 'npm.cmd';\r
-        options.shell = true;\r
-    }\r
-    let handler = () => { };\r
-    try {\r
-        process.on('SIGPIPE', handler);\r
-        let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;\r
-        if (!stdout) {\r
-            if (tracer) {\r
-                tracer(`'npm config get prefix' didn't return a value.`);\r
-            }\r
-            return undefined;\r
-        }\r
-        let prefix = stdout.trim();\r
-        if (tracer) {\r
-            tracer(`'npm config get prefix' value is: ${prefix}`);\r
-        }\r
-        if (prefix.length > 0) {\r
-            if (isWindows()) {\r
-                return path.join(prefix, 'node_modules');\r
-            }\r
-            else {\r
-                return path.join(prefix, 'lib', 'node_modules');\r
-            }\r
-        }\r
-        return undefined;\r
-    }\r
-    catch (err) {\r
-        return undefined;\r
-    }\r
-    finally {\r
-        process.removeListener('SIGPIPE', handler);\r
-    }\r
-}\r
-exports.resolveGlobalNodePath = resolveGlobalNodePath;\r
-function resolveGlobalYarnPath(tracer) {\r
-    let yarnCommand = 'yarn';\r
-    let options = {\r
-        encoding: 'utf8'\r
-    };\r
-    if (isWindows()) {\r
-        yarnCommand = 'yarn.cmd';\r
-        options.shell = true;\r
-    }\r
-    let handler = () => { };\r
-    try {\r
-        process.on('SIGPIPE', handler);\r
-        let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);\r
-        let stdout = results.stdout;\r
-        if (!stdout) {\r
-            if (tracer) {\r
-                tracer(`'yarn global dir' didn't return a value.`);\r
-                if (results.stderr) {\r
-                    tracer(results.stderr);\r
-                }\r
-            }\r
-            return undefined;\r
-        }\r
-        let lines = stdout.trim().split(/\r?\n/);\r
-        for (let line of lines) {\r
-            try {\r
-                let yarn = JSON.parse(line);\r
-                if (yarn.type === 'log') {\r
-                    return path.join(yarn.data, 'node_modules');\r
-                }\r
-            }\r
-            catch (e) {\r
-                // Do nothing. Ignore the line\r
-            }\r
-        }\r
-        return undefined;\r
-    }\r
-    catch (err) {\r
-        return undefined;\r
-    }\r
-    finally {\r
-        process.removeListener('SIGPIPE', handler);\r
-    }\r
-}\r
-exports.resolveGlobalYarnPath = resolveGlobalYarnPath;\r
-var FileSystem;\r
-(function (FileSystem) {\r
-    let _isCaseSensitive = undefined;\r
-    function isCaseSensitive() {\r
-        if (_isCaseSensitive !== void 0) {\r
-            return _isCaseSensitive;\r
-        }\r
-        if (process.platform === 'win32') {\r
-            _isCaseSensitive = false;\r
-        }\r
-        else {\r
-            // convert current file name to upper case / lower case and check if file exists\r
-            // (guards against cases when name is already all uppercase or lowercase)\r
-            _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());\r
-        }\r
-        return _isCaseSensitive;\r
-    }\r
-    FileSystem.isCaseSensitive = isCaseSensitive;\r
-    function isParent(parent, child) {\r
-        if (isCaseSensitive()) {\r
-            return path.normalize(child).indexOf(path.normalize(parent)) === 0;\r
-        }\r
-        else {\r
-            return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) == 0;\r
-        }\r
-    }\r
-    FileSystem.isParent = isParent;\r
-})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));\r
-function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {\r
-    if (nodePath) {\r
-        if (!path.isAbsolute(nodePath)) {\r
-            nodePath = path.join(workspaceRoot, nodePath);\r
-        }\r
-        return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {\r
-            if (FileSystem.isParent(nodePath, value)) {\r
-                return value;\r
-            }\r
-            else {\r
-                return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));\r
-            }\r
-        }).then(undefined, (_error) => {\r
-            return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);\r
-        });\r
-    }\r
-    else {\r
-        return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);\r
-    }\r
-}\r
-exports.resolveModulePath = resolveModulePath;\r
-
-/* WEBPACK VAR INJECTION */}.call(this, "/index.js"))
-
-/***/ }),
-/* 40 */
-/***/ (function(module, exports) {
-
-module.exports = require("url");
-
-/***/ }),
-/* 41 */
-/***/ (function(module, exports) {
-
-module.exports = require("child_process");
-
-/***/ }),
-/* 42 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-function __export(m) {
-    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-__export(__webpack_require__(43));
-__export(__webpack_require__(46));
-
-
-/***/ }),
-/* 43 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const position_1 = __webpack_require__(44);
-const rbTreeBase_1 = __webpack_require__(45);
-// const lfRegex = new RegExp(/\r\n|\r|\n/g);
-exports.AverageBufferSize = 65535;
-function createUintArray(arr) {
-    let r;
-    if (arr[arr.length - 1] < 65536) {
-        r = new Uint16Array(arr.length);
-    }
-    else {
-        r = new Uint32Array(arr.length);
-    }
-    r.set(arr, 0);
-    return r;
-}
-exports.createUintArray = createUintArray;
-class LineStarts {
-    constructor(lineStarts, cr, lf, crlf, isBasicASCII) {
-        this.lineStarts = lineStarts;
-        this.cr = cr;
-        this.lf = lf;
-        this.crlf = crlf;
-        this.isBasicASCII = isBasicASCII;
-    }
-}
-exports.LineStarts = LineStarts;
-function createLineStartsFast(str, readonly = true) {
-    let r = [0], rLength = 1;
-    for (let i = 0, len = str.length; i < len; i++) {
-        const chr = str.charCodeAt(i);
-        if (chr === 13 /* CarriageReturn */) {
-            if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) {
-                // \r\n... case
-                r[rLength++] = i + 2;
-                i++; // skip \n
-            }
-            else {
-                // \r... case
-                r[rLength++] = i + 1;
-            }
-        }
-        else if (chr === 10 /* LineFeed */) {
-            r[rLength++] = i + 1;
-        }
-    }
-    if (readonly) {
-        return createUintArray(r);
-    }
-    else {
-        return r;
-    }
-}
-exports.createLineStartsFast = createLineStartsFast;
-function createLineStarts(r, str) {
-    r.length = 0;
-    r[0] = 0;
-    let rLength = 1;
-    let cr = 0, lf = 0, crlf = 0;
-    let isBasicASCII = true;
-    for (let i = 0, len = str.length; i < len; i++) {
-        const chr = str.charCodeAt(i);
-        if (chr === 13 /* CarriageReturn */) {
-            if (i + 1 < len && str.charCodeAt(i + 1) === 10 /* LineFeed */) {
-                // \r\n... case
-                crlf++;
-                r[rLength++] = i + 2;
-                i++; // skip \n
-            }
-            else {
-                cr++;
-                // \r... case
-                r[rLength++] = i + 1;
-            }
-        }
-        else if (chr === 10 /* LineFeed */) {
-            lf++;
-            r[rLength++] = i + 1;
-        }
-        else {
-            if (isBasicASCII) {
-                if (chr !== 9 /* Tab */ && (chr < 32 || chr > 126)) {
-                    isBasicASCII = false;
-                }
-            }
-        }
-    }
-    const result = new LineStarts(createUintArray(r), cr, lf, crlf, isBasicASCII);
-    r.length = 0;
-    return result;
-}
-exports.createLineStarts = createLineStarts;
-class Piece {
-    constructor(bufferIndex, start, end, lineFeedCnt, length) {
-        this.bufferIndex = bufferIndex;
-        this.start = start;
-        this.end = end;
-        this.lineFeedCnt = lineFeedCnt;
-        this.length = length;
-    }
-}
-exports.Piece = Piece;
-class StringBuffer {
-    constructor(buffer, lineStarts) {
-        this.buffer = buffer;
-        this.lineStarts = lineStarts;
-    }
-}
-exports.StringBuffer = StringBuffer;
-/**
- * Readonly snapshot for piece tree.
- * In a real multiple thread environment, to make snapshot reading always work correctly, we need to
- * 1. Make TreeNode.piece immutable, then reading and writing can run in parallel.
- * 2. TreeNode/Buffers normalization should not happen during snapshot reading.
- */
-class PieceTreeSnapshot {
-    constructor(tree, BOM) {
-        this._pieces = [];
-        this._tree = tree;
-        this._BOM = BOM;
-        this._index = 0;
-        if (tree.root !== rbTreeBase_1.SENTINEL) {
-            tree.iterate(tree.root, node => {
-                if (node !== rbTreeBase_1.SENTINEL) {
-                    this._pieces.push(node.piece);
-                }
-                return true;
-            });
-        }
-    }
-    read() {
-        if (this._pieces.length === 0) {
-            if (this._index === 0) {
-                this._index++;
-                return this._BOM;
-            }
-            else {
-                return null;
-            }
-        }
-        if (this._index > this._pieces.length - 1) {
-            return null;
-        }
-        if (this._index === 0) {
-            return this._BOM + this._tree.getPieceContent(this._pieces[this._index++]);
-        }
-        return this._tree.getPieceContent(this._pieces[this._index++]);
-    }
-}
-class PieceTreeSearchCache {
-    constructor(limit) {
-        this._limit = limit;
-        this._cache = [];
-    }
-    get(offset) {
-        for (let i = this._cache.length - 1; i >= 0; i--) {
-            let nodePos = this._cache[i];
-            if (nodePos.nodeStartOffset <= offset && nodePos.nodeStartOffset + nodePos.node.piece.length >= offset) {
-                return nodePos;
-            }
-        }
-        return null;
-    }
-    get2(lineNumber) {
-        for (let i = this._cache.length - 1; i >= 0; i--) {
-            let nodePos = this._cache[i];
-            if (nodePos.nodeStartLineNumber && nodePos.nodeStartLineNumber < lineNumber && nodePos.nodeStartLineNumber + nodePos.node.piece.lineFeedCnt >= lineNumber) {
-                return nodePos;
-            }
-        }
-        return null;
-    }
-    set(nodePosition) {
-        if (this._cache.length >= this._limit) {
-            this._cache.shift();
-        }
-        this._cache.push(nodePosition);
-    }
-    valdiate(offset) {
-        let hasInvalidVal = false;
-        let tmp = this._cache;
-        for (let i = 0; i < tmp.length; i++) {
-            let nodePos = tmp[i];
-            if (nodePos.node.parent === null || nodePos.nodeStartOffset >= offset) {
-                tmp[i] = null;
-                hasInvalidVal = true;
-                continue;
-            }
-        }
-        if (hasInvalidVal) {
-            let newArr = [];
-            for (const entry of tmp) {
-                if (entry !== null) {
-                    newArr.push(entry);
-                }
-            }
-            this._cache = newArr;
-        }
-    }
-}
-class PieceTreeBase {
-    constructor(chunks, eol, eolNormalized) {
-        this.create(chunks, eol, eolNormalized);
-    }
-    create(chunks, eol, eolNormalized) {
-        this._buffers = [
-            new StringBuffer('', [0])
-        ];
-        this._lastChangeBufferPos = { line: 0, column: 0 };
-        this.root = rbTreeBase_1.SENTINEL;
-        this._lineCnt = 1;
-        this._length = 0;
-        this._EOL = eol;
-        this._EOLLength = eol.length;
-        this._EOLNormalized = eolNormalized;
-        let lastNode = null;
-        for (let i = 0, len = chunks.length; i < len; i++) {
-            if (chunks[i].buffer.length > 0) {
-                if (!chunks[i].lineStarts) {
-                    chunks[i].lineStarts = createLineStartsFast(chunks[i].buffer);
-                }
-                let piece = new Piece(i + 1, { line: 0, column: 0 }, { line: chunks[i].lineStarts.length - 1, column: chunks[i].buffer.length - chunks[i].lineStarts[chunks[i].lineStarts.length - 1] }, chunks[i].lineStarts.length - 1, chunks[i].buffer.length);
-                this._buffers.push(chunks[i]);
-                lastNode = this.rbInsertRight(lastNode, piece);
-            }
-        }
-        this._searchCache = new PieceTreeSearchCache(1);
-        this._lastVisitedLine = { lineNumber: 0, value: '' };
-        this.computeBufferMetadata();
-    }
-    normalizeEOL(eol) {
-        let averageBufferSize = exports.AverageBufferSize;
-        let min = averageBufferSize - Math.floor(averageBufferSize / 3);
-        let max = min * 2;
-        let tempChunk = '';
-        let tempChunkLen = 0;
-        let chunks = [];
-        this.iterate(this.root, node => {
-            let str = this.getNodeContent(node);
-            let len = str.length;
-            if (tempChunkLen <= min || tempChunkLen + len < max) {
-                tempChunk += str;
-                tempChunkLen += len;
-                return true;
-            }
-            // flush anyways
-            let text = tempChunk.replace(/\r\n|\r|\n/g, eol);
-            chunks.push(new StringBuffer(text, createLineStartsFast(text)));
-            tempChunk = str;
-            tempChunkLen = len;
-            return true;
-        });
-        if (tempChunkLen > 0) {
-            let text = tempChunk.replace(/\r\n|\r|\n/g, eol);
-            chunks.push(new StringBuffer(text, createLineStartsFast(text)));
-        }
-        this.create(chunks, eol, true);
-    }
-    // #region Buffer API
-    getEOL() {
-        return this._EOL;
-    }
-    setEOL(newEOL) {
-        this._EOL = newEOL;
-        this._EOLLength = this._EOL.length;
-        this.normalizeEOL(newEOL);
-    }
-    createSnapshot(BOM) {
-        return new PieceTreeSnapshot(this, BOM);
-    }
-    equal(other) {
-        if (this.getLength() !== other.getLength()) {
-            return false;
-        }
-        if (this.getLineCount() !== other.getLineCount()) {
-            return false;
-        }
-        let offset = 0;
-        let ret = this.iterate(this.root, node => {
-            if (node === rbTreeBase_1.SENTINEL) {
-                return true;
-            }
-            let str = this.getNodeContent(node);
-            let len = str.length;
-            let startPosition = other.nodeAt(offset);
-            let endPosition = other.nodeAt(offset + len);
-            let val = other.getValueInRange2(startPosition, endPosition);
-            return str === val;
-        });
-        return ret;
-    }
-    getOffsetAt(lineNumber, column) {
-        let leftLen = 0; // inorder
-        let x = this.root;
-        while (x !== rbTreeBase_1.SENTINEL) {
-            if (x.left !== rbTreeBase_1.SENTINEL && x.lf_left + 1 >= lineNumber) {
-                x = x.left;
-            }
-            else if (x.lf_left + x.piece.lineFeedCnt + 1 >= lineNumber) {
-                leftLen += x.size_left;
-                // lineNumber >= 2
-                let accumualtedValInCurrentIndex = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);
-                return leftLen += accumualtedValInCurrentIndex + column - 1;
-            }
-            else {
-                lineNumber -= x.lf_left + x.piece.lineFeedCnt;
-                leftLen += x.size_left + x.piece.length;
-                x = x.right;
-            }
-        }
-        return leftLen;
-    }
-    getPositionAt(offset) {
-        offset = Math.floor(offset);
-        offset = Math.max(0, offset);
-        let x = this.root;
-        let lfCnt = 0;
-        let originalOffset = offset;
-        while (x !== rbTreeBase_1.SENTINEL) {
-            if (x.size_left !== 0 && x.size_left >= offset) {
-                x = x.left;
-            }
-            else if (x.size_left + x.piece.length >= offset) {
-                let out = this.getIndexOf(x, offset - x.size_left);
-                lfCnt += x.lf_left + out.index;
-                if (out.index === 0) {
-                    let lineStartOffset = this.getOffsetAt(lfCnt + 1, 1);
-                    let column = originalOffset - lineStartOffset;
-                    return new position_1.Position(lfCnt + 1, column + 1);
-                }
-                return new position_1.Position(lfCnt + 1, out.remainder + 1);
-            }
-            else {
-                offset -= x.size_left + x.piece.length;
-                lfCnt += x.lf_left + x.piece.lineFeedCnt;
-                if (x.right === rbTreeBase_1.SENTINEL) {
-                    // last node
-                    let lineStartOffset = this.getOffsetAt(lfCnt + 1, 1);
-                    let column = originalOffset - offset - lineStartOffset;
-                    return new position_1.Position(lfCnt + 1, column + 1);
-                }
-                else {
-                    x = x.right;
-                }
-            }
-        }
-        return new position_1.Position(1, 1);
-    }
-    getValueInRange(range, eol) {
-        if (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn) {
-            return '';
-        }
-        let startPosition = this.nodeAt2(range.startLineNumber, range.startColumn);
-        let endPosition = this.nodeAt2(range.endLineNumber, range.endColumn);
-        let value = this.getValueInRange2(startPosition, endPosition);
-        if (eol) {
-            if (eol !== this._EOL || !this._EOLNormalized) {
-                return value.replace(/\r\n|\r|\n/g, eol);
-            }
-            if (eol === this.getEOL() && this._EOLNormalized) {
-                if (eol === '\r\n') {
-                }
-                return value;
-            }
-            return value.replace(/\r\n|\r|\n/g, eol);
-        }
-        return value;
-    }
-    getValueInRange2(startPosition, endPosition) {
-        if (startPosition.node === endPosition.node) {
-            let node = startPosition.node;
-            let buffer = this._buffers[node.piece.bufferIndex].buffer;
-            let startOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start);
-            return buffer.substring(startOffset + startPosition.remainder, startOffset + endPosition.remainder);
-        }
-        let x = startPosition.node;
-        let buffer = this._buffers[x.piece.bufferIndex].buffer;
-        let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-        let ret = buffer.substring(startOffset + startPosition.remainder, startOffset + x.piece.length);
-        x = x.next();
-        while (x !== rbTreeBase_1.SENTINEL) {
-            let buffer = this._buffers[x.piece.bufferIndex].buffer;
-            let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-            if (x === endPosition.node) {
-                ret += buffer.substring(startOffset, startOffset + endPosition.remainder);
-                break;
-            }
-            else {
-                ret += buffer.substr(startOffset, x.piece.length);
-            }
-            x = x.next();
-        }
-        return ret;
-    }
-    getLinesContent() {
-        return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/);
-    }
-    getLength() {
-        return this._length;
-    }
-    getLineCount() {
-        return this._lineCnt;
-    }
-    /**
-     * @param lineNumber 1 based
-     */
-    getLineContent(lineNumber) {
-        if (this._lastVisitedLine.lineNumber === lineNumber) {
-            return this._lastVisitedLine.value;
-        }
-        this._lastVisitedLine.lineNumber = lineNumber;
-        if (lineNumber === this._lineCnt) {
-            this._lastVisitedLine.value = this.getLineRawContent(lineNumber);
-        }
-        else if (this._EOLNormalized) {
-            this._lastVisitedLine.value = this.getLineRawContent(lineNumber, this._EOLLength);
-        }
-        else {
-            this._lastVisitedLine.value = this.getLineRawContent(lineNumber).replace(/(\r\n|\r|\n)$/, '');
-        }
-        return this._lastVisitedLine.value;
-    }
-    getLineCharCode(lineNumber, index) {
-        let nodePos = this.nodeAt2(lineNumber, index + 1);
-        if (nodePos.remainder === nodePos.node.piece.length) {
-            // the char we want to fetch is at the head of next node.
-            let matchingNode = nodePos.node.next();
-            if (!matchingNode) {
-                return 0;
-            }
-            let buffer = this._buffers[matchingNode.piece.bufferIndex];
-            let startOffset = this.offsetInBuffer(matchingNode.piece.bufferIndex, matchingNode.piece.start);
-            return buffer.buffer.charCodeAt(startOffset);
-        }
-        else {
-            let buffer = this._buffers[nodePos.node.piece.bufferIndex];
-            let startOffset = this.offsetInBuffer(nodePos.node.piece.bufferIndex, nodePos.node.piece.start);
-            let targetOffset = startOffset + nodePos.remainder;
-            return buffer.buffer.charCodeAt(targetOffset);
-        }
-    }
-    getLineLength(lineNumber) {
-        if (lineNumber === this.getLineCount()) {
-            let startOffset = this.getOffsetAt(lineNumber, 1);
-            return this.getLength() - startOffset;
-        }
-        return this.getOffsetAt(lineNumber + 1, 1) - this.getOffsetAt(lineNumber, 1) - this._EOLLength;
-    }
-    // #endregion
-    // #region Piece Table
-    insert(offset, value, eolNormalized = false) {
-        this._EOLNormalized = this._EOLNormalized && eolNormalized;
-        this._lastVisitedLine.lineNumber = 0;
-        this._lastVisitedLine.value = '';
-        if (this.root !== rbTreeBase_1.SENTINEL) {
-            let { node, remainder, nodeStartOffset } = this.nodeAt(offset);
-            let piece = node.piece;
-            let bufferIndex = piece.bufferIndex;
-            let insertPosInBuffer = this.positionInBuffer(node, remainder);
-            if (node.piece.bufferIndex === 0 &&
-                piece.end.line === this._lastChangeBufferPos.line &&
-                piece.end.column === this._lastChangeBufferPos.column &&
-                (nodeStartOffset + piece.length === offset) &&
-                value.length < exports.AverageBufferSize) {
-                // changed buffer
-                this.appendToNode(node, value);
-                this.computeBufferMetadata();
-                return;
-            }
-            if (nodeStartOffset === offset) {
-                this.insertContentToNodeLeft(value, node);
-                this._searchCache.valdiate(offset);
-            }
-            else if (nodeStartOffset + node.piece.length > offset) {
-                // we are inserting into the middle of a node.
-                let nodesToDel = [];
-                let newRightPiece = new Piece(piece.bufferIndex, insertPosInBuffer, piece.end, this.getLineFeedCnt(piece.bufferIndex, insertPosInBuffer, piece.end), this.offsetInBuffer(bufferIndex, piece.end) - this.offsetInBuffer(bufferIndex, insertPosInBuffer));
-                if (this.shouldCheckCRLF() && this.endWithCR(value)) {
-                    let headOfRight = this.nodeCharCodeAt(node, remainder);
-                    if (headOfRight === 10 /** \n */) {
-                        let newStart = { line: newRightPiece.start.line + 1, column: 0 };
-                        newRightPiece = new Piece(newRightPiece.bufferIndex, newStart, newRightPiece.end, this.getLineFeedCnt(newRightPiece.bufferIndex, newStart, newRightPiece.end), newRightPiece.length - 1);
-                        value += '\n';
-                    }
-                }
-                // reuse node for content before insertion point.
-                if (this.shouldCheckCRLF() && this.startWithLF(value)) {
-                    let tailOfLeft = this.nodeCharCodeAt(node, remainder - 1);
-                    if (tailOfLeft === 13 /** \r */) {
-                        let previousPos = this.positionInBuffer(node, remainder - 1);
-                        this.deleteNodeTail(node, previousPos);
-                        value = '\r' + value;
-                        if (node.piece.length === 0) {
-                            nodesToDel.push(node);
-                        }
-                    }
-                    else {
-                        this.deleteNodeTail(node, insertPosInBuffer);
-                    }
-                }
-                else {
-                    this.deleteNodeTail(node, insertPosInBuffer);
-                }
-                let newPieces = this.createNewPieces(value);
-                if (newRightPiece.length > 0) {
-                    this.rbInsertRight(node, newRightPiece);
-                }
-                let tmpNode = node;
-                for (let k = 0; k < newPieces.length; k++) {
-                    tmpNode = this.rbInsertRight(tmpNode, newPieces[k]);
-                }
-                this.deleteNodes(nodesToDel);
-            }
-            else {
-                this.insertContentToNodeRight(value, node);
-            }
-        }
-        else {
-            // insert new node
-            let pieces = this.createNewPieces(value);
-            let node = this.rbInsertLeft(null, pieces[0]);
-            for (let k = 1; k < pieces.length; k++) {
-                node = this.rbInsertRight(node, pieces[k]);
-            }
-        }
-        // todo, this is too brutal. Total line feed count should be updated the same way as lf_left.
-        this.computeBufferMetadata();
-    }
-    delete(offset, cnt) {
-        this._lastVisitedLine.lineNumber = 0;
-        this._lastVisitedLine.value = '';
-        if (cnt <= 0 || this.root === rbTreeBase_1.SENTINEL) {
-            return;
-        }
-        let startPosition = this.nodeAt(offset);
-        let endPosition = this.nodeAt(offset + cnt);
-        let startNode = startPosition.node;
-        let endNode = endPosition.node;
-        if (startNode === endNode) {
-            let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder);
-            let endSplitPosInBuffer = this.positionInBuffer(startNode, endPosition.remainder);
-            if (startPosition.nodeStartOffset === offset) {
-                if (cnt === startNode.piece.length) { // delete node
-                    let next = startNode.next();
-                    rbTreeBase_1.rbDelete(this, startNode);
-                    this.validateCRLFWithPrevNode(next);
-                    this.computeBufferMetadata();
-                    return;
-                }
-                this.deleteNodeHead(startNode, endSplitPosInBuffer);
-                this._searchCache.valdiate(offset);
-                this.validateCRLFWithPrevNode(startNode);
-                this.computeBufferMetadata();
-                return;
-            }
-            if (startPosition.nodeStartOffset + startNode.piece.length === offset + cnt) {
-                this.deleteNodeTail(startNode, startSplitPosInBuffer);
-                this.validateCRLFWithNextNode(startNode);
-                this.computeBufferMetadata();
-                return;
-            }
-            // delete content in the middle, this node will be splitted to nodes
-            this.shrinkNode(startNode, startSplitPosInBuffer, endSplitPosInBuffer);
-            this.computeBufferMetadata();
-            return;
-        }
-        let nodesToDel = [];
-        let startSplitPosInBuffer = this.positionInBuffer(startNode, startPosition.remainder);
-        this.deleteNodeTail(startNode, startSplitPosInBuffer);
-        this._searchCache.valdiate(offset);
-        if (startNode.piece.length === 0) {
-            nodesToDel.push(startNode);
-        }
-        // update last touched node
-        let endSplitPosInBuffer = this.positionInBuffer(endNode, endPosition.remainder);
-        this.deleteNodeHead(endNode, endSplitPosInBuffer);
-        if (endNode.piece.length === 0) {
-            nodesToDel.push(endNode);
-        }
-        // delete nodes in between
-        let secondNode = startNode.next();
-        for (let node = secondNode; node !== rbTreeBase_1.SENTINEL && node !== endNode; node = node.next()) {
-            nodesToDel.push(node);
-        }
-        let prev = startNode.piece.length === 0 ? startNode.prev() : startNode;
-        this.deleteNodes(nodesToDel);
-        this.validateCRLFWithNextNode(prev);
-        this.computeBufferMetadata();
-    }
-    insertContentToNodeLeft(value, node) {
-        // we are inserting content to the beginning of node
-        let nodesToDel = [];
-        if (this.shouldCheckCRLF() && this.endWithCR(value) && this.startWithLF(node)) {
-            // move `\n` to new node.
-            let piece = node.piece;
-            let newStart = { line: piece.start.line + 1, column: 0 };
-            let nPiece = new Piece(piece.bufferIndex, newStart, piece.end, this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end), piece.length - 1);
-            node.piece = nPiece;
-            value += '\n';
-            rbTreeBase_1.updateTreeMetadata(this, node, -1, -1);
-            if (node.piece.length === 0) {
-                nodesToDel.push(node);
-            }
-        }
-        let newPieces = this.createNewPieces(value);
-        let newNode = this.rbInsertLeft(node, newPieces[newPieces.length - 1]);
-        for (let k = newPieces.length - 2; k >= 0; k--) {
-            newNode = this.rbInsertLeft(newNode, newPieces[k]);
-        }
-        this.validateCRLFWithPrevNode(newNode);
-        this.deleteNodes(nodesToDel);
-    }
-    insertContentToNodeRight(value, node) {
-        // we are inserting to the right of this node.
-        if (this.adjustCarriageReturnFromNext(value, node)) {
-            // move \n to the new node.
-            value += '\n';
-        }
-        let newPieces = this.createNewPieces(value);
-        let newNode = this.rbInsertRight(node, newPieces[0]);
-        let tmpNode = newNode;
-        for (let k = 1; k < newPieces.length; k++) {
-            tmpNode = this.rbInsertRight(tmpNode, newPieces[k]);
-        }
-        this.validateCRLFWithPrevNode(newNode);
-    }
-    positionInBuffer(node, remainder, ret) {
-        let piece = node.piece;
-        let bufferIndex = node.piece.bufferIndex;
-        let lineStarts = this._buffers[bufferIndex].lineStarts;
-        let startOffset = lineStarts[piece.start.line] + piece.start.column;
-        let offset = startOffset + remainder;
-        // binary search offset between startOffset and endOffset
-        let low = piece.start.line;
-        let high = piece.end.line;
-        let mid = 0;
-        let midStop = 0;
-        let midStart = 0;
-        while (low <= high) {
-            mid = low + ((high - low) / 2) | 0;
-            midStart = lineStarts[mid];
-            if (mid === high) {
-                break;
-            }
-            midStop = lineStarts[mid + 1];
-            if (offset < midStart) {
-                high = mid - 1;
-            }
-            else if (offset >= midStop) {
-                low = mid + 1;
-            }
-            else {
-                break;
-            }
-        }
-        if (ret) {
-            ret.line = mid;
-            ret.column = offset - midStart;
-            return null;
-        }
-        return {
-            line: mid,
-            column: offset - midStart
-        };
-    }
-    getLineFeedCnt(bufferIndex, start, end) {
-        // we don't need to worry about start: abc\r|\n, or abc|\r, or abc|\n, or abc|\r\n doesn't change the fact that, there is one line break after start.
-        // now let's take care of end: abc\r|\n, if end is in between \r and \n, we need to add line feed count by 1
-        if (end.column === 0) {
-            return end.line - start.line;
-        }
-        let lineStarts = this._buffers[bufferIndex].lineStarts;
-        if (end.line === lineStarts.length - 1) { // it means, there is no \n after end, otherwise, there will be one more lineStart.
-            return end.line - start.line;
-        }
-        let nextLineStartOffset = lineStarts[end.line + 1];
-        let endOffset = lineStarts[end.line] + end.column;
-        if (nextLineStartOffset > endOffset + 1) { // there are more than 1 character after end, which means it can't be \n
-            return end.line - start.line;
-        }
-        // endOffset + 1 === nextLineStartOffset
-        // character at endOffset is \n, so we check the character before first
-        // if character at endOffset is \r, end.column is 0 and we can't get here.
-        let previousCharOffset = endOffset - 1; // end.column > 0 so it's okay.
-        let buffer = this._buffers[bufferIndex].buffer;
-        if (buffer.charCodeAt(previousCharOffset) === 13) {
-            return end.line - start.line + 1;
-        }
-        else {
-            return end.line - start.line;
-        }
-    }
-    offsetInBuffer(bufferIndex, cursor) {
-        let lineStarts = this._buffers[bufferIndex].lineStarts;
-        return lineStarts[cursor.line] + cursor.column;
-    }
-    deleteNodes(nodes) {
-        for (let i = 0; i < nodes.length; i++) {
-            rbTreeBase_1.rbDelete(this, nodes[i]);
-        }
-    }
-    createNewPieces(text) {
-        if (text.length > exports.AverageBufferSize) {
-            // the content is large, operations like substring, charCode becomes slow
-            // so here we split it into smaller chunks, just like what we did for CR/LF normalization
-            let newPieces = [];
-            while (text.length > exports.AverageBufferSize) {
-                const lastChar = text.charCodeAt(exports.AverageBufferSize - 1);
-                let splitText;
-                if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) {
-                    // last character is \r or a high surrogate => keep it back
-                    splitText = text.substring(0, exports.AverageBufferSize - 1);
-                    text = text.substring(exports.AverageBufferSize - 1);
-                }
-                else {
-                    splitText = text.substring(0, exports.AverageBufferSize);
-                    text = text.substring(exports.AverageBufferSize);
-                }
-                let lineStarts = createLineStartsFast(splitText);
-                newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts.length - 1, column: splitText.length - lineStarts[lineStarts.length - 1] }, lineStarts.length - 1, splitText.length));
-                this._buffers.push(new StringBuffer(splitText, lineStarts));
-            }
-            let lineStarts = createLineStartsFast(text);
-            newPieces.push(new Piece(this._buffers.length, /* buffer index */ { line: 0, column: 0 }, { line: lineStarts.length - 1, column: text.length - lineStarts[lineStarts.length - 1] }, lineStarts.length - 1, text.length));
-            this._buffers.push(new StringBuffer(text, lineStarts));
-            return newPieces;
-        }
-        let startOffset = this._buffers[0].buffer.length;
-        const lineStarts = createLineStartsFast(text, false);
-        let start = this._lastChangeBufferPos;
-        if (this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 1] === startOffset
-            && startOffset !== 0
-            && this.startWithLF(text)
-            && this.endWithCR(this._buffers[0].buffer) // todo, we can check this._lastChangeBufferPos's column as it's the last one
-        ) {
-            this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line, column: this._lastChangeBufferPos.column + 1 };
-            start = this._lastChangeBufferPos;
-            for (let i = 0; i < lineStarts.length; i++) {
-                lineStarts[i] += startOffset + 1;
-            }
-            this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));
-            this._buffers[0].buffer += '_' + text;
-            startOffset += 1;
-        }
-        else {
-            if (startOffset !== 0) {
-                for (let i = 0; i < lineStarts.length; i++) {
-                    lineStarts[i] += startOffset;
-                }
-            }
-            this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));
-            this._buffers[0].buffer += text;
-        }
-        const endOffset = this._buffers[0].buffer.length;
-        let endIndex = this._buffers[0].lineStarts.length - 1;
-        let endColumn = endOffset - this._buffers[0].lineStarts[endIndex];
-        let endPos = { line: endIndex, column: endColumn };
-        let newPiece = new Piece(0, /** todo@peng */ start, endPos, this.getLineFeedCnt(0, start, endPos), endOffset - startOffset);
-        this._lastChangeBufferPos = endPos;
-        return [newPiece];
-    }
-    getLinesRawContent() {
-        return this.getContentOfSubTree(this.root);
-    }
-    getLineRawContent(lineNumber, endOffset = 0) {
-        let x = this.root;
-        let ret = '';
-        let cache = this._searchCache.get2(lineNumber);
-        if (cache) {
-            x = cache.node;
-            let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber - 1);
-            let buffer = this._buffers[x.piece.bufferIndex].buffer;
-            let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-            if (cache.nodeStartLineNumber + x.piece.lineFeedCnt === lineNumber) {
-                ret = buffer.substring(startOffset + prevAccumualtedValue, startOffset + x.piece.length);
-            }
-            else {
-                let accumualtedValue = this.getAccumulatedValue(x, lineNumber - cache.nodeStartLineNumber);
-                return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue - endOffset);
-            }
-        }
-        else {
-            let nodeStartOffset = 0;
-            const originalLineNumber = lineNumber;
-            while (x !== rbTreeBase_1.SENTINEL) {
-                if (x.left !== rbTreeBase_1.SENTINEL && x.lf_left >= lineNumber - 1) {
-                    x = x.left;
-                }
-                else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {
-                    let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);
-                    let accumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);
-                    let buffer = this._buffers[x.piece.bufferIndex].buffer;
-                    let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-                    nodeStartOffset += x.size_left;
-                    this._searchCache.set({
-                        node: x,
-                        nodeStartOffset,
-                        nodeStartLineNumber: originalLineNumber - (lineNumber - 1 - x.lf_left)
-                    });
-                    return buffer.substring(startOffset + prevAccumualtedValue, startOffset + accumualtedValue - endOffset);
-                }
-                else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {
-                    let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);
-                    let buffer = this._buffers[x.piece.bufferIndex].buffer;
-                    let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-                    ret = buffer.substring(startOffset + prevAccumualtedValue, startOffset + x.piece.length);
-                    break;
-                }
-                else {
-                    lineNumber -= x.lf_left + x.piece.lineFeedCnt;
-                    nodeStartOffset += x.size_left + x.piece.length;
-                    x = x.right;
-                }
-            }
-        }
-        // search in order, to find the node contains end column
-        x = x.next();
-        while (x !== rbTreeBase_1.SENTINEL) {
-            let buffer = this._buffers[x.piece.bufferIndex].buffer;
-            if (x.piece.lineFeedCnt > 0) {
-                let accumualtedValue = this.getAccumulatedValue(x, 0);
-                let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-                ret += buffer.substring(startOffset, startOffset + accumualtedValue - endOffset);
-                return ret;
-            }
-            else {
-                let startOffset = this.offsetInBuffer(x.piece.bufferIndex, x.piece.start);
-                ret += buffer.substr(startOffset, x.piece.length);
-            }
-            x = x.next();
-        }
-        return ret;
-    }
-    computeBufferMetadata() {
-        let x = this.root;
-        let lfCnt = 1;
-        let len = 0;
-        while (x !== rbTreeBase_1.SENTINEL) {
-            lfCnt += x.lf_left + x.piece.lineFeedCnt;
-            len += x.size_left + x.piece.length;
-            x = x.right;
-        }
-        this._lineCnt = lfCnt;
-        this._length = len;
-        this._searchCache.valdiate(this._length);
-    }
-    // #region node operations
-    getIndexOf(node, accumulatedValue) {
-        let piece = node.piece;
-        let pos = this.positionInBuffer(node, accumulatedValue);
-        let lineCnt = pos.line - piece.start.line;
-        if (this.offsetInBuffer(piece.bufferIndex, piece.end) - this.offsetInBuffer(piece.bufferIndex, piece.start) === accumulatedValue) {
-            // we are checking the end of this node, so a CRLF check is necessary.
-            let realLineCnt = this.getLineFeedCnt(node.piece.bufferIndex, piece.start, pos);
-            if (realLineCnt !== lineCnt) {
-                // aha yes, CRLF
-                return { index: realLineCnt, remainder: 0 };
-            }
-        }
-        return { index: lineCnt, remainder: pos.column };
-    }
-    getAccumulatedValue(node, index) {
-        if (index < 0) {
-            return 0;
-        }
-        let piece = node.piece;
-        let lineStarts = this._buffers[piece.bufferIndex].lineStarts;
-        let expectedLineStartIndex = piece.start.line + index + 1;
-        if (expectedLineStartIndex > piece.end.line) {
-            return lineStarts[piece.end.line] + piece.end.column - lineStarts[piece.start.line] - piece.start.column;
-        }
-        else {
-            return lineStarts[expectedLineStartIndex] - lineStarts[piece.start.line] - piece.start.column;
-        }
-    }
-    deleteNodeTail(node, pos) {
-        const piece = node.piece;
-        const originalLFCnt = piece.lineFeedCnt;
-        const originalEndOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);
-        const newEnd = pos;
-        const newEndOffset = this.offsetInBuffer(piece.bufferIndex, newEnd);
-        const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd);
-        const lf_delta = newLineFeedCnt - originalLFCnt;
-        const size_delta = newEndOffset - originalEndOffset;
-        const newLength = piece.length + size_delta;
-        node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength);
-        rbTreeBase_1.updateTreeMetadata(this, node, size_delta, lf_delta);
-    }
-    deleteNodeHead(node, pos) {
-        const piece = node.piece;
-        const originalLFCnt = piece.lineFeedCnt;
-        const originalStartOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);
-        const newStart = pos;
-        const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end);
-        const newStartOffset = this.offsetInBuffer(piece.bufferIndex, newStart);
-        const lf_delta = newLineFeedCnt - originalLFCnt;
-        const size_delta = originalStartOffset - newStartOffset;
-        const newLength = piece.length + size_delta;
-        node.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength);
-        rbTreeBase_1.updateTreeMetadata(this, node, size_delta, lf_delta);
-    }
-    shrinkNode(node, start, end) {
-        const piece = node.piece;
-        const originalStartPos = piece.start;
-        const originalEndPos = piece.end;
-        // old piece, originalStartPos, start
-        const oldLength = piece.length;
-        const oldLFCnt = piece.lineFeedCnt;
-        const newEnd = start;
-        const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, piece.start, newEnd);
-        const newLength = this.offsetInBuffer(piece.bufferIndex, start) - this.offsetInBuffer(piece.bufferIndex, originalStartPos);
-        node.piece = new Piece(piece.bufferIndex, piece.start, newEnd, newLineFeedCnt, newLength);
-        rbTreeBase_1.updateTreeMetadata(this, node, newLength - oldLength, newLineFeedCnt - oldLFCnt);
-        // new right piece, end, originalEndPos
-        let newPiece = new Piece(piece.bufferIndex, end, originalEndPos, this.getLineFeedCnt(piece.bufferIndex, end, originalEndPos), this.offsetInBuffer(piece.bufferIndex, originalEndPos) - this.offsetInBuffer(piece.bufferIndex, end));
-        let newNode = this.rbInsertRight(node, newPiece);
-        this.validateCRLFWithPrevNode(newNode);
-    }
-    appendToNode(node, value) {
-        if (this.adjustCarriageReturnFromNext(value, node)) {
-            value += '\n';
-        }
-        const hitCRLF = this.shouldCheckCRLF() && this.startWithLF(value) && this.endWithCR(node);
-        const startOffset = this._buffers[0].buffer.length;
-        this._buffers[0].buffer += value;
-        const lineStarts = createLineStartsFast(value, false);
-        for (let i = 0; i < lineStarts.length; i++) {
-            lineStarts[i] += startOffset;
-        }
-        if (hitCRLF) {
-            let prevStartOffset = this._buffers[0].lineStarts[this._buffers[0].lineStarts.length - 2];
-            this._buffers[0].lineStarts.pop();
-            // _lastChangeBufferPos is already wrong
-            this._lastChangeBufferPos = { line: this._lastChangeBufferPos.line - 1, column: startOffset - prevStartOffset };
-        }
-        this._buffers[0].lineStarts = this._buffers[0].lineStarts.concat(lineStarts.slice(1));
-        const endIndex = this._buffers[0].lineStarts.length - 1;
-        const endColumn = this._buffers[0].buffer.length - this._buffers[0].lineStarts[endIndex];
-        const newEnd = { line: endIndex, column: endColumn };
-        const newLength = node.piece.length + value.length;
-        const oldLineFeedCnt = node.piece.lineFeedCnt;
-        const newLineFeedCnt = this.getLineFeedCnt(0, node.piece.start, newEnd);
-        const lf_delta = newLineFeedCnt - oldLineFeedCnt;
-        node.piece = new Piece(node.piece.bufferIndex, node.piece.start, newEnd, newLineFeedCnt, newLength);
-        this._lastChangeBufferPos = newEnd;
-        rbTreeBase_1.updateTreeMetadata(this, node, value.length, lf_delta);
-    }
-    nodeAt(offset) {
-        let x = this.root;
-        let cache = this._searchCache.get(offset);
-        if (cache) {
-            return {
-                node: cache.node,
-                nodeStartOffset: cache.nodeStartOffset,
-                remainder: offset - cache.nodeStartOffset
-            };
-        }
-        let nodeStartOffset = 0;
-        while (x !== rbTreeBase_1.SENTINEL) {
-            if (x.size_left > offset) {
-                x = x.left;
-            }
-            else if (x.size_left + x.piece.length >= offset) {
-                nodeStartOffset += x.size_left;
-                let ret = {
-                    node: x,
-                    remainder: offset - x.size_left,
-                    nodeStartOffset
-                };
-                this._searchCache.set(ret);
-                return ret;
-            }
-            else {
-                offset -= x.size_left + x.piece.length;
-                nodeStartOffset += x.size_left + x.piece.length;
-                x = x.right;
-            }
-        }
-        return null;
-    }
-    nodeAt2(lineNumber, column) {
-        let x = this.root;
-        let nodeStartOffset = 0;
-        while (x !== rbTreeBase_1.SENTINEL) {
-            if (x.left !== rbTreeBase_1.SENTINEL && x.lf_left >= lineNumber - 1) {
-                x = x.left;
-            }
-            else if (x.lf_left + x.piece.lineFeedCnt > lineNumber - 1) {
-                let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);
-                let accumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 1);
-                nodeStartOffset += x.size_left;
-                return {
-                    node: x,
-                    remainder: Math.min(prevAccumualtedValue + column - 1, accumualtedValue),
-                    nodeStartOffset
-                };
-            }
-            else if (x.lf_left + x.piece.lineFeedCnt === lineNumber - 1) {
-                let prevAccumualtedValue = this.getAccumulatedValue(x, lineNumber - x.lf_left - 2);
-                if (prevAccumualtedValue + column - 1 <= x.piece.length) {
-                    return {
-                        node: x,
-                        remainder: prevAccumualtedValue + column - 1,
-                        nodeStartOffset
-                    };
-                }
-                else {
-                    column -= x.piece.length - prevAccumualtedValue;
-                    break;
-                }
-            }
-            else {
-                lineNumber -= x.lf_left + x.piece.lineFeedCnt;
-                nodeStartOffset += x.size_left + x.piece.length;
-                x = x.right;
-            }
-        }
-        // search in order, to find the node contains position.column
-        x = x.next();
-        while (x !== rbTreeBase_1.SENTINEL) {
-            if (x.piece.lineFeedCnt > 0) {
-                let accumualtedValue = this.getAccumulatedValue(x, 0);
-                let nodeStartOffset = this.offsetOfNode(x);
-                return {
-                    node: x,
-                    remainder: Math.min(column - 1, accumualtedValue),
-                    nodeStartOffset
-                };
-            }
-            else {
-                if (x.piece.length >= column - 1) {
-                    let nodeStartOffset = this.offsetOfNode(x);
-                    return {
-                        node: x,
-                        remainder: column - 1,
-                        nodeStartOffset
-                    };
-                }
-                else {
-                    column -= x.piece.length;
-                }
-            }
-            x = x.next();
-        }
-        return null;
-    }
-    nodeCharCodeAt(node, offset) {
-        if (node.piece.lineFeedCnt < 1) {
-            return -1;
-        }
-        let buffer = this._buffers[node.piece.bufferIndex];
-        let newOffset = this.offsetInBuffer(node.piece.bufferIndex, node.piece.start) + offset;
-        return buffer.buffer.charCodeAt(newOffset);
-    }
-    offsetOfNode(node) {
-        if (!node) {
-            return 0;
-        }
-        let pos = node.size_left;
-        while (node !== this.root) {
-            if (node.parent.right === node) {
-                pos += node.parent.size_left + node.parent.piece.length;
-            }
-            node = node.parent;
-        }
-        return pos;
-    }
-    // #endregion
-    // #region CRLF
-    shouldCheckCRLF() {
-        return !(this._EOLNormalized && this._EOL === '\n');
-    }
-    startWithLF(val) {
-        if (typeof val === 'string') {
-            return val.charCodeAt(0) === 10;
-        }
-        if (val === rbTreeBase_1.SENTINEL || val.piece.lineFeedCnt === 0) {
-            return false;
-        }
-        let piece = val.piece;
-        let lineStarts = this._buffers[piece.bufferIndex].lineStarts;
-        let line = piece.start.line;
-        let startOffset = lineStarts[line] + piece.start.column;
-        if (line === lineStarts.length - 1) {
-            // last line, so there is no line feed at the end of this line
-            return false;
-        }
-        let nextLineOffset = lineStarts[line + 1];
-        if (nextLineOffset > startOffset + 1) {
-            return false;
-        }
-        return this._buffers[piece.bufferIndex].buffer.charCodeAt(startOffset) === 10;
-    }
-    endWithCR(val) {
-        if (typeof val === 'string') {
-            return val.charCodeAt(val.length - 1) === 13;
-        }
-        if (val === rbTreeBase_1.SENTINEL || val.piece.lineFeedCnt === 0) {
-            return false;
-        }
-        return this.nodeCharCodeAt(val, val.piece.length - 1) === 13;
-    }
-    validateCRLFWithPrevNode(nextNode) {
-        if (this.shouldCheckCRLF() && this.startWithLF(nextNode)) {
-            let node = nextNode.prev();
-            if (this.endWithCR(node)) {
-                this.fixCRLF(node, nextNode);
-            }
-        }
-    }
-    validateCRLFWithNextNode(node) {
-        if (this.shouldCheckCRLF() && this.endWithCR(node)) {
-            let nextNode = node.next();
-            if (this.startWithLF(nextNode)) {
-                this.fixCRLF(node, nextNode);
-            }
-        }
-    }
-    fixCRLF(prev, next) {
-        let nodesToDel = [];
-        // update node
-        let lineStarts = this._buffers[prev.piece.bufferIndex].lineStarts;
-        let newEnd;
-        if (prev.piece.end.column === 0) {
-            // it means, last line ends with \r, not \r\n
-            newEnd = { line: prev.piece.end.line - 1, column: lineStarts[prev.piece.end.line] - lineStarts[prev.piece.end.line - 1] - 1 };
-        }
-        else {
-            // \r\n
-            newEnd = { line: prev.piece.end.line, column: prev.piece.end.column - 1 };
-        }
-        const prevNewLength = prev.piece.length - 1;
-        const prevNewLFCnt = prev.piece.lineFeedCnt - 1;
-        prev.piece = new Piece(prev.piece.bufferIndex, prev.piece.start, newEnd, prevNewLFCnt, prevNewLength);
-        rbTreeBase_1.updateTreeMetadata(this, prev, -1, -1);
-        if (prev.piece.length === 0) {
-            nodesToDel.push(prev);
-        }
-        // update nextNode
-        let newStart = { line: next.piece.start.line + 1, column: 0 };
-        const newLength = next.piece.length - 1;
-        const newLineFeedCnt = this.getLineFeedCnt(next.piece.bufferIndex, newStart, next.piece.end);
-        next.piece = new Piece(next.piece.bufferIndex, newStart, next.piece.end, newLineFeedCnt, newLength);
-        rbTreeBase_1.updateTreeMetadata(this, next, -1, -1);
-        if (next.piece.length === 0) {
-            nodesToDel.push(next);
-        }
-        // create new piece which contains \r\n
-        let pieces = this.createNewPieces('\r\n');
-        this.rbInsertRight(prev, pieces[0]);
-        // delete empty nodes
-        for (let i = 0; i < nodesToDel.length; i++) {
-            rbTreeBase_1.rbDelete(this, nodesToDel[i]);
-        }
-    }
-    adjustCarriageReturnFromNext(value, node) {
-        if (this.shouldCheckCRLF() && this.endWithCR(value)) {
-            let nextNode = node.next();
-            if (this.startWithLF(nextNode)) {
-                // move `\n` forward
-                value += '\n';
-                if (nextNode.piece.length === 1) {
-                    rbTreeBase_1.rbDelete(this, nextNode);
-                }
-                else {
-                    const piece = nextNode.piece;
-                    const newStart = { line: piece.start.line + 1, column: 0 };
-                    const newLength = piece.length - 1;
-                    const newLineFeedCnt = this.getLineFeedCnt(piece.bufferIndex, newStart, piece.end);
-                    nextNode.piece = new Piece(piece.bufferIndex, newStart, piece.end, newLineFeedCnt, newLength);
-                    rbTreeBase_1.updateTreeMetadata(this, nextNode, -1, -1);
-                }
-                return true;
-            }
-        }
-        return false;
-    }
-    // #endregion
-    // #endregion
-    // #region Tree operations
-    iterate(node, callback) {
-        if (node === rbTreeBase_1.SENTINEL) {
-            return callback(rbTreeBase_1.SENTINEL);
-        }
-        let leftRet = this.iterate(node.left, callback);
-        if (!leftRet) {
-            return leftRet;
-        }
-        return callback(node) && this.iterate(node.right, callback);
-    }
-    getNodeContent(node) {
-        if (node === rbTreeBase_1.SENTINEL) {
-            return '';
-        }
-        let buffer = this._buffers[node.piece.bufferIndex];
-        let currentContent;
-        let piece = node.piece;
-        let startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);
-        let endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);
-        currentContent = buffer.buffer.substring(startOffset, endOffset);
-        return currentContent;
-    }
-    getPieceContent(piece) {
-        let buffer = this._buffers[piece.bufferIndex];
-        let startOffset = this.offsetInBuffer(piece.bufferIndex, piece.start);
-        let endOffset = this.offsetInBuffer(piece.bufferIndex, piece.end);
-        let currentContent = buffer.buffer.substring(startOffset, endOffset);
-        return currentContent;
-    }
-    /**
-     *      node              node
-     *     /  \              /  \
-     *    a   b    <----   a    b
-     *                         /
-     *                        z
-     */
-    rbInsertRight(node, p) {
-        let z = new rbTreeBase_1.TreeNode(p, 1 /* Red */);
-        z.left = rbTreeBase_1.SENTINEL;
-        z.right = rbTreeBase_1.SENTINEL;
-        z.parent = rbTreeBase_1.SENTINEL;
-        z.size_left = 0;
-        z.lf_left = 0;
-        let x = this.root;
-        if (x === rbTreeBase_1.SENTINEL) {
-            this.root = z;
-            z.color = 0 /* Black */;
-        }
-        else if (node.right === rbTreeBase_1.SENTINEL) {
-            node.right = z;
-            z.parent = node;
-        }
-        else {
-            let nextNode = rbTreeBase_1.leftest(node.right);
-            nextNode.left = z;
-            z.parent = nextNode;
-        }
-        rbTreeBase_1.fixInsert(this, z);
-        return z;
-    }
-    /**
-     *      node              node
-     *     /  \              /  \
-     *    a   b     ---->   a    b
-     *                       \
-     *                        z
-     */
-    rbInsertLeft(node, p) {
-        let z = new rbTreeBase_1.TreeNode(p, 1 /* Red */);
-        z.left = rbTreeBase_1.SENTINEL;
-        z.right = rbTreeBase_1.SENTINEL;
-        z.parent = rbTreeBase_1.SENTINEL;
-        z.size_left = 0;
-        z.lf_left = 0;
-        if (this.root === rbTreeBase_1.SENTINEL) {
-            this.root = z;
-            z.color = 0 /* Black */;
-        }
-        else if (node.left === rbTreeBase_1.SENTINEL) {
-            node.left = z;
-            z.parent = node;
-        }
-        else {
-            let prevNode = rbTreeBase_1.righttest(node.left); // a
-            prevNode.right = z;
-            z.parent = prevNode;
-        }
-        rbTreeBase_1.fixInsert(this, z);
-        return z;
-    }
-    getContentOfSubTree(node) {
-        let str = '';
-        this.iterate(node, node => {
-            str += this.getNodeContent(node);
-            return true;
-        });
-        return str;
-    }
-}
-exports.PieceTreeBase = PieceTreeBase;
-
-
-/***/ }),
-/* 44 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-/**
- * A position in the editor.
- */
-class Position {
-    constructor(lineNumber, column) {
-        this.lineNumber = lineNumber;
-        this.column = column;
-    }
-    /**
-     * Create a new postion from this position.
-     *
-     * @param newLineNumber new line number
-     * @param newColumn new column
-     */
-    with(newLineNumber = this.lineNumber, newColumn = this.column) {
-        if (newLineNumber === this.lineNumber && newColumn === this.column) {
-            return this;
-        }
-        else {
-            return new Position(newLineNumber, newColumn);
-        }
-    }
-    /**
-     * Derive a new position from this position.
-     *
-     * @param deltaLineNumber line number delta
-     * @param deltaColumn column delta
-     */
-    delta(deltaLineNumber = 0, deltaColumn = 0) {
-        return this.with(this.lineNumber + deltaLineNumber, this.column + deltaColumn);
-    }
-    /**
-     * Test if this position equals other position
-     */
-    equals(other) {
-        return Position.equals(this, other);
-    }
-    /**
-     * Test if position `a` equals position `b`
-     */
-    static equals(a, b) {
-        if (!a && !b) {
-            return true;
-        }
-        return (!!a &&
-            !!b &&
-            a.lineNumber === b.lineNumber &&
-            a.column === b.column);
-    }
-    /**
-     * Test if this position is before other position.
-     * If the two positions are equal, the result will be false.
-     */
-    isBefore(other) {
-        return Position.isBefore(this, other);
-    }
-    /**
-     * Test if position `a` is before position `b`.
-     * If the two positions are equal, the result will be false.
-     */
-    static isBefore(a, b) {
-        if (a.lineNumber < b.lineNumber) {
-            return true;
-        }
-        if (b.lineNumber < a.lineNumber) {
-            return false;
-        }
-        return a.column < b.column;
-    }
-    /**
-     * Test if this position is before other position.
-     * If the two positions are equal, the result will be true.
-     */
-    isBeforeOrEqual(other) {
-        return Position.isBeforeOrEqual(this, other);
-    }
-    /**
-     * Test if position `a` is before position `b`.
-     * If the two positions are equal, the result will be true.
-     */
-    static isBeforeOrEqual(a, b) {
-        if (a.lineNumber < b.lineNumber) {
-            return true;
-        }
-        if (b.lineNumber < a.lineNumber) {
-            return false;
-        }
-        return a.column <= b.column;
-    }
-    /**
-     * A function that compares positions, useful for sorting
-     */
-    static compare(a, b) {
-        let aLineNumber = a.lineNumber | 0;
-        let bLineNumber = b.lineNumber | 0;
-        if (aLineNumber === bLineNumber) {
-            let aColumn = a.column | 0;
-            let bColumn = b.column | 0;
-            return aColumn - bColumn;
-        }
-        return aLineNumber - bLineNumber;
-    }
-    /**
-     * Clone this position.
-     */
-    clone() {
-        return new Position(this.lineNumber, this.column);
-    }
-    /**
-     * Convert to a human-readable representation.
-     */
-    toString() {
-        return '(' + this.lineNumber + ',' + this.column + ')';
-    }
-    // ---
-    /**
-     * Create a `Position` from an `IPosition`.
-     */
-    static lift(pos) {
-        return new Position(pos.lineNumber, pos.column);
-    }
-    /**
-     * Test if `obj` is an `IPosition`.
-     */
-    static isIPosition(obj) {
-        return (obj
-            && (typeof obj.lineNumber === 'number')
-            && (typeof obj.column === 'number'));
-    }
-}
-exports.Position = Position;
-
-
-/***/ }),
-/* 45 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-class TreeNode {
-    constructor(piece, color) {
-        this.piece = piece;
-        this.color = color;
-        this.size_left = 0;
-        this.lf_left = 0;
-        this.parent = this;
-        this.left = this;
-        this.right = this;
-    }
-    next() {
-        if (this.right !== exports.SENTINEL) {
-            return leftest(this.right);
-        }
-        let node = this;
-        while (node.parent !== exports.SENTINEL) {
-            if (node.parent.left === node) {
-                break;
-            }
-            node = node.parent;
-        }
-        if (node.parent === exports.SENTINEL) {
-            return exports.SENTINEL;
-        }
-        else {
-            return node.parent;
-        }
-    }
-    prev() {
-        if (this.left !== exports.SENTINEL) {
-            return righttest(this.left);
-        }
-        let node = this;
-        while (node.parent !== exports.SENTINEL) {
-            if (node.parent.right === node) {
-                break;
-            }
-            node = node.parent;
-        }
-        if (node.parent === exports.SENTINEL) {
-            return exports.SENTINEL;
-        }
-        else {
-            return node.parent;
-        }
-    }
-    detach() {
-        this.parent = null;
-        this.left = null;
-        this.right = null;
-    }
-}
-exports.TreeNode = TreeNode;
-exports.SENTINEL = new TreeNode(null, 0 /* Black */);
-exports.SENTINEL.parent = exports.SENTINEL;
-exports.SENTINEL.left = exports.SENTINEL;
-exports.SENTINEL.right = exports.SENTINEL;
-exports.SENTINEL.color = 0 /* Black */;
-function leftest(node) {
-    while (node.left !== exports.SENTINEL) {
-        node = node.left;
-    }
-    return node;
-}
-exports.leftest = leftest;
-function righttest(node) {
-    while (node.right !== exports.SENTINEL) {
-        node = node.right;
-    }
-    return node;
-}
-exports.righttest = righttest;
-function calculateSize(node) {
-    if (node === exports.SENTINEL) {
-        return 0;
-    }
-    return node.size_left + node.piece.length + calculateSize(node.right);
-}
-exports.calculateSize = calculateSize;
-function calculateLF(node) {
-    if (node === exports.SENTINEL) {
-        return 0;
-    }
-    return node.lf_left + node.piece.lineFeedCnt + calculateLF(node.right);
-}
-exports.calculateLF = calculateLF;
-function resetSentinel() {
-    exports.SENTINEL.parent = exports.SENTINEL;
-}
-exports.resetSentinel = resetSentinel;
-function leftRotate(tree, x) {
-    let y = x.right;
-    // fix size_left
-    y.size_left += x.size_left + (x.piece ? x.piece.length : 0);
-    y.lf_left += x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0);
-    x.right = y.left;
-    if (y.left !== exports.SENTINEL) {
-        y.left.parent = x;
-    }
-    y.parent = x.parent;
-    if (x.parent === exports.SENTINEL) {
-        tree.root = y;
-    }
-    else if (x.parent.left === x) {
-        x.parent.left = y;
-    }
-    else {
-        x.parent.right = y;
-    }
-    y.left = x;
-    x.parent = y;
-}
-exports.leftRotate = leftRotate;
-function rightRotate(tree, y) {
-    let x = y.left;
-    y.left = x.right;
-    if (x.right !== exports.SENTINEL) {
-        x.right.parent = y;
-    }
-    x.parent = y.parent;
-    // fix size_left
-    y.size_left -= x.size_left + (x.piece ? x.piece.length : 0);
-    y.lf_left -= x.lf_left + (x.piece ? x.piece.lineFeedCnt : 0);
-    if (y.parent === exports.SENTINEL) {
-        tree.root = x;
-    }
-    else if (y === y.parent.right) {
-        y.parent.right = x;
-    }
-    else {
-        y.parent.left = x;
-    }
-    x.right = y;
-    y.parent = x;
-}
-exports.rightRotate = rightRotate;
-function rbDelete(tree, z) {
-    let x;
-    let y;
-    if (z.left === exports.SENTINEL) {
-        y = z;
-        x = y.right;
-    }
-    else if (z.right === exports.SENTINEL) {
-        y = z;
-        x = y.left;
-    }
-    else {
-        y = leftest(z.right);
-        x = y.right;
-    }
-    if (y === tree.root) {
-        tree.root = x;
-        // if x is null, we are removing the only node
-        x.color = 0 /* Black */;
-        z.detach();
-        resetSentinel();
-        tree.root.parent = exports.SENTINEL;
-        return;
-    }
-    let yWasRed = (y.color === 1 /* Red */);
-    if (y === y.parent.left) {
-        y.parent.left = x;
-    }
-    else {
-        y.parent.right = x;
-    }
-    if (y === z) {
-        x.parent = y.parent;
-        recomputeTreeMetadata(tree, x);
-    }
-    else {
-        if (y.parent === z) {
-            x.parent = y;
-        }
-        else {
-            x.parent = y.parent;
-        }
-        // as we make changes to x's hierarchy, update size_left of subtree first
-        recomputeTreeMetadata(tree, x);
-        y.left = z.left;
-        y.right = z.right;
-        y.parent = z.parent;
-        y.color = z.color;
-        if (z === tree.root) {
-            tree.root = y;
-        }
-        else {
-            if (z === z.parent.left) {
-                z.parent.left = y;
-            }
-            else {
-                z.parent.right = y;
-            }
-        }
-        if (y.left !== exports.SENTINEL) {
-            y.left.parent = y;
-        }
-        if (y.right !== exports.SENTINEL) {
-            y.right.parent = y;
-        }
-        // update metadata
-        // we replace z with y, so in this sub tree, the length change is z.item.length
-        y.size_left = z.size_left;
-        y.lf_left = z.lf_left;
-        recomputeTreeMetadata(tree, y);
-    }
-    z.detach();
-    if (x.parent.left === x) {
-        let newSizeLeft = calculateSize(x);
-        let newLFLeft = calculateLF(x);
-        if (newSizeLeft !== x.parent.size_left || newLFLeft !== x.parent.lf_left) {
-            let delta = newSizeLeft - x.parent.size_left;
-            let lf_delta = newLFLeft - x.parent.lf_left;
-            x.parent.size_left = newSizeLeft;
-            x.parent.lf_left = newLFLeft;
-            updateTreeMetadata(tree, x.parent, delta, lf_delta);
-        }
-    }
-    recomputeTreeMetadata(tree, x.parent);
-    if (yWasRed) {
-        resetSentinel();
-        return;
-    }
-    // RB-DELETE-FIXUP
-    let w;
-    while (x !== tree.root && x.color === 0 /* Black */) {
-        if (x === x.parent.left) {
-            w = x.parent.right;
-            if (w.color === 1 /* Red */) {
-                w.color = 0 /* Black */;
-                x.parent.color = 1 /* Red */;
-                leftRotate(tree, x.parent);
-                w = x.parent.right;
-            }
-            if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) {
-                w.color = 1 /* Red */;
-                x = x.parent;
-            }
-            else {
-                if (w.right.color === 0 /* Black */) {
-                    w.left.color = 0 /* Black */;
-                    w.color = 1 /* Red */;
-                    rightRotate(tree, w);
-                    w = x.parent.right;
-                }
-                w.color = x.parent.color;
-                x.parent.color = 0 /* Black */;
-                w.right.color = 0 /* Black */;
-                leftRotate(tree, x.parent);
-                x = tree.root;
-            }
-        }
-        else {
-            w = x.parent.left;
-            if (w.color === 1 /* Red */) {
-                w.color = 0 /* Black */;
-                x.parent.color = 1 /* Red */;
-                rightRotate(tree, x.parent);
-                w = x.parent.left;
-            }
-            if (w.left.color === 0 /* Black */ && w.right.color === 0 /* Black */) {
-                w.color = 1 /* Red */;
-                x = x.parent;
-            }
-            else {
-                if (w.left.color === 0 /* Black */) {
-                    w.right.color = 0 /* Black */;
-                    w.color = 1 /* Red */;
-                    leftRotate(tree, w);
-                    w = x.parent.left;
-                }
-                w.color = x.parent.color;
-                x.parent.color = 0 /* Black */;
-                w.left.color = 0 /* Black */;
-                rightRotate(tree, x.parent);
-                x = tree.root;
-            }
-        }
-    }
-    x.color = 0 /* Black */;
-    resetSentinel();
-}
-exports.rbDelete = rbDelete;
-function fixInsert(tree, x) {
-    recomputeTreeMetadata(tree, x);
-    while (x !== tree.root && x.parent.color === 1 /* Red */) {
-        if (x.parent === x.parent.parent.left) {
-            const y = x.parent.parent.right;
-            if (y.color === 1 /* Red */) {
-                x.parent.color = 0 /* Black */;
-                y.color = 0 /* Black */;
-                x.parent.parent.color = 1 /* Red */;
-                x = x.parent.parent;
-            }
-            else {
-                if (x === x.parent.right) {
-                    x = x.parent;
-                    leftRotate(tree, x);
-                }
-                x.parent.color = 0 /* Black */;
-                x.parent.parent.color = 1 /* Red */;
-                rightRotate(tree, x.parent.parent);
-            }
-        }
-        else {
-            const y = x.parent.parent.left;
-            if (y.color === 1 /* Red */) {
-                x.parent.color = 0 /* Black */;
-                y.color = 0 /* Black */;
-                x.parent.parent.color = 1 /* Red */;
-                x = x.parent.parent;
-            }
-            else {
-                if (x === x.parent.left) {
-                    x = x.parent;
-                    rightRotate(tree, x);
-                }
-                x.parent.color = 0 /* Black */;
-                x.parent.parent.color = 1 /* Red */;
-                leftRotate(tree, x.parent.parent);
-            }
-        }
-    }
-    tree.root.color = 0 /* Black */;
-}
-exports.fixInsert = fixInsert;
-function updateTreeMetadata(tree, x, delta, lineFeedCntDelta) {
-    // node length change or line feed count change
-    while (x !== tree.root && x !== exports.SENTINEL) {
-        if (x.parent.left === x) {
-            x.parent.size_left += delta;
-            x.parent.lf_left += lineFeedCntDelta;
-        }
-        x = x.parent;
-    }
-}
-exports.updateTreeMetadata = updateTreeMetadata;
-function recomputeTreeMetadata(tree, x) {
-    let delta = 0;
-    let lf_delta = 0;
-    if (x === tree.root) {
-        return;
-    }
-    if (delta === 0) {
-        // go upwards till the node whose left subtree is changed.
-        while (x !== tree.root && x === x.parent.right) {
-            x = x.parent;
-        }
-        if (x === tree.root) {
-            // well, it means we add a node to the end (inorder)
-            return;
-        }
-        // x is the node whose right subtree is changed.
-        x = x.parent;
-        delta = calculateSize(x.left) - x.size_left;
-        lf_delta = calculateLF(x.left) - x.lf_left;
-        x.size_left += delta;
-        x.lf_left += lf_delta;
-    }
-    // go upwards till root. O(logN)
-    while (x !== tree.root && (delta !== 0 || lf_delta !== 0)) {
-        if (x.parent.left === x) {
-            x.parent.size_left += delta;
-            x.parent.lf_left += lf_delta;
-        }
-        x = x.parent;
-    }
-}
-exports.recomputeTreeMetadata = recomputeTreeMetadata;
-
-
-/***/ }),
-/* 46 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const pieceTreeBase_1 = __webpack_require__(43);
-exports.UTF8_BOM_CHARACTER = String.fromCharCode(65279 /* UTF8_BOM */);
-function startsWithUTF8BOM(str) {
-    return !!(str && str.length > 0 && str.charCodeAt(0) === 65279 /* UTF8_BOM */);
-}
-exports.startsWithUTF8BOM = startsWithUTF8BOM;
-class PieceTreeTextBufferFactory {
-    constructor(_chunks, _bom, _cr, _lf, _crlf, _normalizeEOL) {
-        this._chunks = _chunks;
-        this._bom = _bom;
-        this._cr = _cr;
-        this._lf = _lf;
-        this._crlf = _crlf;
-        this._normalizeEOL = _normalizeEOL;
-    }
-    _getEOL(defaultEOL) {
-        const totalEOLCount = this._cr + this._lf + this._crlf;
-        const totalCRCount = this._cr + this._crlf;
-        if (totalEOLCount === 0) {
-            // This is an empty file or a file with precisely one line
-            return (defaultEOL === 1 /* LF */ ? '\n' : '\r\n');
-        }
-        if (totalCRCount > totalEOLCount / 2) {
-            // More than half of the file contains \r\n ending lines
-            return '\r\n';
-        }
-        // At least one line more ends in \n
-        return '\n';
-    }
-    create(defaultEOL) {
-        const eol = this._getEOL(defaultEOL);
-        let chunks = this._chunks;
-        if (this._normalizeEOL &&
-            ((eol === '\r\n' && (this._cr > 0 || this._lf > 0))
-                || (eol === '\n' && (this._cr > 0 || this._crlf > 0)))) {
-            // Normalize pieces
-            for (let i = 0, len = chunks.length; i < len; i++) {
-                let str = chunks[i].buffer.replace(/\r\n|\r|\n/g, eol);
-                let newLineStart = pieceTreeBase_1.createLineStartsFast(str);
-                chunks[i] = new pieceTreeBase_1.StringBuffer(str, newLineStart);
-            }
-        }
-        return new pieceTreeBase_1.PieceTreeBase(chunks, eol, this._normalizeEOL);
-    }
-    getFirstLineText(lengthLimit) {
-        return this._chunks[0].buffer.substr(0, 100).split(/\r\n|\r|\n/)[0];
-    }
-}
-exports.PieceTreeTextBufferFactory = PieceTreeTextBufferFactory;
-class PieceTreeTextBufferBuilder {
-    constructor() {
-        this.chunks = [];
-        this.BOM = '';
-        this._hasPreviousChar = false;
-        this._previousChar = 0;
-        this._tmpLineStarts = [];
-        this.cr = 0;
-        this.lf = 0;
-        this.crlf = 0;
-    }
-    acceptChunk(chunk) {
-        if (chunk.length === 0) {
-            return;
-        }
-        if (this.chunks.length === 0) {
-            if (startsWithUTF8BOM(chunk)) {
-                this.BOM = exports.UTF8_BOM_CHARACTER;
-                chunk = chunk.substr(1);
-            }
-        }
-        const lastChar = chunk.charCodeAt(chunk.length - 1);
-        if (lastChar === 13 /* CarriageReturn */ || (lastChar >= 0xD800 && lastChar <= 0xDBFF)) {
-            // last character is \r or a high surrogate => keep it back
-            this._acceptChunk1(chunk.substr(0, chunk.length - 1), false);
-            this._hasPreviousChar = true;
-            this._previousChar = lastChar;
-        }
-        else {
-            this._acceptChunk1(chunk, false);
-            this._hasPreviousChar = false;
-            this._previousChar = lastChar;
-        }
-    }
-    _acceptChunk1(chunk, allowEmptyStrings) {
-        if (!allowEmptyStrings && chunk.length === 0) {
-            // Nothing to do
-            return;
-        }
-        if (this._hasPreviousChar) {
-            this._acceptChunk2(String.fromCharCode(this._previousChar) + chunk);
-        }
-        else {
-            this._acceptChunk2(chunk);
-        }
-    }
-    _acceptChunk2(chunk) {
-        const lineStarts = pieceTreeBase_1.createLineStarts(this._tmpLineStarts, chunk);
-        this.chunks.push(new pieceTreeBase_1.StringBuffer(chunk, lineStarts.lineStarts));
-        this.cr += lineStarts.cr;
-        this.lf += lineStarts.lf;
-        this.crlf += lineStarts.crlf;
-    }
-    finish(normalizeEOL = true) {
-        this._finish();
-        return new PieceTreeTextBufferFactory(this.chunks, this.BOM, this.cr, this.lf, this.crlf, normalizeEOL);
-    }
-    _finish() {
-        if (this.chunks.length === 0) {
-            this._acceptChunk1('', true);
-        }
-        if (this._hasPreviousChar) {
-            this._hasPreviousChar = false;
-            // recreate last chunk
-            let lastChunk = this.chunks[this.chunks.length - 1];
-            lastChunk.buffer += String.fromCharCode(this._previousChar);
-            let newLineStarts = pieceTreeBase_1.createLineStartsFast(lastChunk.buffer);
-            lastChunk.lineStarts = newLineStarts;
-            if (this._previousChar === 13 /* CarriageReturn */) {
-                this.cr++;
-            }
-        }
-    }
-}
-exports.PieceTreeTextBufferBuilder = PieceTreeTextBufferBuilder;
-
-
-/***/ }),
-/* 47 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const position_1 = __webpack_require__(44);
-/**
- * A range in the editor. (startLineNumber,startColumn) is <= (endLineNumber,endColumn)
- */
-class Range {
-    constructor(startLineNumber, startColumn, endLineNumber, endColumn) {
-        if ((startLineNumber > endLineNumber) || (startLineNumber === endLineNumber && startColumn > endColumn)) {
-            this.startLineNumber = endLineNumber;
-            this.startColumn = endColumn;
-            this.endLineNumber = startLineNumber;
-            this.endColumn = startColumn;
-        }
-        else {
-            this.startLineNumber = startLineNumber;
-            this.startColumn = startColumn;
-            this.endLineNumber = endLineNumber;
-            this.endColumn = endColumn;
-        }
-    }
-    /**
-     * Test if this range is empty.
-     */
-    isEmpty() {
-        return Range.isEmpty(this);
-    }
-    /**
-     * Test if `range` is empty.
-     */
-    static isEmpty(range) {
-        return (range.startLineNumber === range.endLineNumber && range.startColumn === range.endColumn);
-    }
-    /**
-     * Test if position is in this range. If the position is at the edges, will return true.
-     */
-    containsPosition(position) {
-        return Range.containsPosition(this, position);
-    }
-    /**
-     * Test if `position` is in `range`. If the position is at the edges, will return true.
-     */
-    static containsPosition(range, position) {
-        if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {
-            return false;
-        }
-        if (position.lineNumber === range.startLineNumber && position.column < range.startColumn) {
-            return false;
-        }
-        if (position.lineNumber === range.endLineNumber && position.column > range.endColumn) {
-            return false;
-        }
-        return true;
-    }
-    /**
-     * Test if range is in this range. If the range is equal to this range, will return true.
-     */
-    containsRange(range) {
-        return Range.containsRange(this, range);
-    }
-    /**
-     * Test if `otherRange` is in `range`. If the ranges are equal, will return true.
-     */
-    static containsRange(range, otherRange) {
-        if (otherRange.startLineNumber < range.startLineNumber || otherRange.endLineNumber < range.startLineNumber) {
-            return false;
-        }
-        if (otherRange.startLineNumber > range.endLineNumber || otherRange.endLineNumber > range.endLineNumber) {
-            return false;
-        }
-        if (otherRange.startLineNumber === range.startLineNumber && otherRange.startColumn < range.startColumn) {
-            return false;
-        }
-        if (otherRange.endLineNumber === range.endLineNumber && otherRange.endColumn > range.endColumn) {
-            return false;
-        }
-        return true;
-    }
-    /**
-     * A reunion of the two ranges.
-     * The smallest position will be used as the start point, and the largest one as the end point.
-     */
-    plusRange(range) {
-        return Range.plusRange(this, range);
-    }
-    /**
-     * A reunion of the two ranges.
-     * The smallest position will be used as the start point, and the largest one as the end point.
-     */
-    static plusRange(a, b) {
-        let startLineNumber;
-        let startColumn;
-        let endLineNumber;
-        let endColumn;
-        if (b.startLineNumber < a.startLineNumber) {
-            startLineNumber = b.startLineNumber;
-            startColumn = b.startColumn;
-        }
-        else if (b.startLineNumber === a.startLineNumber) {
-            startLineNumber = b.startLineNumber;
-            startColumn = Math.min(b.startColumn, a.startColumn);
-        }
-        else {
-            startLineNumber = a.startLineNumber;
-            startColumn = a.startColumn;
-        }
-        if (b.endLineNumber > a.endLineNumber) {
-            endLineNumber = b.endLineNumber;
-            endColumn = b.endColumn;
-        }
-        else if (b.endLineNumber === a.endLineNumber) {
-            endLineNumber = b.endLineNumber;
-            endColumn = Math.max(b.endColumn, a.endColumn);
-        }
-        else {
-            endLineNumber = a.endLineNumber;
-            endColumn = a.endColumn;
-        }
-        return new Range(startLineNumber, startColumn, endLineNumber, endColumn);
-    }
-    /**
-     * A intersection of the two ranges.
-     */
-    intersectRanges(range) {
-        return Range.intersectRanges(this, range);
-    }
-    /**
-     * A intersection of the two ranges.
-     */
-    static intersectRanges(a, b) {
-        let resultStartLineNumber = a.startLineNumber;
-        let resultStartColumn = a.startColumn;
-        let resultEndLineNumber = a.endLineNumber;
-        let resultEndColumn = a.endColumn;
-        let otherStartLineNumber = b.startLineNumber;
-        let otherStartColumn = b.startColumn;
-        let otherEndLineNumber = b.endLineNumber;
-        let otherEndColumn = b.endColumn;
-        if (resultStartLineNumber < otherStartLineNumber) {
-            resultStartLineNumber = otherStartLineNumber;
-            resultStartColumn = otherStartColumn;
-        }
-        else if (resultStartLineNumber === otherStartLineNumber) {
-            resultStartColumn = Math.max(resultStartColumn, otherStartColumn);
-        }
-        if (resultEndLineNumber > otherEndLineNumber) {
-            resultEndLineNumber = otherEndLineNumber;
-            resultEndColumn = otherEndColumn;
-        }
-        else if (resultEndLineNumber === otherEndLineNumber) {
-            resultEndColumn = Math.min(resultEndColumn, otherEndColumn);
-        }
-        // Check if selection is now empty
-        if (resultStartLineNumber > resultEndLineNumber) {
-            return null;
-        }
-        if (resultStartLineNumber === resultEndLineNumber && resultStartColumn > resultEndColumn) {
-            return null;
-        }
-        return new Range(resultStartLineNumber, resultStartColumn, resultEndLineNumber, resultEndColumn);
-    }
-    /**
-     * Test if this range equals other.
-     */
-    equalsRange(other) {
-        return Range.equalsRange(this, other);
-    }
-    /**
-     * Test if range `a` equals `b`.
-     */
-    static equalsRange(a, b) {
-        return (!!a &&
-            !!b &&
-            a.startLineNumber === b.startLineNumber &&
-            a.startColumn === b.startColumn &&
-            a.endLineNumber === b.endLineNumber &&
-            a.endColumn === b.endColumn);
-    }
-    /**
-     * Return the end position (which will be after or equal to the start position)
-     */
-    getEndPosition() {
-        return new position_1.Position(this.endLineNumber, this.endColumn);
-    }
-    /**
-     * Return the start position (which will be before or equal to the end position)
-     */
-    getStartPosition() {
-        return new position_1.Position(this.startLineNumber, this.startColumn);
-    }
-    /**
-     * Transform to a user presentable string representation.
-     */
-    toString() {
-        return '[' + this.startLineNumber + ',' + this.startColumn + ' -> ' + this.endLineNumber + ',' + this.endColumn + ']';
-    }
-    /**
-     * Create a new range using this range's start position, and using endLineNumber and endColumn as the end position.
-     */
-    setEndPosition(endLineNumber, endColumn) {
-        return new Range(this.startLineNumber, this.startColumn, endLineNumber, endColumn);
-    }
-    /**
-     * Create a new range using this range's end position, and using startLineNumber and startColumn as the start position.
-     */
-    setStartPosition(startLineNumber, startColumn) {
-        return new Range(startLineNumber, startColumn, this.endLineNumber, this.endColumn);
-    }
-    /**
-     * Create a new empty range using this range's start position.
-     */
-    collapseToStart() {
-        return Range.collapseToStart(this);
-    }
-    /**
-     * Create a new empty range using this range's start position.
-     */
-    static collapseToStart(range) {
-        return new Range(range.startLineNumber, range.startColumn, range.startLineNumber, range.startColumn);
-    }
-    // ---
-    static fromPositions(start, end = start) {
-        return new Range(start.lineNumber, start.column, end.lineNumber, end.column);
-    }
-    static lift(range) {
-        if (!range) {
-            return null;
-        }
-        return new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn);
-    }
-    /**
-     * Test if `obj` is an `IRange`.
-     */
-    static isIRange(obj) {
-        return (obj
-            && (typeof obj.startLineNumber === 'number')
-            && (typeof obj.startColumn === 'number')
-            && (typeof obj.endLineNumber === 'number')
-            && (typeof obj.endColumn === 'number'));
-    }
-    /**
-     * Test if the two ranges are touching in any way.
-     */
-    static areIntersectingOrTouching(a, b) {
-        // Check if `a` is before `b`
-        if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn < b.startColumn)) {
-            return false;
-        }
-        // Check if `b` is before `a`
-        if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn < a.startColumn)) {
-            return false;
-        }
-        // These ranges must intersect
-        return true;
-    }
-    /**
-     * Test if the two ranges are intersecting. If the ranges are touching it returns true.
-     */
-    static areIntersecting(a, b) {
-        // Check if `a` is before `b`
-        if (a.endLineNumber < b.startLineNumber || (a.endLineNumber === b.startLineNumber && a.endColumn <= b.startColumn)) {
-            return false;
-        }
-        // Check if `b` is before `a`
-        if (b.endLineNumber < a.startLineNumber || (b.endLineNumber === a.startLineNumber && b.endColumn <= a.startColumn)) {
-            return false;
-        }
-        // These ranges must intersect
-        return true;
-    }
-    /**
-     * A function that compares ranges, useful for sorting ranges
-     * It will first compare ranges on the startPosition and then on the endPosition
-     */
-    static compareRangesUsingStarts(a, b) {
-        if (a && b) {
-            const aStartLineNumber = a.startLineNumber | 0;
-            const bStartLineNumber = b.startLineNumber | 0;
-            if (aStartLineNumber === bStartLineNumber) {
-                const aStartColumn = a.startColumn | 0;
-                const bStartColumn = b.startColumn | 0;
-                if (aStartColumn === bStartColumn) {
-                    const aEndLineNumber = a.endLineNumber | 0;
-                    const bEndLineNumber = b.endLineNumber | 0;
-                    if (aEndLineNumber === bEndLineNumber) {
-                        const aEndColumn = a.endColumn | 0;
-                        const bEndColumn = b.endColumn | 0;
-                        return aEndColumn - bEndColumn;
-                    }
-                    return aEndLineNumber - bEndLineNumber;
-                }
-                return aStartColumn - bStartColumn;
-            }
-            return aStartLineNumber - bStartLineNumber;
-        }
-        const aExists = (a ? 1 : 0);
-        const bExists = (b ? 1 : 0);
-        return aExists - bExists;
-    }
-    /**
-     * A function that compares ranges, useful for sorting ranges
-     * It will first compare ranges on the endPosition and then on the startPosition
-     */
-    static compareRangesUsingEnds(a, b) {
-        if (a.endLineNumber === b.endLineNumber) {
-            if (a.endColumn === b.endColumn) {
-                if (a.startLineNumber === b.startLineNumber) {
-                    return a.startColumn - b.startColumn;
-                }
-                return a.startLineNumber - b.startLineNumber;
-            }
-            return a.endColumn - b.endColumn;
-        }
-        return a.endLineNumber - b.endLineNumber;
-    }
-    /**
-     * Test if the range spans multiple lines.
-     */
-    static spansMultipleLines(range) {
-        return range.endLineNumber > range.startLineNumber;
-    }
-}
-exports.Range = Range;
-
-
-/***/ }),
-/* 48 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-const vscode_languageserver_protocol_1 = __webpack_require__(3);\r
-const uuid_1 = __webpack_require__(38);\r
-class ProgressImpl {\r
-    constructor(_connection, title, percentage, message, cancellable) {\r
-        this._connection = _connection;\r
-        this._id = uuid_1.generateUuid();\r
-        let params = {\r
-            id: this._id,\r
-            title,\r
-            cancellable\r
-        };\r
-        if (percentage !== undefined) {\r
-            params.percentage = percentage;\r
-        }\r
-        if (message !== undefined) {\r
-            params.message = message;\r
-        }\r
-        if (cancellable !== undefined) {\r
-            params.cancellable = cancellable;\r
-        }\r
-        ProgressImpl.Instances.set(this._id, this);\r
-        this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();\r
-        this._connection.sendNotification(vscode_languageserver_protocol_1.Proposed.ProgressStartNotification.type, params);\r
-    }\r
-    get token() {\r
-        return this._source.token;\r
-    }\r
-    report(arg0, arg1) {\r
-        let percentage;\r
-        let message;\r
-        if (typeof arg0 === 'number') {\r
-            percentage = arg0;\r
-            if (arg1 !== undefined) {\r
-                message = arg1;\r
-            }\r
-        }\r
-        else {\r
-            message = arg0;\r
-        }\r
-        this._connection.sendNotification(vscode_languageserver_protocol_1.Proposed.ProgressReportNotification.type, { id: this._id, percentage, message });\r
-    }\r
-    done() {\r
-        ProgressImpl.Instances.delete(this._id);\r
-        this._source.dispose();\r
-        this._connection.sendNotification(vscode_languageserver_protocol_1.Proposed.ProgressDoneNotification.type, { id: this._id });\r
-    }\r
-    cancel() {\r
-        this._source.cancel();\r
-    }\r
-}\r
-ProgressImpl.Instances = new Map();\r
-class NullProgress {\r
-    constructor() {\r
-        this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();\r
-    }\r
-    get token() {\r
-        return this._source.token;\r
-    }\r
-    report() {\r
-    }\r
-    done() {\r
-    }\r
-}\r
-exports.ProgressFeature = (Base) => {\r
-    return class extends Base {\r
-        initialize(cap) {\r
-            let capabilities = cap;\r
-            if (capabilities.window && capabilities.window.progress) {\r
-                this._progressSupported = true;\r
-                this.connection.onNotification(vscode_languageserver_protocol_1.Proposed.ProgressCancelNotification.type, (params) => {\r
-                    let progress = ProgressImpl.Instances.get(params.id);\r
-                    if (progress !== undefined) {\r
-                        progress.cancel();\r
-                    }\r
-                });\r
-            }\r
-        }\r
-        createProgress(title, percentage, message, cancellable) {\r
-            if (this._progressSupported) {\r
-                return new ProgressImpl(this.connection, title, percentage, message, cancellable);\r
-            }\r
-            else {\r
-                return new NullProgress();\r
-            }\r
-        }\r
-    };\r
-};\r
-
-
-/***/ }),
-/* 49 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var url_1 = __webpack_require__(40);
-var https = __webpack_require__(50);
-var http = __webpack_require__(51);
-var HttpProxyAgent = __webpack_require__(52);
-var HttpsProxyAgent = __webpack_require__(69);
-var zlib = __webpack_require__(75);
-var nls = __webpack_require__(76);
-nls.config(process.env['VSCODE_NLS_CONFIG']);
-var localize = nls.loadMessageBundle();
-var proxyUrl = null;
-var strictSSL = true;
-function configure(_proxyUrl, _strictSSL) {
-    proxyUrl = _proxyUrl;
-    strictSSL = _strictSSL;
-}
-exports.configure = configure;
-function xhr(options) {
-    var agent = getProxyAgent(options.url, { proxyUrl: proxyUrl, strictSSL: strictSSL });
-    options = assign({}, options);
-    options = assign(options, { agent: agent, strictSSL: strictSSL });
-    if (typeof options.followRedirects !== 'number') {
-        options.followRedirects = 5;
-    }
-    return request(options).then(function (result) { return new Promise(function (c, e) {
-        var res = result.res;
-        var readable = res;
-        var encoding = res.headers && res.headers['content-encoding'];
-        var isCompleted = false;
-        if (encoding === 'gzip') {
-            var gunzip = zlib.createGunzip();
-            res.pipe(gunzip);
-            readable = gunzip;
-        }
-        else if (encoding === 'deflate') {
-            var inflate = zlib.createInflate();
-            res.pipe(inflate);
-            readable = inflate;
-        }
-        var data = [];
-        readable.on('data', function (c) { return data.push(c); });
-        readable.on('end', function () {
-            if (isCompleted) {
-                return;
-            }
-            isCompleted = true;
-            if (options.followRedirects > 0 && (res.statusCode >= 300 && res.statusCode <= 303 || res.statusCode === 307)) {
-                var location = res.headers['location'];
-                if (location) {
-                    var newOptions = {
-                        type: options.type, url: location, user: options.user, password: options.password, responseType: options.responseType, headers: options.headers,
-                        timeout: options.timeout, followRedirects: options.followRedirects - 1, data: options.data
-                    };
-                    xhr(newOptions).then(c, e);
-                    return;
-                }
-            }
-            var response = {
-                responseText: data.join(''),
-                status: res.statusCode
-            };
-            if ((res.statusCode >= 200 && res.statusCode < 300) || res.statusCode === 1223) {
-                c(response);
-            }
-            else {
-                e(response);
-            }
-        });
-        readable.on('error', function (err) {
-            var response = {
-                responseText: localize('error', 'Unable to access {0}. Error: {1}', options.url, err.message),
-                status: 500
-            };
-            isCompleted = true;
-            e(response);
-        });
-    }); }, function (err) {
-        var message;
-        if (agent) {
-            message = localize('error.cannot.connect.proxy', 'Unable to connect to {0} through a proxy . Error: {1}', options.url, err.message);
-        }
-        else {
-            message = localize('error.cannot.connect', 'Unable to connect to {0}. Error: {1}', options.url, err.message);
-        }
-        return Promise.reject({
-            responseText: message,
-            status: 404
-        });
-    });
-}
-exports.xhr = xhr;
-function assign(destination) {
-    var sources = [];
-    for (var _i = 1; _i < arguments.length; _i++) {
-        sources[_i - 1] = arguments[_i];
-    }
-    sources.forEach(function (source) { return Object.keys(source).forEach(function (key) { return destination[key] = source[key]; }); });
-    return destination;
-}
-function request(options) {
-    var req;
-    return new Promise(function (c, e) {
-        var endpoint = url_1.parse(options.url);
-        var opts = {
-            hostname: endpoint.hostname,
-            port: endpoint.port ? parseInt(endpoint.port) : (endpoint.protocol === 'https:' ? 443 : 80),
-            path: endpoint.path,
-            method: options.type || 'GET',
-            headers: options.headers,
-            agent: options.agent,
-            rejectUnauthorized: (typeof options.strictSSL === 'boolean') ? options.strictSSL : true
-        };
-        if (options.user && options.password) {
-            opts.auth = options.user + ':' + options.password;
-        }
-        var handler = function (res) {
-            if (res.statusCode >= 300 && res.statusCode < 400 && options.followRedirects && options.followRedirects > 0 && res.headers['location']) {
-                c(request(assign({}, options, {
-                    url: res.headers['location'],
-                    followRedirects: options.followRedirects - 1
-                })));
-            }
-            else {
-                c({ req: req, res: res });
-            }
-        };
-        if (endpoint.protocol === 'https:') {
-            req = https.request(opts, handler);
-        }
-        else {
-            req = http.request(opts, handler);
-        }
-        req.on('error', e);
-        if (options.timeout) {
-            req.setTimeout(options.timeout);
-        }
-        if (options.data) {
-            req.write(options.data);
-        }
-        req.end();
-    });
-}
-function getErrorStatusDescription(status) {
-    if (status < 400) {
-        return void 0;
-    }
-    switch (status) {
-        case 400: return localize('status.400', 'Bad request. The request cannot be fulfilled due to bad syntax.');
-        case 401: return localize('status.401', 'Unauthorized. The server is refusing to respond.');
-        case 403: return localize('status.403', 'Forbidden. The server is refusing to respond.');
-        case 404: return localize('status.404', 'Not Found. The requested location could not be found.');
-        case 405: return localize('status.405', 'Method not allowed. A request was made using a request method not supported by that location.');
-        case 406: return localize('status.406', 'Not Acceptable. The server can only generate a response that is not accepted by the client.');
-        case 407: return localize('status.407', 'Proxy Authentication Required. The client must first authenticate itself with the proxy.');
-        case 408: return localize('status.408', 'Request Timeout. The server timed out waiting for the request.');
-        case 409: return localize('status.409', 'Conflict. The request could not be completed because of a conflict in the request.');
-        case 410: return localize('status.410', 'Gone. The requested page is no longer available.');
-        case 411: return localize('status.411', 'Length Required. The "Content-Length" is not defined.');
-        case 412: return localize('status.412', 'Precondition Failed. The precondition given in the request evaluated to false by the server.');
-        case 413: return localize('status.413', 'Request Entity Too Large. The server will not accept the request, because the request entity is too large.');
-        case 414: return localize('status.414', 'Request-URI Too Long. The server will not accept the request, because the URL is too long.');
-        case 415: return localize('status.415', 'Unsupported Media Type. The server will not accept the request, because the media type is not supported.');
-        case 500: return localize('status.500', 'Internal Server Error.');
-        case 501: return localize('status.501', 'Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.');
-        case 503: return localize('status.503', 'Service Unavailable. The server is currently unavailable (overloaded or down).');
-        default: return localize('status.416', 'HTTP status code {0}', status);
-    }
-}
-exports.getErrorStatusDescription = getErrorStatusDescription;
-// proxy handling
-function getSystemProxyURI(requestURL) {
-    if (requestURL.protocol === 'http:') {
-        return process.env.HTTP_PROXY || process.env.http_proxy || null;
-    }
-    else if (requestURL.protocol === 'https:') {
-        return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null;
-    }
-    return null;
-}
-function getProxyAgent(rawRequestURL, options) {
-    if (options === void 0) { options = {}; }
-    var requestURL = url_1.parse(rawRequestURL);
-    var proxyURL = options.proxyUrl || getSystemProxyURI(requestURL);
-    if (!proxyURL) {
-        return null;
-    }
-    var proxyEndpoint = url_1.parse(proxyURL);
-    if (!/^https?:$/.test(proxyEndpoint.protocol)) {
-        return null;
-    }
-    var opts = {
-        host: proxyEndpoint.hostname,
-        port: Number(proxyEndpoint.port),
-        auth: proxyEndpoint.auth,
-        rejectUnauthorized: (typeof options.strictSSL === 'boolean') ? options.strictSSL : true
-    };
-    return requestURL.protocol === 'http:' ? new HttpProxyAgent(opts) : new HttpsProxyAgent(opts);
-}
-//# sourceMappingURL=main.js.map
-
-/***/ }),
-/* 50 */
-/***/ (function(module, exports) {
-
-module.exports = require("https");
-
-/***/ }),
-/* 51 */
-/***/ (function(module, exports) {
-
-module.exports = require("http");
-
-/***/ }),
-/* 52 */
-/***/ (function(module, exports, __webpack_require__) {
-
-
-/**
- * Module dependencies.
- */
-
-var net = __webpack_require__(15);
-var tls = __webpack_require__(53);
-var url = __webpack_require__(40);
-var Agent = __webpack_require__(54);
-var inherits = __webpack_require__(56).inherits;
-var debug = __webpack_require__(61)('http-proxy-agent');
-
-/**
- * Module exports.
- */
-
-module.exports = HttpProxyAgent;
-
-/**
- * The `HttpProxyAgent` implements an HTTP Agent subclass that connects to the
- * specified "HTTP proxy server" in order to proxy HTTP requests.
- *
- * @api public
- */
-
-function HttpProxyAgent (opts) {
-  if (!(this instanceof HttpProxyAgent)) return new HttpProxyAgent(opts);
-  if ('string' == typeof opts) opts = url.parse(opts);
-  if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
-  debug('creating new HttpProxyAgent instance: %o', opts);
-  Agent.call(this, opts);
-
-  var proxy = Object.assign({}, opts);
-
-  // if `true`, then connect to the proxy server over TLS. defaults to `false`.
-  this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
-
-  // prefer `hostname` over `host`, and set the `port` if needed
-  proxy.host = proxy.hostname || proxy.host;
-  proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
-
-  if (proxy.host && proxy.path) {
-    // if both a `host` and `path` are specified then it's most likely the
-    // result of a `url.parse()` call... we need to remove the `path` portion so
-    // that `net.connect()` doesn't attempt to open that as a unix socket file.
-    delete proxy.path;
-    delete proxy.pathname;
-  }
-
-  this.proxy = proxy;
-}
-inherits(HttpProxyAgent, Agent);
-
-/**
- * Called when the node-core HTTP client library is creating a new HTTP request.
- *
- * @api public
- */
-
-HttpProxyAgent.prototype.callback = function connect (req, opts, fn) {
-  var proxy = this.proxy;
-
-  // change the `http.ClientRequest` instance's "path" field
-  // to the absolute path of the URL that will be requested
-  var parsed = url.parse(req.path);
-  if (null == parsed.protocol) parsed.protocol = 'http:';
-  if (null == parsed.hostname) parsed.hostname = opts.hostname || opts.host;
-  if (null == parsed.port) parsed.port = opts.port;
-  if (parsed.port == 80) {
-    // if port is 80, then we can remove the port so that the
-    // ":80" portion is not on the produced URL
-    delete parsed.port;
-  }
-  var absolute = url.format(parsed);
-  req.path = absolute;
-
-  // inject the `Proxy-Authorization` header if necessary
-  if (proxy.auth) {
-    req.setHeader(
-      'Proxy-Authorization',
-      'Basic ' + Buffer.from(proxy.auth).toString('base64')
-    );
-  }
-
-  // create a socket connection to the proxy server
-  var socket;
-  if (this.secureProxy) {
-    socket = tls.connect(proxy);
-  } else {
-    socket = net.connect(proxy);
-  }
-
-  // at this point, the http ClientRequest's internal `_header` field might have
-  // already been set. If this is the case then we'll need to re-generate the
-  // string since we just changed the `req.path`
-  if (req._header) {
-    debug('regenerating stored HTTP header string for request');
-    req._header = null;
-    req._implicitHeader();
-    if (req.output && req.output.length > 0) {
-      debug('patching connection write() output buffer with updated header');
-      // the _header has already been queued to be written to the socket
-      var first = req.output[0];
-      var endOfHeaders = first.indexOf('\r\n\r\n') + 4;
-      req.output[0] = req._header + first.substring(endOfHeaders);
-      debug('output buffer: %o', req.output);
-    }
-  }
-
-  fn(null, socket);
-};
-
-
-/***/ }),
-/* 53 */
-/***/ (function(module, exports) {
-
-module.exports = require("tls");
-
-/***/ }),
-/* 54 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-__webpack_require__(55);
-const inherits = __webpack_require__(56).inherits;
-const promisify = __webpack_require__(57);
-const EventEmitter = __webpack_require__(60).EventEmitter;
-
-module.exports = Agent;
-
-function isAgent(v) {
-  return v && typeof v.addRequest === 'function';
-}
-
-/**
- * Base `http.Agent` implementation.
- * No pooling/keep-alive is implemented by default.
- *
- * @param {Function} callback
- * @api public
- */
-function Agent(callback, _opts) {
-  if (!(this instanceof Agent)) {
-    return new Agent(callback, _opts);
-  }
-
-  EventEmitter.call(this);
-
-  // The callback gets promisified if it has 3 parameters
-  // (i.e. it has a callback function) lazily
-  this._promisifiedCallback = false;
-
-  let opts = _opts;
-  if ('function' === typeof callback) {
-    this.callback = callback;
-  } else if (callback) {
-    opts = callback;
-  }
-
-  // timeout for the socket to be returned from the callback
-  this.timeout = (opts && opts.timeout) || null;
-
-  this.options = opts;
-}
-inherits(Agent, EventEmitter);
-
-/**
- * Override this function in your subclass!
- */
-Agent.prototype.callback = function callback(req, opts) {
-  throw new Error(
-    '"agent-base" has no default implementation, you must subclass and override `callback()`'
-  );
-};
-
-/**
- * Called by node-core's "_http_client.js" module when creating
- * a new HTTP request with this Agent instance.
- *
- * @api public
- */
-Agent.prototype.addRequest = function addRequest(req, _opts) {
-  const ownOpts = Object.assign({}, _opts);
-
-  // Set default `host` for HTTP to localhost
-  if (null == ownOpts.host) {
-    ownOpts.host = 'localhost';
-  }
-
-  // Set default `port` for HTTP if none was explicitly specified
-  if (null == ownOpts.port) {
-    ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
-  }
-
-  const opts = Object.assign({}, this.options, ownOpts);
-
-  if (opts.host && opts.path) {
-    // If both a `host` and `path` are specified then it's most likely the
-    // result of a `url.parse()` call... we need to remove the `path` portion so
-    // that `net.connect()` doesn't attempt to open that as a unix socket file.
-    delete opts.path;
-  }
-
-  delete opts.agent;
-  delete opts.hostname;
-  delete opts._defaultAgent;
-  delete opts.defaultPort;
-  delete opts.createConnection;
-
-  // Hint to use "Connection: close"
-  // XXX: non-documented `http` module API :(
-  req._last = true;
-  req.shouldKeepAlive = false;
-
-  // Create the `stream.Duplex` instance
-  let timeout;
-  let timedOut = false;
-  const timeoutMs = this.timeout;
-  const freeSocket = this.freeSocket;
-
-  function onerror(err) {
-    if (req._hadError) return;
-    req.emit('error', err);
-    // For Safety. Some additional errors might fire later on
-    // and we need to make sure we don't double-fire the error event.
-    req._hadError = true;
-  }
-
-  function ontimeout() {
-    timeout = null;
-    timedOut = true;
-    const err = new Error(
-      'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
-    );
-    err.code = 'ETIMEOUT';
-    onerror(err);
-  }
-
-  function callbackError(err) {
-    if (timedOut) return;
-    if (timeout != null) {
-      clearTimeout(timeout);
-      timeout = null;
-    }
-    onerror(err);
-  }
-
-  function onsocket(socket) {
-    if (timedOut) return;
-    if (timeout != null) {
-      clearTimeout(timeout);
-      timeout = null;
-    }
-    if (isAgent(socket)) {
-      // `socket` is actually an http.Agent instance, so relinquish
-      // responsibility for this `req` to the Agent from here on
-      socket.addRequest(req, opts);
-    } else if (socket) {
-      function onfree() {
-        freeSocket(socket, opts);
-      }
-      socket.on('free', onfree);
-      req.onSocket(socket);
-    } else {
-      const err = new Error(
-        'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`'
-      );
-      onerror(err);
-    }
-  }
-
-  if (!this._promisifiedCallback && this.callback.length >= 3) {
-    // Legacy callback function - convert to a Promise
-    this.callback = promisify(this.callback, this);
-    this._promisifiedCallback = true;
-  }
-
-  if (timeoutMs > 0) {
-    timeout = setTimeout(ontimeout, timeoutMs);
-  }
-
-  try {
-    Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
-  } catch (err) {
-    Promise.reject(err).catch(callbackError);
-  }
-};
-
-Agent.prototype.freeSocket = function freeSocket(socket, opts) {
-  // TODO reuse sockets
-  socket.destroy();
-};
-
-
-/***/ }),
-/* 55 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-const url = __webpack_require__(40);
-const https = __webpack_require__(50);
-
-/**
- * This currently needs to be applied to all Node.js versions
- * in order to determine if the `req` is an HTTP or HTTPS request.
- *
- * There is currently no PR attempting to move this property upstream.
- */
-const patchMarker = "__agent_base_https_request_patched__";
-if (!https.request[patchMarker]) {
-  https.request = (function(request) {
-    return function(_options, cb) {
-      let options;
-      if (typeof _options === 'string') {
-        options = url.parse(_options);
-      } else {
-        options = Object.assign({}, _options);
-      }
-      if (null == options.port) {
-        options.port = 443;
-      }
-      options.secureEndpoint = true;
-      return request.call(https, options, cb);
-    };
-  })(https.request);
-  https.request[patchMarker] = true;
-}
-
-/**
- * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the
- * patched `https.request()`.
- *
- * Ref: https://github.com/nodejs/node/commit/5118f31
- */
-https.get = function (_url, _options, cb) {
-    let options;
-    if (typeof _url === 'string' && _options && typeof _options !== 'function') {
-      options = Object.assign({}, url.parse(_url), _options);
-    } else if (!_options && !cb) {
-      options = _url;
-    } else if (!cb) {
-      options = _url;
-      cb = _options;
-    }
-
-  const req = https.request(options, cb);
-  req.end();
-  return req;
-};
-
-
-/***/ }),
-/* 56 */
-/***/ (function(module, exports) {
-
-module.exports = require("util");
-
-/***/ }),
-/* 57 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/* global module, require */
-module.exports = function () {
-
-    "use strict";
-
-    // Get a promise object. This may be native, or it may be polyfilled
-
-    var ES6Promise = __webpack_require__(58);
-
-    /**
-     * thatLooksLikeAPromiseToMe()
-     *
-     * Duck-types a promise.
-     *
-     * @param {object} o
-     * @return {bool} True if this resembles a promise
-     */
-    function thatLooksLikeAPromiseToMe(o) {
-        return o && typeof o.then === "function" && typeof o.catch === "function";
-    }
-
-    /**
-     * promisify()
-     *
-     * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into
-     * an ES6-compatible Promise. Promisify provides a default callback of the form (error, result)
-     * and rejects when `error` is truthy. You can also supply settings object as the second argument.
-     *
-     * @param {function} original - The function to promisify
-     * @param {object} settings - Settings object
-     * @param {object} settings.thisArg - A `this` context to use. If not set, assume `settings` _is_ `thisArg`
-     * @param {bool} settings.multiArgs - Should multiple arguments be returned as an array?
-     * @return {function} A promisified version of `original`
-     */
-    return function promisify(original, settings) {
-
-        return function () {
-            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
-                args[_key] = arguments[_key];
-            }
-
-            var returnMultipleArguments = settings && settings.multiArgs;
-
-            var target = void 0;
-            if (settings && settings.thisArg) {
-                target = settings.thisArg;
-            } else if (settings) {
-                target = settings;
-            }
-
-            // Return the promisified function
-            return new ES6Promise(function (resolve, reject) {
-
-                // Append the callback bound to the context
-                args.push(function callback(err) {
-
-                    if (err) {
-                        return reject(err);
-                    }
-
-                    for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
-                        values[_key2 - 1] = arguments[_key2];
-                    }
-
-                    if (false === !!returnMultipleArguments) {
-                        return resolve(values[0]);
-                    }
-
-                    resolve(values);
-                });
-
-                // Call the function
-                var response = original.apply(target, args);
-
-                // If it looks like original already returns a promise,
-                // then just resolve with that promise. Hopefully, the callback function we added will just be ignored.
-                if (thatLooksLikeAPromiseToMe(response)) {
-                    resolve(response);
-                }
-            });
-        };
-    };
-}();
-
-/***/ }),
-/* 58 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/* global self, window, module, global, require */
-module.exports = function () {
-
-    "use strict";
-
-    var globalObject = void 0;
-
-    function isFunction(x) {
-        return typeof x === "function";
-    }
-
-    // Seek the global object
-    if (global !== undefined) {
-        globalObject = global;
-    } else if (window !== undefined && window.document) {
-        globalObject = window;
-    } else {
-        globalObject = self;
-    }
-
-    // Test for any native promise implementation, and if that
-    // implementation appears to conform to the specificaton.
-    // This code mostly nicked from the es6-promise module polyfill
-    // and then fooled with.
-    var hasPromiseSupport = function () {
-
-        // No promise object at all, and it's a non-starter
-        if (!globalObject.hasOwnProperty("Promise")) {
-            return false;
-        }
-
-        // There is a Promise object. Does it conform to the spec?
-        var P = globalObject.Promise;
-
-        // Some of these methods are missing from
-        // Firefox/Chrome experimental implementations
-        if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) {
-            return false;
-        }
-
-        if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) {
-            return false;
-        }
-
-        // Older version of the spec had a resolver object
-        // as the arg rather than a function
-        return function () {
-
-            var resolve = void 0;
-
-            var p = new globalObject.Promise(function (r) {
-                resolve = r;
-            });
-
-            if (p) {
-                return isFunction(resolve);
-            }
-
-            return false;
-        }();
-    }();
-
-    // Export the native Promise implementation if it
-    // looks like it matches the spec
-    if (hasPromiseSupport) {
-        return globalObject.Promise;
-    }
-
-    //  Otherwise, return the es6-promise polyfill by @jaffathecake.
-    return __webpack_require__(59).Promise;
-}();
-
-/***/ }),
-/* 59 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/*!
- * @overview es6-promise - a tiny implementation of Promises/A+.
- * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
- * @license   Licensed under MIT license
- *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
- * @version   v4.2.8+1e68dce6
- */
-
-(function (global, factory) {
-        true ? module.exports = factory() :
-       undefined;
-}(this, (function () { 'use strict';
-
-function objectOrFunction(x) {
-  var type = typeof x;
-  return x !== null && (type === 'object' || type === 'function');
-}
-
-function isFunction(x) {
-  return typeof x === 'function';
-}
-
-
-
-var _isArray = void 0;
-if (Array.isArray) {
-  _isArray = Array.isArray;
-} else {
-  _isArray = function (x) {
-    return Object.prototype.toString.call(x) === '[object Array]';
-  };
-}
-
-var isArray = _isArray;
-
-var len = 0;
-var vertxNext = void 0;
-var customSchedulerFn = void 0;
-
-var asap = function asap(callback, arg) {
-  queue[len] = callback;
-  queue[len + 1] = arg;
-  len += 2;
-  if (len === 2) {
-    // If len is 2, that means that we need to schedule an async flush.
-    // If additional callbacks are queued before the queue is flushed, they
-    // will be processed by this flush that we are scheduling.
-    if (customSchedulerFn) {
-      customSchedulerFn(flush);
-    } else {
-      scheduleFlush();
-    }
-  }
-};
-
-function setScheduler(scheduleFn) {
-  customSchedulerFn = scheduleFn;
-}
-
-function setAsap(asapFn) {
-  asap = asapFn;
-}
-
-var browserWindow = typeof window !== 'undefined' ? window : undefined;
-var browserGlobal = browserWindow || {};
-var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
-var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
-
-// test for web worker but not in IE10
-var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
-
-// node
-function useNextTick() {
-  // node version 0.10.x displays a deprecation warning when nextTick is used recursively
-  // see https://github.com/cujojs/when/issues/410 for details
-  return function () {
-    return process.nextTick(flush);
-  };
-}
-
-// vertx
-function useVertxTimer() {
-  if (typeof vertxNext !== 'undefined') {
-    return function () {
-      vertxNext(flush);
-    };
-  }
-
-  return useSetTimeout();
-}
-
-function useMutationObserver() {
-  var iterations = 0;
-  var observer = new BrowserMutationObserver(flush);
-  var node = document.createTextNode('');
-  observer.observe(node, { characterData: true });
-
-  return function () {
-    node.data = iterations = ++iterations % 2;
-  };
-}
-
-// web worker
-function useMessageChannel() {
-  var channel = new MessageChannel();
-  channel.port1.onmessage = flush;
-  return function () {
-    return channel.port2.postMessage(0);
-  };
-}
-
-function useSetTimeout() {
-  // Store setTimeout reference so es6-promise will be unaffected by
-  // other code modifying setTimeout (like sinon.useFakeTimers())
-  var globalSetTimeout = setTimeout;
-  return function () {
-    return globalSetTimeout(flush, 1);
-  };
-}
-
-var queue = new Array(1000);
-function flush() {
-  for (var i = 0; i < len; i += 2) {
-    var callback = queue[i];
-    var arg = queue[i + 1];
-
-    callback(arg);
-
-    queue[i] = undefined;
-    queue[i + 1] = undefined;
-  }
-
-  len = 0;
-}
-
-function attemptVertx() {
-  try {
-    var vertx = Function('return this')().require('vertx');
-    vertxNext = vertx.runOnLoop || vertx.runOnContext;
-    return useVertxTimer();
-  } catch (e) {
-    return useSetTimeout();
-  }
-}
-
-var scheduleFlush = void 0;
-// Decide what async method to use to triggering processing of queued callbacks:
-if (isNode) {
-  scheduleFlush = useNextTick();
-} else if (BrowserMutationObserver) {
-  scheduleFlush = useMutationObserver();
-} else if (isWorker) {
-  scheduleFlush = useMessageChannel();
-} else if (browserWindow === undefined && "function" === 'function') {
-  scheduleFlush = attemptVertx();
-} else {
-  scheduleFlush = useSetTimeout();
-}
-
-function then(onFulfillment, onRejection) {
-  var parent = this;
-
-  var child = new this.constructor(noop);
-
-  if (child[PROMISE_ID] === undefined) {
-    makePromise(child);
-  }
-
-  var _state = parent._state;
-
-
-  if (_state) {
-    var callback = arguments[_state - 1];
-    asap(function () {
-      return invokeCallback(_state, child, callback, parent._result);
-    });
-  } else {
-    subscribe(parent, child, onFulfillment, onRejection);
-  }
-
-  return child;
-}
-
-/**
-  `Promise.resolve` returns a promise that will become resolved with the
-  passed `value`. It is shorthand for the following:
-
-  ```javascript
-  let promise = new Promise(function(resolve, reject){
-    resolve(1);
-  });
-
-  promise.then(function(value){
-    // value === 1
-  });
-  ```
-
-  Instead of writing the above, your code now simply becomes the following:
-
-  ```javascript
-  let promise = Promise.resolve(1);
-
-  promise.then(function(value){
-    // value === 1
-  });
-  ```
-
-  @method resolve
-  @static
-  @param {Any} value value that the returned promise will be resolved with
-  Useful for tooling.
-  @return {Promise} a promise that will become fulfilled with the given
-  `value`
-*/
-function resolve$1(object) {
-  /*jshint validthis:true */
-  var Constructor = this;
-
-  if (object && typeof object === 'object' && object.constructor === Constructor) {
-    return object;
-  }
-
-  var promise = new Constructor(noop);
-  resolve(promise, object);
-  return promise;
-}
-
-var PROMISE_ID = Math.random().toString(36).substring(2);
-
-function noop() {}
-
-var PENDING = void 0;
-var FULFILLED = 1;
-var REJECTED = 2;
-
-function selfFulfillment() {
-  return new TypeError("You cannot resolve a promise with itself");
-}
-
-function cannotReturnOwn() {
-  return new TypeError('A promises callback cannot return that same promise.');
-}
-
-function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
-  try {
-    then$$1.call(value, fulfillmentHandler, rejectionHandler);
-  } catch (e) {
-    return e;
-  }
-}
-
-function handleForeignThenable(promise, thenable, then$$1) {
-  asap(function (promise) {
-    var sealed = false;
-    var error = tryThen(then$$1, thenable, function (value) {
-      if (sealed) {
-        return;
-      }
-      sealed = true;
-      if (thenable !== value) {
-        resolve(promise, value);
-      } else {
-        fulfill(promise, value);
-      }
-    }, function (reason) {
-      if (sealed) {
-        return;
-      }
-      sealed = true;
-
-      reject(promise, reason);
-    }, 'Settle: ' + (promise._label || ' unknown promise'));
-
-    if (!sealed && error) {
-      sealed = true;
-      reject(promise, error);
-    }
-  }, promise);
-}
-
-function handleOwnThenable(promise, thenable) {
-  if (thenable._state === FULFILLED) {
-    fulfill(promise, thenable._result);
-  } else if (thenable._state === REJECTED) {
-    reject(promise, thenable._result);
-  } else {
-    subscribe(thenable, undefined, function (value) {
-      return resolve(promise, value);
-    }, function (reason) {
-      return reject(promise, reason);
-    });
-  }
-}
-
-function handleMaybeThenable(promise, maybeThenable, then$$1) {
-  if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
-    handleOwnThenable(promise, maybeThenable);
-  } else {
-    if (then$$1 === undefined) {
-      fulfill(promise, maybeThenable);
-    } else if (isFunction(then$$1)) {
-      handleForeignThenable(promise, maybeThenable, then$$1);
-    } else {
-      fulfill(promise, maybeThenable);
-    }
-  }
-}
-
-function resolve(promise, value) {
-  if (promise === value) {
-    reject(promise, selfFulfillment());
-  } else if (objectOrFunction(value)) {
-    var then$$1 = void 0;
-    try {
-      then$$1 = value.then;
-    } catch (error) {
-      reject(promise, error);
-      return;
-    }
-    handleMaybeThenable(promise, value, then$$1);
-  } else {
-    fulfill(promise, value);
-  }
-}
-
-function publishRejection(promise) {
-  if (promise._onerror) {
-    promise._onerror(promise._result);
-  }
-
-  publish(promise);
-}
-
-function fulfill(promise, value) {
-  if (promise._state !== PENDING) {
-    return;
-  }
-
-  promise._result = value;
-  promise._state = FULFILLED;
-
-  if (promise._subscribers.length !== 0) {
-    asap(publish, promise);
-  }
-}
-
-function reject(promise, reason) {
-  if (promise._state !== PENDING) {
-    return;
-  }
-  promise._state = REJECTED;
-  promise._result = reason;
-
-  asap(publishRejection, promise);
-}
-
-function subscribe(parent, child, onFulfillment, onRejection) {
-  var _subscribers = parent._subscribers;
-  var length = _subscribers.length;
-
-
-  parent._onerror = null;
-
-  _subscribers[length] = child;
-  _subscribers[length + FULFILLED] = onFulfillment;
-  _subscribers[length + REJECTED] = onRejection;
-
-  if (length === 0 && parent._state) {
-    asap(publish, parent);
-  }
-}
-
-function publish(promise) {
-  var subscribers = promise._subscribers;
-  var settled = promise._state;
-
-  if (subscribers.length === 0) {
-    return;
-  }
-
-  var child = void 0,
-      callback = void 0,
-      detail = promise._result;
-
-  for (var i = 0; i < subscribers.length; i += 3) {
-    child = subscribers[i];
-    callback = subscribers[i + settled];
-
-    if (child) {
-      invokeCallback(settled, child, callback, detail);
-    } else {
-      callback(detail);
-    }
-  }
-
-  promise._subscribers.length = 0;
-}
-
-function invokeCallback(settled, promise, callback, detail) {
-  var hasCallback = isFunction(callback),
-      value = void 0,
-      error = void 0,
-      succeeded = true;
-
-  if (hasCallback) {
-    try {
-      value = callback(detail);
-    } catch (e) {
-      succeeded = false;
-      error = e;
-    }
-
-    if (promise === value) {
-      reject(promise, cannotReturnOwn());
-      return;
-    }
-  } else {
-    value = detail;
-  }
-
-  if (promise._state !== PENDING) {
-    // noop
-  } else if (hasCallback && succeeded) {
-    resolve(promise, value);
-  } else if (succeeded === false) {
-    reject(promise, error);
-  } else if (settled === FULFILLED) {
-    fulfill(promise, value);
-  } else if (settled === REJECTED) {
-    reject(promise, value);
-  }
-}
-
-function initializePromise(promise, resolver) {
-  try {
-    resolver(function resolvePromise(value) {
-      resolve(promise, value);
-    }, function rejectPromise(reason) {
-      reject(promise, reason);
-    });
-  } catch (e) {
-    reject(promise, e);
-  }
-}
-
-var id = 0;
-function nextId() {
-  return id++;
-}
-
-function makePromise(promise) {
-  promise[PROMISE_ID] = id++;
-  promise._state = undefined;
-  promise._result = undefined;
-  promise._subscribers = [];
-}
-
-function validationError() {
-  return new Error('Array Methods must be provided an Array');
-}
-
-var Enumerator = function () {
-  function Enumerator(Constructor, input) {
-    this._instanceConstructor = Constructor;
-    this.promise = new Constructor(noop);
-
-    if (!this.promise[PROMISE_ID]) {
-      makePromise(this.promise);
-    }
-
-    if (isArray(input)) {
-      this.length = input.length;
-      this._remaining = input.length;
-
-      this._result = new Array(this.length);
-
-      if (this.length === 0) {
-        fulfill(this.promise, this._result);
-      } else {
-        this.length = this.length || 0;
-        this._enumerate(input);
-        if (this._remaining === 0) {
-          fulfill(this.promise, this._result);
-        }
-      }
-    } else {
-      reject(this.promise, validationError());
-    }
-  }
-
-  Enumerator.prototype._enumerate = function _enumerate(input) {
-    for (var i = 0; this._state === PENDING && i < input.length; i++) {
-      this._eachEntry(input[i], i);
-    }
-  };
-
-  Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
-    var c = this._instanceConstructor;
-    var resolve$$1 = c.resolve;
-
-
-    if (resolve$$1 === resolve$1) {
-      var _then = void 0;
-      var error = void 0;
-      var didError = false;
-      try {
-        _then = entry.then;
-      } catch (e) {
-        didError = true;
-        error = e;
-      }
-
-      if (_then === then && entry._state !== PENDING) {
-        this._settledAt(entry._state, i, entry._result);
-      } else if (typeof _then !== 'function') {
-        this._remaining--;
-        this._result[i] = entry;
-      } else if (c === Promise$1) {
-        var promise = new c(noop);
-        if (didError) {
-          reject(promise, error);
-        } else {
-          handleMaybeThenable(promise, entry, _then);
-        }
-        this._willSettleAt(promise, i);
-      } else {
-        this._willSettleAt(new c(function (resolve$$1) {
-          return resolve$$1(entry);
-        }), i);
-      }
-    } else {
-      this._willSettleAt(resolve$$1(entry), i);
-    }
-  };
-
-  Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
-    var promise = this.promise;
-
-
-    if (promise._state === PENDING) {
-      this._remaining--;
-
-      if (state === REJECTED) {
-        reject(promise, value);
-      } else {
-        this._result[i] = value;
-      }
-    }
-
-    if (this._remaining === 0) {
-      fulfill(promise, this._result);
-    }
-  };
-
-  Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
-    var enumerator = this;
-
-    subscribe(promise, undefined, function (value) {
-      return enumerator._settledAt(FULFILLED, i, value);
-    }, function (reason) {
-      return enumerator._settledAt(REJECTED, i, reason);
-    });
-  };
-
-  return Enumerator;
-}();
-
-/**
-  `Promise.all` accepts an array of promises, and returns a new promise which
-  is fulfilled with an array of fulfillment values for the passed promises, or
-  rejected with the reason of the first passed promise to be rejected. It casts all
-  elements of the passed iterable to promises as it runs this algorithm.
-
-  Example:
-
-  ```javascript
-  let promise1 = resolve(1);
-  let promise2 = resolve(2);
-  let promise3 = resolve(3);
-  let promises = [ promise1, promise2, promise3 ];
-
-  Promise.all(promises).then(function(array){
-    // The array here would be [ 1, 2, 3 ];
-  });
-  ```
-
-  If any of the `promises` given to `all` are rejected, the first promise
-  that is rejected will be given as an argument to the returned promises's
-  rejection handler. For example:
-
-  Example:
-
-  ```javascript
-  let promise1 = resolve(1);
-  let promise2 = reject(new Error("2"));
-  let promise3 = reject(new Error("3"));
-  let promises = [ promise1, promise2, promise3 ];
-
-  Promise.all(promises).then(function(array){
-    // Code here never runs because there are rejected promises!
-  }, function(error) {
-    // error.message === "2"
-  });
-  ```
-
-  @method all
-  @static
-  @param {Array} entries array of promises
-  @param {String} label optional string for labeling the promise.
-  Useful for tooling.
-  @return {Promise} promise that is fulfilled when all `promises` have been
-  fulfilled, or rejected if any of them become rejected.
-  @static
-*/
-function all(entries) {
-  return new Enumerator(this, entries).promise;
-}
-
-/**
-  `Promise.race` returns a new promise which is settled in the same way as the
-  first passed promise to settle.
-
-  Example:
-
-  ```javascript
-  let promise1 = new Promise(function(resolve, reject){
-    setTimeout(function(){
-      resolve('promise 1');
-    }, 200);
-  });
-
-  let promise2 = new Promise(function(resolve, reject){
-    setTimeout(function(){
-      resolve('promise 2');
-    }, 100);
-  });
-
-  Promise.race([promise1, promise2]).then(function(result){
-    // result === 'promise 2' because it was resolved before promise1
-    // was resolved.
-  });
-  ```
-
-  `Promise.race` is deterministic in that only the state of the first
-  settled promise matters. For example, even if other promises given to the
-  `promises` array argument are resolved, but the first settled promise has
-  become rejected before the other promises became fulfilled, the returned
-  promise will become rejected:
-
-  ```javascript
-  let promise1 = new Promise(function(resolve, reject){
-    setTimeout(function(){
-      resolve('promise 1');
-    }, 200);
-  });
-
-  let promise2 = new Promise(function(resolve, reject){
-    setTimeout(function(){
-      reject(new Error('promise 2'));
-    }, 100);
-  });
-
-  Promise.race([promise1, promise2]).then(function(result){
-    // Code here never runs
-  }, function(reason){
-    // reason.message === 'promise 2' because promise 2 became rejected before
-    // promise 1 became fulfilled
-  });
-  ```
-
-  An example real-world use case is implementing timeouts:
-
-  ```javascript
-  Promise.race([ajax('foo.json'), timeout(5000)])
-  ```
-
-  @method race
-  @static
-  @param {Array} promises array of promises to observe
-  Useful for tooling.
-  @return {Promise} a promise which settles in the same way as the first passed
-  promise to settle.
-*/
-function race(entries) {
-  /*jshint validthis:true */
-  var Constructor = this;
-
-  if (!isArray(entries)) {
-    return new Constructor(function (_, reject) {
-      return reject(new TypeError('You must pass an array to race.'));
-    });
-  } else {
-    return new Constructor(function (resolve, reject) {
-      var length = entries.length;
-      for (var i = 0; i < length; i++) {
-        Constructor.resolve(entries[i]).then(resolve, reject);
-      }
-    });
-  }
-}
-
-/**
-  `Promise.reject` returns a promise rejected with the passed `reason`.
-  It is shorthand for the following:
-
-  ```javascript
-  let promise = new Promise(function(resolve, reject){
-    reject(new Error('WHOOPS'));
-  });
-
-  promise.then(function(value){
-    // Code here doesn't run because the promise is rejected!
-  }, function(reason){
-    // reason.message === 'WHOOPS'
-  });
-  ```
-
-  Instead of writing the above, your code now simply becomes the following:
-
-  ```javascript
-  let promise = Promise.reject(new Error('WHOOPS'));
-
-  promise.then(function(value){
-    // Code here doesn't run because the promise is rejected!
-  }, function(reason){
-    // reason.message === 'WHOOPS'
-  });
-  ```
-
-  @method reject
-  @static
-  @param {Any} reason value that the returned promise will be rejected with.
-  Useful for tooling.
-  @return {Promise} a promise rejected with the given `reason`.
-*/
-function reject$1(reason) {
-  /*jshint validthis:true */
-  var Constructor = this;
-  var promise = new Constructor(noop);
-  reject(promise, reason);
-  return promise;
-}
-
-function needsResolver() {
-  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
-}
-
-function needsNew() {
-  throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
-}
-
-/**
-  Promise objects represent the eventual result of an asynchronous operation. The
-  primary way of interacting with a promise is through its `then` method, which
-  registers callbacks to receive either a promise's eventual value or the reason
-  why the promise cannot be fulfilled.
-
-  Terminology
-  -----------
-
-  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
-  - `thenable` is an object or function that defines a `then` method.
-  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
-  - `exception` is a value that is thrown using the throw statement.
-  - `reason` is a value that indicates why a promise was rejected.
-  - `settled` the final resting state of a promise, fulfilled or rejected.
-
-  A promise can be in one of three states: pending, fulfilled, or rejected.
-
-  Promises that are fulfilled have a fulfillment value and are in the fulfilled
-  state.  Promises that are rejected have a rejection reason and are in the
-  rejected state.  A fulfillment value is never a thenable.
-
-  Promises can also be said to *resolve* a value.  If this value is also a
-  promise, then the original promise's settled state will match the value's
-  settled state.  So a promise that *resolves* a promise that rejects will
-  itself reject, and a promise that *resolves* a promise that fulfills will
-  itself fulfill.
-
-
-  Basic Usage:
-  ------------
-
-  ```js
-  let promise = new Promise(function(resolve, reject) {
-    // on success
-    resolve(value);
-
-    // on failure
-    reject(reason);
-  });
-
-  promise.then(function(value) {
-    // on fulfillment
-  }, function(reason) {
-    // on rejection
-  });
-  ```
-
-  Advanced Usage:
-  ---------------
-
-  Promises shine when abstracting away asynchronous interactions such as
-  `XMLHttpRequest`s.
-
-  ```js
-  function getJSON(url) {
-    return new Promise(function(resolve, reject){
-      let xhr = new XMLHttpRequest();
-
-      xhr.open('GET', url);
-      xhr.onreadystatechange = handler;
-      xhr.responseType = 'json';
-      xhr.setRequestHeader('Accept', 'application/json');
-      xhr.send();
-
-      function handler() {
-        if (this.readyState === this.DONE) {
-          if (this.status === 200) {
-            resolve(this.response);
-          } else {
-            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
-          }
-        }
-      };
-    });
-  }
-
-  getJSON('/posts.json').then(function(json) {
-    // on fulfillment
-  }, function(reason) {
-    // on rejection
-  });
-  ```
-
-  Unlike callbacks, promises are great composable primitives.
-
-  ```js
-  Promise.all([
-    getJSON('/posts'),
-    getJSON('/comments')
-  ]).then(function(values){
-    values[0] // => postsJSON
-    values[1] // => commentsJSON
-
-    return values;
-  });
-  ```
-
-  @class Promise
-  @param {Function} resolver
-  Useful for tooling.
-  @constructor
-*/
-
-var Promise$1 = function () {
-  function Promise(resolver) {
-    this[PROMISE_ID] = nextId();
-    this._result = this._state = undefined;
-    this._subscribers = [];
-
-    if (noop !== resolver) {
-      typeof resolver !== 'function' && needsResolver();
-      this instanceof Promise ? initializePromise(this, resolver) : needsNew();
-    }
-  }
-
-  /**
-  The primary way of interacting with a promise is through its `then` method,
-  which registers callbacks to receive either a promise's eventual value or the
-  reason why the promise cannot be fulfilled.
-   ```js
-  findUser().then(function(user){
-    // user is available
-  }, function(reason){
-    // user is unavailable, and you are given the reason why
-  });
-  ```
-   Chaining
-  --------
-   The return value of `then` is itself a promise.  This second, 'downstream'
-  promise is resolved with the return value of the first promise's fulfillment
-  or rejection handler, or rejected if the handler throws an exception.
-   ```js
-  findUser().then(function (user) {
-    return user.name;
-  }, function (reason) {
-    return 'default name';
-  }).then(function (userName) {
-    // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
-    // will be `'default name'`
-  });
-   findUser().then(function (user) {
-    throw new Error('Found user, but still unhappy');
-  }, function (reason) {
-    throw new Error('`findUser` rejected and we're unhappy');
-  }).then(function (value) {
-    // never reached
-  }, function (reason) {
-    // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
-    // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
-  });
-  ```
-  If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
-   ```js
-  findUser().then(function (user) {
-    throw new PedagogicalException('Upstream error');
-  }).then(function (value) {
-    // never reached
-  }).then(function (value) {
-    // never reached
-  }, function (reason) {
-    // The `PedgagocialException` is propagated all the way down to here
-  });
-  ```
-   Assimilation
-  ------------
-   Sometimes the value you want to propagate to a downstream promise can only be
-  retrieved asynchronously. This can be achieved by returning a promise in the
-  fulfillment or rejection handler. The downstream promise will then be pending
-  until the returned promise is settled. This is called *assimilation*.
-   ```js
-  findUser().then(function (user) {
-    return findCommentsByAuthor(user);
-  }).then(function (comments) {
-    // The user's comments are now available
-  });
-  ```
-   If the assimliated promise rejects, then the downstream promise will also reject.
-   ```js
-  findUser().then(function (user) {
-    return findCommentsByAuthor(user);
-  }).then(function (comments) {
-    // If `findCommentsByAuthor` fulfills, we'll have the value here
-  }, function (reason) {
-    // If `findCommentsByAuthor` rejects, we'll have the reason here
-  });
-  ```
-   Simple Example
-  --------------
-   Synchronous Example
-   ```javascript
-  let result;
-   try {
-    result = findResult();
-    // success
-  } catch(reason) {
-    // failure
-  }
-  ```
-   Errback Example
-   ```js
-  findResult(function(result, err){
-    if (err) {
-      // failure
-    } else {
-      // success
-    }
-  });
-  ```
-   Promise Example;
-   ```javascript
-  findResult().then(function(result){
-    // success
-  }, function(reason){
-    // failure
-  });
-  ```
-   Advanced Example
-  --------------
-   Synchronous Example
-   ```javascript
-  let author, books;
-   try {
-    author = findAuthor();
-    books  = findBooksByAuthor(author);
-    // success
-  } catch(reason) {
-    // failure
-  }
-  ```
-   Errback Example
-   ```js
-   function foundBooks(books) {
-   }
-   function failure(reason) {
-   }
-   findAuthor(function(author, err){
-    if (err) {
-      failure(err);
-      // failure
-    } else {
-      try {
-        findBoooksByAuthor(author, function(books, err) {
-          if (err) {
-            failure(err);
-          } else {
-            try {
-              foundBooks(books);
-            } catch(reason) {
-              failure(reason);
-            }
-          }
-        });
-      } catch(error) {
-        failure(err);
-      }
-      // success
-    }
-  });
-  ```
-   Promise Example;
-   ```javascript
-  findAuthor().
-    then(findBooksByAuthor).
-    then(function(books){
-      // found books
-  }).catch(function(reason){
-    // something went wrong
-  });
-  ```
-   @method then
-  @param {Function} onFulfilled
-  @param {Function} onRejected
-  Useful for tooling.
-  @return {Promise}
-  */
-
-  /**
-  `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
-  as the catch block of a try/catch statement.
-  ```js
-  function findAuthor(){
-  throw new Error('couldn't find that author');
-  }
-  // synchronous
-  try {
-  findAuthor();
-  } catch(reason) {
-  // something went wrong
-  }
-  // async with promises
-  findAuthor().catch(function(reason){
-  // something went wrong
-  });
-  ```
-  @method catch
-  @param {Function} onRejection
-  Useful for tooling.
-  @return {Promise}
-  */
-
-
-  Promise.prototype.catch = function _catch(onRejection) {
-    return this.then(null, onRejection);
-  };
-
-  /**
-    `finally` will be invoked regardless of the promise's fate just as native
-    try/catch/finally behaves
-  
-    Synchronous example:
-  
-    ```js
-    findAuthor() {
-      if (Math.random() > 0.5) {
-        throw new Error();
-      }
-      return new Author();
-    }
-  
-    try {
-      return findAuthor(); // succeed or fail
-    } catch(error) {
-      return findOtherAuther();
-    } finally {
-      // always runs
-      // doesn't affect the return value
-    }
-    ```
-  
-    Asynchronous example:
-  
-    ```js
-    findAuthor().catch(function(reason){
-      return findOtherAuther();
-    }).finally(function(){
-      // author was either found, or not
-    });
-    ```
-  
-    @method finally
-    @param {Function} callback
-    @return {Promise}
-  */
-
-
-  Promise.prototype.finally = function _finally(callback) {
-    var promise = this;
-    var constructor = promise.constructor;
-
-    if (isFunction(callback)) {
-      return promise.then(function (value) {
-        return constructor.resolve(callback()).then(function () {
-          return value;
-        });
-      }, function (reason) {
-        return constructor.resolve(callback()).then(function () {
-          throw reason;
-        });
-      });
-    }
-
-    return promise.then(callback, callback);
-  };
-
-  return Promise;
-}();
-
-Promise$1.prototype.then = then;
-Promise$1.all = all;
-Promise$1.race = race;
-Promise$1.resolve = resolve$1;
-Promise$1.reject = reject$1;
-Promise$1._setScheduler = setScheduler;
-Promise$1._setAsap = setAsap;
-Promise$1._asap = asap;
-
-/*global self*/
-function polyfill() {
-  var local = void 0;
-
-  if (typeof global !== 'undefined') {
-    local = global;
-  } else if (typeof self !== 'undefined') {
-    local = self;
-  } else {
-    try {
-      local = Function('return this')();
-    } catch (e) {
-      throw new Error('polyfill failed because global object is unavailable in this environment');
-    }
-  }
-
-  var P = local.Promise;
-
-  if (P) {
-    var promiseToString = null;
-    try {
-      promiseToString = Object.prototype.toString.call(P.resolve());
-    } catch (e) {
-      // silently ignored
-    }
-
-    if (promiseToString === '[object Promise]' && !P.cast) {
-      return;
-    }
-  }
-
-  local.Promise = Promise$1;
-}
-
-// Strange compat..
-Promise$1.polyfill = polyfill;
-Promise$1.Promise = Promise$1;
-
-return Promise$1;
-
-})));
-
-
-
-//# sourceMappingURL=es6-promise.map
-
-
-/***/ }),
-/* 60 */
-/***/ (function(module, exports) {
-
-module.exports = require("events");
-
-/***/ }),
-/* 61 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * Detect Electron renderer process, which is node, but we should
- * treat as a browser.
- */
-
-if (typeof process === 'undefined' || process.type === 'renderer') {
-  module.exports = __webpack_require__(62);
-} else {
-  module.exports = __webpack_require__(65);
-}
-
-
-/***/ }),
-/* 62 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * This is the web browser implementation of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = __webpack_require__(63);
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = 'undefined' != typeof chrome
-               && 'undefined' != typeof chrome.storage
-                  ? chrome.storage.local
-                  : localstorage();
-
-/**
- * Colors.
- */
-
-exports.colors = [
-  '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
-  '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
-  '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
-  '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
-  '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
-  '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
-  '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
-  '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
-  '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
-  '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
-  '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
-];
-
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-
-function useColors() {
-  // NB: In an Electron preload script, document will be defined but not fully
-  // initialized. Since we know we're in Chrome, we'll just detect this case
-  // explicitly
-  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
-    return true;
-  }
-
-  // Internet Explorer and Edge do not support colors.
-  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
-    return false;
-  }
-
-  // is webkit? http://stackoverflow.com/a/16459606/376773
-  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
-  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
-    // is firebug? http://stackoverflow.com/a/398120/376773
-    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
-    // is firefox >= v31?
-    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
-    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
-    // double check webkit in userAgent just in case we are in a worker
-    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
-}
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-exports.formatters.j = function(v) {
-  try {
-    return JSON.stringify(v);
-  } catch (err) {
-    return '[UnexpectedJSONParseError]: ' + err.message;
-  }
-};
-
-
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
-  var useColors = this.useColors;
-
-  args[0] = (useColors ? '%c' : '')
-    + this.namespace
-    + (useColors ? ' %c' : ' ')
-    + args[0]
-    + (useColors ? '%c ' : ' ')
-    + '+' + exports.humanize(this.diff);
-
-  if (!useColors) return;
-
-  var c = 'color: ' + this.color;
-  args.splice(1, 0, c, 'color: inherit')
-
-  // the final "%c" is somewhat tricky, because there could be other
-  // arguments passed either before or after the %c, so we need to
-  // figure out the correct index to insert the CSS into
-  var index = 0;
-  var lastC = 0;
-  args[0].replace(/%[a-zA-Z%]/g, function(match) {
-    if ('%%' === match) return;
-    index++;
-    if ('%c' === match) {
-      // we only are interested in the *last* %c
-      // (the user may have provided their own)
-      lastC = index;
-    }
-  });
-
-  args.splice(lastC, 0, c);
-}
-
-/**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
-
-function log() {
-  // this hackery is required for IE8/9, where
-  // the `console.log` function doesn't have 'apply'
-  return 'object' === typeof console
-    && console.log
-    && Function.prototype.apply.call(console.log, console, arguments);
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-function save(namespaces) {
-  try {
-    if (null == namespaces) {
-      exports.storage.removeItem('debug');
-    } else {
-      exports.storage.debug = namespaces;
-    }
-  } catch(e) {}
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
-  var r;
-  try {
-    r = exports.storage.debug;
-  } catch(e) {}
-
-  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
-  if (!r && typeof process !== 'undefined' && 'env' in process) {
-    r = process.env.DEBUG;
-  }
-
-  return r;
-}
-
-/**
- * Enable namespaces listed in `localStorage.debug` initially.
- */
-
-exports.enable(load());
-
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-function localstorage() {
-  try {
-    return window.localStorage;
-  } catch (e) {}
-}
-
-
-/***/ }),
-/* 63 */
-/***/ (function(module, exports, __webpack_require__) {
-
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
-exports.coerce = coerce;
-exports.disable = disable;
-exports.enable = enable;
-exports.enabled = enabled;
-exports.humanize = __webpack_require__(64);
-
-/**
- * Active `debug` instances.
- */
-exports.instances = [];
-
-/**
- * The currently active debug mode names, and names to skip.
- */
-
-exports.names = [];
-exports.skips = [];
-
-/**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
-
-exports.formatters = {};
-
-/**
- * Select a color.
- * @param {String} namespace
- * @return {Number}
- * @api private
- */
-
-function selectColor(namespace) {
-  var hash = 0, i;
-
-  for (i in namespace) {
-    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);
-    hash |= 0; // Convert to 32bit integer
-  }
-
-  return exports.colors[Math.abs(hash) % exports.colors.length];
-}
-
-/**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
-
-function createDebug(namespace) {
-
-  var prevTime;
-
-  function debug() {
-    // disabled?
-    if (!debug.enabled) return;
-
-    var self = debug;
-
-    // set `diff` timestamp
-    var curr = +new Date();
-    var ms = curr - (prevTime || curr);
-    self.diff = ms;
-    self.prev = prevTime;
-    self.curr = curr;
-    prevTime = curr;
-
-    // turn the `arguments` into a proper Array
-    var args = new Array(arguments.length);
-    for (var i = 0; i < args.length; i++) {
-      args[i] = arguments[i];
-    }
-
-    args[0] = exports.coerce(args[0]);
-
-    if ('string' !== typeof args[0]) {
-      // anything else let's inspect with %O
-      args.unshift('%O');
-    }
-
-    // apply any `formatters` transformations
-    var index = 0;
-    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
-      // if we encounter an escaped % then don't increase the array index
-      if (match === '%%') return match;
-      index++;
-      var formatter = exports.formatters[format];
-      if ('function' === typeof formatter) {
-        var val = args[index];
-        match = formatter.call(self, val);
-
-        // now we need to remove `args[index]` since it's inlined in the `format`
-        args.splice(index, 1);
-        index--;
-      }
-      return match;
-    });
-
-    // apply env-specific formatting (colors, etc.)
-    exports.formatArgs.call(self, args);
-
-    var logFn = debug.log || exports.log || console.log.bind(console);
-    logFn.apply(self, args);
-  }
-
-  debug.namespace = namespace;
-  debug.enabled = exports.enabled(namespace);
-  debug.useColors = exports.useColors();
-  debug.color = selectColor(namespace);
-  debug.destroy = destroy;
-
-  // env-specific initialization logic for debug instances
-  if ('function' === typeof exports.init) {
-    exports.init(debug);
-  }
-
-  exports.instances.push(debug);
-
-  return debug;
-}
-
-function destroy () {
-  var index = exports.instances.indexOf(this);
-  if (index !== -1) {
-    exports.instances.splice(index, 1);
-    return true;
-  } else {
-    return false;
-  }
-}
-
-/**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
-
-function enable(namespaces) {
-  exports.save(namespaces);
-
-  exports.names = [];
-  exports.skips = [];
-
-  var i;
-  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
-  var len = split.length;
-
-  for (i = 0; i < len; i++) {
-    if (!split[i]) continue; // ignore empty strings
-    namespaces = split[i].replace(/\*/g, '.*?');
-    if (namespaces[0] === '-') {
-      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
-    } else {
-      exports.names.push(new RegExp('^' + namespaces + '$'));
-    }
-  }
-
-  for (i = 0; i < exports.instances.length; i++) {
-    var instance = exports.instances[i];
-    instance.enabled = exports.enabled(instance.namespace);
-  }
-}
-
-/**
- * Disable debug output.
- *
- * @api public
- */
-
-function disable() {
-  exports.enable('');
-}
-
-/**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
-
-function enabled(name) {
-  if (name[name.length - 1] === '*') {
-    return true;
-  }
-  var i, len;
-  for (i = 0, len = exports.skips.length; i < len; i++) {
-    if (exports.skips[i].test(name)) {
-      return false;
-    }
-  }
-  for (i = 0, len = exports.names.length; i < len; i++) {
-    if (exports.names[i].test(name)) {
-      return true;
-    }
-  }
-  return false;
-}
-
-/**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
-
-function coerce(val) {
-  if (val instanceof Error) return val.stack || val.message;
-  return val;
-}
-
-
-/***/ }),
-/* 64 */
-/***/ (function(module, exports) {
-
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var y = d * 365.25;
-
-/**
- * Parse or format the given `val`.
- *
- * Options:
- *
- *  - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} [options]
- * @throws {Error} throw an error if val is not a non-empty string or a number
- * @return {String|Number}
- * @api public
- */
-
-module.exports = function(val, options) {
-  options = options || {};
-  var type = typeof val;
-  if (type === 'string' && val.length > 0) {
-    return parse(val);
-  } else if (type === 'number' && isNaN(val) === false) {
-    return options.long ? fmtLong(val) : fmtShort(val);
-  }
-  throw new Error(
-    'val is not a non-empty string or a valid number. val=' +
-      JSON.stringify(val)
-  );
-};
-
-/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function parse(str) {
-  str = String(str);
-  if (str.length > 100) {
-    return;
-  }
-  var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
-    str
-  );
-  if (!match) {
-    return;
-  }
-  var n = parseFloat(match[1]);
-  var type = (match[2] || 'ms').toLowerCase();
-  switch (type) {
-    case 'years':
-    case 'year':
-    case 'yrs':
-    case 'yr':
-    case 'y':
-      return n * y;
-    case 'days':
-    case 'day':
-    case 'd':
-      return n * d;
-    case 'hours':
-    case 'hour':
-    case 'hrs':
-    case 'hr':
-    case 'h':
-      return n * h;
-    case 'minutes':
-    case 'minute':
-    case 'mins':
-    case 'min':
-    case 'm':
-      return n * m;
-    case 'seconds':
-    case 'second':
-    case 'secs':
-    case 'sec':
-    case 's':
-      return n * s;
-    case 'milliseconds':
-    case 'millisecond':
-    case 'msecs':
-    case 'msec':
-    case 'ms':
-      return n;
-    default:
-      return undefined;
-  }
-}
-
-/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtShort(ms) {
-  if (ms >= d) {
-    return Math.round(ms / d) + 'd';
-  }
-  if (ms >= h) {
-    return Math.round(ms / h) + 'h';
-  }
-  if (ms >= m) {
-    return Math.round(ms / m) + 'm';
-  }
-  if (ms >= s) {
-    return Math.round(ms / s) + 's';
-  }
-  return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtLong(ms) {
-  return plural(ms, d, 'day') ||
-    plural(ms, h, 'hour') ||
-    plural(ms, m, 'minute') ||
-    plural(ms, s, 'second') ||
-    ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, n, name) {
-  if (ms < n) {
-    return;
-  }
-  if (ms < n * 1.5) {
-    return Math.floor(ms / n) + ' ' + name;
-  }
-  return Math.ceil(ms / n) + ' ' + name + 's';
-}
-
-
-/***/ }),
-/* 65 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * Module dependencies.
- */
-
-var tty = __webpack_require__(66);
-var util = __webpack_require__(56);
-
-/**
- * This is the Node.js implementation of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = __webpack_require__(63);
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-
-/**
- * Colors.
- */
-
-exports.colors = [ 6, 2, 3, 4, 5, 1 ];
-
-try {
-  var supportsColor = __webpack_require__(67);
-  if (supportsColor && supportsColor.level >= 2) {
-    exports.colors = [
-      20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
-      69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
-      135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
-      172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
-      205, 206, 207, 208, 209, 214, 215, 220, 221
-    ];
-  }
-} catch (err) {
-  // swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-exports.inspectOpts = Object.keys(process.env).filter(function (key) {
-  return /^debug_/i.test(key);
-}).reduce(function (obj, key) {
-  // camel-case
-  var prop = key
-    .substring(6)
-    .toLowerCase()
-    .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
-
-  // coerce string value into JS value
-  var val = process.env[key];
-  if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
-  else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
-  else if (val === 'null') val = null;
-  else val = Number(val);
-
-  obj[prop] = val;
-  return obj;
-}, {});
-
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
-  return 'colors' in exports.inspectOpts
-    ? Boolean(exports.inspectOpts.colors)
-    : tty.isatty(process.stderr.fd);
-}
-
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-exports.formatters.o = function(v) {
-  this.inspectOpts.colors = this.useColors;
-  return util.inspect(v, this.inspectOpts)
-    .split('\n').map(function(str) {
-      return str.trim()
-    }).join(' ');
-};
-
-/**
- * Map %o to `util.inspect()`, allowing multiple lines if needed.
- */
-
-exports.formatters.O = function(v) {
-  this.inspectOpts.colors = this.useColors;
-  return util.inspect(v, this.inspectOpts);
-};
-
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
-  var name = this.namespace;
-  var useColors = this.useColors;
-
-  if (useColors) {
-    var c = this.color;
-    var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
-    var prefix = '  ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
-
-    args[0] = prefix + args[0].split('\n').join('\n' + prefix);
-    args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
-  } else {
-    args[0] = getDate() + name + ' ' + args[0];
-  }
-}
-
-function getDate() {
-  if (exports.inspectOpts.hideDate) {
-    return '';
-  } else {
-    return new Date().toISOString() + ' ';
-  }
-}
-
-/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
- */
-
-function log() {
-  return process.stderr.write(util.format.apply(util, arguments) + '\n');
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-function save(namespaces) {
-  if (null == namespaces) {
-    // If you set a process.env field to null or undefined, it gets cast to the
-    // string 'null' or 'undefined'. Just delete instead.
-    delete process.env.DEBUG;
-  } else {
-    process.env.DEBUG = namespaces;
-  }
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
-  return process.env.DEBUG;
-}
-
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-function init (debug) {
-  debug.inspectOpts = {};
-
-  var keys = Object.keys(exports.inspectOpts);
-  for (var i = 0; i < keys.length; i++) {
-    debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
-  }
-}
-
-/**
- * Enable namespaces listed in `process.env.DEBUG` initially.
- */
-
-exports.enable(load());
-
-
-/***/ }),
-/* 66 */
-/***/ (function(module, exports) {
-
-module.exports = require("tty");
-
-/***/ }),
-/* 67 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-const os = __webpack_require__(13);
-const hasFlag = __webpack_require__(68);
-
-const env = process.env;
-
-let forceColor;
-if (hasFlag('no-color') ||
-       hasFlag('no-colors') ||
-       hasFlag('color=false')) {
-       forceColor = false;
-} else if (hasFlag('color') ||
-       hasFlag('colors') ||
-       hasFlag('color=true') ||
-       hasFlag('color=always')) {
-       forceColor = true;
-}
-if ('FORCE_COLOR' in env) {
-       forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
-}
-
-function translateLevel(level) {
-       if (level === 0) {
-               return false;
-       }
-
-       return {
-               level,
-               hasBasic: true,
-               has256: level >= 2,
-               has16m: level >= 3
-       };
-}
-
-function supportsColor(stream) {
-       if (forceColor === false) {
-               return 0;
-       }
-
-       if (hasFlag('color=16m') ||
-               hasFlag('color=full') ||
-               hasFlag('color=truecolor')) {
-               return 3;
-       }
-
-       if (hasFlag('color=256')) {
-               return 2;
-       }
-
-       if (stream && !stream.isTTY && forceColor !== true) {
-               return 0;
-       }
-
-       const min = forceColor ? 1 : 0;
-
-       if (process.platform === 'win32') {
-               // Node.js 7.5.0 is the first version of Node.js to include a patch to
-               // libuv that enables 256 color output on Windows. Anything earlier and it
-               // won't work. However, here we target Node.js 8 at minimum as it is an LTS
-               // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
-               // release that supports 256 colors. Windows 10 build 14931 is the first release
-               // that supports 16m/TrueColor.
-               const osRelease = os.release().split('.');
-               if (
-                       Number(process.versions.node.split('.')[0]) >= 8 &&
-                       Number(osRelease[0]) >= 10 &&
-                       Number(osRelease[2]) >= 10586
-               ) {
-                       return Number(osRelease[2]) >= 14931 ? 3 : 2;
-               }
-
-               return 1;
-       }
-
-       if ('CI' in env) {
-               if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
-                       return 1;
-               }
-
-               return min;
-       }
-
-       if ('TEAMCITY_VERSION' in env) {
-               return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
-       }
-
-       if (env.COLORTERM === 'truecolor') {
-               return 3;
-       }
-
-       if ('TERM_PROGRAM' in env) {
-               const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
-
-               switch (env.TERM_PROGRAM) {
-                       case 'iTerm.app':
-                               return version >= 3 ? 3 : 2;
-                       case 'Apple_Terminal':
-                               return 2;
-                       // No default
-               }
-       }
-
-       if (/-256(color)?$/i.test(env.TERM)) {
-               return 2;
-       }
-
-       if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
-               return 1;
-       }
-
-       if ('COLORTERM' in env) {
-               return 1;
-       }
-
-       if (env.TERM === 'dumb') {
-               return min;
-       }
-
-       return min;
-}
-
-function getSupportLevel(stream) {
-       const level = supportsColor(stream);
-       return translateLevel(level);
-}
-
-module.exports = {
-       supportsColor: getSupportLevel,
-       stdout: getSupportLevel(process.stdout),
-       stderr: getSupportLevel(process.stderr)
-};
-
-
-/***/ }),
-/* 68 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-module.exports = (flag, argv) => {
-       argv = argv || process.argv;
-       const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
-       const pos = argv.indexOf(prefix + flag);
-       const terminatorPos = argv.indexOf('--');
-       return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
-};
-
-
-/***/ }),
-/* 69 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * Module dependencies.
- */
-
-var net = __webpack_require__(15);
-var tls = __webpack_require__(53);
-var url = __webpack_require__(40);
-var Agent = __webpack_require__(54);
-var inherits = __webpack_require__(56).inherits;
-var debug = __webpack_require__(70)('https-proxy-agent');
-
-/**
- * Module exports.
- */
-
-module.exports = HttpsProxyAgent;
-
-/**
- * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to the
- * specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
- *
- * @api public
- */
-
-function HttpsProxyAgent(opts) {
-  if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts);
-  if ('string' == typeof opts) opts = url.parse(opts);
-  if (!opts)
-    throw new Error(
-      'an HTTP(S) proxy server `host` and `port` must be specified!'
-    );
-  debug('creating new HttpsProxyAgent instance: %o', opts);
-  Agent.call(this, opts);
-
-  var proxy = Object.assign({}, opts);
-
-  // if `true`, then connect to the proxy server over TLS. defaults to `false`.
-  this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
-
-  // prefer `hostname` over `host`, and set the `port` if needed
-  proxy.host = proxy.hostname || proxy.host;
-  proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
-
-  // ALPN is supported by Node.js >= v5.
-  // attempt to negotiate http/1.1 for proxy servers that support http/2
-  if (this.secureProxy && !('ALPNProtocols' in proxy)) {
-    proxy.ALPNProtocols = ['http 1.1']
-  }
-
-  if (proxy.host && proxy.path) {
-    // if both a `host` and `path` are specified then it's most likely the
-    // result of a `url.parse()` call... we need to remove the `path` portion so
-    // that `net.connect()` doesn't attempt to open that as a unix socket file.
-    delete proxy.path;
-    delete proxy.pathname;
-  }
-
-  this.proxy = proxy;
-  this.defaultPort = 443;
-}
-inherits(HttpsProxyAgent, Agent);
-
-/**
- * Called when the node-core HTTP client library is creating a new HTTP request.
- *
- * @api public
- */
-
-HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) {
-  var proxy = this.proxy;
-
-  // create a socket connection to the proxy server
-  var socket;
-  if (this.secureProxy) {
-    socket = tls.connect(proxy);
-  } else {
-    socket = net.connect(proxy);
-  }
-
-  // we need to buffer any HTTP traffic that happens with the proxy before we get
-  // the CONNECT response, so that if the response is anything other than an "200"
-  // response code, then we can re-play the "data" events on the socket once the
-  // HTTP parser is hooked up...
-  var buffers = [];
-  var buffersLength = 0;
-
-  function read() {
-    var b = socket.read();
-    if (b) ondata(b);
-    else socket.once('readable', read);
-  }
-
-  function cleanup() {
-    socket.removeListener('data', ondata);
-    socket.removeListener('end', onend);
-    socket.removeListener('error', onerror);
-    socket.removeListener('close', onclose);
-    socket.removeListener('readable', read);
-  }
-
-  function onclose(err) {
-    debug('onclose had error %o', err);
-  }
-
-  function onend() {
-    debug('onend');
-  }
-
-  function onerror(err) {
-    cleanup();
-    fn(err);
-  }
-
-  function ondata(b) {
-    buffers.push(b);
-    buffersLength += b.length;
-    var buffered = Buffer.concat(buffers, buffersLength);
-    var str = buffered.toString('ascii');
-
-    if (!~str.indexOf('\r\n\r\n')) {
-      // keep buffering
-      debug('have not received end of HTTP headers yet...');
-      if (socket.read) {
-        read();
-      } else {
-        socket.once('data', ondata);
-      }
-      return;
-    }
-
-    var firstLine = str.substring(0, str.indexOf('\r\n'));
-    var statusCode = +firstLine.split(' ')[1];
-    debug('got proxy server response: %o', firstLine);
-
-    if (200 == statusCode) {
-      // 200 Connected status code!
-      var sock = socket;
-
-      // nullify the buffered data since we won't be needing it
-      buffers = buffered = null;
-
-      if (opts.secureEndpoint) {
-        // since the proxy is connecting to an SSL server, we have
-        // to upgrade this socket connection to an SSL connection
-        debug(
-          'upgrading proxy-connected socket to TLS connection: %o',
-          opts.host
-        );
-        opts.socket = socket;
-        opts.servername = opts.servername || opts.host;
-        opts.host = null;
-        opts.hostname = null;
-        opts.port = null;
-        sock = tls.connect(opts);
-      }
-
-      cleanup();
-      fn(null, sock);
-    } else {
-      // some other status code that's not 200... need to re-play the HTTP header
-      // "data" events onto the socket once the HTTP machinery is attached so that
-      // the user can parse and handle the error status code
-      cleanup();
-
-      // save a reference to the concat'd Buffer for the `onsocket` callback
-      buffers = buffered;
-
-      // need to wait for the "socket" event to re-play the "data" events
-      req.once('socket', onsocket);
-      fn(null, socket);
-    }
-  }
-
-  function onsocket(socket) {
-    // replay the "buffers" Buffer onto the `socket`, since at this point
-    // the HTTP module machinery has been hooked up for the user
-    if ('function' == typeof socket.ondata) {
-      // node <= v0.11.3, the `ondata` function is set on the socket
-      socket.ondata(buffers, 0, buffers.length);
-    } else if (socket.listeners('data').length > 0) {
-      // node > v0.11.3, the "data" event is listened for directly
-      socket.emit('data', buffers);
-    } else {
-      // never?
-      throw new Error('should not happen...');
-    }
-
-    // nullify the cached Buffer instance
-    buffers = null;
-  }
-
-  socket.on('error', onerror);
-  socket.on('close', onclose);
-  socket.on('end', onend);
-
-  if (socket.read) {
-    read();
-  } else {
-    socket.once('data', ondata);
-  }
-
-  var hostname = opts.host + ':' + opts.port;
-  var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n';
-
-  var headers = Object.assign({}, proxy.headers);
-  if (proxy.auth) {
-    headers['Proxy-Authorization'] =
-      'Basic ' + Buffer.from(proxy.auth).toString('base64');
-  }
-
-  // the Host header should only include the port
-  // number when it is a non-standard port
-  var host = opts.host;
-  if (!isDefaultPort(opts.port, opts.secureEndpoint)) {
-    host += ':' + opts.port;
-  }
-  headers['Host'] = host;
-
-  headers['Connection'] = 'close';
-  Object.keys(headers).forEach(function(name) {
-    msg += name + ': ' + headers[name] + '\r\n';
-  });
-
-  socket.write(msg + '\r\n');
-};
-
-function isDefaultPort(port, secure) {
-  return Boolean((!secure && port === 80) || (secure && port === 443));
-}
-
-
-/***/ }),
-/* 70 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/**
- * Detect Electron renderer / nwjs process, which is node, but we should
- * treat as a browser.
- */
-if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
-  module.exports = __webpack_require__(71);
-} else {
-  module.exports = __webpack_require__(74);
-}
-
-
-
-/***/ }),
-/* 71 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
-
-/* eslint-env browser */
-
-/**
- * This is the web browser implementation of `debug()`.
- */
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = localstorage();
-/**
- * Colors.
- */
-
-exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-// eslint-disable-next-line complexity
-
-function useColors() {
-  // NB: In an Electron preload script, document will be defined but not fully
-  // initialized. Since we know we're in Chrome, we'll just detect this case
-  // explicitly
-  if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
-    return true;
-  } // Internet Explorer and Edge do not support colors.
-
-
-  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
-    return false;
-  } // Is webkit? http://stackoverflow.com/a/16459606/376773
-  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
-
-
-  return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
-  typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
-  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
-  typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
-  typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
-}
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-
-function formatArgs(args) {
-  args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
-
-  if (!this.useColors) {
-    return;
-  }
-
-  var c = 'color: ' + this.color;
-  args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
-  // arguments passed either before or after the %c, so we need to
-  // figure out the correct index to insert the CSS into
-
-  var index = 0;
-  var lastC = 0;
-  args[0].replace(/%[a-zA-Z%]/g, function (match) {
-    if (match === '%%') {
-      return;
-    }
-
-    index++;
-
-    if (match === '%c') {
-      // We only are interested in the *last* %c
-      // (the user may have provided their own)
-      lastC = index;
-    }
-  });
-  args.splice(lastC, 0, c);
-}
-/**
- * Invokes `console.log()` when available.
- * No-op when `console.log` is not a "function".
- *
- * @api public
- */
-
-
-function log() {
-  var _console;
-
-  // This hackery is required for IE8/9, where
-  // the `console.log` function doesn't have 'apply'
-  return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
-}
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-
-function save(namespaces) {
-  try {
-    if (namespaces) {
-      exports.storage.setItem('debug', namespaces);
-    } else {
-      exports.storage.removeItem('debug');
-    }
-  } catch (error) {// Swallow
-    // XXX (@Qix-) should we be logging these?
-  }
-}
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-
-function load() {
-  var r;
-
-  try {
-    r = exports.storage.getItem('debug');
-  } catch (error) {} // Swallow
-  // XXX (@Qix-) should we be logging these?
-  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
-
-
-  if (!r && typeof process !== 'undefined' && 'env' in process) {
-    r = process.env.DEBUG;
-  }
-
-  return r;
-}
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-
-function localstorage() {
-  try {
-    // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
-    // The Browser also has localStorage in the global context.
-    return localStorage;
-  } catch (error) {// Swallow
-    // XXX (@Qix-) should we be logging these?
-  }
-}
-
-module.exports = __webpack_require__(72)(exports);
-var formatters = module.exports.formatters;
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-formatters.j = function (v) {
-  try {
-    return JSON.stringify(v);
-  } catch (error) {
-    return '[UnexpectedJSONParseError]: ' + error.message;
-  }
-};
-
-
-
-/***/ }),
-/* 72 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- */
-function setup(env) {
-  createDebug.debug = createDebug;
-  createDebug.default = createDebug;
-  createDebug.coerce = coerce;
-  createDebug.disable = disable;
-  createDebug.enable = enable;
-  createDebug.enabled = enabled;
-  createDebug.humanize = __webpack_require__(73);
-  Object.keys(env).forEach(function (key) {
-    createDebug[key] = env[key];
-  });
-  /**
-  * Active `debug` instances.
-  */
-
-  createDebug.instances = [];
-  /**
-  * The currently active debug mode names, and names to skip.
-  */
-
-  createDebug.names = [];
-  createDebug.skips = [];
-  /**
-  * Map of special "%n" handling functions, for the debug "format" argument.
-  *
-  * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
-  */
-
-  createDebug.formatters = {};
-  /**
-  * Selects a color for a debug namespace
-  * @param {String} namespace The namespace string for the for the debug instance to be colored
-  * @return {Number|String} An ANSI color code for the given namespace
-  * @api private
-  */
-
-  function selectColor(namespace) {
-    var hash = 0;
-
-    for (var i = 0; i < namespace.length; i++) {
-      hash = (hash << 5) - hash + namespace.charCodeAt(i);
-      hash |= 0; // Convert to 32bit integer
-    }
-
-    return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
-  }
-
-  createDebug.selectColor = selectColor;
-  /**
-  * Create a debugger with the given `namespace`.
-  *
-  * @param {String} namespace
-  * @return {Function}
-  * @api public
-  */
-
-  function createDebug(namespace) {
-    var prevTime;
-
-    function debug() {
-      // Disabled?
-      if (!debug.enabled) {
-        return;
-      }
-
-      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
-        args[_key] = arguments[_key];
-      }
-
-      var self = debug; // Set `diff` timestamp
-
-      var curr = Number(new Date());
-      var ms = curr - (prevTime || curr);
-      self.diff = ms;
-      self.prev = prevTime;
-      self.curr = curr;
-      prevTime = curr;
-      args[0] = createDebug.coerce(args[0]);
-
-      if (typeof args[0] !== 'string') {
-        // Anything else let's inspect with %O
-        args.unshift('%O');
-      } // Apply any `formatters` transformations
-
-
-      var index = 0;
-      args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
-        // If we encounter an escaped % then don't increase the array index
-        if (match === '%%') {
-          return match;
-        }
-
-        index++;
-        var formatter = createDebug.formatters[format];
-
-        if (typeof formatter === 'function') {
-          var val = args[index];
-          match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
-
-          args.splice(index, 1);
-          index--;
-        }
-
-        return match;
-      }); // Apply env-specific formatting (colors, etc.)
-
-      createDebug.formatArgs.call(self, args);
-      var logFn = self.log || createDebug.log;
-      logFn.apply(self, args);
-    }
-
-    debug.namespace = namespace;
-    debug.enabled = createDebug.enabled(namespace);
-    debug.useColors = createDebug.useColors();
-    debug.color = selectColor(namespace);
-    debug.destroy = destroy;
-    debug.extend = extend; // Debug.formatArgs = formatArgs;
-    // debug.rawLog = rawLog;
-    // env-specific initialization logic for debug instances
-
-    if (typeof createDebug.init === 'function') {
-      createDebug.init(debug);
-    }
-
-    createDebug.instances.push(debug);
-    return debug;
-  }
-
-  function destroy() {
-    var index = createDebug.instances.indexOf(this);
-
-    if (index !== -1) {
-      createDebug.instances.splice(index, 1);
-      return true;
-    }
-
-    return false;
-  }
-
-  function extend(namespace, delimiter) {
-    return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
-  }
-  /**
-  * Enables a debug mode by namespaces. This can include modes
-  * separated by a colon and wildcards.
-  *
-  * @param {String} namespaces
-  * @api public
-  */
-
-
-  function enable(namespaces) {
-    createDebug.save(namespaces);
-    createDebug.names = [];
-    createDebug.skips = [];
-    var i;
-    var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
-    var len = split.length;
-
-    for (i = 0; i < len; i++) {
-      if (!split[i]) {
-        // ignore empty strings
-        continue;
-      }
-
-      namespaces = split[i].replace(/\*/g, '.*?');
-
-      if (namespaces[0] === '-') {
-        createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
-      } else {
-        createDebug.names.push(new RegExp('^' + namespaces + '$'));
-      }
-    }
-
-    for (i = 0; i < createDebug.instances.length; i++) {
-      var instance = createDebug.instances[i];
-      instance.enabled = createDebug.enabled(instance.namespace);
-    }
-  }
-  /**
-  * Disable debug output.
-  *
-  * @api public
-  */
-
-
-  function disable() {
-    createDebug.enable('');
-  }
-  /**
-  * Returns true if the given mode name is enabled, false otherwise.
-  *
-  * @param {String} name
-  * @return {Boolean}
-  * @api public
-  */
-
-
-  function enabled(name) {
-    if (name[name.length - 1] === '*') {
-      return true;
-    }
-
-    var i;
-    var len;
-
-    for (i = 0, len = createDebug.skips.length; i < len; i++) {
-      if (createDebug.skips[i].test(name)) {
-        return false;
-      }
-    }
-
-    for (i = 0, len = createDebug.names.length; i < len; i++) {
-      if (createDebug.names[i].test(name)) {
-        return true;
-      }
-    }
-
-    return false;
-  }
-  /**
-  * Coerce `val`.
-  *
-  * @param {Mixed} val
-  * @return {Mixed}
-  * @api private
-  */
-
-
-  function coerce(val) {
-    if (val instanceof Error) {
-      return val.stack || val.message;
-    }
-
-    return val;
-  }
-
-  createDebug.enable(createDebug.load());
-  return createDebug;
-}
-
-module.exports = setup;
-
-
-
-/***/ }),
-/* 73 */
-/***/ (function(module, exports) {
-
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var w = d * 7;
-var y = d * 365.25;
-
-/**
- * Parse or format the given `val`.
- *
- * Options:
- *
- *  - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} [options]
- * @throws {Error} throw an error if val is not a non-empty string or a number
- * @return {String|Number}
- * @api public
- */
-
-module.exports = function(val, options) {
-  options = options || {};
-  var type = typeof val;
-  if (type === 'string' && val.length > 0) {
-    return parse(val);
-  } else if (type === 'number' && isFinite(val)) {
-    return options.long ? fmtLong(val) : fmtShort(val);
-  }
-  throw new Error(
-    'val is not a non-empty string or a valid number. val=' +
-      JSON.stringify(val)
-  );
-};
-
-/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function parse(str) {
-  str = String(str);
-  if (str.length > 100) {
-    return;
-  }
-  var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
-    str
-  );
-  if (!match) {
-    return;
-  }
-  var n = parseFloat(match[1]);
-  var type = (match[2] || 'ms').toLowerCase();
-  switch (type) {
-    case 'years':
-    case 'year':
-    case 'yrs':
-    case 'yr':
-    case 'y':
-      return n * y;
-    case 'weeks':
-    case 'week':
-    case 'w':
-      return n * w;
-    case 'days':
-    case 'day':
-    case 'd':
-      return n * d;
-    case 'hours':
-    case 'hour':
-    case 'hrs':
-    case 'hr':
-    case 'h':
-      return n * h;
-    case 'minutes':
-    case 'minute':
-    case 'mins':
-    case 'min':
-    case 'm':
-      return n * m;
-    case 'seconds':
-    case 'second':
-    case 'secs':
-    case 'sec':
-    case 's':
-      return n * s;
-    case 'milliseconds':
-    case 'millisecond':
-    case 'msecs':
-    case 'msec':
-    case 'ms':
-      return n;
-    default:
-      return undefined;
-  }
-}
-
-/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtShort(ms) {
-  var msAbs = Math.abs(ms);
-  if (msAbs >= d) {
-    return Math.round(ms / d) + 'd';
-  }
-  if (msAbs >= h) {
-    return Math.round(ms / h) + 'h';
-  }
-  if (msAbs >= m) {
-    return Math.round(ms / m) + 'm';
-  }
-  if (msAbs >= s) {
-    return Math.round(ms / s) + 's';
-  }
-  return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtLong(ms) {
-  var msAbs = Math.abs(ms);
-  if (msAbs >= d) {
-    return plural(ms, msAbs, d, 'day');
-  }
-  if (msAbs >= h) {
-    return plural(ms, msAbs, h, 'hour');
-  }
-  if (msAbs >= m) {
-    return plural(ms, msAbs, m, 'minute');
-  }
-  if (msAbs >= s) {
-    return plural(ms, msAbs, s, 'second');
-  }
-  return ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, msAbs, n, name) {
-  var isPlural = msAbs >= n * 1.5;
-  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
-}
-
-
-/***/ }),
-/* 74 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-/**
- * Module dependencies.
- */
-var tty = __webpack_require__(66);
-
-var util = __webpack_require__(56);
-/**
- * This is the Node.js implementation of `debug()`.
- */
-
-
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-try {
-  // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
-  // eslint-disable-next-line import/no-extraneous-dependencies
-  var supportsColor = __webpack_require__(67);
-
-  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
-    exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
-  }
-} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-
-exports.inspectOpts = Object.keys(process.env).filter(function (key) {
-  return /^debug_/i.test(key);
-}).reduce(function (obj, key) {
-  // Camel-case
-  var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
-    return k.toUpperCase();
-  }); // Coerce string value into JS value
-
-  var val = process.env[key];
-
-  if (/^(yes|on|true|enabled)$/i.test(val)) {
-    val = true;
-  } else if (/^(no|off|false|disabled)$/i.test(val)) {
-    val = false;
-  } else if (val === 'null') {
-    val = null;
-  } else {
-    val = Number(val);
-  }
-
-  obj[prop] = val;
-  return obj;
-}, {});
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
-  return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
-}
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-
-function formatArgs(args) {
-  var name = this.namespace,
-      useColors = this.useColors;
-
-  if (useColors) {
-    var c = this.color;
-    var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
-    var prefix = "  ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
-    args[0] = prefix + args[0].split('\n').join('\n' + prefix);
-    args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
-  } else {
-    args[0] = getDate() + name + ' ' + args[0];
-  }
-}
-
-function getDate() {
-  if (exports.inspectOpts.hideDate) {
-    return '';
-  }
-
-  return new Date().toISOString() + ' ';
-}
-/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
- */
-
-
-function log() {
-  return process.stderr.write(util.format.apply(util, arguments) + '\n');
-}
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-
-
-function save(namespaces) {
-  if (namespaces) {
-    process.env.DEBUG = namespaces;
-  } else {
-    // If you set a process.env field to null or undefined, it gets cast to the
-    // string 'null' or 'undefined'. Just delete instead.
-    delete process.env.DEBUG;
-  }
-}
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-
-function load() {
-  return process.env.DEBUG;
-}
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-
-function init(debug) {
-  debug.inspectOpts = {};
-  var keys = Object.keys(exports.inspectOpts);
-
-  for (var i = 0; i < keys.length; i++) {
-    debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
-  }
-}
-
-module.exports = __webpack_require__(72)(exports);
-var formatters = module.exports.formatters;
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-formatters.o = function (v) {
-  this.inspectOpts.colors = this.useColors;
-  return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
-};
-/**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
-
-
-formatters.O = function (v) {
-  this.inspectOpts.colors = this.useColors;
-  return util.inspect(v, this.inspectOpts);
-};
-
-
-
-/***/ }),
-/* 75 */
-/***/ (function(module, exports) {
-
-module.exports = require("zlib");
-
-/***/ }),
-/* 76 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* --------------------------------------------------------------------------------------------\r
- * Copyright (c) Microsoft Corporation. All rights reserved.\r
- * Licensed under the MIT License. See License.txt in the project root for license information.\r
- * ------------------------------------------------------------------------------------------ */\r
-\r
-Object.defineProperty(exports, "__esModule", { value: true });\r
-var path = __webpack_require__(1);\r
-var fs = __webpack_require__(2);\r
-var toString = Object.prototype.toString;\r
-function isDefined(value) {\r
-    return typeof value !== 'undefined';\r
-}\r
-function isNumber(value) {\r
-    return toString.call(value) === '[object Number]';\r
-}\r
-function isString(value) {\r
-    return toString.call(value) === '[object String]';\r
-}\r
-function isBoolean(value) {\r
-    return value === true || value === false;\r
-}\r
-function readJsonFileSync(filename) {\r
-    return JSON.parse(fs.readFileSync(filename, 'utf8'));\r
-}\r
-var MessageFormat;\r
-(function (MessageFormat) {\r
-    MessageFormat["file"] = "file";\r
-    MessageFormat["bundle"] = "bundle";\r
-    MessageFormat["both"] = "both";\r
-})(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {}));\r
-var BundleFormat;\r
-(function (BundleFormat) {\r
-    // the nls.bundle format\r
-    BundleFormat["standalone"] = "standalone";\r
-    BundleFormat["languagePack"] = "languagePack";\r
-})(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {}));\r
-var LocalizeInfo;\r
-(function (LocalizeInfo) {\r
-    function is(value) {\r
-        var candidate = value;\r
-        return candidate && isDefined(candidate.key) && isDefined(candidate.comment);\r
-    }\r
-    LocalizeInfo.is = is;\r
-})(LocalizeInfo || (LocalizeInfo = {}));\r
-var resolvedLanguage;\r
-var resolvedBundles;\r
-var options;\r
-var isPseudo;\r
-function initializeSettings() {\r
-    options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: MessageFormat.bundle };\r
-    if (isString(process.env.VSCODE_NLS_CONFIG)) {\r
-        try {\r
-            var vscodeOptions = JSON.parse(process.env.VSCODE_NLS_CONFIG);\r
-            var language = void 0;\r
-            var locale = void 0;\r
-            if (vscodeOptions.availableLanguages) {\r
-                var value = vscodeOptions.availableLanguages['*'];\r
-                if (isString(value)) {\r
-                    language = value;\r
-                }\r
-            }\r
-            if (isString(vscodeOptions.locale)) {\r
-                options.locale = vscodeOptions.locale.toLowerCase();\r
-            }\r
-            if (language === undefined) {\r
-                options.language = options.locale;\r
-            }\r
-            else if (language !== 'en') {\r
-                options.language = language;\r
-            }\r
-            if (isBoolean(vscodeOptions._languagePackSupport)) {\r
-                options.languagePackSupport = vscodeOptions._languagePackSupport;\r
-            }\r
-            if (isString(vscodeOptions._cacheRoot)) {\r
-                options.cacheRoot = vscodeOptions._cacheRoot;\r
-            }\r
-            if (isString(vscodeOptions._languagePackId)) {\r
-                options.languagePackId = vscodeOptions._languagePackId;\r
-            }\r
-            if (isString(vscodeOptions._translationsConfigFile)) {\r
-                options.translationsConfigFile = vscodeOptions._translationsConfigFile;\r
-                try {\r
-                    options.translationsConfig = readJsonFileSync(options.translationsConfigFile);\r
-                }\r
-                catch (error) {\r
-                    // We can't read the translation config file. Mark the cache as corrupted.\r
-                    if (vscodeOptions._corruptedFile) {\r
-                        fs.writeFile(vscodeOptions._corruptedFile, 'corrupted', 'utf8', function (err) {\r
-                            console.error(err);\r
-                        });\r
-                    }\r
-                }\r
-            }\r
-        }\r
-        catch (_a) {\r
-            // Do nothing.\r
-        }\r
-    }\r
-    isPseudo = options.locale === 'pseudo';\r
-    resolvedLanguage = undefined;\r
-    resolvedBundles = Object.create(null);\r
-}\r
-initializeSettings();\r
-function supportsLanguagePack() {\r
-    return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined\r
-        && options.translationsConfig !== undefined;\r
-}\r
-function format(message, args) {\r
-    var result;\r
-    if (isPseudo) {\r
-        // FF3B and FF3D is the Unicode zenkaku representation for [ and ]\r
-        message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';\r
-    }\r
-    if (args.length === 0) {\r
-        result = message;\r
-    }\r
-    else {\r
-        result = message.replace(/\{(\d+)\}/g, function (match, rest) {\r
-            var index = rest[0];\r
-            var arg = args[index];\r
-            var replacement = match;\r
-            if (typeof arg === 'string') {\r
-                replacement = arg;\r
-            }\r
-            else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {\r
-                replacement = String(arg);\r
-            }\r
-            return replacement;\r
-        });\r
-    }\r
-    return result;\r
-}\r
-function createScopedLocalizeFunction(messages) {\r
-    return function (key, message) {\r
-        var args = [];\r
-        for (var _i = 2; _i < arguments.length; _i++) {\r
-            args[_i - 2] = arguments[_i];\r
-        }\r
-        if (isNumber(key)) {\r
-            if (key >= messages.length) {\r
-                console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: " + new Error('').stack);\r
-                return;\r
-            }\r
-            return format(messages[key], args);\r
-        }\r
-        else {\r
-            if (isString(message)) {\r
-                console.warn("Message " + message + " didn't get externalized correctly.");\r
-                return format(message, args);\r
-            }\r
-            else {\r
-                console.error("Broken localize call found. Stacktrace is\n: " + new Error('').stack);\r
-            }\r
-        }\r
-    };\r
-}\r
-function localize(key, message) {\r
-    var args = [];\r
-    for (var _i = 2; _i < arguments.length; _i++) {\r
-        args[_i - 2] = arguments[_i];\r
-    }\r
-    return format(message, args);\r
-}\r
-function resolveLanguage(file) {\r
-    var resolvedLanguage;\r
-    if (options.cacheLanguageResolution && resolvedLanguage) {\r
-        resolvedLanguage = resolvedLanguage;\r
-    }\r
-    else {\r
-        if (isPseudo || !options.language) {\r
-            resolvedLanguage = '.nls.json';\r
-        }\r
-        else {\r
-            var locale = options.language;\r
-            while (locale) {\r
-                var candidate = '.nls.' + locale + '.json';\r
-                if (fs.existsSync(file + candidate)) {\r
-                    resolvedLanguage = candidate;\r
-                    break;\r
-                }\r
-                else {\r
-                    var index = locale.lastIndexOf('-');\r
-                    if (index > 0) {\r
-                        locale = locale.substring(0, index);\r
-                    }\r
-                    else {\r
-                        resolvedLanguage = '.nls.json';\r
-                        locale = null;\r
-                    }\r
-                }\r
-            }\r
-        }\r
-        if (options.cacheLanguageResolution) {\r
-            resolvedLanguage = resolvedLanguage;\r
-        }\r
-    }\r
-    return file + resolvedLanguage;\r
-}\r
-function findInTheBoxBundle(root) {\r
-    var language = options.language;\r
-    while (language) {\r
-        var candidate = path.join(root, "nls.bundle." + language + ".json");\r
-        if (fs.existsSync(candidate)) {\r
-            return candidate;\r
-        }\r
-        else {\r
-            var index = language.lastIndexOf('-');\r
-            if (index > 0) {\r
-                language = language.substring(0, index);\r
-            }\r
-            else {\r
-                language = undefined;\r
-            }\r
-        }\r
-    }\r
-    // Test if we can reslove the default bundle.\r
-    if (language === undefined) {\r
-        var candidate = path.join(root, 'nls.bundle.json');\r
-        if (fs.existsSync(candidate)) {\r
-            return candidate;\r
-        }\r
-    }\r
-    return undefined;\r
-}\r
-function mkdir(directory) {\r
-    try {\r
-        fs.mkdirSync(directory);\r
-    }\r
-    catch (err) {\r
-        if (err.code === 'EEXIST') {\r
-            return;\r
-        }\r
-        else if (err.code === 'ENOENT') {\r
-            var parent = path.dirname(directory);\r
-            if (parent !== directory) {\r
-                mkdir(parent);\r
-                fs.mkdirSync(directory);\r
-            }\r
-        }\r
-        else {\r
-            throw err;\r
-        }\r
-    }\r
-}\r
-function createDefaultNlsBundle(folder) {\r
-    var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));\r
-    var result = Object.create(null);\r
-    for (var module_1 in metaData) {\r
-        var entry = metaData[module_1];\r
-        result[module_1] = entry.messages;\r
-    }\r
-    return result;\r
-}\r
-function createNLSBundle(header, metaDataPath) {\r
-    var languagePackLocation = options.translationsConfig[header.id];\r
-    if (!languagePackLocation) {\r
-        return undefined;\r
-    }\r
-    var languagePack = readJsonFileSync(languagePackLocation).contents;\r
-    var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));\r
-    var result = Object.create(null);\r
-    for (var module_2 in metaData) {\r
-        var entry = metaData[module_2];\r
-        var translations = languagePack[header.outDir + "/" + module_2];\r
-        if (translations) {\r
-            var resultMessages = [];\r
-            for (var i = 0; i < entry.keys.length; i++) {\r
-                var messageKey = entry.keys[i];\r
-                var key = isString(messageKey) ? messageKey : messageKey.key;\r
-                var translatedMessage = translations[key];\r
-                if (translatedMessage === undefined) {\r
-                    translatedMessage = entry.messages[i];\r
-                }\r
-                resultMessages.push(translatedMessage);\r
-            }\r
-            result[module_2] = resultMessages;\r
-        }\r
-        else {\r
-            result[module_2] = entry.messages;\r
-        }\r
-    }\r
-    return result;\r
-}\r
-function touch(file) {\r
-    var d = new Date();\r
-    fs.utimes(file, d, d, function () {\r
-        // Do nothing. Ignore\r
-    });\r
-}\r
-function cacheBundle(key, bundle) {\r
-    resolvedBundles[key] = bundle;\r
-    return bundle;\r
-}\r
-function loadNlsBundleOrCreateFromI18n(header, bundlePath) {\r
-    var result;\r
-    var bundle = path.join(options.cacheRoot, header.id + "-" + header.hash + ".json");\r
-    var useMemoryOnly = false;\r
-    var writeBundle = false;\r
-    try {\r
-        result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));\r
-        touch(bundle);\r
-        return result;\r
-    }\r
-    catch (err) {\r
-        if (err.code === 'ENOENT') {\r
-            writeBundle = true;\r
-        }\r
-        else if (err instanceof SyntaxError) {\r
-            // We have a syntax error. So no valid JSON. Use\r
-            console.log("Syntax error parsing message bundle: " + err.message + ".");\r
-            fs.unlink(bundle, function (err) {\r
-                if (err) {\r
-                    console.error("Deleting corrupted bundle " + bundle + " failed.");\r
-                }\r
-            });\r
-            useMemoryOnly = true;\r
-        }\r
-        else {\r
-            throw err;\r
-        }\r
-    }\r
-    result = createNLSBundle(header, bundlePath);\r
-    if (!result || useMemoryOnly) {\r
-        return result;\r
-    }\r
-    if (writeBundle) {\r
-        try {\r
-            fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });\r
-        }\r
-        catch (err) {\r
-            if (err.code === 'EEXIST') {\r
-                return result;\r
-            }\r
-            throw err;\r
-        }\r
-    }\r
-    return result;\r
-}\r
-function loadDefaultNlsBundle(bundlePath) {\r
-    try {\r
-        return createDefaultNlsBundle(bundlePath);\r
-    }\r
-    catch (err) {\r
-        console.log("Generating default bundle from meta data failed.", err);\r
-        return undefined;\r
-    }\r
-}\r
-function loadNlsBundle(header, bundlePath) {\r
-    var result;\r
-    // Core decided to use a language pack. Do the same in the extension\r
-    if (supportsLanguagePack()) {\r
-        try {\r
-            result = loadNlsBundleOrCreateFromI18n(header, bundlePath);\r
-        }\r
-        catch (err) {\r
-            console.log("Load or create bundle failed ", err);\r
-        }\r
-    }\r
-    if (!result) {\r
-        // No language pack found, but core is running in language pack mode\r
-        // Don't try to use old in the box bundles since the might be stale\r
-        // Fall right back to the default bundle.\r
-        if (options.languagePackSupport) {\r
-            return loadDefaultNlsBundle(bundlePath);\r
-        }\r
-        var candidate = findInTheBoxBundle(bundlePath);\r
-        if (candidate) {\r
-            try {\r
-                return readJsonFileSync(candidate);\r
-            }\r
-            catch (err) {\r
-                console.log("Loading in the box message bundle failed.", err);\r
-            }\r
-        }\r
-        result = loadDefaultNlsBundle(bundlePath);\r
-    }\r
-    return result;\r
-}\r
-function tryFindMetaDataHeaderFile(file) {\r
-    var result;\r
-    var dirname = path.dirname(file);\r
-    while (true) {\r
-        result = path.join(dirname, 'nls.metadata.header.json');\r
-        if (fs.existsSync(result)) {\r
-            break;\r
-        }\r
-        var parent = path.dirname(dirname);\r
-        if (parent === dirname) {\r
-            result = undefined;\r
-            break;\r
-        }\r
-        else {\r
-            dirname = parent;\r
-        }\r
-    }\r
-    return result;\r
-}\r
-function loadMessageBundle(file) {\r
-    if (!file) {\r
-        // No file. We are in dev mode. Return the default\r
-        // localize function.\r
-        return localize;\r
-    }\r
-    // Remove extension since we load json files.\r
-    var ext = path.extname(file);\r
-    if (ext) {\r
-        file = file.substr(0, file.length - ext.length);\r
-    }\r
-    if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.bundle) {\r
-        var headerFile = tryFindMetaDataHeaderFile(file);\r
-        if (headerFile) {\r
-            var bundlePath = path.dirname(headerFile);\r
-            var bundle = resolvedBundles[bundlePath];\r
-            if (bundle === undefined) {\r
-                try {\r
-                    var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));\r
-                    try {\r
-                        var nlsBundle = loadNlsBundle(header, bundlePath);\r
-                        bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);\r
-                    }\r
-                    catch (err) {\r
-                        console.error('Failed to load nls bundle', err);\r
-                        bundle = cacheBundle(bundlePath, null);\r
-                    }\r
-                }\r
-                catch (err) {\r
-                    console.error('Failed to read header file', err);\r
-                    bundle = cacheBundle(bundlePath, null);\r
-                }\r
-            }\r
-            if (bundle) {\r
-                var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');\r
-                var messages = bundle.nlsBundle[module_3];\r
-                if (messages === undefined) {\r
-                    console.error("Messages for file " + file + " not found. See console for details.");\r
-                    return function () {\r
-                        return 'Messages not found.';\r
-                    };\r
-                }\r
-                return createScopedLocalizeFunction(messages);\r
-            }\r
-        }\r
-    }\r
-    if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.file) {\r
-        // Try to load a single file bundle\r
-        try {\r
-            var json = readJsonFileSync(resolveLanguage(file));\r
-            if (Array.isArray(json)) {\r
-                return createScopedLocalizeFunction(json);\r
-            }\r
-            else {\r
-                if (isDefined(json.messages) && isDefined(json.keys)) {\r
-                    return createScopedLocalizeFunction(json.messages);\r
-                }\r
-                else {\r
-                    console.error("String bundle '" + file + "' uses an unsupported format.");\r
-                    return function () {\r
-                        return 'File bundle has unsupported format. See console for details';\r
-                    };\r
-                }\r
-            }\r
-        }\r
-        catch (err) {\r
-            if (err.code !== 'ENOENT') {\r
-                console.error('Failed to load single file bundle', err);\r
-            }\r
-        }\r
-    }\r
-    console.error("Failed to load message bundle for file " + file);\r
-    return function () {\r
-        return 'Failed to load message bundle. See console for details.';\r
-    };\r
-}\r
-exports.loadMessageBundle = loadMessageBundle;\r
-function config(opts) {\r
-    if (opts) {\r
-        if (isString(opts.locale)) {\r
-            options.locale = opts.locale.toLowerCase();\r
-            options.language = options.locale;\r
-            resolvedLanguage = undefined;\r
-            resolvedBundles = Object.create(null);\r
-        }\r
-        if (opts.messageFormat !== undefined) {\r
-            options.messageFormat = opts.messageFormat;\r
-        }\r
-        if (opts.bundleFormat === BundleFormat.standalone && options.languagePackSupport === true) {\r
-            options.languagePackSupport = false;\r
-        }\r
-    }\r
-    isPseudo = options.locale === 'pseudo';\r
-    return loadMessageBundle;\r
-}\r
-exports.config = config;\r
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uriToFsPath", function() { return uriToFsPath; });
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+var __extends = (undefined && undefined.__extends) || (function () {
+    var extendStatics = function (d, b) {
+        extendStatics = Object.setPrototypeOf ||
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
+        return extendStatics(d, b);
+    };
+    return function (d, b) {
+        extendStatics(d, b);
+        function __() { this.constructor = d; }
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+    };
+})();
+var _a;
+var isWindows;
+if (typeof process === 'object') {
+    isWindows = process.platform === 'win32';
+}
+else if (typeof navigator === 'object') {
+    var userAgent = navigator.userAgent;
+    isWindows = userAgent.indexOf('Windows') >= 0;
+}
+function isHighSurrogate(charCode) {
+    return (0xD800 <= charCode && charCode <= 0xDBFF);
+}
+function isLowSurrogate(charCode) {
+    return (0xDC00 <= charCode && charCode <= 0xDFFF);
+}
+function isLowerAsciiHex(code) {
+    return code >= 97 /* a */ && code <= 102 /* f */;
+}
+function isLowerAsciiLetter(code) {
+    return code >= 97 /* a */ && code <= 122 /* z */;
+}
+function isUpperAsciiLetter(code) {
+    return code >= 65 /* A */ && code <= 90 /* Z */;
+}
+function isAsciiLetter(code) {
+    return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
+}
+//#endregion
+var _schemePattern = /^\w[\w\d+.-]*$/;
+var _singleSlashStart = /^\//;
+var _doubleSlashStart = /^\/\//;
+function _validateUri(ret, _strict) {
+    // scheme, must be set
+    if (!ret.scheme && _strict) {
+        throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
+    }
+    // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
+    // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+    if (ret.scheme && !_schemePattern.test(ret.scheme)) {
+        throw new Error('[UriError]: Scheme contains illegal characters.');
+    }
+    // path, http://tools.ietf.org/html/rfc3986#section-3.3
+    // If a URI contains an authority component, then the path component
+    // must either be empty or begin with a slash ("/") character.  If a URI
+    // does not contain an authority component, then the path cannot begin
+    // with two slash characters ("//").
+    if (ret.path) {
+        if (ret.authority) {
+            if (!_singleSlashStart.test(ret.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 (_doubleSlashStart.test(ret.path)) {
+                throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
+            }
+        }
+    }
+}
+// for a while we allowed uris *without* schemes and this is the migration
+// for them, e.g. an uri without scheme and without strict-mode warns and falls
+// back to the file-scheme. that should cause the least carnage and still be a
+// clear warning
+function _schemeFix(scheme, _strict) {
+    if (!scheme && !_strict) {
+        return 'file';
+    }
+    return scheme;
+}
+// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
+function _referenceResolution(scheme, path) {
+    // the slash-character is our 'default base' as we don't
+    // support constructing URIs relative to other URIs. This
+    // also means that we alter and potentially break paths.
+    // see https://tools.ietf.org/html/rfc3986#section-5.1.4
+    switch (scheme) {
+        case 'https':
+        case 'http':
+        case 'file':
+            if (!path) {
+                path = _slash;
+            }
+            else if (path[0] !== _slash) {
+                path = _slash + path;
+            }
+            break;
+    }
+    return path;
+}
+var _empty = '';
+var _slash = '/';
+var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
+/**
+ * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
+ * This class is a simple parser which creates the basic component parts
+ * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
+ * and encoding.
+ *
+ * ```txt
+ *       foo://example.com:8042/over/there?name=ferret#nose
+ *       \_/   \______________/\_________/ \_________/ \__/
+ *        |           |            |            |        |
+ *     scheme     authority       path        query   fragment
+ *        |   _____________________|__
+ *       / \ /                        \
+ *       urn:example:animal:ferret:nose
+ * ```
+ */
+var URI = /** @class */ (function () {
+    /**
+     * @internal
+     */
+    function URI(schemeOrData, authority, path, query, fragment, _strict) {
+        if (_strict === void 0) { _strict = false; }
+        if (typeof schemeOrData === 'object') {
+            this.scheme = schemeOrData.scheme || _empty;
+            this.authority = schemeOrData.authority || _empty;
+            this.path = schemeOrData.path || _empty;
+            this.query = schemeOrData.query || _empty;
+            this.fragment = schemeOrData.fragment || _empty;
+            // no validation because it's this URI
+            // that creates uri components.
+            // _validateUri(this);
+        }
+        else {
+            this.scheme = _schemeFix(schemeOrData, _strict);
+            this.authority = authority || _empty;
+            this.path = _referenceResolution(this.scheme, path || _empty);
+            this.query = query || _empty;
+            this.fragment = fragment || _empty;
+            _validateUri(this, _strict);
+        }
+    }
+    URI.isUri = function (thing) {
+        if (thing instanceof URI) {
+            return true;
+        }
+        if (!thing) {
+            return false;
+        }
+        return typeof thing.authority === 'string'
+            && typeof thing.fragment === 'string'
+            && typeof thing.path === 'string'
+            && typeof thing.query === 'string'
+            && typeof thing.scheme === 'string'
+            && typeof thing.fsPath === 'function'
+            && typeof thing.with === 'function'
+            && typeof thing.toString === 'function';
+    };
+    Object.defineProperty(URI.prototype, "fsPath", {
+        // ---- filesystem path -----------------------
+        /**
+         * Returns a string representing the corresponding file system path of this URI.
+         * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
+         * platform specific path separator.
+         *
+         * * Will *not* validate the path for invalid characters and semantics.
+         * * Will *not* look at the scheme of this URI.
+         * * The result shall *not* be used for display purposes but for accessing a file on disk.
+         *
+         *
+         * The *difference* to `URI#path` is the use of the platform specific separator and the handling
+         * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
+         *
+         * ```ts
+            const u = URI.parse('file://server/c$/folder/file.txt')
+            u.authority === 'server'
+            u.path === '/shares/c$/file.txt'
+            u.fsPath === '\\server\c$\folder\file.txt'
+        ```
+         *
+         * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
+         * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
+         * with URIs that represent files on disk (`file` scheme).
+         */
+        get: function () {
+            // if (this.scheme !== 'file') {
+            //         console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
+            // }
+            return uriToFsPath(this, false);
+        },
+        enumerable: true,
+        configurable: true
+    });
+    // ---- modify to new -------------------------
+    URI.prototype.with = function (change) {
+        if (!change) {
+            return this;
+        }
+        var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
+        if (scheme === undefined) {
+            scheme = this.scheme;
+        }
+        else if (scheme === null) {
+            scheme = _empty;
+        }
+        if (authority === undefined) {
+            authority = this.authority;
+        }
+        else if (authority === null) {
+            authority = _empty;
+        }
+        if (path === undefined) {
+            path = this.path;
+        }
+        else if (path === null) {
+            path = _empty;
+        }
+        if (query === undefined) {
+            query = this.query;
+        }
+        else if (query === null) {
+            query = _empty;
+        }
+        if (fragment === undefined) {
+            fragment = this.fragment;
+        }
+        else if (fragment === null) {
+            fragment = _empty;
+        }
+        if (scheme === this.scheme
+            && authority === this.authority
+            && path === this.path
+            && query === this.query
+            && fragment === this.fragment) {
+            return this;
+        }
+        return new _URI(scheme, authority, path, query, fragment);
+    };
+    // ---- parse & validate ------------------------
+    /**
+     * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
+     * `file:///usr/home`, or `scheme:with/path`.
+     *
+     * @param value A string which represents an URI (see `URI#toString`).
+     */
+    URI.parse = function (value, _strict) {
+        if (_strict === void 0) { _strict = false; }
+        var match = _regexp.exec(value);
+        if (!match) {
+            return new _URI(_empty, _empty, _empty, _empty, _empty);
+        }
+        return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
+    };
+    /**
+     * Creates a new URI from a file system path, e.g. `c:\my\files`,
+     * `/usr/home`, or `\\server\share\some\path`.
+     *
+     * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
+     * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
+     * `URI.parse('file://' + path)` because the path might contain characters that are
+     * interpreted (# and ?). See the following sample:
+     * ```ts
+    const good = URI.file('/coding/c#/project1');
+    good.scheme === 'file';
+    good.path === '/coding/c#/project1';
+    good.fragment === '';
+    const bad = URI.parse('file://' + '/coding/c#/project1');
+    bad.scheme === 'file';
+    bad.path === '/coding/c'; // path is now broken
+    bad.fragment === '/project1';
+    ```
+     *
+     * @param path A file system path (see `URI#fsPath`)
+     */
+    URI.file = function (path) {
+        var authority = _empty;
+        // normalize to fwd-slashes on windows,
+        // on other systems bwd-slashes are valid
+        // filename character, eg /f\oo/ba\r.txt
+        if (isWindows) {
+            path = path.replace(/\\/g, _slash);
+        }
+        // check for authority as used in UNC shares
+        // or use the path as given
+        if (path[0] === _slash && path[1] === _slash) {
+            var idx = path.indexOf(_slash, 2);
+            if (idx === -1) {
+                authority = path.substring(2);
+                path = _slash;
+            }
+            else {
+                authority = path.substring(2, idx);
+                path = path.substring(idx) || _slash;
+            }
+        }
+        return new _URI('file', authority, path, _empty, _empty);
+    };
+    URI.from = function (components) {
+        return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
+    };
+    // /**
+    //  * Join a URI path with path fragments and normalizes the resulting path.
+    //  *
+    //  * @param uri The input URI.
+    //  * @param pathFragment The path fragment to add to the URI path.
+    //  * @returns The resulting URI.
+    //  */
+    // static joinPath(uri: URI, ...pathFragment: string[]): URI {
+    //         if (!uri.path) {
+    //                 throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
+    //         }
+    //         let newPath: string;
+    //         if (isWindows && uri.scheme === 'file') {
+    //                 newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
+    //         } else {
+    //                 newPath = paths.posix.join(uri.path, ...pathFragment);
+    //         }
+    //         return uri.with({ path: newPath });
+    // }
+    // ---- printing/externalize ---------------------------
+    /**
+     * Creates a string representation for this URI. It's guaranteed that calling
+     * `URI.parse` with the result of this function creates an URI which is equal
+     * to this URI.
+     *
+     * * The result shall *not* be used for display purposes but for externalization or transport.
+     * * The result will be encoded using the percentage encoding and encoding happens mostly
+     * ignore the scheme-specific encoding rules.
+     *
+     * @param skipEncoding Do not encode the result, default is `false`
+     */
+    URI.prototype.toString = function (skipEncoding) {
+        if (skipEncoding === void 0) { skipEncoding = false; }
+        return _asFormatted(this, skipEncoding);
+    };
+    URI.prototype.toJSON = function () {
+        return this;
+    };
+    URI.revive = function (data) {
+        if (!data) {
+            return data;
+        }
+        else if (data instanceof URI) {
+            return data;
+        }
+        else {
+            var result = new _URI(data);
+            result._formatted = data.external;
+            result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
+            return result;
+        }
+    };
+    return URI;
+}());
+
+var _pathSepMarker = isWindows ? 1 : undefined;
+// eslint-disable-next-line @typescript-eslint/class-name-casing
+var _URI = /** @class */ (function (_super) {
+    __extends(_URI, _super);
+    function _URI() {
+        var _this = _super !== null && _super.apply(this, arguments) || this;
+        _this._formatted = null;
+        _this._fsPath = null;
+        return _this;
+    }
+    Object.defineProperty(_URI.prototype, "fsPath", {
+        get: function () {
+            if (!this._fsPath) {
+                this._fsPath = uriToFsPath(this, false);
+            }
+            return this._fsPath;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    _URI.prototype.toString = function (skipEncoding) {
+        if (skipEncoding === void 0) { skipEncoding = false; }
+        if (!skipEncoding) {
+            if (!this._formatted) {
+                this._formatted = _asFormatted(this, false);
+            }
+            return this._formatted;
+        }
+        else {
+            // we don't cache that
+            return _asFormatted(this, true);
+        }
+    };
+    _URI.prototype.toJSON = function () {
+        var res = {
+            $mid: 1
+        };
+        // cached state
+        if (this._fsPath) {
+            res.fsPath = this._fsPath;
+            res._sep = _pathSepMarker;
+        }
+        if (this._formatted) {
+            res.external = this._formatted;
+        }
+        // uri components
+        if (this.path) {
+            res.path = this.path;
+        }
+        if (this.scheme) {
+            res.scheme = this.scheme;
+        }
+        if (this.authority) {
+            res.authority = this.authority;
+        }
+        if (this.query) {
+            res.query = this.query;
+        }
+        if (this.fragment) {
+            res.fragment = this.fragment;
+        }
+        return res;
+    };
+    return _URI;
+}(URI));
+// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
+var encodeTable = (_a = {},
+    _a[58 /* Colon */] = '%3A',
+    _a[47 /* Slash */] = '%2F',
+    _a[63 /* QuestionMark */] = '%3F',
+    _a[35 /* Hash */] = '%23',
+    _a[91 /* OpenSquareBracket */] = '%5B',
+    _a[93 /* CloseSquareBracket */] = '%5D',
+    _a[64 /* AtSign */] = '%40',
+    _a[33 /* ExclamationMark */] = '%21',
+    _a[36 /* DollarSign */] = '%24',
+    _a[38 /* Ampersand */] = '%26',
+    _a[39 /* SingleQuote */] = '%27',
+    _a[40 /* OpenParen */] = '%28',
+    _a[41 /* CloseParen */] = '%29',
+    _a[42 /* Asterisk */] = '%2A',
+    _a[43 /* Plus */] = '%2B',
+    _a[44 /* Comma */] = '%2C',
+    _a[59 /* Semicolon */] = '%3B',
+    _a[61 /* Equals */] = '%3D',
+    _a[32 /* Space */] = '%20',
+    _a);
+function encodeURIComponentFast(uriComponent, allowSlash) {
+    var res = undefined;
+    var nativeEncodePos = -1;
+    for (var pos = 0; pos < uriComponent.length; pos++) {
+        var code = uriComponent.charCodeAt(pos);
+        // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
+        if ((code >= 97 /* a */ && code <= 122 /* z */)
+            || (code >= 65 /* A */ && code <= 90 /* Z */)
+            || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
+            || code === 45 /* Dash */
+            || code === 46 /* Period */
+            || code === 95 /* Underline */
+            || code === 126 /* Tilde */
+            || (allowSlash && code === 47 /* Slash */)) {
+            // check if we are delaying native encode
+            if (nativeEncodePos !== -1) {
+                res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
+                nativeEncodePos = -1;
+            }
+            // check if we write into a new string (by default we try to return the param)
+            if (res !== undefined) {
+                res += uriComponent.charAt(pos);
+            }
+        }
+        else {
+            // encoding needed, we need to allocate a new string
+            if (res === undefined) {
+                res = uriComponent.substr(0, pos);
+            }
+            // check with default table first
+            var escaped = encodeTable[code];
+            if (escaped !== undefined) {
+                // check if we are delaying native encode
+                if (nativeEncodePos !== -1) {
+                    res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
+                    nativeEncodePos = -1;
+                }
+                // append escaped variant to result
+                res += escaped;
+            }
+            else if (nativeEncodePos === -1) {
+                // use native encode only when needed
+                nativeEncodePos = pos;
+            }
+        }
+    }
+    if (nativeEncodePos !== -1) {
+        res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
+    }
+    return res !== undefined ? res : uriComponent;
+}
+function encodeURIComponentMinimal(path) {
+    var res = undefined;
+    for (var pos = 0; pos < path.length; pos++) {
+        var code = path.charCodeAt(pos);
+        if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
+            if (res === undefined) {
+                res = path.substr(0, pos);
+            }
+            res += encodeTable[code];
+        }
+        else {
+            if (res !== undefined) {
+                res += path[pos];
+            }
+        }
+    }
+    return res !== undefined ? res : path;
+}
+/**
+ * Compute `fsPath` for the given uri
+ */
+function uriToFsPath(uri, keepDriveLetterCasing) {
+    var value;
+    if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
+        // unc path: file://shares/c$/far/boo
+        value = "//" + uri.authority + uri.path;
+    }
+    else if (uri.path.charCodeAt(0) === 47 /* Slash */
+        && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
+        && uri.path.charCodeAt(2) === 58 /* Colon */) {
+        if (!keepDriveLetterCasing) {
+            // windows drive letter: file:///c:/far/boo
+            value = uri.path[1].toLowerCase() + uri.path.substr(2);
+        }
+        else {
+            value = uri.path.substr(1);
+        }
+    }
+    else {
+        // other path
+        value = uri.path;
+    }
+    if (isWindows) {
+        value = value.replace(/\//g, '\\');
+    }
+    return value;
+}
+/**
+ * Create the external version of a uri
+ */
+function _asFormatted(uri, skipEncoding) {
+    var encoder = !skipEncoding
+        ? encodeURIComponentFast
+        : encodeURIComponentMinimal;
+    var res = '';
+    var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
+    if (scheme) {
+        res += scheme;
+        res += ':';
+    }
+    if (authority || scheme === 'file') {
+        res += _slash;
+        res += _slash;
+    }
+    if (authority) {
+        var idx = authority.indexOf('@');
+        if (idx !== -1) {
+            // <user>@<auth>
+            var userinfo = authority.substr(0, idx);
+            authority = authority.substr(idx + 1);
+            idx = userinfo.indexOf(':');
+            if (idx === -1) {
+                res += encoder(userinfo, false);
+            }
+            else {
+                // <user>:<pass>@<auth>
+                res += encoder(userinfo.substr(0, idx), false);
+                res += ':';
+                res += encoder(userinfo.substr(idx + 1), false);
+            }
+            res += '@';
+        }
+        authority = authority.toLowerCase();
+        idx = authority.indexOf(':');
+        if (idx === -1) {
+            res += encoder(authority, false);
+        }
+        else {
+            // <auth>:<port>
+            res += encoder(authority.substr(0, idx), false);
+            res += authority.substr(idx);
+        }
+    }
+    if (path) {
+        // lower-case windows drive letters in /C:/fff or C:/fff
+        if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
+            var code = path.charCodeAt(1);
+            if (code >= 65 /* A */ && code <= 90 /* Z */) {
+                path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
+            }
+        }
+        else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
+            var code = path.charCodeAt(0);
+            if (code >= 65 /* A */ && code <= 90 /* Z */) {
+                path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
+            }
+        }
+        // encode the rest of the path
+        res += encoder(path, true);
+    }
+    if (query) {
+        res += '?';
+        res += encoder(query, false);
+    }
+    if (fragment) {
+        res += '#';
+        res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
+    }
+    return res;
+}
+// --- decode
+function decodeURIComponentGraceful(str) {
+    try {
+        return decodeURIComponent(str);
+    }
+    catch (_a) {
+        if (str.length > 3) {
+            return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
+        }
+        else {
+            return str;
+        }
+    }
+}
+var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
+function percentDecode(str) {
+    if (!str.match(_rEncodedAsHex)) {
+        return str;
+    }
+    return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
+}
+
+
+/***/ }),
+/* 36 */,
+/* 37 */,
+/* 38 */,
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+    if (k2 === undefined) k2 = k;
+    o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+    Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+    o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+    if (mod && mod.__esModule) return mod;
+    var result = {};
+    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+    __setModuleDefault(result, mod);
+    return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_1 = __webpack_require__(40);
+const runner_1 = __webpack_require__(88);
+const jsonServer_1 = __webpack_require__(89);
+const request_light_1 = __webpack_require__(115);
+const vscode_uri_1 = __webpack_require__(35);
+const fs = __importStar(__webpack_require__(2));
+// Create a connection for the server.
+const connection = node_1.createConnection();
+console.log = connection.console.log.bind(connection.console);
+console.error = connection.console.error.bind(connection.console);
+process.on('unhandledRejection', (e) => {
+    connection.console.error(runner_1.formatError(`Unhandled exception`, e));
+});
+function getHTTPRequestService() {
+    return {
+        getContent(uri, _encoding) {
+            const headers = { 'Accept-Encoding': 'gzip, deflate' };
+            return request_light_1.xhr({ url: uri, followRedirects: 5, headers }).then(response => {
+                return response.responseText;
+            }, (error) => {
+                return Promise.reject(error.responseText || request_light_1.getErrorStatusDescription(error.status) || error.toString());
+            });
+        }
+    };
+}
+function getFileRequestService() {
+    return {
+        getContent(location, encoding) {
+            return new Promise((c, e) => {
+                const uri = vscode_uri_1.URI.parse(location);
+                fs.readFile(uri.fsPath, encoding, (err, buf) => {
+                    if (err) {
+                        return e(err);
+                    }
+                    c(buf.toString());
+                });
+            });
+        }
+    };
+}
+jsonServer_1.startServer(connection, { file: getFileRequestService(), http: getHTTPRequestService(), configureHttpRequests: request_light_1.configure });
+
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------------------------------------------------- */
+
+
+module.exports = __webpack_require__(41);
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+/// <reference path="../../typings/thenable.d.ts" />
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+const Is = __webpack_require__(42);
+const server_1 = __webpack_require__(43);
+const fm = __webpack_require__(82);
+const node_1 = __webpack_require__(85);
+__export(__webpack_require__(86));
+var Files;
+(function (Files) {
+    Files.uriToFilePath = fm.uriToFilePath;
+    Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
+    Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
+    Files.resolve = fm.resolve;
+    Files.resolveModulePath = fm.resolveModulePath;
+})(Files = exports.Files || (exports.Files = {}));
+let _shutdownReceived = false;
+let exitTimer = undefined;
+function setupExitTimer() {
+    const argName = '--clientProcessId';
+    function runTimer(value) {
+        try {
+            let processId = parseInt(value);
+            if (!isNaN(processId)) {
+                exitTimer = setInterval(() => {
+                    try {
+                        process.kill(processId, 0);
+                    }
+                    catch (ex) {
+                        // Parent process doesn't exist anymore. Exit the server.
+                        process.exit(_shutdownReceived ? 0 : 1);
+                    }
+                }, 3000);
+            }
+        }
+        catch (e) {
+            // Ignore errors;
+        }
+    }
+    for (let i = 2; i < process.argv.length; i++) {
+        let arg = process.argv[i];
+        if (arg === argName && i + 1 < process.argv.length) {
+            runTimer(process.argv[i + 1]);
+            return;
+        }
+        else {
+            let args = arg.split('=');
+            if (args[0] === argName) {
+                runTimer(args[1]);
+            }
+        }
+    }
+}
+setupExitTimer();
+const watchDog = {
+    initialize: (params) => {
+        const processId = params.processId;
+        if (Is.number(processId) && exitTimer === undefined) {
+            // We received a parent process id. Set up a timer to periodically check
+            // if the parent is still alive.
+            setInterval(() => {
+                try {
+                    process.kill(processId, 0);
+                }
+                catch (ex) {
+                    // Parent process doesn't exist anymore. Exit the server.
+                    process.exit(_shutdownReceived ? 0 : 1);
+                }
+            }, 3000);
+        }
+    },
+    get shutdownReceived() {
+        return _shutdownReceived;
+    },
+    set shutdownReceived(value) {
+        _shutdownReceived = value;
+    },
+    exit: (code) => {
+        process.exit(code);
+    }
+};
+function createConnection(arg1, arg2, arg3, arg4) {
+    let factories;
+    let input;
+    let output;
+    let options;
+    if (arg1 !== void 0 && arg1.__brand === 'features') {
+        factories = arg1;
+        arg1 = arg2;
+        arg2 = arg3;
+        arg3 = arg4;
+    }
+    if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {
+        options = arg1;
+    }
+    else {
+        input = arg1;
+        output = arg2;
+        options = arg3;
+    }
+    return _createConnection(input, output, options, factories);
+}
+exports.createConnection = createConnection;
+function _createConnection(input, output, options, factories) {
+    if (!input && !output && process.argv.length > 2) {
+        let port = void 0;
+        let pipeName = void 0;
+        let argv = process.argv.slice(2);
+        for (let i = 0; i < argv.length; i++) {
+            let arg = argv[i];
+            if (arg === '--node-ipc') {
+                input = new node_1.IPCMessageReader(process);
+                output = new node_1.IPCMessageWriter(process);
+                break;
+            }
+            else if (arg === '--stdio') {
+                input = process.stdin;
+                output = process.stdout;
+                break;
+            }
+            else if (arg === '--socket') {
+                port = parseInt(argv[i + 1]);
+                break;
+            }
+            else if (arg === '--pipe') {
+                pipeName = argv[i + 1];
+                break;
+            }
+            else {
+                var args = arg.split('=');
+                if (args[0] === '--socket') {
+                    port = parseInt(args[1]);
+                    break;
+                }
+                else if (args[0] === '--pipe') {
+                    pipeName = args[1];
+                    break;
+                }
+            }
+        }
+        if (port) {
+            let transport = node_1.createServerSocketTransport(port);
+            input = transport[0];
+            output = transport[1];
+        }
+        else if (pipeName) {
+            let transport = node_1.createServerPipeTransport(pipeName);
+            input = transport[0];
+            output = transport[1];
+        }
+    }
+    var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \'--node-ipc\', \'--stdio\' or \'--socket={number}\'';
+    if (!input) {
+        throw new Error('Connection input stream is not set. ' + commandLineMessage);
+    }
+    if (!output) {
+        throw new Error('Connection output stream is not set. ' + commandLineMessage);
+    }
+    // Backwards compatibility
+    if (Is.func(input.read) && Is.func(input.on)) {
+        let inputStream = input;
+        inputStream.on('end', () => {
+            process.exit(_shutdownReceived ? 0 : 1);
+        });
+        inputStream.on('close', () => {
+            process.exit(_shutdownReceived ? 0 : 1);
+        });
+    }
+    const connectionFactory = (logger) => {
+        return node_1.createProtocolConnection(input, output, logger, options);
+    };
+    return server_1.createConnection(connectionFactory, watchDog, factories);
+}
+//# sourceMappingURL=main.js.map
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+function boolean(value) {
+    return value === true || value === false;
+}
+exports.boolean = boolean;
+function string(value) {
+    return typeof value === 'string' || value instanceof String;
+}
+exports.string = string;
+function number(value) {
+    return typeof value === 'number' || value instanceof Number;
+}
+exports.number = number;
+function error(value) {
+    return value instanceof Error;
+}
+exports.error = error;
+function func(value) {
+    return typeof value === 'function';
+}
+exports.func = func;
+function array(value) {
+    return Array.isArray(value);
+}
+exports.array = array;
+function stringArray(value) {
+    return array(value) && value.every(elem => string(elem));
+}
+exports.stringArray = stringArray;
+function typedArray(value, check) {
+    return Array.isArray(value) && value.every(check);
+}
+exports.typedArray = typedArray;
+function thenable(value) {
+    return value && func(value.then);
+}
+exports.thenable = thenable;
+//# sourceMappingURL=is.js.map
+
+/***/ }),
+/* 43 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_languageserver_protocol_1 = __webpack_require__(44);
+const Is = __webpack_require__(42);
+const UUID = __webpack_require__(77);
+const progress_1 = __webpack_require__(78);
+const configuration_1 = __webpack_require__(79);
+const workspaceFolders_1 = __webpack_require__(80);
+const callHierarchy_1 = __webpack_require__(81);
+function null2Undefined(value) {
+    if (value === null) {
+        return undefined;
+    }
+    return value;
+}
+/**
+ * A manager for simple text documents
+ */
+class TextDocuments {
+    /**
+     * Create a new text document manager.
+     */
+    constructor(configuration) {
+        this._documents = Object.create(null);
+        this._configuration = configuration;
+        this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
+        this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
+        this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
+        this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
+        this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
+    }
+    /**
+     * An event that fires when a text document managed by this manager
+     * has been opened or the content changes.
+     */
+    get onDidChangeContent() {
+        return this._onDidChangeContent.event;
+    }
+    /**
+     * An event that fires when a text document managed by this manager
+     * has been opened.
+     */
+    get onDidOpen() {
+        return this._onDidOpen.event;
+    }
+    /**
+     * An event that fires when a text document managed by this manager
+     * will be saved.
+     */
+    get onWillSave() {
+        return this._onWillSave.event;
+    }
+    /**
+     * Sets a handler that will be called if a participant wants to provide
+     * edits during a text document save.
+     */
+    onWillSaveWaitUntil(handler) {
+        this._willSaveWaitUntil = handler;
+    }
+    /**
+     * An event that fires when a text document managed by this manager
+     * has been saved.
+     */
+    get onDidSave() {
+        return this._onDidSave.event;
+    }
+    /**
+     * An event that fires when a text document managed by this manager
+     * has been closed.
+     */
+    get onDidClose() {
+        return this._onDidClose.event;
+    }
+    /**
+     * Returns the document for the given URI. Returns undefined if
+     * the document is not mananged by this instance.
+     *
+     * @param uri The text document's URI to retrieve.
+     * @return the text document or `undefined`.
+     */
+    get(uri) {
+        return this._documents[uri];
+    }
+    /**
+     * Returns all text documents managed by this instance.
+     *
+     * @return all text documents.
+     */
+    all() {
+        return Object.keys(this._documents).map(key => this._documents[key]);
+    }
+    /**
+     * Returns the URIs of all text documents managed by this instance.
+     *
+     * @return the URI's of all text documents.
+     */
+    keys() {
+        return Object.keys(this._documents);
+    }
+    /**
+     * Listens for `low level` notification on the given connection to
+     * update the text documents managed by this instance.
+     *
+     * Please note that the connection only provides handlers not an event model. Therefore
+     * listening on a connection will overwrite the following handlers on a connection:
+     * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,
+     * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.
+     *
+     * Use the correspnding events on the TextDocuments instance instead.
+     *
+     * @param connection The connection to listen on.
+     */
+    listen(connection) {
+        connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
+        connection.onDidOpenTextDocument((event) => {
+            let td = event.textDocument;
+            let document = this._configuration.create(td.uri, td.languageId, td.version, td.text);
+            this._documents[td.uri] = document;
+            let toFire = Object.freeze({ document });
+            this._onDidOpen.fire(toFire);
+            this._onDidChangeContent.fire(toFire);
+        });
+        connection.onDidChangeTextDocument((event) => {
+            let td = event.textDocument;
+            let changes = event.contentChanges;
+            if (changes.length === 0) {
+                return;
+            }
+            let document = this._documents[td.uri];
+            const { version } = td;
+            if (version === null || version === undefined) {
+                throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
+            }
+            document = this._configuration.update(document, changes, version);
+            this._documents[td.uri] = document;
+            this._onDidChangeContent.fire(Object.freeze({ document }));
+        });
+        connection.onDidCloseTextDocument((event) => {
+            let document = this._documents[event.textDocument.uri];
+            if (document) {
+                delete this._documents[event.textDocument.uri];
+                this._onDidClose.fire(Object.freeze({ document }));
+            }
+        });
+        connection.onWillSaveTextDocument((event) => {
+            let document = this._documents[event.textDocument.uri];
+            if (document) {
+                this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
+            }
+        });
+        connection.onWillSaveTextDocumentWaitUntil((event, token) => {
+            let document = this._documents[event.textDocument.uri];
+            if (document && this._willSaveWaitUntil) {
+                return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
+            }
+            else {
+                return [];
+            }
+        });
+        connection.onDidSaveTextDocument((event) => {
+            let document = this._documents[event.textDocument.uri];
+            if (document) {
+                this._onDidSave.fire(Object.freeze({ document }));
+            }
+        });
+    }
+}
+exports.TextDocuments = TextDocuments;
+/**
+ * Helps tracking error message. Equal occurences of the same
+ * message are only stored once. This class is for example
+ * useful if text documents are validated in a loop and equal
+ * error message should be folded into one.
+ */
+class ErrorMessageTracker {
+    constructor() {
+        this._messages = Object.create(null);
+    }
+    /**
+     * Add a message to the tracker.
+     *
+     * @param message The message to add.
+     */
+    add(message) {
+        let count = this._messages[message];
+        if (!count) {
+            count = 0;
+        }
+        count++;
+        this._messages[message] = count;
+    }
+    /**
+     * Send all tracked messages to the connection's window.
+     *
+     * @param connection The connection established between client and server.
+     */
+    sendErrors(connection) {
+        Object.keys(this._messages).forEach(message => {
+            connection.window.showErrorMessage(message);
+        });
+    }
+}
+exports.ErrorMessageTracker = ErrorMessageTracker;
+class RemoteConsoleImpl {
+    constructor() {
+    }
+    rawAttach(connection) {
+        this._rawConnection = connection;
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    initialize(_capabilities) {
+    }
+    error(message) {
+        this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
+    }
+    warn(message) {
+        this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
+    }
+    info(message) {
+        this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
+    }
+    log(message) {
+        this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
+    }
+    send(type, message) {
+        if (this._rawConnection) {
+            this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
+        }
+    }
+}
+class _RemoteWindowImpl {
+    constructor() {
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    initialize(_capabilities) {
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    showErrorMessage(message, ...actions) {
+        let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
+    }
+    showWarningMessage(message, ...actions) {
+        let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
+    }
+    showInformationMessage(message, ...actions) {
+        let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
+    }
+}
+const RemoteWindowImpl = progress_1.ProgressFeature(_RemoteWindowImpl);
+var BulkRegistration;
+(function (BulkRegistration) {
+    /**
+     * Creates a new bulk registration.
+     * @return an empty bulk registration.
+     */
+    function create() {
+        return new BulkRegistrationImpl();
+    }
+    BulkRegistration.create = create;
+})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
+class BulkRegistrationImpl {
+    constructor() {
+        this._registrations = [];
+        this._registered = new Set();
+    }
+    add(type, registerOptions) {
+        const method = Is.string(type) ? type : type.method;
+        if (this._registered.has(method)) {
+            throw new Error(`${method} is already added to this registration`);
+        }
+        const id = UUID.generateUuid();
+        this._registrations.push({
+            id: id,
+            method: method,
+            registerOptions: registerOptions || {}
+        });
+        this._registered.add(method);
+    }
+    asRegistrationParams() {
+        return {
+            registrations: this._registrations
+        };
+    }
+}
+var BulkUnregistration;
+(function (BulkUnregistration) {
+    function create() {
+        return new BulkUnregistrationImpl(undefined, []);
+    }
+    BulkUnregistration.create = create;
+})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
+class BulkUnregistrationImpl {
+    constructor(_connection, unregistrations) {
+        this._connection = _connection;
+        this._unregistrations = new Map();
+        unregistrations.forEach(unregistration => {
+            this._unregistrations.set(unregistration.method, unregistration);
+        });
+    }
+    get isAttached() {
+        return !!this._connection;
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    add(unregistration) {
+        this._unregistrations.set(unregistration.method, unregistration);
+    }
+    dispose() {
+        let unregistrations = [];
+        for (let unregistration of this._unregistrations.values()) {
+            unregistrations.push(unregistration);
+        }
+        let params = {
+            unregisterations: unregistrations
+        };
+        this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
+            this._connection.console.info(`Bulk unregistration failed.`);
+        });
+    }
+    disposeSingle(arg) {
+        const method = Is.string(arg) ? arg : arg.method;
+        const unregistration = this._unregistrations.get(method);
+        if (!unregistration) {
+            return false;
+        }
+        let params = {
+            unregisterations: [unregistration]
+        };
+        this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
+            this._unregistrations.delete(method);
+        }, (_error) => {
+            this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
+        });
+        return true;
+    }
+}
+class RemoteClientImpl {
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    initialize(_capabilities) {
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
+        if (typeOrRegistrations instanceof BulkRegistrationImpl) {
+            return this.registerMany(typeOrRegistrations);
+        }
+        else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
+            return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
+        }
+        else {
+            return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
+        }
+    }
+    registerSingle1(unregistration, type, registerOptions) {
+        const method = Is.string(type) ? type : type.method;
+        const id = UUID.generateUuid();
+        let params = {
+            registrations: [{ id, method, registerOptions: registerOptions || {} }]
+        };
+        if (!unregistration.isAttached) {
+            unregistration.attach(this.connection);
+        }
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
+            unregistration.add({ id: id, method: method });
+            return unregistration;
+        }, (_error) => {
+            this.connection.console.info(`Registering request handler for ${method} failed.`);
+            return Promise.reject(_error);
+        });
+    }
+    registerSingle2(type, registerOptions) {
+        const method = Is.string(type) ? type : type.method;
+        const id = UUID.generateUuid();
+        let params = {
+            registrations: [{ id, method, registerOptions: registerOptions || {} }]
+        };
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
+            return vscode_languageserver_protocol_1.Disposable.create(() => {
+                this.unregisterSingle(id, method);
+            });
+        }, (_error) => {
+            this.connection.console.info(`Registering request handler for ${method} failed.`);
+            return Promise.reject(_error);
+        });
+    }
+    unregisterSingle(id, method) {
+        let params = {
+            unregisterations: [{ id, method }]
+        };
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
+            this.connection.console.info(`Unregistering request handler for ${id} failed.`);
+        });
+    }
+    registerMany(registrations) {
+        let params = registrations.asRegistrationParams();
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
+            return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
+        }, (_error) => {
+            this.connection.console.info(`Bulk registration failed.`);
+            return Promise.reject(_error);
+        });
+    }
+}
+class _RemoteWorkspaceImpl {
+    constructor() {
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    initialize(_capabilities) {
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    applyEdit(paramOrEdit) {
+        function isApplyWorkspaceEditParams(value) {
+            return value && !!value.edit;
+        }
+        let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
+        return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
+    }
+}
+const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
+class TracerImpl {
+    constructor() {
+        this._trace = vscode_languageserver_protocol_1.Trace.Off;
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    initialize(_capabilities) {
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    set trace(value) {
+        this._trace = value;
+    }
+    log(message, verbose) {
+        if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
+            return;
+        }
+        this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
+            message: message,
+            verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
+        });
+    }
+}
+class TelemetryImpl {
+    constructor() {
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    initialize(_capabilities) {
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    logEvent(data) {
+        this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
+    }
+}
+class _LanguagesImpl {
+    constructor() {
+    }
+    attach(connection) {
+        this._connection = connection;
+    }
+    get connection() {
+        if (!this._connection) {
+            throw new Error('Remote is not attached to a connection yet.');
+        }
+        return this._connection;
+    }
+    initialize(_capabilities) {
+    }
+    fillServerCapabilities(_capabilities) {
+    }
+    attachWorkDoneProgress(params) {
+        return progress_1.attachWorkDone(this.connection, params);
+    }
+    attachPartialResultProgress(_type, params) {
+        return progress_1.attachPartialResult(this.connection, params);
+    }
+}
+exports._LanguagesImpl = _LanguagesImpl;
+const LanguagesImpl = callHierarchy_1.CallHierarchyFeature(_LanguagesImpl);
+function combineConsoleFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineConsoleFeatures = combineConsoleFeatures;
+function combineTelemetryFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineTelemetryFeatures = combineTelemetryFeatures;
+function combineTracerFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineTracerFeatures = combineTracerFeatures;
+function combineClientFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineClientFeatures = combineClientFeatures;
+function combineWindowFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineWindowFeatures = combineWindowFeatures;
+function combineWorkspaceFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
+function combineLanguagesFeatures(one, two) {
+    return function (Base) {
+        return two(one(Base));
+    };
+}
+exports.combineLanguagesFeatures = combineLanguagesFeatures;
+function combineFeatures(one, two) {
+    function combine(one, two, func) {
+        if (one && two) {
+            return func(one, two);
+        }
+        else if (one) {
+            return one;
+        }
+        else {
+            return two;
+        }
+    }
+    let result = {
+        __brand: 'features',
+        console: combine(one.console, two.console, combineConsoleFeatures),
+        tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
+        telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
+        client: combine(one.client, two.client, combineClientFeatures),
+        window: combine(one.window, two.window, combineWindowFeatures),
+        workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
+    };
+    return result;
+}
+exports.combineFeatures = combineFeatures;
+function createConnection(connectionFactory, watchDog, factories) {
+    const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());
+    const connection = connectionFactory(logger);
+    logger.rawAttach(connection);
+    const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
+    const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
+    const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
+    const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
+    const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
+    const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());
+    const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages];
+    function asPromise(value) {
+        if (value instanceof Promise) {
+            return value;
+        }
+        else if (Is.thenable(value)) {
+            return new Promise((resolve, reject) => {
+                value.then((resolved) => resolve(resolved), (error) => reject(error));
+            });
+        }
+        else {
+            return Promise.resolve(value);
+        }
+    }
+    let shutdownHandler = undefined;
+    let initializeHandler = undefined;
+    let exitHandler = undefined;
+    let protocolConnection = {
+        listen: () => connection.listen(),
+        sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
+        onRequest: (type, handler) => connection.onRequest(type, handler),
+        sendNotification: (type, param) => {
+            const method = Is.string(type) ? type : type.method;
+            if (arguments.length === 1) {
+                connection.sendNotification(method);
+            }
+            else {
+                connection.sendNotification(method, param);
+            }
+        },
+        onNotification: (type, handler) => connection.onNotification(type, handler),
+        onProgress: connection.onProgress,
+        sendProgress: connection.sendProgress,
+        onInitialize: (handler) => initializeHandler = handler,
+        onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
+        onShutdown: (handler) => shutdownHandler = handler,
+        onExit: (handler) => exitHandler = handler,
+        get console() { return logger; },
+        get telemetry() { return telemetry; },
+        get tracer() { return tracer; },
+        get client() { return client; },
+        get window() { return remoteWindow; },
+        get workspace() { return workspace; },
+        get languages() { return languages; },
+        onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
+        onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
+        __textDocumentSync: undefined,
+        onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
+        onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
+        onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
+        onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
+        onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
+        onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
+        sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
+        onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
+        }),
+        onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
+        onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
+        }),
+        onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {
+            return handler(params, cancel);
+        }),
+        onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
+        }),
+        onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
+        }),
+        onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {
+            return handler(params, cancel);
+        }),
+        onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
+        }),
+        onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {
+            return handler(params, cancel);
+        }),
+        onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {
+            return handler(params, cancel);
+        }),
+        onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), progress_1.attachPartialResult(connection, params));
+        }),
+        onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {
+            return handler(params, cancel, progress_1.attachWorkDone(connection, params), undefined);
+        }),
+        dispose: () => connection.dispose()
+    };
+    for (let remote of allRemotes) {
+        remote.attach(protocolConnection);
+    }
+    connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
+        watchDog.initialize(params);
+        if (Is.string(params.trace)) {
+            tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
+        }
+        for (let remote of allRemotes) {
+            remote.initialize(params.capabilities);
+        }
+        if (initializeHandler) {
+            let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, progress_1.attachWorkDone(connection, params), undefined);
+            return asPromise(result).then((value) => {
+                if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
+                    return value;
+                }
+                let result = value;
+                if (!result) {
+                    result = { capabilities: {} };
+                }
+                let capabilities = result.capabilities;
+                if (!capabilities) {
+                    capabilities = {};
+                    result.capabilities = capabilities;
+                }
+                if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) {
+                    capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
+                }
+                else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
+                    capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
+                }
+                for (let remote of allRemotes) {
+                    remote.fillServerCapabilities(capabilities);
+                }
+                return result;
+            });
+        }
+        else {
+            let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
+            for (let remote of allRemotes) {
+                remote.fillServerCapabilities(result.capabilities);
+            }
+            return result;
+        }
+    });
+    connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
+        watchDog.shutdownReceived = true;
+        if (shutdownHandler) {
+            return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
+        }
+        else {
+            return undefined;
+        }
+    });
+    connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
+        try {
+            if (exitHandler) {
+                exitHandler();
+            }
+        }
+        finally {
+            if (watchDog.shutdownReceived) {
+                watchDog.exit(0);
+            }
+            else {
+                watchDog.exit(1);
+            }
+        }
+    });
+    connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
+        tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
+    });
+    return protocolConnection;
+}
+exports.createConnection = createConnection;
+//# sourceMappingURL=server.js.map
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+const node_1 = __webpack_require__(45);
+__export(__webpack_require__(45));
+__export(__webpack_require__(60));
+function createProtocolConnection(input, output, logger, options) {
+    return node_1.createMessageConnection(input, output, logger, options);
+}
+exports.createProtocolConnection = createProtocolConnection;
+//# sourceMappingURL=main.js.map
+
+/***/ }),
+/* 45 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------------------------------------------------- */
+
+
+module.exports = __webpack_require__(46);
+
+/***/ }),
+/* 46 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------------------------------------------------- */
+const ril_1 = __webpack_require__(47);
+// Install the node runtime abstract.
+ril_1.default.install();
+const api_1 = __webpack_require__(50);
+const path = __webpack_require__(1);
+const os = __webpack_require__(14);
+const crypto_1 = __webpack_require__(15);
+const net_1 = __webpack_require__(16);
+__export(__webpack_require__(50));
+class IPCMessageReader extends api_1.AbstractMessageReader {
+    constructor(process) {
+        super();
+        this.process = process;
+        let eventEmitter = this.process;
+        eventEmitter.on('error', (error) => this.fireError(error));
+        eventEmitter.on('close', () => this.fireClose());
+    }
+    listen(callback) {
+        this.process.on('message', callback);
+        return api_1.Disposable.create(() => this.process.off('message', callback));
+    }
+}
+exports.IPCMessageReader = IPCMessageReader;
+class IPCMessageWriter extends api_1.AbstractMessageWriter {
+    constructor(process) {
+        super();
+        this.process = process;
+        this.errorCount = 0;
+        let eventEmitter = this.process;
+        eventEmitter.on('error', (error) => this.fireError(error));
+        eventEmitter.on('close', () => this.fireClose);
+    }
+    write(msg) {
+        try {
+            if (typeof this.process.send === 'function') {
+                this.process.send(msg, undefined, undefined, (error) => {
+                    if (error) {
+                        this.errorCount++;
+                        this.handleError(error, msg);
+                    }
+                    else {
+                        this.errorCount = 0;
+                    }
+                });
+            }
+            return Promise.resolve();
+        }
+        catch (error) {
+            this.handleError(error, msg);
+            return Promise.reject(error);
+        }
+    }
+    handleError(error, msg) {
+        this.errorCount++;
+        this.fireError(error, msg, this.errorCount);
+    }
+}
+exports.IPCMessageWriter = IPCMessageWriter;
+class SocketMessageReader extends api_1.ReadableStreamMessageReader {
+    constructor(socket, encoding = 'utf-8') {
+        super(ril_1.default().stream.asReadableStream(socket), encoding);
+    }
+}
+exports.SocketMessageReader = SocketMessageReader;
+class SocketMessageWriter extends api_1.WriteableStreamMessageWriter {
+    constructor(socket, options) {
+        super(ril_1.default().stream.asWritableStream(socket), options);
+        this.socket = socket;
+    }
+    dispose() {
+        super.dispose();
+        this.socket.destroy();
+    }
+}
+exports.SocketMessageWriter = SocketMessageWriter;
+class StreamMessageReader extends api_1.ReadableStreamMessageReader {
+    constructor(readble, encoding) {
+        super(ril_1.default().stream.asReadableStream(readble), encoding);
+    }
+}
+exports.StreamMessageReader = StreamMessageReader;
+class StreamMessageWriter extends api_1.WriteableStreamMessageWriter {
+    constructor(writable, options) {
+        super(ril_1.default().stream.asWritableStream(writable), options);
+    }
+}
+exports.StreamMessageWriter = StreamMessageWriter;
+function generateRandomPipeName() {
+    const randomSuffix = crypto_1.randomBytes(21).toString('hex');
+    if (process.platform === 'win32') {
+        return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
+    }
+    else {
+        // Mac/Unix: use socket file
+        return path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);
+    }
+}
+exports.generateRandomPipeName = generateRandomPipeName;
+function createClientPipeTransport(pipeName, encoding = 'utf-8') {
+    let connectResolve;
+    const connected = new Promise((resolve, _reject) => {
+        connectResolve = resolve;
+    });
+    return new Promise((resolve, reject) => {
+        let server = net_1.createServer((socket) => {
+            server.close();
+            connectResolve([
+                new SocketMessageReader(socket, encoding),
+                new SocketMessageWriter(socket, encoding)
+            ]);
+        });
+        server.on('error', reject);
+        server.listen(pipeName, () => {
+            server.removeListener('error', reject);
+            resolve({
+                onConnected: () => { return connected; }
+            });
+        });
+    });
+}
+exports.createClientPipeTransport = createClientPipeTransport;
+function createServerPipeTransport(pipeName, encoding = 'utf-8') {
+    const socket = net_1.createConnection(pipeName);
+    return [
+        new SocketMessageReader(socket, encoding),
+        new SocketMessageWriter(socket, encoding)
+    ];
+}
+exports.createServerPipeTransport = createServerPipeTransport;
+function createClientSocketTransport(port, encoding = 'utf-8') {
+    let connectResolve;
+    const connected = new Promise((resolve, _reject) => {
+        connectResolve = resolve;
+    });
+    return new Promise((resolve, reject) => {
+        const server = net_1.createServer((socket) => {
+            server.close();
+            connectResolve([
+                new SocketMessageReader(socket, encoding),
+                new SocketMessageWriter(socket, encoding)
+            ]);
+        });
+        server.on('error', reject);
+        server.listen(port, '127.0.0.1', () => {
+            server.removeListener('error', reject);
+            resolve({
+                onConnected: () => { return connected; }
+            });
+        });
+    });
+}
+exports.createClientSocketTransport = createClientSocketTransport;
+function createServerSocketTransport(port, encoding = 'utf-8') {
+    const socket = net_1.createConnection(port, '127.0.0.1');
+    return [
+        new SocketMessageReader(socket, encoding),
+        new SocketMessageWriter(socket, encoding)
+    ];
+}
+exports.createServerSocketTransport = createServerSocketTransport;
+function isMessageReader(value) {
+    return value.listen !== undefined && value.read === undefined;
+}
+function isMessageWriter(value) {
+    return value.write !== undefined && value.end === undefined;
+}
+function createMessageConnection(input, output, logger, options) {
+    if (!logger) {
+        logger = api_1.NullLogger;
+    }
+    const reader = isMessageReader(input) ? input : new StreamMessageReader(input);
+    const writer = isMessageWriter(output) ? output : new StreamMessageWriter(output);
+    if (api_1.ConnectionStrategy.is(options)) {
+        options = { connectionStrategy: options };
+    }
+    return api_1.createMessageConnection(reader, writer, logger, options);
+}
+exports.createMessageConnection = createMessageConnection;
 //# sourceMappingURL=main.js.map
 
 /***/ }),
-/* 77 */
+/* 47 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+const disposable_1 = __webpack_require__(49);
+const util_1 = __webpack_require__(3);
+const DefaultSize = 8192;
+const CR = Buffer.from('\r', 'ascii')[0];
+const LF = Buffer.from('\n', 'ascii')[0];
+const CRLF = '\r\n';
+class MessageBuffer {
+    constructor(encoding = 'utf-8') {
+        this._encoding = encoding;
+        this.index = 0;
+        this.buffer = Buffer.allocUnsafe(DefaultSize);
+    }
+    get encoding() {
+        return this._encoding;
+    }
+    append(chunk) {
+        let toAppend;
+        if (typeof chunk === 'string') {
+            toAppend = Buffer.from(chunk, this._encoding);
+        }
+        else {
+            toAppend = chunk;
+        }
+        if (this.buffer.length - this.index >= toAppend.length) {
+            this.buffer.set(toAppend, this.index);
+        }
+        else {
+            var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
+            if (this.index === 0) {
+                this.buffer = Buffer.allocUnsafe(newSize);
+                this.buffer.set(toAppend);
+            }
+            else {
+                this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
+            }
+        }
+        this.index += toAppend.length;
+    }
+    tryReadHeaders() {
+        let current = 0;
+        while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
+            current++;
+        }
+        // No header / body separator found (e.g CRLFCRLF)
+        if (current + 3 >= this.index) {
+            return undefined;
+        }
+        const result = new Map();
+        const headers = this.buffer.toString('ascii', 0, current).split(CRLF);
+        headers.forEach((header) => {
+            let index = header.indexOf(':');
+            if (index === -1) {
+                throw new Error('Message header must separate key and value using :');
+            }
+            let key = header.substr(0, index);
+            let value = header.substr(index + 1).trim();
+            result.set(key, value);
+        });
+        let nextStart = current + 4;
+        this.buffer = this.buffer.slice(nextStart);
+        this.index = this.index - nextStart;
+        return result;
+    }
+    tryReadBody(length) {
+        if (this.index < length) {
+            return undefined;
+        }
+        const result = Buffer.alloc(length);
+        this.buffer.copy(result, 0, 0, length);
+        const nextStart = length;
+        this.buffer.copy(this.buffer, 0, nextStart);
+        this.index = this.index - nextStart;
+        return result;
+    }
+    get numberOfBytes() {
+        return this.index;
+    }
+}
+class ReadableStreamWrapper {
+    constructor(stream) {
+        this.stream = stream;
+    }
+    onClose(listener) {
+        this.stream.on('close', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('close', listener));
+    }
+    onError(listener) {
+        this.stream.on('error', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('error', listener));
+    }
+    onEnd(listener) {
+        this.stream.on('end', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('end', listener));
+    }
+    onData(listener) {
+        this.stream.on('data', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('data', listener));
+    }
+}
+class WritableStreamWrapper {
+    constructor(stream) {
+        this.stream = stream;
+    }
+    onClose(listener) {
+        this.stream.on('close', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('close', listener));
+    }
+    onError(listener) {
+        this.stream.on('error', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('error', listener));
+    }
+    onEnd(listener) {
+        this.stream.on('end', listener);
+        return disposable_1.Disposable.create(() => this.stream.off('end', listener));
+    }
+    write(data, encoding) {
+        return new Promise((resolve, reject) => {
+            const callback = (error) => {
+                if (error === undefined || error === null) {
+                    resolve();
+                }
+                else {
+                    reject(error);
+                }
+            };
+            if (typeof data === 'string') {
+                this.stream.write(data, encoding, callback);
+            }
+            else {
+                this.stream.write(data, callback);
+            }
+        });
+    }
+    end() {
+        this.stream.end();
+    }
+}
+const _ril = Object.freeze({
+    messageBuffer: Object.freeze({
+        create: (encoding) => new MessageBuffer(encoding)
+    }),
+    applicationJson: Object.freeze({
+        encoder: Object.freeze({
+            name: 'application/json',
+            encode: (msg, options) => {
+                return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));
+            }
+        }),
+        decoder: Object.freeze({
+            name: 'application/json',
+            decode: (buffer, options) => {
+                if (buffer instanceof Buffer) {
+                    return Promise.resolve(JSON.parse(buffer.toString(options.charset)));
+                }
+                else {
+                    return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));
+                }
+            }
+        })
+    }),
+    stream: Object.freeze({
+        asReadableStream: (socket) => new ReadableStreamWrapper(socket),
+        asWritableStream: (socket) => new WritableStreamWrapper(socket)
+    }),
+    console: console,
+    timer: Object.freeze({
+        setTimeout(callback, ms, ...args) {
+            return setTimeout(callback, ms, ...args);
+        },
+        clearTimeout(handle) {
+            clearTimeout(handle);
+        },
+        setImmediate(callback, ...args) {
+            return setImmediate(callback, ...args);
+        },
+        clearImmediate(handle) {
+            clearImmediate(handle);
+        }
+    })
+});
+function RIL() {
+    return _ril;
+}
+(function (RIL) {
+    function install() {
+        ral_1.default.install(_ril);
+    }
+    RIL.install = install;
+})(RIL || (RIL = {}));
+exports.default = RIL;
+//# sourceMappingURL=ril.js.map
+
+/***/ }),
+/* 48 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+let _ral;
+function RAL() {
+    if (_ral === undefined) {
+        throw new Error(`No runtime abstraction layer installed`);
+    }
+    return _ral;
+}
+(function (RAL) {
+    function install(ral) {
+        if (ral === undefined) {
+            throw new Error(`No runtime abstraction layer provided`);
+        }
+        _ral = ral;
+    }
+    RAL.install = install;
+})(RAL || (RAL = {}));
+exports.default = RAL;
+//# sourceMappingURL=ral.js.map
+
+/***/ }),
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+var Disposable;
+(function (Disposable) {
+    function create(func) {
+        return {
+            dispose: func
+        };
+    }
+    Disposable.create = create;
+})(Disposable = exports.Disposable || (exports.Disposable = {}));
+//# sourceMappingURL=disposable.js.map
+
+/***/ }),
+/* 50 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+/// <reference path="../../typings/thenable.d.ts" />
+Object.defineProperty(exports, "__esModule", { value: true });
+const messages_1 = __webpack_require__(51);
+exports.RequestType = messages_1.RequestType;
+exports.RequestType0 = messages_1.RequestType0;
+exports.RequestType1 = messages_1.RequestType1;
+exports.RequestType2 = messages_1.RequestType2;
+exports.RequestType3 = messages_1.RequestType3;
+exports.RequestType4 = messages_1.RequestType4;
+exports.RequestType5 = messages_1.RequestType5;
+exports.RequestType6 = messages_1.RequestType6;
+exports.RequestType7 = messages_1.RequestType7;
+exports.RequestType8 = messages_1.RequestType8;
+exports.RequestType9 = messages_1.RequestType9;
+exports.ResponseError = messages_1.ResponseError;
+exports.ErrorCodes = messages_1.ErrorCodes;
+exports.NotificationType = messages_1.NotificationType;
+exports.NotificationType0 = messages_1.NotificationType0;
+exports.NotificationType1 = messages_1.NotificationType1;
+exports.NotificationType2 = messages_1.NotificationType2;
+exports.NotificationType3 = messages_1.NotificationType3;
+exports.NotificationType4 = messages_1.NotificationType4;
+exports.NotificationType5 = messages_1.NotificationType5;
+exports.NotificationType6 = messages_1.NotificationType6;
+exports.NotificationType7 = messages_1.NotificationType7;
+exports.NotificationType8 = messages_1.NotificationType8;
+exports.NotificationType9 = messages_1.NotificationType9;
+const disposable_1 = __webpack_require__(49);
+exports.Disposable = disposable_1.Disposable;
+const events_1 = __webpack_require__(53);
+exports.Event = events_1.Event;
+exports.Emitter = events_1.Emitter;
+const cancellation_1 = __webpack_require__(54);
+exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
+exports.CancellationToken = cancellation_1.CancellationToken;
+const messageReader_1 = __webpack_require__(55);
+exports.MessageReader = messageReader_1.MessageReader;
+exports.AbstractMessageReader = messageReader_1.AbstractMessageReader;
+exports.ReadableStreamMessageReader = messageReader_1.ReadableStreamMessageReader;
+const messageWriter_1 = __webpack_require__(56);
+exports.MessageWriter = messageWriter_1.MessageWriter;
+exports.AbstractMessageWriter = messageWriter_1.AbstractMessageWriter;
+exports.WriteableStreamMessageWriter = messageWriter_1.WriteableStreamMessageWriter;
+const connection_1 = __webpack_require__(58);
+exports.ConnectionStrategy = connection_1.ConnectionStrategy;
+exports.ConnectionOptions = connection_1.ConnectionOptions;
+exports.NullLogger = connection_1.NullLogger;
+exports.createMessageConnection = connection_1.createMessageConnection;
+exports.ProgressType = connection_1.ProgressType;
+exports.Trace = connection_1.Trace;
+exports.TraceFormat = connection_1.TraceFormat;
+exports.SetTraceNotification = connection_1.SetTraceNotification;
+exports.LogTraceNotification = connection_1.LogTraceNotification;
+exports.ConnectionErrors = connection_1.ConnectionErrors;
+exports.ConnectionError = connection_1.ConnectionError;
+exports.CancellationReceiverStrategy = connection_1.CancellationReceiverStrategy;
+exports.CancellationSenderStrategy = connection_1.CancellationSenderStrategy;
+exports.CancellationStrategy = connection_1.CancellationStrategy;
+const ral_1 = __webpack_require__(48);
+exports.RAL = ral_1.default;
+//# sourceMappingURL=api.js.map
+
+/***/ }),
+/* 51 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const is = __webpack_require__(52);
+/**
+ * Predefined error codes.
+ */
+var ErrorCodes;
+(function (ErrorCodes) {
+    // Defined by JSON RPC
+    ErrorCodes.ParseError = -32700;
+    ErrorCodes.InvalidRequest = -32600;
+    ErrorCodes.MethodNotFound = -32601;
+    ErrorCodes.InvalidParams = -32602;
+    ErrorCodes.InternalError = -32603;
+    ErrorCodes.serverErrorStart = -32099;
+    ErrorCodes.serverErrorEnd = -32000;
+    ErrorCodes.ServerNotInitialized = -32002;
+    ErrorCodes.UnknownErrorCode = -32001;
+    // Defined by the protocol.
+    ErrorCodes.RequestCancelled = -32800;
+    ErrorCodes.ContentModified = -32801;
+    // Defined by VSCode library.
+    ErrorCodes.MessageWriteError = 1;
+    ErrorCodes.MessageReadError = 2;
+})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
+/**
+ * An error object return in a response in case a request
+ * has failed.
+ */
+class ResponseError extends Error {
+    constructor(code, message, data) {
+        super(message);
+        this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
+        this.data = data;
+        Object.setPrototypeOf(this, ResponseError.prototype);
+    }
+    toJson() {
+        return {
+            code: this.code,
+            message: this.message,
+            data: this.data,
+        };
+    }
+}
+exports.ResponseError = ResponseError;
+/**
+ * An abstract implementation of a MessageType.
+ */
+class AbstractMessageSignature {
+    constructor(_method, _numberOfParams) {
+        this._method = _method;
+        this._numberOfParams = _numberOfParams;
+    }
+    get method() {
+        return this._method;
+    }
+    get numberOfParams() {
+        return this._numberOfParams;
+    }
+}
+exports.AbstractMessageSignature = AbstractMessageSignature;
+/**
+ * Classes to type request response pairs
+ *
+ * The type parameter RO will be removed in the next major version
+ * of the JSON RPC library since it is a LSP concept and doesn't
+ * belong here. For now it is tagged as default never.
+ */
+class RequestType0 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 0);
+    }
+}
+exports.RequestType0 = RequestType0;
+class RequestType extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+    }
+}
+exports.RequestType = RequestType;
+class RequestType1 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+    }
+}
+exports.RequestType1 = RequestType1;
+class RequestType2 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 2);
+    }
+}
+exports.RequestType2 = RequestType2;
+class RequestType3 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 3);
+    }
+}
+exports.RequestType3 = RequestType3;
+class RequestType4 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 4);
+    }
+}
+exports.RequestType4 = RequestType4;
+class RequestType5 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 5);
+    }
+}
+exports.RequestType5 = RequestType5;
+class RequestType6 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 6);
+    }
+}
+exports.RequestType6 = RequestType6;
+class RequestType7 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 7);
+    }
+}
+exports.RequestType7 = RequestType7;
+class RequestType8 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 8);
+    }
+}
+exports.RequestType8 = RequestType8;
+class RequestType9 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 9);
+    }
+}
+exports.RequestType9 = RequestType9;
+/**
+ * The type parameter RO will be removed in the next major version
+ * of the JSON RPC library since it is a LSP concept and doesn't
+ * belong here. For now it is tagged as default never.
+ */
+class NotificationType extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+        this._ = undefined;
+    }
+}
+exports.NotificationType = NotificationType;
+class NotificationType0 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 0);
+    }
+}
+exports.NotificationType0 = NotificationType0;
+class NotificationType1 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 1);
+    }
+}
+exports.NotificationType1 = NotificationType1;
+class NotificationType2 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 2);
+    }
+}
+exports.NotificationType2 = NotificationType2;
+class NotificationType3 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 3);
+    }
+}
+exports.NotificationType3 = NotificationType3;
+class NotificationType4 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 4);
+    }
+}
+exports.NotificationType4 = NotificationType4;
+class NotificationType5 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 5);
+    }
+}
+exports.NotificationType5 = NotificationType5;
+class NotificationType6 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 6);
+    }
+}
+exports.NotificationType6 = NotificationType6;
+class NotificationType7 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 7);
+    }
+}
+exports.NotificationType7 = NotificationType7;
+class NotificationType8 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 8);
+    }
+}
+exports.NotificationType8 = NotificationType8;
+class NotificationType9 extends AbstractMessageSignature {
+    constructor(method) {
+        super(method, 9);
+    }
+}
+exports.NotificationType9 = NotificationType9;
+/**
+ * Tests if the given message is a request message
+ */
+function isRequestMessage(message) {
+    const candidate = message;
+    return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
+}
+exports.isRequestMessage = isRequestMessage;
+/**
+ * Tests if the given message is a notification message
+ */
+function isNotificationMessage(message) {
+    const candidate = message;
+    return candidate && is.string(candidate.method) && message.id === void 0;
+}
+exports.isNotificationMessage = isNotificationMessage;
+/**
+ * Tests if the given message is a response message
+ */
+function isResponseMessage(message) {
+    const candidate = message;
+    return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
+}
+exports.isResponseMessage = isResponseMessage;
+//# sourceMappingURL=messages.js.map
+
+/***/ }),
+/* 52 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+function boolean(value) {
+    return value === true || value === false;
+}
+exports.boolean = boolean;
+function string(value) {
+    return typeof value === 'string' || value instanceof String;
+}
+exports.string = string;
+function number(value) {
+    return typeof value === 'number' || value instanceof Number;
+}
+exports.number = number;
+function error(value) {
+    return value instanceof Error;
+}
+exports.error = error;
+function func(value) {
+    return typeof value === 'function';
+}
+exports.func = func;
+function array(value) {
+    return Array.isArray(value);
+}
+exports.array = array;
+function stringArray(value) {
+    return array(value) && value.every(elem => string(elem));
+}
+exports.stringArray = stringArray;
+//# sourceMappingURL=is.js.map
+
+/***/ }),
+/* 53 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+var Event;
+(function (Event) {
+    const _disposable = { dispose() { } };
+    Event.None = function () { return _disposable; };
+})(Event = exports.Event || (exports.Event = {}));
+class CallbackList {
+    add(callback, context = null, bucket) {
+        if (!this._callbacks) {
+            this._callbacks = [];
+            this._contexts = [];
+        }
+        this._callbacks.push(callback);
+        this._contexts.push(context);
+        if (Array.isArray(bucket)) {
+            bucket.push({ dispose: () => this.remove(callback, context) });
+        }
+    }
+    remove(callback, context = null) {
+        if (!this._callbacks) {
+            return;
+        }
+        let foundCallbackWithDifferentContext = false;
+        for (let i = 0, len = this._callbacks.length; i < len; i++) {
+            if (this._callbacks[i] === callback) {
+                if (this._contexts[i] === context) {
+                    // callback & context match => remove it
+                    this._callbacks.splice(i, 1);
+                    this._contexts.splice(i, 1);
+                    return;
+                }
+                else {
+                    foundCallbackWithDifferentContext = true;
+                }
+            }
+        }
+        if (foundCallbackWithDifferentContext) {
+            throw new Error('When adding a listener with a context, you should remove it with the same context');
+        }
+    }
+    invoke(...args) {
+        if (!this._callbacks) {
+            return [];
+        }
+        const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
+        for (let i = 0, len = callbacks.length; i < len; i++) {
+            try {
+                ret.push(callbacks[i].apply(contexts[i], args));
+            }
+            catch (e) {
+                // eslint-disable-next-line no-console
+                ral_1.default().console.error(e);
+            }
+        }
+        return ret;
+    }
+    isEmpty() {
+        return !this._callbacks || this._callbacks.length === 0;
+    }
+    dispose() {
+        this._callbacks = undefined;
+        this._contexts = undefined;
+    }
+}
+class Emitter {
+    constructor(_options) {
+        this._options = _options;
+    }
+    /**
+     * For the public to allow to subscribe
+     * to events from this Emitter
+     */
+    get event() {
+        if (!this._event) {
+            this._event = (listener, thisArgs, disposables) => {
+                if (!this._callbacks) {
+                    this._callbacks = new CallbackList();
+                }
+                if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
+                    this._options.onFirstListenerAdd(this);
+                }
+                this._callbacks.add(listener, thisArgs);
+                const result = {
+                    dispose: () => {
+                        if (!this._callbacks) {
+                            // disposable is disposed after emitter is disposed.
+                            return;
+                        }
+                        this._callbacks.remove(listener, thisArgs);
+                        result.dispose = Emitter._noop;
+                        if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
+                            this._options.onLastListenerRemove(this);
+                        }
+                    }
+                };
+                if (Array.isArray(disposables)) {
+                    disposables.push(result);
+                }
+                return result;
+            };
+        }
+        return this._event;
+    }
+    /**
+     * To be kept private to fire an event to
+     * subscribers
+     */
+    fire(event) {
+        if (this._callbacks) {
+            this._callbacks.invoke.call(this._callbacks, event);
+        }
+    }
+    dispose() {
+        if (this._callbacks) {
+            this._callbacks.dispose();
+            this._callbacks = undefined;
+        }
+    }
+}
+exports.Emitter = Emitter;
+Emitter._noop = function () { };
+//# sourceMappingURL=events.js.map
+
+/***/ }),
+/* 54 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+const Is = __webpack_require__(52);
+const events_1 = __webpack_require__(53);
+var CancellationToken;
+(function (CancellationToken) {
+    CancellationToken.None = Object.freeze({
+        isCancellationRequested: false,
+        onCancellationRequested: events_1.Event.None
+    });
+    CancellationToken.Cancelled = Object.freeze({
+        isCancellationRequested: true,
+        onCancellationRequested: events_1.Event.None
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && (candidate === CancellationToken.None
+            || candidate === CancellationToken.Cancelled
+            || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
+    }
+    CancellationToken.is = is;
+})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
+const shortcutEvent = Object.freeze(function (callback, context) {
+    const handle = ral_1.default().timer.setTimeout(callback.bind(context), 0);
+    return { dispose() { ral_1.default().timer.clearTimeout(handle); } };
+});
+class MutableToken {
+    constructor() {
+        this._isCancelled = false;
+    }
+    cancel() {
+        if (!this._isCancelled) {
+            this._isCancelled = true;
+            if (this._emitter) {
+                this._emitter.fire(undefined);
+                this.dispose();
+            }
+        }
+    }
+    get isCancellationRequested() {
+        return this._isCancelled;
+    }
+    get onCancellationRequested() {
+        if (this._isCancelled) {
+            return shortcutEvent;
+        }
+        if (!this._emitter) {
+            this._emitter = new events_1.Emitter();
+        }
+        return this._emitter.event;
+    }
+    dispose() {
+        if (this._emitter) {
+            this._emitter.dispose();
+            this._emitter = undefined;
+        }
+    }
+}
+class CancellationTokenSource {
+    get token() {
+        if (!this._token) {
+            // be lazy and create the token only when
+            // actually needed
+            this._token = new MutableToken();
+        }
+        return this._token;
+    }
+    cancel() {
+        if (!this._token) {
+            // save an object by returning the default
+            // cancelled token when cancellation happens
+            // before someone asks for the token
+            this._token = CancellationToken.Cancelled;
+        }
+        else {
+            this._token.cancel();
+        }
+    }
+    dispose() {
+        if (!this._token) {
+            // ensure to initialize with an empty token if we had none
+            this._token = CancellationToken.None;
+        }
+        else if (this._token instanceof MutableToken) {
+            // actually dispose
+            this._token.dispose();
+        }
+    }
+}
+exports.CancellationTokenSource = CancellationTokenSource;
+//# sourceMappingURL=cancellation.js.map
+
+/***/ }),
+/* 55 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+const Is = __webpack_require__(52);
+const events_1 = __webpack_require__(53);
+var MessageReader;
+(function (MessageReader) {
+    function is(value) {
+        let candidate = value;
+        return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
+            Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
+    }
+    MessageReader.is = is;
+})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
+class AbstractMessageReader {
+    constructor() {
+        this.errorEmitter = new events_1.Emitter();
+        this.closeEmitter = new events_1.Emitter();
+        this.partialMessageEmitter = new events_1.Emitter();
+    }
+    dispose() {
+        this.errorEmitter.dispose();
+        this.closeEmitter.dispose();
+    }
+    get onError() {
+        return this.errorEmitter.event;
+    }
+    fireError(error) {
+        this.errorEmitter.fire(this.asError(error));
+    }
+    get onClose() {
+        return this.closeEmitter.event;
+    }
+    fireClose() {
+        this.closeEmitter.fire(undefined);
+    }
+    get onPartialMessage() {
+        return this.partialMessageEmitter.event;
+    }
+    firePartialMessage(info) {
+        this.partialMessageEmitter.fire(info);
+    }
+    asError(error) {
+        if (error instanceof Error) {
+            return error;
+        }
+        else {
+            return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
+        }
+    }
+}
+exports.AbstractMessageReader = AbstractMessageReader;
+var ResolvedMessageReaderOptions;
+(function (ResolvedMessageReaderOptions) {
+    function fromOptions(options) {
+        var _a;
+        let charset;
+        let result;
+        let contentDecoder;
+        const contentDecoders = new Map();
+        let contentTypeDecoder;
+        const contentTypeDecoders = new Map();
+        if (options === undefined || typeof options === 'string') {
+            charset = options !== null && options !== void 0 ? options : 'utf-8';
+        }
+        else {
+            charset = (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8';
+            if (options.contentDecoder !== undefined) {
+                contentDecoder = options.contentDecoder;
+                contentDecoders.set(contentDecoder.name, contentDecoder);
+            }
+            if (options.contentDecoders !== undefined) {
+                for (const decoder of options.contentDecoders) {
+                    contentDecoders.set(decoder.name, decoder);
+                }
+            }
+            if (options.contentTypeDecoder !== undefined) {
+                contentTypeDecoder = options.contentTypeDecoder;
+                contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
+            }
+            if (options.contentTypeDecoders !== undefined) {
+                for (const decoder of options.contentTypeDecoders) {
+                    contentTypeDecoders.set(decoder.name, decoder);
+                }
+            }
+        }
+        if (contentTypeDecoder === undefined) {
+            contentTypeDecoder = ral_1.default().applicationJson.decoder;
+            contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);
+        }
+        return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };
+    }
+    ResolvedMessageReaderOptions.fromOptions = fromOptions;
+})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));
+class ReadableStreamMessageReader extends AbstractMessageReader {
+    constructor(readable, options) {
+        super();
+        this.readable = readable;
+        this.options = ResolvedMessageReaderOptions.fromOptions(options);
+        this.buffer = ral_1.default().messageBuffer.create(this.options.charset);
+        this._partialMessageTimeout = 10000;
+        this.nextMessageLength = -1;
+        this.messageToken = 0;
+    }
+    set partialMessageTimeout(timeout) {
+        this._partialMessageTimeout = timeout;
+    }
+    get partialMessageTimeout() {
+        return this._partialMessageTimeout;
+    }
+    listen(callback) {
+        this.nextMessageLength = -1;
+        this.messageToken = 0;
+        this.partialMessageTimer = undefined;
+        this.callback = callback;
+        const result = this.readable.onData((data) => {
+            this.onData(data);
+        });
+        this.readable.onError((error) => this.fireError(error));
+        this.readable.onClose(() => this.fireClose());
+        return result;
+    }
+    onData(data) {
+        this.buffer.append(data);
+        while (true) {
+            if (this.nextMessageLength === -1) {
+                const headers = this.buffer.tryReadHeaders();
+                if (!headers) {
+                    return;
+                }
+                const contentLength = headers.get('Content-Length');
+                if (!contentLength) {
+                    throw new Error('Header must provide a Content-Length property.');
+                }
+                const length = parseInt(contentLength);
+                if (isNaN(length)) {
+                    throw new Error('Content-Length value must be a number.');
+                }
+                this.nextMessageLength = length;
+            }
+            const body = this.buffer.tryReadBody(this.nextMessageLength);
+            if (body === undefined) {
+                /** We haven't received the full message yet. */
+                this.setPartialMessageTimer();
+                return;
+            }
+            this.clearPartialMessageTimer();
+            this.nextMessageLength = -1;
+            let p;
+            if (this.options.contentDecoder !== undefined) {
+                p = this.options.contentDecoder.decode(body);
+            }
+            else {
+                p = Promise.resolve(body);
+            }
+            p.then((value) => {
+                this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {
+                    this.callback(msg);
+                }, (error) => {
+                    this.fireError(error);
+                });
+            }, (error) => {
+                this.fireError(error);
+            });
+        }
+    }
+    clearPartialMessageTimer() {
+        if (this.partialMessageTimer) {
+            ral_1.default().timer.clearTimeout(this.partialMessageTimer);
+            this.partialMessageTimer = undefined;
+        }
+    }
+    setPartialMessageTimer() {
+        this.clearPartialMessageTimer();
+        if (this._partialMessageTimeout <= 0) {
+            return;
+        }
+        this.partialMessageTimer = ral_1.default().timer.setTimeout((token, timeout) => {
+            this.partialMessageTimer = undefined;
+            if (token === this.messageToken) {
+                this.firePartialMessage({ messageToken: token, waitingTime: timeout });
+                this.setPartialMessageTimer();
+            }
+        }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
+    }
+}
+exports.ReadableStreamMessageReader = ReadableStreamMessageReader;
+//# sourceMappingURL=messageReader.js.map
+
+/***/ }),
+/* 56 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+const Is = __webpack_require__(52);
+const semaphore_1 = __webpack_require__(57);
+const events_1 = __webpack_require__(53);
+const ContentLength = 'Content-Length: ';
+const CRLF = '\r\n';
+var MessageWriter;
+(function (MessageWriter) {
+    function is(value) {
+        let candidate = value;
+        return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
+            Is.func(candidate.onError) && Is.func(candidate.write);
+    }
+    MessageWriter.is = is;
+})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
+class AbstractMessageWriter {
+    constructor() {
+        this.errorEmitter = new events_1.Emitter();
+        this.closeEmitter = new events_1.Emitter();
+    }
+    dispose() {
+        this.errorEmitter.dispose();
+        this.closeEmitter.dispose();
+    }
+    get onError() {
+        return this.errorEmitter.event;
+    }
+    fireError(error, message, count) {
+        this.errorEmitter.fire([this.asError(error), message, count]);
+    }
+    get onClose() {
+        return this.closeEmitter.event;
+    }
+    fireClose() {
+        this.closeEmitter.fire(undefined);
+    }
+    asError(error) {
+        if (error instanceof Error) {
+            return error;
+        }
+        else {
+            return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
+        }
+    }
+}
+exports.AbstractMessageWriter = AbstractMessageWriter;
+var ResolvedMessageWriterOptions;
+(function (ResolvedMessageWriterOptions) {
+    function fromOptions(options) {
+        var _a, _b;
+        if (options === undefined || typeof options === 'string') {
+            return { charset: options !== null && options !== void 0 ? options : 'utf-8', contentTypeEncoder: ral_1.default().applicationJson.encoder };
+        }
+        else {
+            return { charset: (_a = options.charset) !== null && _a !== void 0 ? _a : 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: (_b = options.contentTypeEncoder) !== null && _b !== void 0 ? _b : ral_1.default().applicationJson.encoder };
+        }
+    }
+    ResolvedMessageWriterOptions.fromOptions = fromOptions;
+})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));
+class WriteableStreamMessageWriter extends AbstractMessageWriter {
+    constructor(writable, options) {
+        super();
+        this.writable = writable;
+        this.options = ResolvedMessageWriterOptions.fromOptions(options);
+        this.errorCount = 0;
+        this.writeSemaphore = new semaphore_1.Semaphore(1);
+        this.writable.onError((error) => this.fireError(error));
+        this.writable.onClose(() => this.fireClose());
+    }
+    async write(msg) {
+        const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {
+            if (this.options.contentEncoder !== undefined) {
+                return this.options.contentEncoder.encode(buffer);
+            }
+            else {
+                return buffer;
+            }
+        });
+        return payload.then((buffer) => {
+            const headers = [];
+            headers.push(ContentLength, buffer.byteLength.toString(), CRLF);
+            headers.push(CRLF);
+            return this.doWrite(msg, headers, buffer);
+        }, (error) => {
+            this.fireError(error);
+            throw error;
+        });
+    }
+    doWrite(msg, headers, data) {
+        return this.writeSemaphore.lock(async () => {
+            try {
+                await this.writable.write(headers.join(''), 'ascii');
+                return this.writable.write(data);
+            }
+            catch (error) {
+                this.handleError(error, msg);
+            }
+        });
+    }
+    handleError(error, msg) {
+        this.errorCount++;
+        this.fireError(error, msg, this.errorCount);
+    }
+}
+exports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;
+//# sourceMappingURL=messageWriter.js.map
+
+/***/ }),
+/* 57 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+class Semaphore {
+    constructor(capacity = 1) {
+        if (capacity <= 0) {
+            throw new Error('Capacity must be greater than 0');
+        }
+        this._capacity = capacity;
+        this._active = 0;
+        this._waiting = [];
+    }
+    lock(thunk) {
+        return new Promise((resolve, reject) => {
+            this._waiting.push({ thunk, resolve, reject });
+            this.runNext();
+        });
+    }
+    get active() {
+        return this._active;
+    }
+    runNext() {
+        if (this._waiting.length === 0 || this._active === this._capacity) {
+            return;
+        }
+        ral_1.default().timer.setImmediate(() => this.doRunNext());
+    }
+    doRunNext() {
+        if (this._waiting.length === 0 || this._active === this._capacity) {
+            return;
+        }
+        const next = this._waiting.shift();
+        this._active++;
+        if (this._active > this._capacity) {
+            throw new Error(`To many thunks active`);
+        }
+        try {
+            const result = next.thunk();
+            if (result instanceof Promise) {
+                result.then((value) => {
+                    this._active--;
+                    next.resolve(value);
+                    this.runNext();
+                }, (err) => {
+                    this._active--;
+                    next.reject(err);
+                    this.runNext();
+                });
+            }
+            else {
+                this._active--;
+                next.resolve(result);
+                this.runNext();
+            }
+        }
+        catch (err) {
+            this._active--;
+            next.reject(err);
+            this.runNext();
+        }
+    }
+}
+exports.Semaphore = Semaphore;
+//# sourceMappingURL=semaphore.js.map
+
+/***/ }),
+/* 58 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const ral_1 = __webpack_require__(48);
+const Is = __webpack_require__(52);
+const messages_1 = __webpack_require__(51);
+const linkedMap_1 = __webpack_require__(59);
+const events_1 = __webpack_require__(53);
+const cancellation_1 = __webpack_require__(54);
+var CancelNotification;
+(function (CancelNotification) {
+    CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
+})(CancelNotification || (CancelNotification = {}));
+var ProgressNotification;
+(function (ProgressNotification) {
+    ProgressNotification.type = new messages_1.NotificationType('$/progress');
+})(ProgressNotification || (ProgressNotification = {}));
+class ProgressType {
+    constructor() {
+    }
+}
+exports.ProgressType = ProgressType;
+exports.NullLogger = Object.freeze({
+    error: () => { },
+    warn: () => { },
+    info: () => { },
+    log: () => { }
+});
+var Trace;
+(function (Trace) {
+    Trace[Trace["Off"] = 0] = "Off";
+    Trace[Trace["Messages"] = 1] = "Messages";
+    Trace[Trace["Verbose"] = 2] = "Verbose";
+})(Trace = exports.Trace || (exports.Trace = {}));
+(function (Trace) {
+    function fromString(value) {
+        if (!Is.string(value)) {
+            return Trace.Off;
+        }
+        value = value.toLowerCase();
+        switch (value) {
+            case 'off':
+                return Trace.Off;
+            case 'messages':
+                return Trace.Messages;
+            case 'verbose':
+                return Trace.Verbose;
+            default:
+                return Trace.Off;
+        }
+    }
+    Trace.fromString = fromString;
+    function toString(value) {
+        switch (value) {
+            case Trace.Off:
+                return 'off';
+            case Trace.Messages:
+                return 'messages';
+            case Trace.Verbose:
+                return 'verbose';
+            default:
+                return 'off';
+        }
+    }
+    Trace.toString = toString;
+})(Trace = exports.Trace || (exports.Trace = {}));
+var TraceFormat;
+(function (TraceFormat) {
+    TraceFormat["Text"] = "text";
+    TraceFormat["JSON"] = "json";
+})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
+(function (TraceFormat) {
+    function fromString(value) {
+        value = value.toLowerCase();
+        if (value === 'json') {
+            return TraceFormat.JSON;
+        }
+        else {
+            return TraceFormat.Text;
+        }
+    }
+    TraceFormat.fromString = fromString;
+})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
+var SetTraceNotification;
+(function (SetTraceNotification) {
+    SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
+})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
+var LogTraceNotification;
+(function (LogTraceNotification) {
+    LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
+})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
+var ConnectionErrors;
+(function (ConnectionErrors) {
+    /**
+     * The connection is closed.
+     */
+    ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
+    /**
+     * The connection got disposed.
+     */
+    ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
+    /**
+     * The connection is already in listening mode.
+     */
+    ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
+})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
+class ConnectionError extends Error {
+    constructor(code, message) {
+        super(message);
+        this.code = code;
+        Object.setPrototypeOf(this, ConnectionError.prototype);
+    }
+}
+exports.ConnectionError = ConnectionError;
+var ConnectionStrategy;
+(function (ConnectionStrategy) {
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.func(candidate.cancelUndispatched);
+    }
+    ConnectionStrategy.is = is;
+})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
+var CancellationReceiverStrategy;
+(function (CancellationReceiverStrategy) {
+    CancellationReceiverStrategy.Message = Object.freeze({
+        createCancellationTokenSource(_) {
+            return new cancellation_1.CancellationTokenSource();
+        }
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.func(candidate.createCancellationTokenSource);
+    }
+    CancellationReceiverStrategy.is = is;
+})(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));
+var CancellationSenderStrategy;
+(function (CancellationSenderStrategy) {
+    CancellationSenderStrategy.Message = Object.freeze({
+        sendCancellation(conn, id) {
+            conn.sendNotification(CancelNotification.type, { id });
+        },
+        cleanup(_) { }
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);
+    }
+    CancellationSenderStrategy.is = is;
+})(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));
+var CancellationStrategy;
+(function (CancellationStrategy) {
+    CancellationStrategy.Message = Object.freeze({
+        receiver: CancellationReceiverStrategy.Message,
+        sender: CancellationSenderStrategy.Message
+    });
+    function is(value) {
+        const candidate = value;
+        return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);
+    }
+    CancellationStrategy.is = is;
+})(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));
+var ConnectionOptions;
+(function (ConnectionOptions) {
+    function is(value) {
+        const candidate = value;
+        return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));
+    }
+    ConnectionOptions.is = is;
+})(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {}));
+var ConnectionState;
+(function (ConnectionState) {
+    ConnectionState[ConnectionState["New"] = 1] = "New";
+    ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
+    ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
+    ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
+})(ConnectionState || (ConnectionState = {}));
+function createMessageConnection(messageReader, messageWriter, _logger, options) {
+    const logger = _logger !== undefined ? _logger : exports.NullLogger;
+    let sequenceNumber = 0;
+    let notificationSquenceNumber = 0;
+    let unknownResponseSquenceNumber = 0;
+    const version = '2.0';
+    let starRequestHandler = undefined;
+    const requestHandlers = Object.create(null);
+    let starNotificationHandler = undefined;
+    const notificationHandlers = Object.create(null);
+    const progressHandlers = new Map();
+    let timer;
+    let messageQueue = new linkedMap_1.LinkedMap();
+    let responsePromises = Object.create(null);
+    let requestTokens = Object.create(null);
+    let trace = Trace.Off;
+    let traceFormat = TraceFormat.Text;
+    let tracer;
+    let state = ConnectionState.New;
+    const errorEmitter = new events_1.Emitter();
+    const closeEmitter = new events_1.Emitter();
+    const unhandledNotificationEmitter = new events_1.Emitter();
+    const unhandledProgressEmitter = new events_1.Emitter();
+    const disposeEmitter = new events_1.Emitter();
+    const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;
+    function createRequestQueueKey(id) {
+        return 'req-' + id.toString();
+    }
+    function createResponseQueueKey(id) {
+        if (id === null) {
+            return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
+        }
+        else {
+            return 'res-' + id.toString();
+        }
+    }
+    function createNotificationQueueKey() {
+        return 'not-' + (++notificationSquenceNumber).toString();
+    }
+    function addMessageToQueue(queue, message) {
+        if (messages_1.isRequestMessage(message)) {
+            queue.set(createRequestQueueKey(message.id), message);
+        }
+        else if (messages_1.isResponseMessage(message)) {
+            queue.set(createResponseQueueKey(message.id), message);
+        }
+        else {
+            queue.set(createNotificationQueueKey(), message);
+        }
+    }
+    function cancelUndispatched(_message) {
+        return undefined;
+    }
+    function isListening() {
+        return state === ConnectionState.Listening;
+    }
+    function isClosed() {
+        return state === ConnectionState.Closed;
+    }
+    function isDisposed() {
+        return state === ConnectionState.Disposed;
+    }
+    function closeHandler() {
+        if (state === ConnectionState.New || state === ConnectionState.Listening) {
+            state = ConnectionState.Closed;
+            closeEmitter.fire(undefined);
+        }
+        // If the connection is disposed don't sent close events.
+    }
+    function readErrorHandler(error) {
+        errorEmitter.fire([error, undefined, undefined]);
+    }
+    function writeErrorHandler(data) {
+        errorEmitter.fire(data);
+    }
+    messageReader.onClose(closeHandler);
+    messageReader.onError(readErrorHandler);
+    messageWriter.onClose(closeHandler);
+    messageWriter.onError(writeErrorHandler);
+    function triggerMessageQueue() {
+        if (timer || messageQueue.size === 0) {
+            return;
+        }
+        timer = ral_1.default().timer.setImmediate(() => {
+            timer = undefined;
+            processMessageQueue();
+        });
+    }
+    function processMessageQueue() {
+        if (messageQueue.size === 0) {
+            return;
+        }
+        const message = messageQueue.shift();
+        try {
+            if (messages_1.isRequestMessage(message)) {
+                handleRequest(message);
+            }
+            else if (messages_1.isNotificationMessage(message)) {
+                handleNotification(message);
+            }
+            else if (messages_1.isResponseMessage(message)) {
+                handleResponse(message);
+            }
+            else {
+                handleInvalidMessage(message);
+            }
+        }
+        finally {
+            triggerMessageQueue();
+        }
+    }
+    const callback = (message) => {
+        try {
+            // We have received a cancellation message. Check if the message is still in the queue
+            // and cancel it if allowed to do so.
+            if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
+                const key = createRequestQueueKey(message.params.id);
+                const toCancel = messageQueue.get(key);
+                if (messages_1.isRequestMessage(toCancel)) {
+                    const strategy = options === null || options === void 0 ? void 0 : options.connectionStrategy;
+                    const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
+                    if (response && (response.error !== undefined || response.result !== undefined)) {
+                        messageQueue.delete(key);
+                        response.id = toCancel.id;
+                        traceSendingResponse(response, message.method, Date.now());
+                        messageWriter.write(response);
+                        return;
+                    }
+                }
+            }
+            addMessageToQueue(messageQueue, message);
+        }
+        finally {
+            triggerMessageQueue();
+        }
+    };
+    function handleRequest(requestMessage) {
+        if (isDisposed()) {
+            // we return here silently since we fired an event when the
+            // connection got disposed.
+            return;
+        }
+        function reply(resultOrError, method, startTime) {
+            const message = {
+                jsonrpc: version,
+                id: requestMessage.id
+            };
+            if (resultOrError instanceof messages_1.ResponseError) {
+                message.error = resultOrError.toJson();
+            }
+            else {
+                message.result = resultOrError === undefined ? null : resultOrError;
+            }
+            traceSendingResponse(message, method, startTime);
+            messageWriter.write(message);
+        }
+        function replyError(error, method, startTime) {
+            const message = {
+                jsonrpc: version,
+                id: requestMessage.id,
+                error: error.toJson()
+            };
+            traceSendingResponse(message, method, startTime);
+            messageWriter.write(message);
+        }
+        function replySuccess(result, method, startTime) {
+            // The JSON RPC defines that a response must either have a result or an error
+            // So we can't treat undefined as a valid response result.
+            if (result === undefined) {
+                result = null;
+            }
+            const message = {
+                jsonrpc: version,
+                id: requestMessage.id,
+                result: result
+            };
+            traceSendingResponse(message, method, startTime);
+            messageWriter.write(message);
+        }
+        traceReceivedRequest(requestMessage);
+        const element = requestHandlers[requestMessage.method];
+        let type;
+        let requestHandler;
+        if (element) {
+            type = element.type;
+            requestHandler = element.handler;
+        }
+        const startTime = Date.now();
+        if (requestHandler || starRequestHandler) {
+            const tokenKey = String(requestMessage.id);
+            const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);
+            requestTokens[tokenKey] = cancellationSource;
+            try {
+                let handlerResult;
+                if (requestMessage.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
+                    handlerResult = requestHandler
+                        ? requestHandler(cancellationSource.token)
+                        : starRequestHandler(requestMessage.method, cancellationSource.token);
+                }
+                else if (Is.array(requestMessage.params) && (type === undefined || type.numberOfParams > 1)) {
+                    handlerResult = requestHandler
+                        ? requestHandler(...requestMessage.params, cancellationSource.token)
+                        : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
+                }
+                else {
+                    handlerResult = requestHandler
+                        ? requestHandler(requestMessage.params, cancellationSource.token)
+                        : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
+                }
+                const promise = handlerResult;
+                if (!handlerResult) {
+                    delete requestTokens[tokenKey];
+                    replySuccess(handlerResult, requestMessage.method, startTime);
+                }
+                else if (promise.then) {
+                    promise.then((resultOrError) => {
+                        delete requestTokens[tokenKey];
+                        reply(resultOrError, requestMessage.method, startTime);
+                    }, error => {
+                        delete requestTokens[tokenKey];
+                        if (error instanceof messages_1.ResponseError) {
+                            replyError(error, requestMessage.method, startTime);
+                        }
+                        else if (error && Is.string(error.message)) {
+                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
+                        }
+                        else {
+                            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
+                        }
+                    });
+                }
+                else {
+                    delete requestTokens[tokenKey];
+                    reply(handlerResult, requestMessage.method, startTime);
+                }
+            }
+            catch (error) {
+                delete requestTokens[tokenKey];
+                if (error instanceof messages_1.ResponseError) {
+                    reply(error, requestMessage.method, startTime);
+                }
+                else if (error && Is.string(error.message)) {
+                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
+                }
+                else {
+                    replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
+                }
+            }
+        }
+        else {
+            replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
+        }
+    }
+    function handleResponse(responseMessage) {
+        if (isDisposed()) {
+            // See handle request.
+            return;
+        }
+        if (responseMessage.id === null) {
+            if (responseMessage.error) {
+                logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
+            }
+            else {
+                logger.error(`Received response message without id. No further error information provided.`);
+            }
+        }
+        else {
+            const key = String(responseMessage.id);
+            const responsePromise = responsePromises[key];
+            traceReceivedResponse(responseMessage, responsePromise);
+            if (responsePromise) {
+                delete responsePromises[key];
+                try {
+                    if (responseMessage.error) {
+                        const error = responseMessage.error;
+                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
+                    }
+                    else if (responseMessage.result !== undefined) {
+                        responsePromise.resolve(responseMessage.result);
+                    }
+                    else {
+                        throw new Error('Should never happen.');
+                    }
+                }
+                catch (error) {
+                    if (error.message) {
+                        logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
+                    }
+                    else {
+                        logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
+                    }
+                }
+            }
+        }
+    }
+    function handleNotification(message) {
+        if (isDisposed()) {
+            // See handle request.
+            return;
+        }
+        let type = undefined;
+        let notificationHandler;
+        if (message.method === CancelNotification.type.method) {
+            notificationHandler = (params) => {
+                const id = params.id;
+                const source = requestTokens[String(id)];
+                if (source) {
+                    source.cancel();
+                }
+            };
+        }
+        else {
+            const element = notificationHandlers[message.method];
+            if (element) {
+                notificationHandler = element.handler;
+                type = element.type;
+            }
+        }
+        if (notificationHandler || starNotificationHandler) {
+            try {
+                traceReceivedNotification(message);
+                if (message.params === undefined || (type !== undefined && type.numberOfParams === 0)) {
+                    notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
+                }
+                else if (Is.array(message.params) && (type === undefined || type.numberOfParams > 1)) {
+                    notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
+                }
+                else {
+                    notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
+                }
+            }
+            catch (error) {
+                if (error.message) {
+                    logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
+                }
+                else {
+                    logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
+                }
+            }
+        }
+        else {
+            unhandledNotificationEmitter.fire(message);
+        }
+    }
+    function handleInvalidMessage(message) {
+        if (!message) {
+            logger.error('Received empty message.');
+            return;
+        }
+        logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
+        // Test whether we find an id to reject the promise
+        const responseMessage = message;
+        if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
+            const key = String(responseMessage.id);
+            const responseHandler = responsePromises[key];
+            if (responseHandler) {
+                responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
+            }
+        }
+    }
+    function traceSendingRequest(message) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose && message.params) {
+                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+            }
+            tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
+        }
+        else {
+            logLSPMessage('send-request', message);
+        }
+    }
+    function traceSendingNotification(message) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.params) {
+                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+                }
+                else {
+                    data = 'No parameters provided.\n\n';
+                }
+            }
+            tracer.log(`Sending notification '${message.method}'.`, data);
+        }
+        else {
+            logLSPMessage('send-notification', message);
+        }
+    }
+    function traceSendingResponse(message, method, startTime) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.error && message.error.data) {
+                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
+                }
+                else {
+                    if (message.result) {
+                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
+                    }
+                    else if (message.error === undefined) {
+                        data = 'No result returned.\n\n';
+                    }
+                }
+            }
+            tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
+        }
+        else {
+            logLSPMessage('send-response', message);
+        }
+    }
+    function traceReceivedRequest(message) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose && message.params) {
+                data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+            }
+            tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
+        }
+        else {
+            logLSPMessage('receive-request', message);
+        }
+    }
+    function traceReceivedNotification(message) {
+        if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.params) {
+                    data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
+                }
+                else {
+                    data = 'No parameters provided.\n\n';
+                }
+            }
+            tracer.log(`Received notification '${message.method}'.`, data);
+        }
+        else {
+            logLSPMessage('receive-notification', message);
+        }
+    }
+    function traceReceivedResponse(message, responsePromise) {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        if (traceFormat === TraceFormat.Text) {
+            let data = undefined;
+            if (trace === Trace.Verbose) {
+                if (message.error && message.error.data) {
+                    data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
+                }
+                else {
+                    if (message.result) {
+                        data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
+                    }
+                    else if (message.error === undefined) {
+                        data = 'No result returned.\n\n';
+                    }
+                }
+            }
+            if (responsePromise) {
+                const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
+                tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
+            }
+            else {
+                tracer.log(`Received response ${message.id} without active response promise.`, data);
+            }
+        }
+        else {
+            logLSPMessage('receive-response', message);
+        }
+    }
+    function logLSPMessage(type, message) {
+        if (!tracer || trace === Trace.Off) {
+            return;
+        }
+        const lspMessage = {
+            isLSPMessage: true,
+            type,
+            message,
+            timestamp: Date.now()
+        };
+        tracer.log(lspMessage);
+    }
+    function throwIfClosedOrDisposed() {
+        if (isClosed()) {
+            throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
+        }
+        if (isDisposed()) {
+            throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
+        }
+    }
+    function throwIfListening() {
+        if (isListening()) {
+            throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
+        }
+    }
+    function throwIfNotListening() {
+        if (!isListening()) {
+            throw new Error('Call listen() first.');
+        }
+    }
+    function undefinedToNull(param) {
+        if (param === undefined) {
+            return null;
+        }
+        else {
+            return param;
+        }
+    }
+    function computeMessageParams(type, params) {
+        let result;
+        const numberOfParams = type.numberOfParams;
+        switch (numberOfParams) {
+            case 0:
+                result = null;
+                break;
+            case 1:
+                result = undefinedToNull(params[0]);
+                break;
+            default:
+                result = [];
+                for (let i = 0; i < params.length && i < numberOfParams; i++) {
+                    result.push(undefinedToNull(params[i]));
+                }
+                if (params.length < numberOfParams) {
+                    for (let i = params.length; i < numberOfParams; i++) {
+                        result.push(null);
+                    }
+                }
+                break;
+        }
+        return result;
+    }
+    const connection = {
+        sendNotification: (type, ...params) => {
+            throwIfClosedOrDisposed();
+            let method;
+            let messageParams;
+            if (Is.string(type)) {
+                method = type;
+                switch (params.length) {
+                    case 0:
+                        messageParams = null;
+                        break;
+                    case 1:
+                        messageParams = params[0];
+                        break;
+                    default:
+                        messageParams = params;
+                        break;
+                }
+            }
+            else {
+                method = type.method;
+                messageParams = computeMessageParams(type, params);
+            }
+            const notificationMessage = {
+                jsonrpc: version,
+                method: method,
+                params: messageParams
+            };
+            traceSendingNotification(notificationMessage);
+            messageWriter.write(notificationMessage);
+        },
+        onNotification: (type, handler) => {
+            throwIfClosedOrDisposed();
+            if (Is.func(type)) {
+                starNotificationHandler = type;
+            }
+            else if (handler) {
+                if (Is.string(type)) {
+                    notificationHandlers[type] = { type: undefined, handler };
+                }
+                else {
+                    notificationHandlers[type.method] = { type, handler };
+                }
+            }
+        },
+        onProgress: (_type, token, handler) => {
+            if (progressHandlers.has(token)) {
+                throw new Error(`Progress handler for token ${token} already registered`);
+            }
+            progressHandlers.set(token, handler);
+            return {
+                dispose: () => {
+                    progressHandlers.delete(token);
+                }
+            };
+        },
+        sendProgress: (_type, token, value) => {
+            connection.sendNotification(ProgressNotification.type, { token, value });
+        },
+        onUnhandledProgress: unhandledProgressEmitter.event,
+        sendRequest: (type, ...params) => {
+            throwIfClosedOrDisposed();
+            throwIfNotListening();
+            let method;
+            let messageParams;
+            let token = undefined;
+            if (Is.string(type)) {
+                method = type;
+                switch (params.length) {
+                    case 0:
+                        messageParams = null;
+                        break;
+                    case 1:
+                        // The cancellation token is optional so it can also be undefined.
+                        if (cancellation_1.CancellationToken.is(params[0])) {
+                            messageParams = null;
+                            token = params[0];
+                        }
+                        else {
+                            messageParams = undefinedToNull(params[0]);
+                        }
+                        break;
+                    default:
+                        const last = params.length - 1;
+                        if (cancellation_1.CancellationToken.is(params[last])) {
+                            token = params[last];
+                            if (params.length === 2) {
+                                messageParams = undefinedToNull(params[0]);
+                            }
+                            else {
+                                messageParams = params.slice(0, last).map(value => undefinedToNull(value));
+                            }
+                        }
+                        else {
+                            messageParams = params.map(value => undefinedToNull(value));
+                        }
+                        break;
+                }
+            }
+            else {
+                method = type.method;
+                messageParams = computeMessageParams(type, params);
+                const numberOfParams = type.numberOfParams;
+                token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
+            }
+            const id = sequenceNumber++;
+            let disposable;
+            if (token) {
+                disposable = token.onCancellationRequested(() => {
+                    cancellationStrategy.sender.sendCancellation(connection, id);
+                });
+            }
+            const result = new Promise((resolve, reject) => {
+                const requestMessage = {
+                    jsonrpc: version,
+                    id: id,
+                    method: method,
+                    params: messageParams
+                };
+                const resolveWithCleanup = (r) => {
+                    resolve(r);
+                    cancellationStrategy.sender.cleanup(id);
+                    disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
+                };
+                const rejectWithCleanup = (r) => {
+                    reject(r);
+                    cancellationStrategy.sender.cleanup(id);
+                    disposable === null || disposable === void 0 ? void 0 : disposable.dispose();
+                };
+                let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };
+                traceSendingRequest(requestMessage);
+                try {
+                    messageWriter.write(requestMessage);
+                }
+                catch (e) {
+                    // Writing the message failed. So we need to reject the promise.
+                    responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
+                    responsePromise = null;
+                }
+                if (responsePromise) {
+                    responsePromises[String(id)] = responsePromise;
+                }
+            });
+            return result;
+        },
+        onRequest: (type, handler) => {
+            throwIfClosedOrDisposed();
+            if (Is.func(type)) {
+                starRequestHandler = type;
+            }
+            else if (handler) {
+                if (Is.string(type)) {
+                    requestHandlers[type] = { type: undefined, handler };
+                }
+                else {
+                    requestHandlers[type.method] = { type, handler };
+                }
+            }
+        },
+        trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
+            let _sendNotification = false;
+            let _traceFormat = TraceFormat.Text;
+            if (sendNotificationOrTraceOptions !== undefined) {
+                if (Is.boolean(sendNotificationOrTraceOptions)) {
+                    _sendNotification = sendNotificationOrTraceOptions;
+                }
+                else {
+                    _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
+                    _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
+                }
+            }
+            trace = _value;
+            traceFormat = _traceFormat;
+            if (trace === Trace.Off) {
+                tracer = undefined;
+            }
+            else {
+                tracer = _tracer;
+            }
+            if (_sendNotification && !isClosed() && !isDisposed()) {
+                connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
+            }
+        },
+        onError: errorEmitter.event,
+        onClose: closeEmitter.event,
+        onUnhandledNotification: unhandledNotificationEmitter.event,
+        onDispose: disposeEmitter.event,
+        dispose: () => {
+            if (isDisposed()) {
+                return;
+            }
+            state = ConnectionState.Disposed;
+            disposeEmitter.fire(undefined);
+            const error = new Error('Connection got disposed.');
+            Object.keys(responsePromises).forEach((key) => {
+                responsePromises[key].reject(error);
+            });
+            responsePromises = Object.create(null);
+            requestTokens = Object.create(null);
+            messageQueue = new linkedMap_1.LinkedMap();
+            // Test for backwards compatibility
+            if (Is.func(messageWriter.dispose)) {
+                messageWriter.dispose();
+            }
+            if (Is.func(messageReader.dispose)) {
+                messageReader.dispose();
+            }
+        },
+        listen: () => {
+            throwIfClosedOrDisposed();
+            throwIfListening();
+            state = ConnectionState.Listening;
+            messageReader.listen(callback);
+        },
+        inspect: () => {
+            // eslint-disable-next-line no-console
+            ral_1.default().console.log('inspect');
+        }
+    };
+    connection.onNotification(LogTraceNotification.type, (params) => {
+        if (trace === Trace.Off || !tracer) {
+            return;
+        }
+        tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
+    });
+    connection.onNotification(ProgressNotification.type, (params) => {
+        const handler = progressHandlers.get(params.token);
+        if (handler) {
+            handler(params.value);
+        }
+        else {
+            unhandledProgressEmitter.fire(params);
+        }
+    });
+    return connection;
+}
+exports.createMessageConnection = createMessageConnection;
+//# sourceMappingURL=connection.js.map
+
+/***/ }),
+/* 59 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+var Touch;
+(function (Touch) {
+    Touch.None = 0;
+    Touch.First = 1;
+    Touch.AsOld = Touch.First;
+    Touch.Last = 2;
+    Touch.AsNew = Touch.Last;
+})(Touch = exports.Touch || (exports.Touch = {}));
+class LinkedMap {
+    constructor() {
+        this[Symbol.toStringTag] = 'LinkedMap';
+        this._map = new Map();
+        this._head = undefined;
+        this._tail = undefined;
+        this._size = 0;
+        this._state = 0;
+    }
+    clear() {
+        this._map.clear();
+        this._head = undefined;
+        this._tail = undefined;
+        this._size = 0;
+        this._state++;
+    }
+    isEmpty() {
+        return !this._head && !this._tail;
+    }
+    get size() {
+        return this._size;
+    }
+    get first() {
+        var _a;
+        return (_a = this._head) === null || _a === void 0 ? void 0 : _a.value;
+    }
+    get last() {
+        var _a;
+        return (_a = this._tail) === null || _a === void 0 ? void 0 : _a.value;
+    }
+    has(key) {
+        return this._map.has(key);
+    }
+    get(key, touch = Touch.None) {
+        const item = this._map.get(key);
+        if (!item) {
+            return undefined;
+        }
+        if (touch !== Touch.None) {
+            this.touch(item, touch);
+        }
+        return item.value;
+    }
+    set(key, value, touch = Touch.None) {
+        let item = this._map.get(key);
+        if (item) {
+            item.value = value;
+            if (touch !== Touch.None) {
+                this.touch(item, touch);
+            }
+        }
+        else {
+            item = { key, value, next: undefined, previous: undefined };
+            switch (touch) {
+                case Touch.None:
+                    this.addItemLast(item);
+                    break;
+                case Touch.First:
+                    this.addItemFirst(item);
+                    break;
+                case Touch.Last:
+                    this.addItemLast(item);
+                    break;
+                default:
+                    this.addItemLast(item);
+                    break;
+            }
+            this._map.set(key, item);
+            this._size++;
+        }
+        return this;
+    }
+    delete(key) {
+        return !!this.remove(key);
+    }
+    remove(key) {
+        const item = this._map.get(key);
+        if (!item) {
+            return undefined;
+        }
+        this._map.delete(key);
+        this.removeItem(item);
+        this._size--;
+        return item.value;
+    }
+    shift() {
+        if (!this._head && !this._tail) {
+            return undefined;
+        }
+        if (!this._head || !this._tail) {
+            throw new Error('Invalid list');
+        }
+        const item = this._head;
+        this._map.delete(item.key);
+        this.removeItem(item);
+        this._size--;
+        return item.value;
+    }
+    forEach(callbackfn, thisArg) {
+        const state = this._state;
+        let current = this._head;
+        while (current) {
+            if (thisArg) {
+                callbackfn.bind(thisArg)(current.value, current.key, this);
+            }
+            else {
+                callbackfn(current.value, current.key, this);
+            }
+            if (this._state !== state) {
+                throw new Error(`LinkedMap got modified during iteration.`);
+            }
+            current = current.next;
+        }
+    }
+    keys() {
+        const map = this;
+        const state = this._state;
+        let current = this._head;
+        const iterator = {
+            [Symbol.iterator]() {
+                return iterator;
+            },
+            next() {
+                if (map._state !== state) {
+                    throw new Error(`LinkedMap got modified during iteration.`);
+                }
+                if (current) {
+                    const result = { value: current.key, done: false };
+                    current = current.next;
+                    return result;
+                }
+                else {
+                    return { value: undefined, done: true };
+                }
+            }
+        };
+        return iterator;
+    }
+    values() {
+        const map = this;
+        const state = this._state;
+        let current = this._head;
+        const iterator = {
+            [Symbol.iterator]() {
+                return iterator;
+            },
+            next() {
+                if (map._state !== state) {
+                    throw new Error(`LinkedMap got modified during iteration.`);
+                }
+                if (current) {
+                    const result = { value: current.value, done: false };
+                    current = current.next;
+                    return result;
+                }
+                else {
+                    return { value: undefined, done: true };
+                }
+            }
+        };
+        return iterator;
+    }
+    entries() {
+        const map = this;
+        const state = this._state;
+        let current = this._head;
+        const iterator = {
+            [Symbol.iterator]() {
+                return iterator;
+            },
+            next() {
+                if (map._state !== state) {
+                    throw new Error(`LinkedMap got modified during iteration.`);
+                }
+                if (current) {
+                    const result = { value: [current.key, current.value], done: false };
+                    current = current.next;
+                    return result;
+                }
+                else {
+                    return { value: undefined, done: true };
+                }
+            }
+        };
+        return iterator;
+    }
+    [Symbol.iterator]() {
+        return this.entries();
+    }
+    trimOld(newSize) {
+        if (newSize >= this.size) {
+            return;
+        }
+        if (newSize === 0) {
+            this.clear();
+            return;
+        }
+        let current = this._head;
+        let currentSize = this.size;
+        while (current && currentSize > newSize) {
+            this._map.delete(current.key);
+            current = current.next;
+            currentSize--;
+        }
+        this._head = current;
+        this._size = currentSize;
+        if (current) {
+            current.previous = undefined;
+        }
+        this._state++;
+    }
+    addItemFirst(item) {
+        // First time Insert
+        if (!this._head && !this._tail) {
+            this._tail = item;
+        }
+        else if (!this._head) {
+            throw new Error('Invalid list');
+        }
+        else {
+            item.next = this._head;
+            this._head.previous = item;
+        }
+        this._head = item;
+        this._state++;
+    }
+    addItemLast(item) {
+        // First time Insert
+        if (!this._head && !this._tail) {
+            this._head = item;
+        }
+        else if (!this._tail) {
+            throw new Error('Invalid list');
+        }
+        else {
+            item.previous = this._tail;
+            this._tail.next = item;
+        }
+        this._tail = item;
+        this._state++;
+    }
+    removeItem(item) {
+        if (item === this._head && item === this._tail) {
+            this._head = undefined;
+            this._tail = undefined;
+        }
+        else if (item === this._head) {
+            // This can only happend if size === 1 which is handle
+            // by the case above.
+            if (!item.next) {
+                throw new Error('Invalid list');
+            }
+            item.next.previous = undefined;
+            this._head = item.next;
+        }
+        else if (item === this._tail) {
+            // This can only happend if size === 1 which is handle
+            // by the case above.
+            if (!item.previous) {
+                throw new Error('Invalid list');
+            }
+            item.previous.next = undefined;
+            this._tail = item.previous;
+        }
+        else {
+            const next = item.next;
+            const previous = item.previous;
+            if (!next || !previous) {
+                throw new Error('Invalid list');
+            }
+            next.previous = previous;
+            previous.next = next;
+        }
+        item.next = undefined;
+        item.previous = undefined;
+        this._state++;
+    }
+    touch(item, touch) {
+        if (!this._head || !this._tail) {
+            throw new Error('Invalid list');
+        }
+        if ((touch !== Touch.First && touch !== Touch.Last)) {
+            return;
+        }
+        if (touch === Touch.First) {
+            if (item === this._head) {
+                return;
+            }
+            const next = item.next;
+            const previous = item.previous;
+            // Unlink the item
+            if (item === this._tail) {
+                // previous must be defined since item was not head but is tail
+                // So there are more than on item in the map
+                previous.next = undefined;
+                this._tail = previous;
+            }
+            else {
+                // Both next and previous are not undefined since item was neither head nor tail.
+                next.previous = previous;
+                previous.next = next;
+            }
+            // Insert the node at head
+            item.previous = undefined;
+            item.next = this._head;
+            this._head.previous = item;
+            this._head = item;
+            this._state++;
+        }
+        else if (touch === Touch.Last) {
+            if (item === this._tail) {
+                return;
+            }
+            const next = item.next;
+            const previous = item.previous;
+            // Unlink the item.
+            if (item === this._head) {
+                // next must be defined since item was not tail but is head
+                // So there are more than on item in the map
+                next.previous = undefined;
+                this._head = next;
+            }
+            else {
+                // Both next and previous are not undefined since item was neither head nor tail.
+                next.previous = previous;
+                previous.next = next;
+            }
+            item.next = undefined;
+            item.previous = this._tail;
+            this._tail.next = item;
+            this._tail = item;
+            this._state++;
+        }
+    }
+    toJSON() {
+        const data = [];
+        this.forEach((value, key) => {
+            data.push([key, value]);
+        });
+        return data;
+    }
+    fromJSON(data) {
+        this.clear();
+        for (const [key, value] of data) {
+            this.set(key, value);
+        }
+    }
+}
+exports.LinkedMap = LinkedMap;
+class LRUCache extends LinkedMap {
+    constructor(limit, ratio = 1) {
+        super();
+        this._limit = limit;
+        this._ratio = Math.min(Math.max(0, ratio), 1);
+    }
+    get limit() {
+        return this._limit;
+    }
+    set limit(limit) {
+        this._limit = limit;
+        this.checkTrim();
+    }
+    get ratio() {
+        return this._ratio;
+    }
+    set ratio(ratio) {
+        this._ratio = Math.min(Math.max(0, ratio), 1);
+        this.checkTrim();
+    }
+    get(key, touch = Touch.AsNew) {
+        return super.get(key, touch);
+    }
+    peek(key) {
+        return super.get(key, Touch.None);
+    }
+    set(key, value) {
+        super.set(key, value, Touch.Last);
+        this.checkTrim();
+        return this;
+    }
+    checkTrim() {
+        if (this.size > this._limit) {
+            this.trimOld(Math.round(this._limit * this._ratio));
+        }
+    }
+}
+exports.LRUCache = LRUCache;
+//# sourceMappingURL=linkedMap.js.map
+
+/***/ }),
+/* 60 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(__webpack_require__(46));
+__export(__webpack_require__(61));
+__export(__webpack_require__(62));
+__export(__webpack_require__(63));
+var connection_1 = __webpack_require__(75);
+exports.createProtocolConnection = connection_1.createProtocolConnection;
+const st = __webpack_require__(76);
+var Proposed;
+(function (Proposed) {
+    Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
+    Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
+    Proposed.SemanticTokens = st.SemanticTokens;
+    let SemanticTokensRequest;
+    (function (SemanticTokensRequest) {
+        SemanticTokensRequest.method = st.SemanticTokensRequest.method;
+        SemanticTokensRequest.type = st.SemanticTokensRequest.type;
+    })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
+    let SemanticTokensEditsRequest;
+    (function (SemanticTokensEditsRequest) {
+        SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
+        SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
+    })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
+    let SemanticTokensRangeRequest;
+    (function (SemanticTokensRangeRequest) {
+        SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
+        SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
+    })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
+})(Proposed = exports.Proposed || (exports.Proposed = {}));
+//# sourceMappingURL=api.js.map
+
+/***/ }),
+/* 61 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUriThrowOnMissingScheme", function() { return setUriThrowOnMissingScheme; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticCode", function() { return DiagnosticCode; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertReplaceEdit", function() { return InsertReplaceEdit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
 
-var __extends = (undefined && undefined.__extends) || (function () {
-    var extendStatics = Object.setPrototypeOf ||
-        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-var isWindows;
-if (typeof process === 'object') {
-    isWindows = process.platform === 'win32';
-}
-else if (typeof navigator === 'object') {
-    var userAgent = navigator.userAgent;
-    isWindows = userAgent.indexOf('Windows') >= 0;
-}
-//#endregion
-var _schemePattern = /^\w[\w\d+.-]*$/;
-var _singleSlashStart = /^\//;
-var _doubleSlashStart = /^\/\//;
-var _throwOnMissingSchema = true;
 /**
- * @internal
+ * The Position namespace provides helper functions to work with
+ * [Position](#Position) literals.
+ */
+var Position;
+(function (Position) {
+    /**
+     * Creates a new Position literal from the given line and character.
+     * @param line The position's line.
+     * @param character The position's character.
+     */
+    function create(line, character) {
+        return { line: line, character: character };
+    }
+    Position.create = create;
+    /**
+     * Checks whether the given liternal conforms to the [Position](#Position) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
+    }
+    Position.is = is;
+})(Position || (Position = {}));
+/**
+ * The Range namespace provides helper functions to work with
+ * [Range](#Range) literals.
+ */
+var Range;
+(function (Range) {
+    function create(one, two, three, four) {
+        if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
+            return { start: Position.create(one, two), end: Position.create(three, four) };
+        }
+        else if (Position.is(one) && Position.is(two)) {
+            return { start: one, end: two };
+        }
+        else {
+            throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
+        }
+    }
+    Range.create = create;
+    /**
+     * Checks whether the given literal conforms to the [Range](#Range) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
+    }
+    Range.is = is;
+})(Range || (Range = {}));
+/**
+ * The Location namespace provides helper functions to work with
+ * [Location](#Location) literals.
+ */
+var Location;
+(function (Location) {
+    /**
+     * Creates a Location literal.
+     * @param uri The location's uri.
+     * @param range The location's range.
+     */
+    function create(uri, range) {
+        return { uri: uri, range: range };
+    }
+    Location.create = create;
+    /**
+     * Checks whether the given literal conforms to the [Location](#Location) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
+    }
+    Location.is = is;
+})(Location || (Location = {}));
+/**
+ * The LocationLink namespace provides helper functions to work with
+ * [LocationLink](#LocationLink) literals.
+ */
+var LocationLink;
+(function (LocationLink) {
+    /**
+     * Creates a LocationLink literal.
+     * @param targetUri The definition's uri.
+     * @param targetRange The full range of the definition.
+     * @param targetSelectionRange The span of the symbol definition at the target.
+     * @param originSelectionRange The span of the symbol being defined in the originating source file.
+     */
+    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
+        return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
+    }
+    LocationLink.create = create;
+    /**
+     * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
+            && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
+            && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
+    }
+    LocationLink.is = is;
+})(LocationLink || (LocationLink = {}));
+/**
+ * The Color namespace provides helper functions to work with
+ * [Color](#Color) literals.
+ */
+var Color;
+(function (Color) {
+    /**
+     * Creates a new Color literal.
+     */
+    function create(red, green, blue, alpha) {
+        return {
+            red: red,
+            green: green,
+            blue: blue,
+            alpha: alpha,
+        };
+    }
+    Color.create = create;
+    /**
+     * Checks whether the given literal conforms to the [Color](#Color) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.number(candidate.red)
+            && Is.number(candidate.green)
+            && Is.number(candidate.blue)
+            && Is.number(candidate.alpha);
+    }
+    Color.is = is;
+})(Color || (Color = {}));
+/**
+ * The ColorInformation namespace provides helper functions to work with
+ * [ColorInformation](#ColorInformation) literals.
+ */
+var ColorInformation;
+(function (ColorInformation) {
+    /**
+     * Creates a new ColorInformation literal.
+     */
+    function create(range, color) {
+        return {
+            range: range,
+            color: color,
+        };
+    }
+    ColorInformation.create = create;
+    /**
+     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Range.is(candidate.range) && Color.is(candidate.color);
+    }
+    ColorInformation.is = is;
+})(ColorInformation || (ColorInformation = {}));
+/**
+ * The Color namespace provides helper functions to work with
+ * [ColorPresentation](#ColorPresentation) literals.
+ */
+var ColorPresentation;
+(function (ColorPresentation) {
+    /**
+     * Creates a new ColorInformation literal.
+     */
+    function create(label, textEdit, additionalTextEdits) {
+        return {
+            label: label,
+            textEdit: textEdit,
+            additionalTextEdits: additionalTextEdits,
+        };
+    }
+    ColorPresentation.create = create;
+    /**
+     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.string(candidate.label)
+            && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
+            && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
+    }
+    ColorPresentation.is = is;
+})(ColorPresentation || (ColorPresentation = {}));
+/**
+ * Enum of known range kinds
+ */
+var FoldingRangeKind;
+(function (FoldingRangeKind) {
+    /**
+     * Folding range for a comment
+     */
+    FoldingRangeKind["Comment"] = "comment";
+    /**
+     * Folding range for a imports or includes
+     */
+    FoldingRangeKind["Imports"] = "imports";
+    /**
+     * Folding range for a region (e.g. `#region`)
+     */
+    FoldingRangeKind["Region"] = "region";
+})(FoldingRangeKind || (FoldingRangeKind = {}));
+/**
+ * The folding range namespace provides helper functions to work with
+ * [FoldingRange](#FoldingRange) literals.
+ */
+var FoldingRange;
+(function (FoldingRange) {
+    /**
+     * Creates a new FoldingRange literal.
+     */
+    function create(startLine, endLine, startCharacter, endCharacter, kind) {
+        var result = {
+            startLine: startLine,
+            endLine: endLine
+        };
+        if (Is.defined(startCharacter)) {
+            result.startCharacter = startCharacter;
+        }
+        if (Is.defined(endCharacter)) {
+            result.endCharacter = endCharacter;
+        }
+        if (Is.defined(kind)) {
+            result.kind = kind;
+        }
+        return result;
+    }
+    FoldingRange.create = create;
+    /**
+     * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.number(candidate.startLine) && Is.number(candidate.startLine)
+            && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
+            && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
+            && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
+    }
+    FoldingRange.is = is;
+})(FoldingRange || (FoldingRange = {}));
+/**
+ * The DiagnosticRelatedInformation namespace provides helper functions to work with
+ * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
+ */
+var DiagnosticRelatedInformation;
+(function (DiagnosticRelatedInformation) {
+    /**
+     * Creates a new DiagnosticRelatedInformation literal.
+     */
+    function create(location, message) {
+        return {
+            location: location,
+            message: message
+        };
+    }
+    DiagnosticRelatedInformation.create = create;
+    /**
+     * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
+    }
+    DiagnosticRelatedInformation.is = is;
+})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
+/**
+ * The diagnostic's severity.
+ */
+var DiagnosticSeverity;
+(function (DiagnosticSeverity) {
+    /**
+     * Reports an error.
+     */
+    DiagnosticSeverity.Error = 1;
+    /**
+     * Reports a warning.
+     */
+    DiagnosticSeverity.Warning = 2;
+    /**
+     * Reports an information.
+     */
+    DiagnosticSeverity.Information = 3;
+    /**
+     * Reports a hint.
+     */
+    DiagnosticSeverity.Hint = 4;
+})(DiagnosticSeverity || (DiagnosticSeverity = {}));
+/**
+ * The diagnostic tags.
+ *
+ * @since 3.15.0
+ */
+var DiagnosticTag;
+(function (DiagnosticTag) {
+    /**
+     * Unused or unnecessary code.
+     *
+     * Clients are allowed to render diagnostics with this tag faded out instead of having
+     * an error squiggle.
+     */
+    DiagnosticTag.Unnecessary = 1;
+    /**
+     * Deprecated or obsolete code.
+     *
+     * Clients are allowed to rendered diagnostics with this tag strike through.
+     */
+    DiagnosticTag.Deprecated = 2;
+})(DiagnosticTag || (DiagnosticTag = {}));
+/**
+ * The DiagnosticCode namespace provides functions to deal with complex diagnostic codes.
+ *
+ * @since 3.16.0 - Proposed state
+ */
+var DiagnosticCode;
+(function (DiagnosticCode) {
+    /**
+     * Checks whether the given liternal conforms to the [DiagnosticCode](#DiagnosticCode) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return candidate !== undefined && candidate !== null && (Is.number(candidate.value) || Is.string(candidate.value)) && Is.string(candidate.target);
+    }
+    DiagnosticCode.is = is;
+})(DiagnosticCode || (DiagnosticCode = {}));
+/**
+ * The Diagnostic namespace provides helper functions to work with
+ * [Diagnostic](#Diagnostic) literals.
+ */
+var Diagnostic;
+(function (Diagnostic) {
+    /**
+     * Creates a new Diagnostic literal.
+     */
+    function create(range, message, severity, code, source, relatedInformation) {
+        var result = { range: range, message: message };
+        if (Is.defined(severity)) {
+            result.severity = severity;
+        }
+        if (Is.defined(code)) {
+            result.code = code;
+        }
+        if (Is.defined(source)) {
+            result.source = source;
+        }
+        if (Is.defined(relatedInformation)) {
+            result.relatedInformation = relatedInformation;
+        }
+        return result;
+    }
+    Diagnostic.create = create;
+    /**
+     * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate)
+            && Range.is(candidate.range)
+            && Is.string(candidate.message)
+            && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
+            && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
+            && (Is.string(candidate.source) || Is.undefined(candidate.source))
+            && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
+    }
+    Diagnostic.is = is;
+})(Diagnostic || (Diagnostic = {}));
+/**
+ * The Command namespace provides helper functions to work with
+ * [Command](#Command) literals.
  */
-function setUriThrowOnMissingScheme(value) {
-    var old = _throwOnMissingSchema;
-    _throwOnMissingSchema = value;
-    return old;
-}
-function _validateUri(ret, _strict) {
-    // scheme, must be set
-    if (!ret.scheme) {
-        if (_strict || _throwOnMissingSchema) {
-            throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
+var Command;
+(function (Command) {
+    /**
+     * Creates a new Command literal.
+     */
+    function create(title, command) {
+        var args = [];
+        for (var _i = 2; _i < arguments.length; _i++) {
+            args[_i - 2] = arguments[_i];
         }
-        else {
-            // console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
+        var result = { title: title, command: command };
+        if (Is.defined(args) && args.length > 0) {
+            result.arguments = args;
         }
+        return result;
     }
-    // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
-    // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
-    if (ret.scheme && !_schemePattern.test(ret.scheme)) {
-        throw new Error('[UriError]: Scheme contains illegal characters.');
+    Command.create = create;
+    /**
+     * Checks whether the given literal conforms to the [Command](#Command) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
     }
-    // path, http://tools.ietf.org/html/rfc3986#section-3.3
-    // If a URI contains an authority component, then the path component
-    // must either be empty or begin with a slash ("/") character.  If a URI
-    // does not contain an authority component, then the path cannot begin
-    // with two slash characters ("//").
-    if (ret.path) {
-        if (ret.authority) {
-            if (!_singleSlashStart.test(ret.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');
+    Command.is = is;
+})(Command || (Command = {}));
+/**
+ * The TextEdit namespace provides helper function to create replace,
+ * insert and delete edits more easily.
+ */
+var TextEdit;
+(function (TextEdit) {
+    /**
+     * Creates a replace text edit.
+     * @param range The range of text to be replaced.
+     * @param newText The new text.
+     */
+    function replace(range, newText) {
+        return { range: range, newText: newText };
+    }
+    TextEdit.replace = replace;
+    /**
+     * Creates a insert text edit.
+     * @param position The position to insert the text at.
+     * @param newText The text to be inserted.
+     */
+    function insert(position, newText) {
+        return { range: { start: position, end: position }, newText: newText };
+    }
+    TextEdit.insert = insert;
+    /**
+     * Creates a delete text edit.
+     * @param range The range of text to be deleted.
+     */
+    function del(range) {
+        return { range: range, newText: '' };
+    }
+    TextEdit.del = del;
+    function is(value) {
+        var candidate = value;
+        return Is.objectLiteral(candidate)
+            && Is.string(candidate.newText)
+            && Range.is(candidate.range);
+    }
+    TextEdit.is = is;
+})(TextEdit || (TextEdit = {}));
+/**
+ * The TextDocumentEdit namespace provides helper function to create
+ * an edit that manipulates a text document.
+ */
+var TextDocumentEdit;
+(function (TextDocumentEdit) {
+    /**
+     * Creates a new `TextDocumentEdit`
+     */
+    function create(textDocument, edits) {
+        return { textDocument: textDocument, edits: edits };
+    }
+    TextDocumentEdit.create = create;
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate)
+            && VersionedTextDocumentIdentifier.is(candidate.textDocument)
+            && Array.isArray(candidate.edits);
+    }
+    TextDocumentEdit.is = is;
+})(TextDocumentEdit || (TextDocumentEdit = {}));
+var CreateFile;
+(function (CreateFile) {
+    function create(uri, options) {
+        var result = {
+            kind: 'create',
+            uri: uri
+        };
+        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
+            result.options = options;
+        }
+        return result;
+    }
+    CreateFile.create = create;
+    function is(value) {
+        var candidate = value;
+        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
+            (candidate.options === void 0 ||
+                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
+    }
+    CreateFile.is = is;
+})(CreateFile || (CreateFile = {}));
+var RenameFile;
+(function (RenameFile) {
+    function create(oldUri, newUri, options) {
+        var result = {
+            kind: 'rename',
+            oldUri: oldUri,
+            newUri: newUri
+        };
+        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
+            result.options = options;
+        }
+        return result;
+    }
+    RenameFile.create = create;
+    function is(value) {
+        var candidate = value;
+        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
+            (candidate.options === void 0 ||
+                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
+    }
+    RenameFile.is = is;
+})(RenameFile || (RenameFile = {}));
+var DeleteFile;
+(function (DeleteFile) {
+    function create(uri, options) {
+        var result = {
+            kind: 'delete',
+            uri: uri
+        };
+        if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
+            result.options = options;
+        }
+        return result;
+    }
+    DeleteFile.create = create;
+    function is(value) {
+        var candidate = value;
+        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
+            (candidate.options === void 0 ||
+                ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
+    }
+    DeleteFile.is = is;
+})(DeleteFile || (DeleteFile = {}));
+var WorkspaceEdit;
+(function (WorkspaceEdit) {
+    function is(value) {
+        var candidate = value;
+        return candidate &&
+            (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
+            (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
+                if (Is.string(change.kind)) {
+                    return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
+                }
+                else {
+                    return TextDocumentEdit.is(change);
+                }
+            }));
+    }
+    WorkspaceEdit.is = is;
+})(WorkspaceEdit || (WorkspaceEdit = {}));
+var TextEditChangeImpl = /** @class */ (function () {
+    function TextEditChangeImpl(edits) {
+        this.edits = edits;
+    }
+    TextEditChangeImpl.prototype.insert = function (position, newText) {
+        this.edits.push(TextEdit.insert(position, newText));
+    };
+    TextEditChangeImpl.prototype.replace = function (range, newText) {
+        this.edits.push(TextEdit.replace(range, newText));
+    };
+    TextEditChangeImpl.prototype.delete = function (range) {
+        this.edits.push(TextEdit.del(range));
+    };
+    TextEditChangeImpl.prototype.add = function (edit) {
+        this.edits.push(edit);
+    };
+    TextEditChangeImpl.prototype.all = function () {
+        return this.edits;
+    };
+    TextEditChangeImpl.prototype.clear = function () {
+        this.edits.splice(0, this.edits.length);
+    };
+    return TextEditChangeImpl;
+}());
+/**
+ * A workspace change helps constructing changes to a workspace.
+ */
+var WorkspaceChange = /** @class */ (function () {
+    function WorkspaceChange(workspaceEdit) {
+        var _this = this;
+        this._textEditChanges = Object.create(null);
+        if (workspaceEdit) {
+            this._workspaceEdit = workspaceEdit;
+            if (workspaceEdit.documentChanges) {
+                workspaceEdit.documentChanges.forEach(function (change) {
+                    if (TextDocumentEdit.is(change)) {
+                        var textEditChange = new TextEditChangeImpl(change.edits);
+                        _this._textEditChanges[change.textDocument.uri] = textEditChange;
+                    }
+                });
+            }
+            else if (workspaceEdit.changes) {
+                Object.keys(workspaceEdit.changes).forEach(function (key) {
+                    var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
+                    _this._textEditChanges[key] = textEditChange;
+                });
+            }
+        }
+    }
+    Object.defineProperty(WorkspaceChange.prototype, "edit", {
+        /**
+         * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
+         * use to be returned from a workspace edit operation like rename.
+         */
+        get: function () {
+            if (this._workspaceEdit === undefined) {
+                return { documentChanges: [] };
+            }
+            return this._workspaceEdit;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    WorkspaceChange.prototype.getTextEditChange = function (key) {
+        if (VersionedTextDocumentIdentifier.is(key)) {
+            if (!this._workspaceEdit) {
+                this._workspaceEdit = {
+                    documentChanges: []
+                };
+            }
+            if (!this._workspaceEdit.documentChanges) {
+                throw new Error('Workspace edit is not configured for document changes.');
+            }
+            var textDocument = key;
+            var result = this._textEditChanges[textDocument.uri];
+            if (!result) {
+                var edits = [];
+                var textDocumentEdit = {
+                    textDocument: textDocument,
+                    edits: edits
+                };
+                this._workspaceEdit.documentChanges.push(textDocumentEdit);
+                result = new TextEditChangeImpl(edits);
+                this._textEditChanges[textDocument.uri] = result;
             }
+            return result;
         }
         else {
-            if (_doubleSlashStart.test(ret.path)) {
-                throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
+            if (!this._workspaceEdit) {
+                this._workspaceEdit = {
+                    changes: Object.create(null)
+                };
+            }
+            if (!this._workspaceEdit.changes) {
+                throw new Error('Workspace edit is not configured for normal text edit changes.');
+            }
+            var result = this._textEditChanges[key];
+            if (!result) {
+                var edits = [];
+                this._workspaceEdit.changes[key] = edits;
+                result = new TextEditChangeImpl(edits);
+                this._textEditChanges[key] = result;
             }
+            return result;
+        }
+    };
+    WorkspaceChange.prototype.createFile = function (uri, options) {
+        this.checkDocumentChanges();
+        this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
+    };
+    WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
+        this.checkDocumentChanges();
+        this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
+    };
+    WorkspaceChange.prototype.deleteFile = function (uri, options) {
+        this.checkDocumentChanges();
+        this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
+    };
+    WorkspaceChange.prototype.checkDocumentChanges = function () {
+        if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
+            throw new Error('Workspace edit is not configured for document changes.');
         }
+    };
+    return WorkspaceChange;
+}());
+
+/**
+ * The TextDocumentIdentifier namespace provides helper functions to work with
+ * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
+ */
+var TextDocumentIdentifier;
+(function (TextDocumentIdentifier) {
+    /**
+     * Creates a new TextDocumentIdentifier literal.
+     * @param uri The document's uri.
+     */
+    function create(uri) {
+        return { uri: uri };
+    }
+    TextDocumentIdentifier.create = create;
+    /**
+     * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri);
+    }
+    TextDocumentIdentifier.is = is;
+})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
+/**
+ * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
+ * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
+ */
+var VersionedTextDocumentIdentifier;
+(function (VersionedTextDocumentIdentifier) {
+    /**
+     * Creates a new VersionedTextDocumentIdentifier literal.
+     * @param uri The document's uri.
+     * @param uri The document's text.
+     */
+    function create(uri, version) {
+        return { uri: uri, version: version };
+    }
+    VersionedTextDocumentIdentifier.create = create;
+    /**
+     * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
+    }
+    VersionedTextDocumentIdentifier.is = is;
+})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
+/**
+ * The TextDocumentItem namespace provides helper functions to work with
+ * [TextDocumentItem](#TextDocumentItem) literals.
+ */
+var TextDocumentItem;
+(function (TextDocumentItem) {
+    /**
+     * Creates a new TextDocumentItem literal.
+     * @param uri The document's uri.
+     * @param languageId The document's language identifier.
+     * @param version The document's version number.
+     * @param text The document's text.
+     */
+    function create(uri, languageId, version, text) {
+        return { uri: uri, languageId: languageId, version: version, text: text };
+    }
+    TextDocumentItem.create = create;
+    /**
+     * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
+    }
+    TextDocumentItem.is = is;
+})(TextDocumentItem || (TextDocumentItem = {}));
+/**
+ * Describes the content type that a client supports in various
+ * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
+ *
+ * Please note that `MarkupKinds` must not start with a `$`. This kinds
+ * are reserved for internal usage.
+ */
+var MarkupKind;
+(function (MarkupKind) {
+    /**
+     * Plain text is supported as a content format
+     */
+    MarkupKind.PlainText = 'plaintext';
+    /**
+     * Markdown is supported as a content format
+     */
+    MarkupKind.Markdown = 'markdown';
+})(MarkupKind || (MarkupKind = {}));
+(function (MarkupKind) {
+    /**
+     * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
+     */
+    function is(value) {
+        var candidate = value;
+        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
+    }
+    MarkupKind.is = is;
+})(MarkupKind || (MarkupKind = {}));
+var MarkupContent;
+(function (MarkupContent) {
+    /**
+     * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
+    }
+    MarkupContent.is = is;
+})(MarkupContent || (MarkupContent = {}));
+/**
+ * The kind of a completion entry.
+ */
+var CompletionItemKind;
+(function (CompletionItemKind) {
+    CompletionItemKind.Text = 1;
+    CompletionItemKind.Method = 2;
+    CompletionItemKind.Function = 3;
+    CompletionItemKind.Constructor = 4;
+    CompletionItemKind.Field = 5;
+    CompletionItemKind.Variable = 6;
+    CompletionItemKind.Class = 7;
+    CompletionItemKind.Interface = 8;
+    CompletionItemKind.Module = 9;
+    CompletionItemKind.Property = 10;
+    CompletionItemKind.Unit = 11;
+    CompletionItemKind.Value = 12;
+    CompletionItemKind.Enum = 13;
+    CompletionItemKind.Keyword = 14;
+    CompletionItemKind.Snippet = 15;
+    CompletionItemKind.Color = 16;
+    CompletionItemKind.File = 17;
+    CompletionItemKind.Reference = 18;
+    CompletionItemKind.Folder = 19;
+    CompletionItemKind.EnumMember = 20;
+    CompletionItemKind.Constant = 21;
+    CompletionItemKind.Struct = 22;
+    CompletionItemKind.Event = 23;
+    CompletionItemKind.Operator = 24;
+    CompletionItemKind.TypeParameter = 25;
+})(CompletionItemKind || (CompletionItemKind = {}));
+/**
+ * Defines whether the insert text in a completion item should be interpreted as
+ * plain text or a snippet.
+ */
+var InsertTextFormat;
+(function (InsertTextFormat) {
+    /**
+     * The primary text to be inserted is treated as a plain string.
+     */
+    InsertTextFormat.PlainText = 1;
+    /**
+     * The primary text to be inserted is treated as a snippet.
+     *
+     * A snippet can define tab stops and placeholders with `$1`, `$2`
+     * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
+     * the end of the snippet. Placeholders with equal identifiers are linked,
+     * that is typing in one will update others too.
+     *
+     * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
+     */
+    InsertTextFormat.Snippet = 2;
+})(InsertTextFormat || (InsertTextFormat = {}));
+/**
+ * Completion item tags are extra annotations that tweak the rendering of a completion
+ * item.
+ *
+ * @since 3.15.0
+ */
+var CompletionItemTag;
+(function (CompletionItemTag) {
+    /**
+     * Render a completion as obsolete, usually using a strike-out.
+     */
+    CompletionItemTag.Deprecated = 1;
+})(CompletionItemTag || (CompletionItemTag = {}));
+/**
+ * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
+ *
+ * @since 3.16.0 - Proposed state
+ */
+var InsertReplaceEdit;
+(function (InsertReplaceEdit) {
+    /**
+     * Creates a new insert / replace edit
+     */
+    function create(newText, insert, replace) {
+        return { newText: newText, insert: insert, replace: replace };
+    }
+    InsertReplaceEdit.create = create;
+    /**
+     * Checks whether the given liternal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
+    }
+    InsertReplaceEdit.is = is;
+})(InsertReplaceEdit || (InsertReplaceEdit = {}));
+/**
+ * The CompletionItem namespace provides functions to deal with
+ * completion items.
+ */
+var CompletionItem;
+(function (CompletionItem) {
+    /**
+     * Create a completion item and seed it with a label.
+     * @param label The completion item's label
+     */
+    function create(label) {
+        return { label: label };
     }
-}
-// for a while we allowed uris *without* schemes and this is the migration
-// for them, e.g. an uri without scheme and without strict-mode warns and falls
-// back to the file-scheme. that should cause the least carnage and still be a
-// clear warning
-function _schemeFix(scheme, _strict) {
-    if (_strict || _throwOnMissingSchema) {
-        return scheme || _empty;
+    CompletionItem.create = create;
+})(CompletionItem || (CompletionItem = {}));
+/**
+ * The CompletionList namespace provides functions to deal with
+ * completion lists.
+ */
+var CompletionList;
+(function (CompletionList) {
+    /**
+     * Creates a new completion list.
+     *
+     * @param items The completion items.
+     * @param isIncomplete The list is not complete.
+     */
+    function create(items, isIncomplete) {
+        return { items: items ? items : [], isIncomplete: !!isIncomplete };
     }
-    if (!scheme) {
-        // console.trace('BAD uri lacks scheme, falling back to file-scheme.');
-        scheme = 'file';
+    CompletionList.create = create;
+})(CompletionList || (CompletionList = {}));
+var MarkedString;
+(function (MarkedString) {
+    /**
+     * Creates a marked string from plain text.
+     *
+     * @param plainText The plain text.
+     */
+    function fromPlainText(plainText) {
+        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
     }
-    return scheme;
-}
-// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
-function _referenceResolution(scheme, path) {
-    // the slash-character is our 'default base' as we don't
-    // support constructing URIs relative to other URIs. This
-    // also means that we alter and potentially break paths.
-    // see https://tools.ietf.org/html/rfc3986#section-5.1.4
-    switch (scheme) {
-        case 'https':
-        case 'http':
-        case 'file':
-            if (!path) {
-                path = _slash;
-            }
-            else if (path[0] !== _slash) {
-                path = _slash + path;
-            }
-            break;
+    MarkedString.fromPlainText = fromPlainText;
+    /**
+     * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
     }
-    return path;
-}
-var _empty = '';
-var _slash = '/';
-var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
-function _isQueryStringScheme(scheme) {
-    switch (scheme.toLowerCase()) {
-        case 'http':
-        case 'https':
-        case 'ftp':
-            return true;
+    MarkedString.is = is;
+})(MarkedString || (MarkedString = {}));
+var Hover;
+(function (Hover) {
+    /**
+     * Checks whether the given value conforms to the [Hover](#Hover) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
+            MarkedString.is(candidate.contents) ||
+            Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
     }
-    return false;
-}
+    Hover.is = is;
+})(Hover || (Hover = {}));
 /**
- * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
- * This class is a simple parser which creates the basic component parts
- * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
- * and encoding.
- *
- *       foo://example.com:8042/over/there?name=ferret#nose
- *       \_/   \______________/\_________/ \_________/ \__/
- *        |           |            |            |        |
- *     scheme     authority       path        query   fragment
- *        |   _____________________|__
- *       / \ /                        \
- *       urn:example:animal:ferret:nose
+ * The ParameterInformation namespace provides helper functions to work with
+ * [ParameterInformation](#ParameterInformation) literals.
  */
-var URI = (function () {
+var ParameterInformation;
+(function (ParameterInformation) {
     /**
-     * @internal
+     * Creates a new parameter information literal.
+     *
+     * @param label A label string.
+     * @param documentation A doc string.
      */
-    function URI(schemeOrData, authority, path, query, fragment, _strict) {
-        if (_strict === void 0) { _strict = false; }
-        if (typeof schemeOrData === 'object') {
-            this.scheme = schemeOrData.scheme || _empty;
-            this.authority = schemeOrData.authority || _empty;
-            this.path = schemeOrData.path || _empty;
-            this.query = schemeOrData.query || _empty;
-            this.fragment = schemeOrData.fragment || _empty;
-            // no validation because it's this URI
-            // that creates uri components.
-            // _validateUri(this);
-        }
-        else {
-            this.scheme = _schemeFix(schemeOrData, _strict);
-            this.authority = authority || _empty;
-            this.path = _referenceResolution(this.scheme, path || _empty);
-            this.query = query || _empty;
-            this.fragment = fragment || _empty;
-            _validateUri(this, _strict);
-        }
+    function create(label, documentation) {
+        return documentation ? { label: label, documentation: documentation } : { label: label };
     }
-    URI.isUri = function (thing) {
-        if (thing instanceof URI) {
-            return true;
-        }
-        if (!thing) {
-            return false;
-        }
-        return typeof thing.authority === 'string'
-            && typeof thing.fragment === 'string'
-            && typeof thing.path === 'string'
-            && typeof thing.query === 'string'
-            && typeof thing.scheme === 'string'
-            && typeof thing.fsPath === 'function'
-            && typeof thing.with === 'function'
-            && typeof thing.toString === 'function';
-    };
-    Object.defineProperty(URI.prototype, "fsPath", {
-        // ---- filesystem path -----------------------
-        /**
-         * Returns a string representing the corresponding file system path of this URI.
-         * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
-         * platform specific path separator.
-         *
-         * * Will *not* validate the path for invalid characters and semantics.
-         * * Will *not* look at the scheme of this URI.
-         * * The result shall *not* be used for display purposes but for accessing a file on disk.
-         *
-         *
-         * The *difference* to `URI#path` is the use of the platform specific separator and the handling
-         * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
-         *
-         * ```ts
-            const u = URI.parse('file://server/c$/folder/file.txt')
-            u.authority === 'server'
-            u.path === '/shares/c$/file.txt'
-            u.fsPath === '\\server\c$\folder\file.txt'
-        ```
-         *
-         * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
-         * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
-         * with URIs that represent files on disk (`file` scheme).
-         */
-        get: function () {
-            // if (this.scheme !== 'file') {
-            //         console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
-            // }
-            return _makeFsPath(this);
-        },
-        enumerable: true,
-        configurable: true
-    });
-    // ---- modify to new -------------------------
-    URI.prototype.with = function (change) {
-        if (!change) {
-            return this;
-        }
-        var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
-        if (scheme === undefined) {
-            scheme = this.scheme;
-        }
-        else if (scheme === null) {
-            scheme = _empty;
-        }
-        if (authority === undefined) {
-            authority = this.authority;
-        }
-        else if (authority === null) {
-            authority = _empty;
-        }
-        if (path === undefined) {
-            path = this.path;
-        }
-        else if (path === null) {
-            path = _empty;
+    ParameterInformation.create = create;
+})(ParameterInformation || (ParameterInformation = {}));
+/**
+ * The SignatureInformation namespace provides helper functions to work with
+ * [SignatureInformation](#SignatureInformation) literals.
+ */
+var SignatureInformation;
+(function (SignatureInformation) {
+    function create(label, documentation) {
+        var parameters = [];
+        for (var _i = 2; _i < arguments.length; _i++) {
+            parameters[_i - 2] = arguments[_i];
         }
-        if (query === undefined) {
-            query = this.query;
+        var result = { label: label };
+        if (Is.defined(documentation)) {
+            result.documentation = documentation;
         }
-        else if (query === null) {
-            query = _empty;
+        if (Is.defined(parameters)) {
+            result.parameters = parameters;
         }
-        if (fragment === undefined) {
-            fragment = this.fragment;
+        else {
+            result.parameters = [];
         }
-        else if (fragment === null) {
-            fragment = _empty;
+        return result;
+    }
+    SignatureInformation.create = create;
+})(SignatureInformation || (SignatureInformation = {}));
+/**
+ * A document highlight kind.
+ */
+var DocumentHighlightKind;
+(function (DocumentHighlightKind) {
+    /**
+     * A textual occurrence.
+     */
+    DocumentHighlightKind.Text = 1;
+    /**
+     * Read-access of a symbol, like reading a variable.
+     */
+    DocumentHighlightKind.Read = 2;
+    /**
+     * Write-access of a symbol, like writing to a variable.
+     */
+    DocumentHighlightKind.Write = 3;
+})(DocumentHighlightKind || (DocumentHighlightKind = {}));
+/**
+ * DocumentHighlight namespace to provide helper functions to work with
+ * [DocumentHighlight](#DocumentHighlight) literals.
+ */
+var DocumentHighlight;
+(function (DocumentHighlight) {
+    /**
+     * Create a DocumentHighlight object.
+     * @param range The range the highlight applies to.
+     */
+    function create(range, kind) {
+        var result = { range: range };
+        if (Is.number(kind)) {
+            result.kind = kind;
         }
-        if (scheme === this.scheme
-            && authority === this.authority
-            && path === this.path
-            && query === this.query
-            && fragment === this.fragment) {
-            return this;
+        return result;
+    }
+    DocumentHighlight.create = create;
+})(DocumentHighlight || (DocumentHighlight = {}));
+/**
+ * A symbol kind.
+ */
+var SymbolKind;
+(function (SymbolKind) {
+    SymbolKind.File = 1;
+    SymbolKind.Module = 2;
+    SymbolKind.Namespace = 3;
+    SymbolKind.Package = 4;
+    SymbolKind.Class = 5;
+    SymbolKind.Method = 6;
+    SymbolKind.Property = 7;
+    SymbolKind.Field = 8;
+    SymbolKind.Constructor = 9;
+    SymbolKind.Enum = 10;
+    SymbolKind.Interface = 11;
+    SymbolKind.Function = 12;
+    SymbolKind.Variable = 13;
+    SymbolKind.Constant = 14;
+    SymbolKind.String = 15;
+    SymbolKind.Number = 16;
+    SymbolKind.Boolean = 17;
+    SymbolKind.Array = 18;
+    SymbolKind.Object = 19;
+    SymbolKind.Key = 20;
+    SymbolKind.Null = 21;
+    SymbolKind.EnumMember = 22;
+    SymbolKind.Struct = 23;
+    SymbolKind.Event = 24;
+    SymbolKind.Operator = 25;
+    SymbolKind.TypeParameter = 26;
+})(SymbolKind || (SymbolKind = {}));
+/**
+ * Symbol tags are extra annotations that tweak the rendering of a symbol.
+ * @since 3.15
+ */
+var SymbolTag;
+(function (SymbolTag) {
+    /**
+     * Render a symbol as obsolete, usually using a strike-out.
+     */
+    SymbolTag.Deprecated = 1;
+})(SymbolTag || (SymbolTag = {}));
+var SymbolInformation;
+(function (SymbolInformation) {
+    /**
+     * Creates a new symbol information literal.
+     *
+     * @param name The name of the symbol.
+     * @param kind The kind of the symbol.
+     * @param range The range of the location of the symbol.
+     * @param uri The resource of the location of symbol, defaults to the current document.
+     * @param containerName The name of the symbol containing the symbol.
+     */
+    function create(name, kind, range, uri, containerName) {
+        var result = {
+            name: name,
+            kind: kind,
+            location: { uri: uri, range: range }
+        };
+        if (containerName) {
+            result.containerName = containerName;
         }
-        return new _URI(scheme, authority, path, query, fragment);
-    };
-    // ---- parse & validate ------------------------
+        return result;
+    }
+    SymbolInformation.create = create;
+})(SymbolInformation || (SymbolInformation = {}));
+var DocumentSymbol;
+(function (DocumentSymbol) {
     /**
-     * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
-     * `file:///usr/home`, or `scheme:with/path`.
+     * Creates a new symbol information literal.
      *
-     * @param value A string which represents an URI (see `URI#toString`).
+     * @param name The name of the symbol.
+     * @param detail The detail of the symbol.
+     * @param kind The kind of the symbol.
+     * @param range The range of the symbol.
+     * @param selectionRange The selectionRange of the symbol.
+     * @param children Children of the symbol.
      */
-    URI.parse = function (value, _strict) {
-        if (_strict === void 0) { _strict = false; }
-        var match = _regexp.exec(value);
-        if (!match) {
-            return new _URI(_empty, _empty, _empty, _empty, _empty, _strict);
+    function create(name, detail, kind, range, selectionRange, children) {
+        var result = {
+            name: name,
+            detail: detail,
+            kind: kind,
+            range: range,
+            selectionRange: selectionRange
+        };
+        if (children !== void 0) {
+            result.children = children;
         }
-        return new _URI(match[2] || _empty, decodeURIComponentFast(match[4] || _empty, false, false), decodeURIComponentFast(match[5] || _empty, true, false), decodeURIComponentFast(match[7] || _empty, false, _isQueryStringScheme(match[2])), decodeURIComponentFast(match[9] || _empty, false, false), _strict);
-    };
+        return result;
+    }
+    DocumentSymbol.create = create;
     /**
-     * Creates a new URI from a file system path, e.g. `c:\my\files`,
-     * `/usr/home`, or `\\server\share\some\path`.
+     * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return candidate &&
+            Is.string(candidate.name) && Is.number(candidate.kind) &&
+            Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
+            (candidate.detail === void 0 || Is.string(candidate.detail)) &&
+            (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
+            (candidate.children === void 0 || Array.isArray(candidate.children)) &&
+            (candidate.tags === void 0 || Array.isArray(candidate.tags));
+    }
+    DocumentSymbol.is = is;
+})(DocumentSymbol || (DocumentSymbol = {}));
+/**
+ * A set of predefined code action kinds
+ */
+var CodeActionKind;
+(function (CodeActionKind) {
+    /**
+     * Empty kind.
+     */
+    CodeActionKind.Empty = '';
+    /**
+     * Base kind for quickfix actions: 'quickfix'
+     */
+    CodeActionKind.QuickFix = 'quickfix';
+    /**
+     * Base kind for refactoring actions: 'refactor'
+     */
+    CodeActionKind.Refactor = 'refactor';
+    /**
+     * Base kind for refactoring extraction actions: 'refactor.extract'
      *
-     * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
-     * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
-     * `URI.parse('file://' + path)` because the path might contain characters that are
-     * interpreted (# and ?). See the following sample:
-     * ```ts
-    const good = URI.file('/coding/c#/project1');
-    good.scheme === 'file';
-    good.path === '/coding/c#/project1';
-    good.fragment === '';
-    const bad = URI.parse('file://' + '/coding/c#/project1');
-    bad.scheme === 'file';
-    bad.path === '/coding/c'; // path is now broken
-    bad.fragment === '/project1';
-    ```
+     * Example extract actions:
      *
-     * @param path A file system path (see `URI#fsPath`)
+     * - Extract method
+     * - Extract function
+     * - Extract variable
+     * - Extract interface from class
+     * - ...
      */
-    URI.file = function (path) {
-        var authority = _empty;
-        // normalize to fwd-slashes on windows,
-        // on other systems bwd-slashes are valid
-        // filename character, eg /f\oo/ba\r.txt
-        if (isWindows) {
-            path = path.replace(/\\/g, _slash);
-        }
-        // check for authority as used in UNC shares
-        // or use the path as given
-        if (path[0] === _slash && path[1] === _slash) {
-            var idx = path.indexOf(_slash, 2);
-            if (idx === -1) {
-                authority = path.substring(2);
-                path = _slash;
-            }
-            else {
-                authority = path.substring(2, idx);
-                path = path.substring(idx) || _slash;
-            }
-        }
-        return new _URI('file', authority, path, _empty, _empty);
-    };
-    URI.from = function (components) {
-        return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
-    };
-    // ---- printing/externalize ---------------------------
+    CodeActionKind.RefactorExtract = 'refactor.extract';
     /**
-     * Creates a string representation for this URI. It's guaranteed that calling
-     * `URI.parse` with the result of this function creates an URI which is equal
-     * to this URI.
+     * Base kind for refactoring inline actions: 'refactor.inline'
      *
-     * * The result shall *not* be used for display purposes but for externalization or transport.
-     * * The result will be encoded using the percentage encoding and encoding happens mostly
-     * ignore the scheme-specific encoding rules.
+     * Example inline actions:
      *
-     * @param skipEncoding Do not encode the result, default is `false`
+     * - Inline function
+     * - Inline variable
+     * - Inline constant
+     * - ...
      */
-    URI.prototype.toString = function (skipEncoding) {
-        if (skipEncoding === void 0) { skipEncoding = false; }
-        return _asFormatted(this, skipEncoding);
-    };
-    URI.prototype.toJSON = function () {
-        return this;
-    };
-    URI.revive = function (data) {
-        if (!data) {
-            return data;
-        }
-        else if (data instanceof URI) {
-            return data;
-        }
-        else {
-            var result = new _URI(data);
-            result._formatted = data.external;
-            result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
-            return result;
+    CodeActionKind.RefactorInline = 'refactor.inline';
+    /**
+     * Base kind for refactoring rewrite actions: 'refactor.rewrite'
+     *
+     * Example rewrite actions:
+     *
+     * - Convert JavaScript function to class
+     * - Add or remove parameter
+     * - Encapsulate field
+     * - Make method static
+     * - Move method to base class
+     * - ...
+     */
+    CodeActionKind.RefactorRewrite = 'refactor.rewrite';
+    /**
+     * Base kind for source actions: `source`
+     *
+     * Source code actions apply to the entire file.
+     */
+    CodeActionKind.Source = 'source';
+    /**
+     * Base kind for an organize imports source action: `source.organizeImports`
+     */
+    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
+    /**
+     * Base kind for auto-fix source actions: `source.fixAll`.
+     *
+     * Fix all actions automatically fix errors that have a clear fix that do not require user input.
+     * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
+     *
+     * @since 3.15.0
+     */
+    CodeActionKind.SourceFixAll = 'source.fixAll';
+})(CodeActionKind || (CodeActionKind = {}));
+/**
+ * The CodeActionContext namespace provides helper functions to work with
+ * [CodeActionContext](#CodeActionContext) literals.
+ */
+var CodeActionContext;
+(function (CodeActionContext) {
+    /**
+     * Creates a new CodeActionContext literal.
+     */
+    function create(diagnostics, only) {
+        var result = { diagnostics: diagnostics };
+        if (only !== void 0 && only !== null) {
+            result.only = only;
         }
-    };
-    return URI;
-}());
-
-var _pathSepMarker = isWindows ? 1 : undefined;
-// tslint:disable-next-line:class-name
-var _URI = (function (_super) {
-    __extends(_URI, _super);
-    function _URI() {
-        var _this = _super !== null && _super.apply(this, arguments) || this;
-        _this._formatted = null;
-        _this._fsPath = null;
-        return _this;
+        return result;
     }
-    Object.defineProperty(_URI.prototype, "fsPath", {
-        get: function () {
-            if (!this._fsPath) {
-                this._fsPath = _makeFsPath(this);
-            }
-            return this._fsPath;
-        },
-        enumerable: true,
-        configurable: true
-    });
-    _URI.prototype.toString = function (skipEncoding) {
-        if (skipEncoding === void 0) { skipEncoding = false; }
-        if (!skipEncoding) {
-            if (!this._formatted) {
-                this._formatted = _asFormatted(this, false);
-            }
-            return this._formatted;
-        }
-        else {
-            // we don't cache that
-            return _asFormatted(this, true);
-        }
-    };
-    _URI.prototype.toJSON = function () {
-        var res = {
-            $mid: 1
-        };
-        // cached state
-        if (this._fsPath) {
-            res.fsPath = this._fsPath;
-            res._sep = _pathSepMarker;
-        }
-        if (this._formatted) {
-            res.external = this._formatted;
-        }
-        // uri components
-        if (this.path) {
-            res.path = this.path;
-        }
-        if (this.scheme) {
-            res.scheme = this.scheme;
-        }
-        if (this.authority) {
-            res.authority = this.authority;
-        }
-        if (this.query) {
-            res.query = this.query;
-        }
-        if (this.fragment) {
-            res.fragment = this.fragment;
-        }
-        return res;
-    };
-    return _URI;
-}(URI));
-function isHex(value, pos) {
-    if (pos >= value.length) {
-        return false;
+    CodeActionContext.create = create;
+    /**
+     * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
     }
-    var code = value.charCodeAt(pos);
-    return (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */) // 0-9
-        || (code >= 97 /* a */ && code <= 102 /* f */) //a-f
-        || (code >= 65 /* A */ && code <= 70 /* F */); //A-F
-}
-function decodeURIComponentFast(uriComponent, isPath, isQueryString) {
-    var res;
-    var nativeDecodePos = -1;
-    for (var pos = 0; pos < uriComponent.length; pos++) {
-        var code = uriComponent.charCodeAt(pos);
-        // decoding needed
-        if (code === 37 /* PercentSign */ && isHex(uriComponent, pos + 1) && isHex(uriComponent, pos + 2)) {
-            var chA = uriComponent.charCodeAt(pos + 1);
-            var chB = uriComponent.charCodeAt(pos + 2);
-            // when in a path -> check and accept %2f and %2F (fwd slash)
-            // when in a query string -> check and accept %3D, %26, and %3B (equals, ampersand, semi-colon)
-            if ((isPath && chA === 50 /* Digit2 */ && (chB === 70 /* F */ || chB === 102 /* f */))
-                ||
-                    (isQueryString && ((chA === 50 /* Digit2 */ && chB === 54 /* Digit6 */) // %26
-                        ||
-                            (chA === 51 /* Digit3 */ && (chB === 66 /* B */ || chB === 98 /* b */ || chB === 68 /* D */ || chB === 100 /* d */)) // %3D, %3D
-                    ))) {
-                if (nativeDecodePos !== -1) {
-                    res += decodeURIComponent(uriComponent.substring(nativeDecodePos, pos));
-                    nativeDecodePos = -1;
-                }
-                if (res !== undefined) {
-                    res += uriComponent.substr(pos, 3);
-                }
-                pos += 2;
-                continue;
-            }
-            if (res === undefined) {
-                res = uriComponent.substring(0, pos);
-            }
-            if (nativeDecodePos === -1) {
-                nativeDecodePos = pos;
-            }
-            pos += 2;
+    CodeActionContext.is = is;
+})(CodeActionContext || (CodeActionContext = {}));
+var CodeAction;
+(function (CodeAction) {
+    function create(title, commandOrEdit, kind) {
+        var result = { title: title };
+        if (Command.is(commandOrEdit)) {
+            result.command = commandOrEdit;
         }
         else {
-            if (nativeDecodePos !== -1) {
-                res += decodeURIComponent(uriComponent.substring(nativeDecodePos, pos));
-                nativeDecodePos = -1;
-            }
-            if (res !== undefined) {
-                res += String.fromCharCode(code);
-            }
+            result.edit = commandOrEdit;
         }
+        if (kind !== void 0) {
+            result.kind = kind;
+        }
+        return result;
     }
-    if (nativeDecodePos !== -1) {
-        res += decodeURIComponent(uriComponent.substr(nativeDecodePos));
+    CodeAction.create = create;
+    function is(value) {
+        var candidate = value;
+        return candidate && Is.string(candidate.title) &&
+            (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
+            (candidate.kind === void 0 || Is.string(candidate.kind)) &&
+            (candidate.edit !== void 0 || candidate.command !== void 0) &&
+            (candidate.command === void 0 || Command.is(candidate.command)) &&
+            (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
+            (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
     }
-    return res !== undefined ? res : uriComponent;
-}
-// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
-var encodeTable = (_a = {},
-    _a[58 /* Colon */] = '%3A',
-    _a[47 /* Slash */] = '%2F',
-    _a[63 /* QuestionMark */] = '%3F',
-    _a[35 /* Hash */] = '%23',
-    _a[91 /* OpenSquareBracket */] = '%5B',
-    _a[93 /* CloseSquareBracket */] = '%5D',
-    _a[64 /* AtSign */] = '%40',
-    _a[33 /* ExclamationMark */] = '%21',
-    _a[36 /* DollarSign */] = '%24',
-    _a[38 /* Ampersand */] = '%26',
-    _a[39 /* SingleQuote */] = '%27',
-    _a[40 /* OpenParen */] = '%28',
-    _a[41 /* CloseParen */] = '%29',
-    _a[42 /* Asterisk */] = '%2A',
-    _a[43 /* Plus */] = '%2B',
-    _a[44 /* Comma */] = '%2C',
-    _a[59 /* Semicolon */] = '%3B',
-    _a[61 /* Equals */] = '%3D',
-    _a[32 /* Space */] = '%20',
-    _a);
-function encodeURIComponentFast(uriComponent, isPath, isQueryString) {
-    var res = undefined;
-    var nativeEncodePos = -1;
-    for (var pos = 0; pos < uriComponent.length; pos++) {
-        var code = uriComponent.charCodeAt(pos);
-        // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
-        if ((code >= 97 /* a */ && code <= 122 /* z */)
-            || (code >= 65 /* A */ && code <= 90 /* Z */)
-            || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
-            || code === 45 /* Dash */
-            || code === 46 /* Period */
-            || code === 95 /* Underline */
-            || code === 126 /* Tilde */
-            || (isPath && code === 47 /* Slash */) // path => allow slash AS-IS
-            || (isQueryString && (code === 61 /* Equals */ || code === 38 /* Ampersand */ || code === 59 /* Semicolon */)) // query string => allow &=;
-        ) {
-            // check if we are delaying native encode
-            if (nativeEncodePos !== -1) {
-                res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
-                nativeEncodePos = -1;
-            }
-            // check if we write into a new string (by default we try to return the param)
-            if (res !== undefined) {
-                res += uriComponent.charAt(pos);
-            }
-        }
-        else if (code === 37 /* PercentSign */ && isHex(uriComponent, pos + 1) && isHex(uriComponent, pos + 2)) {
-            // at percentage encoded value
-            // check if we are delaying native encode
-            if (nativeEncodePos !== -1) {
-                res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
-                nativeEncodePos = -1;
-            }
-            // check if we write into a new string (by default we try to return the param)
-            if (res !== undefined) {
-                res += uriComponent.substr(pos, 3);
-            }
-            pos += 2;
-        }
-        else {
-            // encoding needed, we need to allocate a new string
-            if (res === undefined) {
-                res = uriComponent.substr(0, pos);
-            }
-            // check with default table first
-            var escaped = encodeTable[code];
-            if (escaped !== undefined) {
-                // check if we are delaying native encode
-                if (nativeEncodePos !== -1) {
-                    res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
-                    nativeEncodePos = -1;
-                }
-                // append escaped variant to result
-                res += escaped;
-            }
-            else if (nativeEncodePos === -1) {
-                // use native encode only when needed
-                nativeEncodePos = pos;
-            }
+    CodeAction.is = is;
+})(CodeAction || (CodeAction = {}));
+/**
+ * The CodeLens namespace provides helper functions to work with
+ * [CodeLens](#CodeLens) literals.
+ */
+var CodeLens;
+(function (CodeLens) {
+    /**
+     * Creates a new CodeLens literal.
+     */
+    function create(range, data) {
+        var result = { range: range };
+        if (Is.defined(data)) {
+            result.data = data;
         }
+        return result;
     }
-    if (nativeEncodePos !== -1) {
-        res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
+    CodeLens.create = create;
+    /**
+     * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
     }
-    return res !== undefined ? res : uriComponent;
-}
-function encodeURIComponentMinimal(path) {
-    var res = undefined;
-    for (var pos = 0; pos < path.length; pos++) {
-        var code = path.charCodeAt(pos);
-        if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
-            if (res === undefined) {
-                res = path.substr(0, pos);
-            }
-            res += encodeTable[code];
-        }
-        else {
-            if (res !== undefined) {
-                res += path[pos];
-            }
-        }
+    CodeLens.is = is;
+})(CodeLens || (CodeLens = {}));
+/**
+ * The FormattingOptions namespace provides helper functions to work with
+ * [FormattingOptions](#FormattingOptions) literals.
+ */
+var FormattingOptions;
+(function (FormattingOptions) {
+    /**
+     * Creates a new FormattingOptions literal.
+     */
+    function create(tabSize, insertSpaces) {
+        return { tabSize: tabSize, insertSpaces: insertSpaces };
+    }
+    FormattingOptions.create = create;
+    /**
+     * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
     }
-    return res !== undefined ? res : path;
-}
+    FormattingOptions.is = is;
+})(FormattingOptions || (FormattingOptions = {}));
 /**
- * Compute `fsPath` for the given uri
+ * The DocumentLink namespace provides helper functions to work with
+ * [DocumentLink](#DocumentLink) literals.
  */
-function _makeFsPath(uri) {
-    var value;
-    if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
-        // unc path: file://shares/c$/far/boo
-        value = "//" + uri.authority + uri.path;
+var DocumentLink;
+(function (DocumentLink) {
+    /**
+     * Creates a new DocumentLink literal.
+     */
+    function create(range, target, data) {
+        return { range: range, target: target, data: data };
     }
-    else if (uri.path.charCodeAt(0) === 47 /* Slash */
-        && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
-        && uri.path.charCodeAt(2) === 58 /* Colon */) {
-        // windows drive letter: file:///c:/far/boo
-        value = uri.path[1].toLowerCase() + uri.path.substr(2);
+    DocumentLink.create = create;
+    /**
+     * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
     }
-    else {
-        // other path
-        value = uri.path;
+    DocumentLink.is = is;
+})(DocumentLink || (DocumentLink = {}));
+/**
+ * The SelectionRange namespace provides helper function to work with
+ * SelectionRange literals.
+ */
+var SelectionRange;
+(function (SelectionRange) {
+    /**
+     * Creates a new SelectionRange
+     * @param range the range.
+     * @param parent an optional parent.
+     */
+    function create(range, parent) {
+        return { range: range, parent: parent };
     }
-    if (isWindows) {
-        value = value.replace(/\//g, '\\');
+    SelectionRange.create = create;
+    function is(value) {
+        var candidate = value;
+        return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
     }
-    return value;
-}
+    SelectionRange.is = is;
+})(SelectionRange || (SelectionRange = {}));
+var EOL = ['\n', '\r\n', '\r'];
 /**
- * Create the external version of a uri
+ * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
  */
-function _asFormatted(uri, skipEncoding) {
-    var encoder = !skipEncoding
-        ? encodeURIComponentFast
-        : encodeURIComponentMinimal;
-    var res = '';
-    var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
-    if (scheme) {
-        res += scheme;
-        res += ':';
+var TextDocument;
+(function (TextDocument) {
+    /**
+     * Creates a new ITextDocument literal from the given uri and content.
+     * @param uri The document's uri.
+     * @param languageId  The document's language Id.
+     * @param content The document's content.
+     */
+    function create(uri, languageId, version, content) {
+        return new FullTextDocument(uri, languageId, version, content);
     }
-    if (authority || scheme === 'file') {
-        res += _slash;
-        res += _slash;
+    TextDocument.create = create;
+    /**
+     * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
+     */
+    function is(value) {
+        var candidate = value;
+        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
+            && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
     }
-    if (authority) {
-        var idx = authority.indexOf('@');
-        if (idx !== -1) {
-            // <user>@<auth>
-            var userinfo = authority.substr(0, idx);
-            authority = authority.substr(idx + 1);
-            idx = userinfo.indexOf(':');
-            if (idx === -1) {
-                res += encoder(userinfo, false, false);
+    TextDocument.is = is;
+    function applyEdits(document, edits) {
+        var text = document.getText();
+        var sortedEdits = mergeSort(edits, function (a, b) {
+            var diff = a.range.start.line - b.range.start.line;
+            if (diff === 0) {
+                return a.range.start.character - b.range.start.character;
+            }
+            return diff;
+        });
+        var lastModifiedOffset = text.length;
+        for (var i = sortedEdits.length - 1; i >= 0; i--) {
+            var e = sortedEdits[i];
+            var startOffset = document.offsetAt(e.range.start);
+            var endOffset = document.offsetAt(e.range.end);
+            if (endOffset <= lastModifiedOffset) {
+                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
             }
             else {
-                // <user>:<pass>@<auth>
-                res += encoder(userinfo.substr(0, idx), false, false);
-                res += ':';
-                res += encoder(userinfo.substr(idx + 1), false, false);
+                throw new Error('Overlapping edit');
             }
-            res += '@';
-        }
-        authority = authority.toLowerCase();
-        idx = authority.indexOf(':');
-        if (idx === -1) {
-            res += encoder(authority, false, false);
-        }
-        else {
-            // <auth>:<port>
-            res += encoder(authority.substr(0, idx), false, false);
-            res += authority.substr(idx);
+            lastModifiedOffset = startOffset;
         }
+        return text;
     }
-    if (path) {
-        // lower-case windows drive letters in /C:/fff or C:/fff
-        if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
-            var code = path.charCodeAt(1);
-            if (code >= 65 /* A */ && code <= 90 /* Z */) {
-                path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
-            }
+    TextDocument.applyEdits = applyEdits;
+    function mergeSort(data, compare) {
+        if (data.length <= 1) {
+            // sorted
+            return data;
         }
-        else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
-            var code = path.charCodeAt(0);
-            if (code >= 65 /* A */ && code <= 90 /* Z */) {
-                path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
+        var p = (data.length / 2) | 0;
+        var left = data.slice(0, p);
+        var right = data.slice(p);
+        mergeSort(left, compare);
+        mergeSort(right, compare);
+        var leftIdx = 0;
+        var rightIdx = 0;
+        var i = 0;
+        while (leftIdx < left.length && rightIdx < right.length) {
+            var ret = compare(left[leftIdx], right[rightIdx]);
+            if (ret <= 0) {
+                // smaller_equal -> take left to preserve order
+                data[i++] = left[leftIdx++];
+            }
+            else {
+                // greater -> take right
+                data[i++] = right[rightIdx++];
             }
         }
-        // encode the rest of the path
-        res += encoder(path, true, false);
-    }
-    if (query) {
-        res += '?';
-        res += encoder(query, false, _isQueryStringScheme(scheme));
-    }
-    if (fragment) {
-        res += '#';
-        res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;
-    }
-    return res;
-}
-var _a;
-
-
-/***/ }),
-/* 78 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-const vscode_languageserver_1 = __webpack_require__(34);
-function formatError(message, err) {
-    if (err instanceof Error) {
-        let error = err;
-        return `${message}: ${error.message}\n${error.stack}`;
-    }
-    else if (typeof err === 'string') {
-        return `${message}: ${err}`;
+        while (leftIdx < left.length) {
+            data[i++] = left[leftIdx++];
+        }
+        while (rightIdx < right.length) {
+            data[i++] = right[rightIdx++];
+        }
+        return data;
     }
-    else if (err) {
-        return `${message}: ${err.toString()}`;
+})(TextDocument || (TextDocument = {}));
+var FullTextDocument = /** @class */ (function () {
+    function FullTextDocument(uri, languageId, version, content) {
+        this._uri = uri;
+        this._languageId = languageId;
+        this._version = version;
+        this._content = content;
+        this._lineOffsets = undefined;
     }
-    return message;
-}
-exports.formatError = formatError;
-function runSafeAsync(func, errorVal, errorMessage, token) {
-    return new Promise((resolve) => {
-        setImmediate(() => {
-            if (token.isCancellationRequested) {
-                resolve(cancelValue());
-            }
-            return func().then(result => {
-                if (token.isCancellationRequested) {
-                    resolve(cancelValue());
-                    return;
+    Object.defineProperty(FullTextDocument.prototype, "uri", {
+        get: function () {
+            return this._uri;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    Object.defineProperty(FullTextDocument.prototype, "languageId", {
+        get: function () {
+            return this._languageId;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    Object.defineProperty(FullTextDocument.prototype, "version", {
+        get: function () {
+            return this._version;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    FullTextDocument.prototype.getText = function (range) {
+        if (range) {
+            var start = this.offsetAt(range.start);
+            var end = this.offsetAt(range.end);
+            return this._content.substring(start, end);
+        }
+        return this._content;
+    };
+    FullTextDocument.prototype.update = function (event, version) {
+        this._content = event.text;
+        this._version = version;
+        this._lineOffsets = undefined;
+    };
+    FullTextDocument.prototype.getLineOffsets = function () {
+        if (this._lineOffsets === undefined) {
+            var lineOffsets = [];
+            var text = this._content;
+            var isLineStart = true;
+            for (var i = 0; i < text.length; i++) {
+                if (isLineStart) {
+                    lineOffsets.push(i);
+                    isLineStart = false;
                 }
-                else {
-                    resolve(result);
+                var ch = text.charAt(i);
+                isLineStart = (ch === '\r' || ch === '\n');
+                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
+                    i++;
                 }
-            }, e => {
-                console.error(formatError(errorMessage, e));
-                resolve(errorVal);
-            });
-        });
-    });
-}
-exports.runSafeAsync = runSafeAsync;
-function runSafe(func, errorVal, errorMessage, token) {
-    return new Promise((resolve) => {
-        setImmediate(() => {
-            if (token.isCancellationRequested) {
-                resolve(cancelValue());
             }
-            else {
-                try {
-                    let result = func();
-                    if (token.isCancellationRequested) {
-                        resolve(cancelValue());
-                        return;
-                    }
-                    else {
-                        resolve(result);
-                    }
-                }
-                catch (e) {
-                    console.error(formatError(errorMessage, e));
-                    resolve(errorVal);
-                }
+            if (isLineStart && text.length > 0) {
+                lineOffsets.push(text.length);
             }
-        });
-    });
-}
-exports.runSafe = runSafe;
-function cancelValue() {
-    console.log('cancelled');
-    return new vscode_languageserver_1.ResponseError(vscode_languageserver_1.ErrorCodes.RequestCancelled, 'Request cancelled');
-}
-
-
-/***/ }),
-/* 79 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLanguageService", function() { return getLanguageService; });
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextDocument"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItem"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionList"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Hover"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolInformation"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Diagnostic"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FormattingOptions"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkedString"]; });
-
-/* harmony import */ var _services_jsonCompletion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81);
-/* harmony import */ var _services_jsonHover__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92);
-/* harmony import */ var _services_jsonValidation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93);
-/* harmony import */ var _services_jsonDocumentSymbols__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96);
-/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(82);
-/* harmony import */ var _services_configuration__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(98);
-/* harmony import */ var _services_jsonSchemaService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(94);
-/* harmony import */ var _services_jsonFolding__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(99);
-/* harmony import */ var _services_jsonSelectionRanges__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(100);
-/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(83);
-/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(89);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["Color"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["ColorInformation"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["ColorPresentation"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["FoldingRange"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["FoldingRangeKind"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["SelectionRange"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorCode", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["ErrorCode"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_11__["ClientCapabilities"]; });
-
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-
-
-
-
-
-
-
-
-
-
-
-
-function getLanguageService(params) {
-    var promise = params.promiseConstructor || Promise;
-    var jsonSchemaService = new _services_jsonSchemaService__WEBPACK_IMPORTED_MODULE_7__["JSONSchemaService"](params.schemaRequestService, params.workspaceContext, promise);
-    jsonSchemaService.setSchemaContributions(_services_configuration__WEBPACK_IMPORTED_MODULE_6__["schemaContributions"]);
-    var jsonCompletion = new _services_jsonCompletion__WEBPACK_IMPORTED_MODULE_1__["JSONCompletion"](jsonSchemaService, params.contributions, promise, params.clientCapabilities);
-    var jsonHover = new _services_jsonHover__WEBPACK_IMPORTED_MODULE_2__["JSONHover"](jsonSchemaService, params.contributions, promise);
-    var jsonDocumentSymbols = new _services_jsonDocumentSymbols__WEBPACK_IMPORTED_MODULE_4__["JSONDocumentSymbols"](jsonSchemaService);
-    var jsonValidation = new _services_jsonValidation__WEBPACK_IMPORTED_MODULE_3__["JSONValidation"](jsonSchemaService, promise);
-    return {
-        configure: function (settings) {
-            jsonSchemaService.clearExternalSchemas();
-            if (settings.schemas) {
-                settings.schemas.forEach(function (settings) {
-                    jsonSchemaService.registerExternalSchema(settings.uri, settings.fileMatch, settings.schema);
-                });
+            this._lineOffsets = lineOffsets;
+        }
+        return this._lineOffsets;
+    };
+    FullTextDocument.prototype.positionAt = function (offset) {
+        offset = Math.max(Math.min(offset, this._content.length), 0);
+        var lineOffsets = this.getLineOffsets();
+        var low = 0, high = lineOffsets.length;
+        if (high === 0) {
+            return Position.create(0, offset);
+        }
+        while (low < high) {
+            var mid = Math.floor((low + high) / 2);
+            if (lineOffsets[mid] > offset) {
+                high = mid;
             }
-            jsonValidation.configure(settings);
-        },
-        resetSchema: function (uri) { return jsonSchemaService.onResourceChange(uri); },
-        doValidation: jsonValidation.doValidation.bind(jsonValidation),
-        parseJSONDocument: function (document) { return Object(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_5__["parse"])(document, { collectComments: true }); },
-        newJSONDocument: function (root, diagnostics) { return Object(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_5__["newJSONDocument"])(root, diagnostics); },
-        doResolve: jsonCompletion.doResolve.bind(jsonCompletion),
-        doComplete: jsonCompletion.doComplete.bind(jsonCompletion),
-        findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols),
-        findDocumentSymbols2: jsonDocumentSymbols.findDocumentSymbols2.bind(jsonDocumentSymbols),
-        findColorSymbols: function (d, s) { return jsonDocumentSymbols.findDocumentColors(d, s).then(function (s) { return s.map(function (s) { return s.range; }); }); },
-        findDocumentColors: jsonDocumentSymbols.findDocumentColors.bind(jsonDocumentSymbols),
-        getColorPresentations: jsonDocumentSymbols.getColorPresentations.bind(jsonDocumentSymbols),
-        doHover: jsonHover.doHover.bind(jsonHover),
-        getFoldingRanges: _services_jsonFolding__WEBPACK_IMPORTED_MODULE_8__["getFoldingRanges"],
-        getSelectionRanges: _services_jsonSelectionRanges__WEBPACK_IMPORTED_MODULE_9__["getSelectionRanges"],
-        format: function (d, r, o) {
-            var range = void 0;
-            if (r) {
-                var offset = d.offsetAt(r.start);
-                var length = d.offsetAt(r.end) - offset;
-                range = { offset: offset, length: length };
+            else {
+                low = mid + 1;
             }
-            var options = { tabSize: o ? o.tabSize : 4, insertSpaces: o ? o.insertSpaces : true, eol: '\n' };
-            return Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_10__["format"])(d.getText(), range, options).map(function (e) {
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"].replace(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(d.positionAt(e.offset), d.positionAt(e.offset + e.length)), e.content);
-            });
         }
+        // low is the least x for which the line offset is larger than the current offset
+        // or array.length if no line offset is larger than the current offset
+        var line = low - 1;
+        return Position.create(line, offset - lineOffsets[line]);
     };
-}
-
-
-/***/ }),
-/* 80 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentSaveReason", function() { return TextDocumentSaveReason; });
+    FullTextDocument.prototype.offsetAt = function (position) {
+        var lineOffsets = this.getLineOffsets();
+        if (position.line >= lineOffsets.length) {
+            return this._content.length;
+        }
+        else if (position.line < 0) {
+            return 0;
+        }
+        var lineOffset = lineOffsets[position.line];
+        var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
+        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
+    };
+    Object.defineProperty(FullTextDocument.prototype, "lineCount", {
+        get: function () {
+            return this.getLineOffsets().length;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    return FullTextDocument;
+}());
+var Is;
+(function (Is) {
+    var toString = Object.prototype.toString;
+    function defined(value) {
+        return typeof value !== 'undefined';
+    }
+    Is.defined = defined;
+    function undefined(value) {
+        return typeof value === 'undefined';
+    }
+    Is.undefined = undefined;
+    function boolean(value) {
+        return value === true || value === false;
+    }
+    Is.boolean = boolean;
+    function string(value) {
+        return toString.call(value) === '[object String]';
+    }
+    Is.string = string;
+    function number(value) {
+        return toString.call(value) === '[object Number]';
+    }
+    Is.number = number;
+    function func(value) {
+        return toString.call(value) === '[object Function]';
+    }
+    Is.func = func;
+    function objectLiteral(value) {
+        // Strictly speaking class instances pass this check as well. Since the LSP
+        // doesn't use classes we ignore this for now. If we do we need to add something
+        // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
+        return value !== null && typeof value === 'object';
+    }
+    Is.objectLiteral = objectLiteral;
+    function typedArray(value, check) {
+        return Array.isArray(value) && value.every(check);
+    }
+    Is.typedArray = typedArray;
+})(Is || (Is = {}));
+
+
+/***/ }),
+/* 62 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
 /* --------------------------------------------------------------------------------------------
  * Copyright (c) Microsoft Corporation. All rights reserved.
  * Licensed under the MIT License. See License.txt in the project root for license information.
  * ------------------------------------------------------------------------------------------ */
-
-/**
- * The Position namespace provides helper functions to work with
- * [Position](#Position) literals.
- */
-var Position;
-(function (Position) {
-    /**
-     * Creates a new Position literal from the given line and character.
-     * @param line The position's line.
-     * @param character The position's character.
-     */
-    function create(line, character) {
-        return { line: line, character: character };
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
+    constructor(method) {
+        super(method);
     }
-    Position.create = create;
-    /**
-     * Checks whether the given liternal conforms to the [Position](#Position) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
+}
+exports.ProtocolRequestType0 = ProtocolRequestType0;
+class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
+    constructor(method) {
+        super(method);
     }
-    Position.is = is;
-})(Position || (Position = {}));
-/**
- * The Range namespace provides helper functions to work with
- * [Range](#Range) literals.
- */
-var Range;
-(function (Range) {
-    function create(one, two, three, four) {
-        if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
-            return { start: Position.create(one, two), end: Position.create(three, four) };
-        }
-        else if (Position.is(one) && Position.is(two)) {
-            return { start: one, end: two };
-        }
-        else {
-            throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
-        }
+}
+exports.ProtocolRequestType = ProtocolRequestType;
+class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
+    constructor(method) {
+        super(method);
     }
-    Range.create = create;
-    /**
-     * Checks whether the given literal conforms to the [Range](#Range) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
+}
+exports.ProtocolNotificationType = ProtocolNotificationType;
+class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
+    constructor(method) {
+        super(method);
     }
-    Range.is = is;
-})(Range || (Range = {}));
+}
+exports.ProtocolNotificationType0 = ProtocolNotificationType0;
+//# sourceMappingURL=messages.js.map
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const Is = __webpack_require__(64);
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+const protocol_implementation_1 = __webpack_require__(65);
+exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
+const protocol_typeDefinition_1 = __webpack_require__(66);
+exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
+const protocol_workspaceFolders_1 = __webpack_require__(67);
+exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
+exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
+const protocol_configuration_1 = __webpack_require__(68);
+exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
+const protocol_colorProvider_1 = __webpack_require__(69);
+exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
+exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
+const protocol_foldingRange_1 = __webpack_require__(70);
+exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
+const protocol_declaration_1 = __webpack_require__(71);
+exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
+const protocol_selectionRange_1 = __webpack_require__(72);
+exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
+const protocol_progress_1 = __webpack_require__(73);
+exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
+exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
+exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
+const protocol_callHierarchy_1 = __webpack_require__(74);
+exports.CallHierarchyIncomingCallsRequest = protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest;
+exports.CallHierarchyOutgoingCallsRequest = protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest;
+exports.CallHierarchyPrepareRequest = protocol_callHierarchy_1.CallHierarchyPrepareRequest;
+// @ts-ignore: to avoid inlining LocatioLink as dynamic import
+let __noDynamicImport;
 /**
- * The Location namespace provides helper functions to work with
- * [Location](#Location) literals.
+ * The DocumentFilter namespace provides helper functions to work with
+ * [DocumentFilter](#DocumentFilter) literals.
  */
-var Location;
-(function (Location) {
-    /**
-     * Creates a Location literal.
-     * @param uri The location's uri.
-     * @param range The location's range.
-     */
-    function create(uri, range) {
-        return { uri: uri, range: range };
-    }
-    Location.create = create;
-    /**
-     * Checks whether the given literal conforms to the [Location](#Location) interface.
-     */
+var DocumentFilter;
+(function (DocumentFilter) {
     function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
+        const candidate = value;
+        return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
     }
-    Location.is = is;
-})(Location || (Location = {}));
+    DocumentFilter.is = is;
+})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
 /**
- * The LocationLink namespace provides helper functions to work with
- * [LocationLink](#LocationLink) literals.
+ * The DocumentSelector namespace provides helper functions to work with
+ * [DocumentSelector](#DocumentSelector)s.
  */
-var LocationLink;
-(function (LocationLink) {
-    /**
-     * Creates a LocationLink literal.
-     * @param targetUri The definition's uri.
-     * @param targetRange The full range of the definition.
-     * @param targetSelectionRange The span of the symbol definition at the target.
-     * @param originSelectionRange The span of the symbol being defined in the originating source file.
-     */
-    function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
-        return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
-    }
-    LocationLink.create = create;
-    /**
-     * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
-     */
+var DocumentSelector;
+(function (DocumentSelector) {
     function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
-            && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
-            && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
+        if (!Array.isArray(value)) {
+            return false;
+        }
+        for (let elem of value) {
+            if (!Is.string(elem) && !DocumentFilter.is(elem)) {
+                return false;
+            }
+        }
+        return true;
     }
-    LocationLink.is = is;
-})(LocationLink || (LocationLink = {}));
+    DocumentSelector.is = is;
+})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
 /**
- * The Color namespace provides helper functions to work with
- * [Color](#Color) literals.
+ * The `client/registerCapability` request is sent from the server to the client to register a new capability
+ * handler on the client side.
  */
-var Color;
-(function (Color) {
-    /**
-     * Creates a new Color literal.
-     */
-    function create(red, green, blue, alpha) {
-        return {
-            red: red,
-            green: green,
-            blue: blue,
-            alpha: alpha,
-        };
-    }
-    Color.create = create;
-    /**
-     * Checks whether the given literal conforms to the [Color](#Color) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.number(candidate.red)
-            && Is.number(candidate.green)
-            && Is.number(candidate.blue)
-            && Is.number(candidate.alpha);
-    }
-    Color.is = is;
-})(Color || (Color = {}));
+var RegistrationRequest;
+(function (RegistrationRequest) {
+    RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
+})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
 /**
- * The ColorInformation namespace provides helper functions to work with
- * [ColorInformation](#ColorInformation) literals.
+ * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
+ * handler on the client side.
  */
-var ColorInformation;
-(function (ColorInformation) {
+var UnregistrationRequest;
+(function (UnregistrationRequest) {
+    UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
+})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
+var ResourceOperationKind;
+(function (ResourceOperationKind) {
     /**
-     * Creates a new ColorInformation literal.
+     * Supports creating new files and folders.
      */
-    function create(range, color) {
-        return {
-            range: range,
-            color: color,
-        };
-    }
-    ColorInformation.create = create;
+    ResourceOperationKind.Create = 'create';
     /**
-     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
+     * Supports renaming existing files and folders.
      */
-    function is(value) {
-        var candidate = value;
-        return Range.is(candidate.range) && Color.is(candidate.color);
-    }
-    ColorInformation.is = is;
-})(ColorInformation || (ColorInformation = {}));
-/**
- * The Color namespace provides helper functions to work with
- * [ColorPresentation](#ColorPresentation) literals.
- */
-var ColorPresentation;
-(function (ColorPresentation) {
+    ResourceOperationKind.Rename = 'rename';
     /**
-     * Creates a new ColorInformation literal.
+     * Supports deleting existing files and folders.
      */
-    function create(label, textEdit, additionalTextEdits) {
-        return {
-            label: label,
-            textEdit: textEdit,
-            additionalTextEdits: additionalTextEdits,
-        };
-    }
-    ColorPresentation.create = create;
+    ResourceOperationKind.Delete = 'delete';
+})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
+var FailureHandlingKind;
+(function (FailureHandlingKind) {
     /**
-     * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
+     * Applying the workspace change is simply aborted if one of the changes provided
+     * fails. All operations executed before the failing operation stay executed.
      */
-    function is(value) {
-        var candidate = value;
-        return Is.string(candidate.label)
-            && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
-            && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
-    }
-    ColorPresentation.is = is;
-})(ColorPresentation || (ColorPresentation = {}));
-/**
- * Enum of known range kinds
- */
-var FoldingRangeKind;
-(function (FoldingRangeKind) {
+    FailureHandlingKind.Abort = 'abort';
     /**
-     * Folding range for a comment
+     * All operations are executed transactional. That means they either all
+     * succeed or no changes at all are applied to the workspace.
      */
-    FoldingRangeKind["Comment"] = "comment";
+    FailureHandlingKind.Transactional = 'transactional';
     /**
-     * Folding range for a imports or includes
+     * If the workspace edit contains only textual file changes they are executed transactional.
+     * If resource changes (create, rename or delete file) are part of the change the failure
+     * handling startegy is abort.
      */
-    FoldingRangeKind["Imports"] = "imports";
+    FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
     /**
-     * Folding range for a region (e.g. `#region`)
+     * The client tries to undo the operations already executed. But there is no
+     * guarantee that this is succeeding.
      */
-    FoldingRangeKind["Region"] = "region";
-})(FoldingRangeKind || (FoldingRangeKind = {}));
+    FailureHandlingKind.Undo = 'undo';
+})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
 /**
- * The folding range namespace provides helper functions to work with
- * [FoldingRange](#FoldingRange) literals.
+ * The StaticRegistrationOptions namespace provides helper functions to work with
+ * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
  */
-var FoldingRange;
-(function (FoldingRange) {
-    /**
-     * Creates a new FoldingRange literal.
-     */
-    function create(startLine, endLine, startCharacter, endCharacter, kind) {
-        var result = {
-            startLine: startLine,
-            endLine: endLine
-        };
-        if (Is.defined(startCharacter)) {
-            result.startCharacter = startCharacter;
-        }
-        if (Is.defined(endCharacter)) {
-            result.endCharacter = endCharacter;
-        }
-        if (Is.defined(kind)) {
-            result.kind = kind;
-        }
-        return result;
+var StaticRegistrationOptions;
+(function (StaticRegistrationOptions) {
+    function hasId(value) {
+        const candidate = value;
+        return candidate && Is.string(candidate.id) && candidate.id.length > 0;
+    }
+    StaticRegistrationOptions.hasId = hasId;
+})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
+/**
+ * The TextDocumentRegistrationOptions namespace provides helper functions to work with
+ * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
+ */
+var TextDocumentRegistrationOptions;
+(function (TextDocumentRegistrationOptions) {
+    function is(value) {
+        const candidate = value;
+        return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
     }
-    FoldingRange.create = create;
+    TextDocumentRegistrationOptions.is = is;
+})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
+/**
+ * The WorkDoneProgressOptions namespace provides helper functions to work with
+ * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
+ */
+var WorkDoneProgressOptions;
+(function (WorkDoneProgressOptions) {
+    function is(value) {
+        const candidate = value;
+        return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
+    }
+    WorkDoneProgressOptions.is = is;
+    function hasWorkDoneProgress(value) {
+        const candidate = value;
+        return candidate && Is.boolean(candidate.workDoneProgress);
+    }
+    WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
+})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
+/**
+ * The initialize request is sent from the client to the server.
+ * It is sent once as the request after starting up the server.
+ * The requests parameter is of type [InitializeParams](#InitializeParams)
+ * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
+ * resolves to such.
+ */
+var InitializeRequest;
+(function (InitializeRequest) {
+    InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
+})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
+/**
+ * Known error codes for an `InitializeError`;
+ */
+var InitializeError;
+(function (InitializeError) {
     /**
-     * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
+     * If the protocol version provided by the client can't be handled by the server.
+     * @deprecated This initialize error got replaced by client capabilities. There is
+     * no version handshake in version 3.0x
      */
-    function is(value) {
-        var candidate = value;
-        return Is.number(candidate.startLine) && Is.number(candidate.startLine)
-            && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
-            && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
-            && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
-    }
-    FoldingRange.is = is;
-})(FoldingRange || (FoldingRange = {}));
+    InitializeError.unknownProtocolVersion = 1;
+})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
 /**
- * The DiagnosticRelatedInformation namespace provides helper functions to work with
- * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
+ * The intialized notification is sent from the client to the
+ * server after the client is fully initialized and the server
+ * is allowed to send requests from the server to the client.
  */
-var DiagnosticRelatedInformation;
-(function (DiagnosticRelatedInformation) {
+var InitializedNotification;
+(function (InitializedNotification) {
+    InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
+})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
+//---- Shutdown Method ----
+/**
+ * A shutdown request is sent from the client to the server.
+ * It is sent once when the client decides to shutdown the
+ * server. The only notification that is sent after a shutdown request
+ * is the exit event.
+ */
+var ShutdownRequest;
+(function (ShutdownRequest) {
+    ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
+})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
+//---- Exit Notification ----
+/**
+ * The exit event is sent from the client to the server to
+ * ask the server to exit its process.
+ */
+var ExitNotification;
+(function (ExitNotification) {
+    ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
+})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
+/**
+ * The configuration change notification is sent from the client to the server
+ * when the client's configuration has changed. The notification contains
+ * the changed configuration as defined by the language client.
+ */
+var DidChangeConfigurationNotification;
+(function (DidChangeConfigurationNotification) {
+    DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
+})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
+//---- Message show and log notifications ----
+/**
+ * The message type
+ */
+var MessageType;
+(function (MessageType) {
     /**
-     * Creates a new DiagnosticRelatedInformation literal.
+     * An error message.
      */
-    function create(location, message) {
-        return {
-            location: location,
-            message: message
-        };
-    }
-    DiagnosticRelatedInformation.create = create;
+    MessageType.Error = 1;
     /**
-     * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
+     * A warning message.
      */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
-    }
-    DiagnosticRelatedInformation.is = is;
-})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
+    MessageType.Warning = 2;
+    /**
+     * An information message.
+     */
+    MessageType.Info = 3;
+    /**
+     * A log message.
+     */
+    MessageType.Log = 4;
+})(MessageType = exports.MessageType || (exports.MessageType = {}));
 /**
- * The diagnostic's severity.
+ * The show message notification is sent from a server to a client to ask
+ * the client to display a particular message in the user interface.
  */
-var DiagnosticSeverity;
-(function (DiagnosticSeverity) {
+var ShowMessageNotification;
+(function (ShowMessageNotification) {
+    ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
+})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
+/**
+ * The show message request is sent from the server to the client to show a message
+ * and a set of options actions to the user.
+ */
+var ShowMessageRequest;
+(function (ShowMessageRequest) {
+    ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
+})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
+/**
+ * The log message notification is sent from the server to the client to ask
+ * the client to log a particular message.
+ */
+var LogMessageNotification;
+(function (LogMessageNotification) {
+    LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
+})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
+//---- Telemetry notification
+/**
+ * The telemetry event notification is sent from the server to the client to ask
+ * the client to log telemetry data.
+ */
+var TelemetryEventNotification;
+(function (TelemetryEventNotification) {
+    TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
+})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
+/**
+ * Defines how the host (editor) should sync
+ * document changes to the language server.
+ */
+var TextDocumentSyncKind;
+(function (TextDocumentSyncKind) {
     /**
-     * Reports an error.
+     * Documents should not be synced at all.
      */
-    DiagnosticSeverity.Error = 1;
+    TextDocumentSyncKind.None = 0;
     /**
-     * Reports a warning.
+     * Documents are synced by always sending the full content
+     * of the document.
      */
-    DiagnosticSeverity.Warning = 2;
+    TextDocumentSyncKind.Full = 1;
     /**
-     * Reports an information.
+     * Documents are synced by sending the full content on open.
+     * After that only incremental updates to the document are
+     * send.
      */
-    DiagnosticSeverity.Information = 3;
+    TextDocumentSyncKind.Incremental = 2;
+})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
+/**
+ * The document open notification is sent from the client to the server to signal
+ * newly opened text documents. The document's truth is now managed by the client
+ * and the server must not try to read the document's truth using the document's
+ * uri. Open in this sense means it is managed by the client. It doesn't necessarily
+ * mean that its content is presented in an editor. An open notification must not
+ * be sent more than once without a corresponding close notification send before.
+ * This means open and close notification must be balanced and the max open count
+ * is one.
+ */
+var DidOpenTextDocumentNotification;
+(function (DidOpenTextDocumentNotification) {
+    DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
+    DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
+})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
+/**
+ * The document change notification is sent from the client to the server to signal
+ * changes to a text document.
+ */
+var DidChangeTextDocumentNotification;
+(function (DidChangeTextDocumentNotification) {
+    DidChangeTextDocumentNotification.method = 'textDocument/didChange';
+    DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
+})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
+/**
+ * The document close notification is sent from the client to the server when
+ * the document got closed in the client. The document's truth now exists where
+ * the document's uri points to (e.g. if the document's uri is a file uri the
+ * truth now exists on disk). As with the open notification the close notification
+ * is about managing the document's content. Receiving a close notification
+ * doesn't mean that the document was open in an editor before. A close
+ * notification requires a previous open notification to be sent.
+ */
+var DidCloseTextDocumentNotification;
+(function (DidCloseTextDocumentNotification) {
+    DidCloseTextDocumentNotification.method = 'textDocument/didClose';
+    DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
+})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
+/**
+ * The document save notification is sent from the client to the server when
+ * the document got saved in the client.
+ */
+var DidSaveTextDocumentNotification;
+(function (DidSaveTextDocumentNotification) {
+    DidSaveTextDocumentNotification.method = 'textDocument/didSave';
+    DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
+})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
+/**
+ * Represents reasons why a text document is saved.
+ */
+var TextDocumentSaveReason;
+(function (TextDocumentSaveReason) {
     /**
-     * Reports a hint.
+     * Manually triggered, e.g. by the user pressing save, by starting debugging,
+     * or by an API call.
      */
-    DiagnosticSeverity.Hint = 4;
-})(DiagnosticSeverity || (DiagnosticSeverity = {}));
-var DiagnosticTag;
-(function (DiagnosticTag) {
+    TextDocumentSaveReason.Manual = 1;
     /**
-     * Unused or unnecessary code.
-     *
-     * Clients are allowed to render diagnostics with this tag faded out instead of having
-     * an error squiggle.
+     * Automatic after a delay.
      */
-    DiagnosticTag.Unnecessary = 1;
-})(DiagnosticTag || (DiagnosticTag = {}));
+    TextDocumentSaveReason.AfterDelay = 2;
+    /**
+     * When the editor lost focus.
+     */
+    TextDocumentSaveReason.FocusOut = 3;
+})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
 /**
- * The Diagnostic namespace provides helper functions to work with
- * [Diagnostic](#Diagnostic) literals.
+ * A document will save notification is sent from the client to the server before
+ * the document is actually saved.
  */
-var Diagnostic;
-(function (Diagnostic) {
+var WillSaveTextDocumentNotification;
+(function (WillSaveTextDocumentNotification) {
+    WillSaveTextDocumentNotification.method = 'textDocument/willSave';
+    WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
+})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
+/**
+ * A document will save request is sent from the client to the server before
+ * the document is actually saved. The request can return an array of TextEdits
+ * which will be applied to the text document before it is saved. Please note that
+ * clients might drop results if computing the text edits took too long or if a
+ * server constantly fails on this request. This is done to keep the save fast and
+ * reliable.
+ */
+var WillSaveTextDocumentWaitUntilRequest;
+(function (WillSaveTextDocumentWaitUntilRequest) {
+    WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
+    WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
+})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
+/**
+ * The watched files notification is sent from the client to the server when
+ * the client detects changes to file watched by the language client.
+ */
+var DidChangeWatchedFilesNotification;
+(function (DidChangeWatchedFilesNotification) {
+    DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
+})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
+/**
+ * The file event type
+ */
+var FileChangeType;
+(function (FileChangeType) {
     /**
-     * Creates a new Diagnostic literal.
+     * The file got created.
      */
-    function create(range, message, severity, code, source, relatedInformation) {
-        var result = { range: range, message: message };
-        if (Is.defined(severity)) {
-            result.severity = severity;
-        }
-        if (Is.defined(code)) {
-            result.code = code;
-        }
-        if (Is.defined(source)) {
-            result.source = source;
-        }
-        if (Is.defined(relatedInformation)) {
-            result.relatedInformation = relatedInformation;
-        }
-        return result;
-    }
-    Diagnostic.create = create;
+    FileChangeType.Created = 1;
     /**
-     * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
+     * The file got changed.
      */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate)
-            && Range.is(candidate.range)
-            && Is.string(candidate.message)
-            && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
-            && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
-            && (Is.string(candidate.source) || Is.undefined(candidate.source))
-            && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
-    }
-    Diagnostic.is = is;
-})(Diagnostic || (Diagnostic = {}));
+    FileChangeType.Changed = 2;
+    /**
+     * The file got deleted.
+     */
+    FileChangeType.Deleted = 3;
+})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
+var WatchKind;
+(function (WatchKind) {
+    /**
+     * Interested in create events.
+     */
+    WatchKind.Create = 1;
+    /**
+     * Interested in change events
+     */
+    WatchKind.Change = 2;
+    /**
+     * Interested in delete events
+     */
+    WatchKind.Delete = 4;
+})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
 /**
- * The Command namespace provides helper functions to work with
- * [Command](#Command) literals.
+ * Diagnostics notification are sent from the server to the client to signal
+ * results of validation runs.
  */
-var Command;
-(function (Command) {
+var PublishDiagnosticsNotification;
+(function (PublishDiagnosticsNotification) {
+    PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
+})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
+/**
+ * How a completion was triggered
+ */
+var CompletionTriggerKind;
+(function (CompletionTriggerKind) {
     /**
-     * Creates a new Command literal.
+     * Completion was triggered by typing an identifier (24x7 code
+     * complete), manual invocation (e.g Ctrl+Space) or via API.
      */
-    function create(title, command) {
-        var args = [];
-        for (var _i = 2; _i < arguments.length; _i++) {
-            args[_i - 2] = arguments[_i];
-        }
-        var result = { title: title, command: command };
-        if (Is.defined(args) && args.length > 0) {
-            result.arguments = args;
-        }
-        return result;
-    }
-    Command.create = create;
+    CompletionTriggerKind.Invoked = 1;
     /**
-     * Checks whether the given literal conforms to the [Command](#Command) interface.
+     * Completion was triggered by a trigger character specified by
+     * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
      */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
-    }
-    Command.is = is;
-})(Command || (Command = {}));
+    CompletionTriggerKind.TriggerCharacter = 2;
+    /**
+     * Completion was re-triggered as current completion list is incomplete
+     */
+    CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
+})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
 /**
- * The TextEdit namespace provides helper function to create replace,
- * insert and delete edits more easily.
+ * Request to request completion at a given text document position. The request's
+ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
+ * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
+ * or a Thenable that resolves to such.
+ *
+ * The request can delay the computation of the [`detail`](#CompletionItem.detail)
+ * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
+ * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
+ * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
  */
-var TextEdit;
-(function (TextEdit) {
+var CompletionRequest;
+(function (CompletionRequest) {
+    CompletionRequest.method = 'textDocument/completion';
+    CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
+    /** @deprecated Use CompletionRequest.type */
+    CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
+/**
+ * Request to resolve additional information for a given completion item.The request's
+ * parameter is of type [CompletionItem](#CompletionItem) the response
+ * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
+ */
+var CompletionResolveRequest;
+(function (CompletionResolveRequest) {
+    CompletionResolveRequest.method = 'completionItem/resolve';
+    CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
+})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
+/**
+ * Request to request hover information at a given text document position. The request's
+ * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
+ * type [Hover](#Hover) or a Thenable that resolves to such.
+ */
+var HoverRequest;
+(function (HoverRequest) {
+    HoverRequest.method = 'textDocument/hover';
+    HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
+})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
+/**
+ * How a signature help was triggered.
+ *
+ * @since 3.15.0
+ */
+var SignatureHelpTriggerKind;
+(function (SignatureHelpTriggerKind) {
     /**
-     * Creates a replace text edit.
-     * @param range The range of text to be replaced.
-     * @param newText The new text.
+     * Signature help was invoked manually by the user or by a command.
      */
-    function replace(range, newText) {
-        return { range: range, newText: newText };
-    }
-    TextEdit.replace = replace;
+    SignatureHelpTriggerKind.Invoked = 1;
     /**
-     * Creates a insert text edit.
-     * @param position The position to insert the text at.
-     * @param newText The text to be inserted.
+     * Signature help was triggered by a trigger character.
      */
-    function insert(position, newText) {
-        return { range: { start: position, end: position }, newText: newText };
-    }
-    TextEdit.insert = insert;
+    SignatureHelpTriggerKind.TriggerCharacter = 2;
     /**
-     * Creates a delete text edit.
-     * @param range The range of text to be deleted.
+     * Signature help was triggered by the cursor moving or by the document content changing.
      */
-    function del(range) {
-        return { range: range, newText: '' };
-    }
-    TextEdit.del = del;
-    function is(value) {
-        var candidate = value;
-        return Is.objectLiteral(candidate)
-            && Is.string(candidate.newText)
-            && Range.is(candidate.range);
-    }
-    TextEdit.is = is;
-})(TextEdit || (TextEdit = {}));
+    SignatureHelpTriggerKind.ContentChange = 3;
+})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
+var SignatureHelpRequest;
+(function (SignatureHelpRequest) {
+    SignatureHelpRequest.method = 'textDocument/signatureHelp';
+    SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
+})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
+/**
+ * A request to resolve the definition location of a symbol at a given text
+ * document position. The request's parameter is of type [TextDocumentPosition]
+ * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
+ * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
+ * to such.
+ */
+var DefinitionRequest;
+(function (DefinitionRequest) {
+    DefinitionRequest.method = 'textDocument/definition';
+    DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
+    /** @deprecated Use DefinitionRequest.type */
+    DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
+/**
+ * A request to resolve project-wide references for the symbol denoted
+ * by the given text document position. The request's parameter is of
+ * type [ReferenceParams](#ReferenceParams) the response is of type
+ * [Location[]](#Location) or a Thenable that resolves to such.
+ */
+var ReferencesRequest;
+(function (ReferencesRequest) {
+    ReferencesRequest.method = 'textDocument/references';
+    ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
+    /** @deprecated Use ReferencesRequest.type */
+    ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
+/**
+ * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
+ * text document position. The request's parameter is of type [TextDocumentPosition]
+ * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
+ * (#DocumentHighlight) or a Thenable that resolves to such.
+ */
+var DocumentHighlightRequest;
+(function (DocumentHighlightRequest) {
+    DocumentHighlightRequest.method = 'textDocument/documentHighlight';
+    DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
+    /** @deprecated Use DocumentHighlightRequest.type */
+    DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
+/**
+ * A request to list all symbols found in a given text document. The request's
+ * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
+ * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
+ * that resolves to such.
+ */
+var DocumentSymbolRequest;
+(function (DocumentSymbolRequest) {
+    DocumentSymbolRequest.method = 'textDocument/documentSymbol';
+    DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
+    /** @deprecated Use DocumentSymbolRequest.type */
+    DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
+/**
+ * A request to provide commands for the given text document and range.
+ */
+var CodeActionRequest;
+(function (CodeActionRequest) {
+    CodeActionRequest.method = 'textDocument/codeAction';
+    CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
+    /** @deprecated Use CodeActionRequest.type */
+    CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
+/**
+ * A request to list project-wide symbols matching the query string given
+ * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
+ * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
+ * resolves to such.
+ */
+var WorkspaceSymbolRequest;
+(function (WorkspaceSymbolRequest) {
+    WorkspaceSymbolRequest.method = 'workspace/symbol';
+    WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
+    /** @deprecated Use WorkspaceSymbolRequest.type */
+    WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
+/**
+ * A request to provide code lens for the given text document.
+ */
+var CodeLensRequest;
+(function (CodeLensRequest) {
+    CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
+    /** @deprecated Use CodeLensRequest.type */
+    CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
+/**
+ * A request to resolve a command for a given code lens.
+ */
+var CodeLensResolveRequest;
+(function (CodeLensResolveRequest) {
+    CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
+})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
+/**
+ * A request to provide document links
+ */
+var DocumentLinkRequest;
+(function (DocumentLinkRequest) {
+    DocumentLinkRequest.method = 'textDocument/documentLink';
+    DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
+    /** @deprecated Use DocumentLinkRequest.type */
+    DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
+/**
+ * Request to resolve additional information for a given document link. The request's
+ * parameter is of type [DocumentLink](#DocumentLink) the response
+ * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
+ */
+var DocumentLinkResolveRequest;
+(function (DocumentLinkResolveRequest) {
+    DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
+})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
+/**
+ * A request to to format a whole document.
+ */
+var DocumentFormattingRequest;
+(function (DocumentFormattingRequest) {
+    DocumentFormattingRequest.method = 'textDocument/formatting';
+    DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
+})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
+/**
+ * A request to to format a range in a document.
+ */
+var DocumentRangeFormattingRequest;
+(function (DocumentRangeFormattingRequest) {
+    DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
+    DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
+})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
+/**
+ * A request to format a document on type.
+ */
+var DocumentOnTypeFormattingRequest;
+(function (DocumentOnTypeFormattingRequest) {
+    DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
+    DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
+})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
+/**
+ * A request to rename a symbol.
+ */
+var RenameRequest;
+(function (RenameRequest) {
+    RenameRequest.method = 'textDocument/rename';
+    RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
+})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
+/**
+ * A request to test and perform the setup necessary for a rename.
+ */
+var PrepareRenameRequest;
+(function (PrepareRenameRequest) {
+    PrepareRenameRequest.method = 'textDocument/prepareRename';
+    PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
+})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
+/**
+ * A request send from the client to the server to execute a command. The request might return
+ * a workspace edit which the client will apply to the workspace.
+ */
+var ExecuteCommandRequest;
+(function (ExecuteCommandRequest) {
+    ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
+})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
+/**
+ * A request sent from the server to the client to modified certain resources.
+ */
+var ApplyWorkspaceEditRequest;
+(function (ApplyWorkspaceEditRequest) {
+    ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
+})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
+//# sourceMappingURL=protocol.js.map
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+Object.defineProperty(exports, "__esModule", { value: true });
+function boolean(value) {
+    return value === true || value === false;
+}
+exports.boolean = boolean;
+function string(value) {
+    return typeof value === 'string' || value instanceof String;
+}
+exports.string = string;
+function number(value) {
+    return typeof value === 'number' || value instanceof Number;
+}
+exports.number = number;
+function error(value) {
+    return value instanceof Error;
+}
+exports.error = error;
+function func(value) {
+    return typeof value === 'function';
+}
+exports.func = func;
+function array(value) {
+    return Array.isArray(value);
+}
+exports.array = array;
+function stringArray(value) {
+    return array(value) && value.every(elem => string(elem));
+}
+exports.stringArray = stringArray;
+function typedArray(value, check) {
+    return Array.isArray(value) && value.every(check);
+}
+exports.typedArray = typedArray;
+function objectLiteral(value) {
+    // Strictly speaking class instances pass this check as well. Since the LSP
+    // doesn't use classes we ignore this for now. If we do we need to add something
+    // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
+    return value !== null && typeof value === 'object';
+}
+exports.objectLiteral = objectLiteral;
+//# sourceMappingURL=is.js.map
+
+/***/ }),
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+// @ts-ignore: to avoid inlining LocatioLink as dynamic import
+let __noDynamicImport;
 /**
- * The TextDocumentEdit namespace provides helper function to create
- * an edit that manipulates a text document.
+ * A request to resolve the implementation locations of a symbol at a given text
+ * document position. The request's parameter is of type [TextDocumentPositioParams]
+ * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
+ * Thenable that resolves to such.
  */
-var TextDocumentEdit;
-(function (TextDocumentEdit) {
-    /**
-     * Creates a new `TextDocumentEdit`
-     */
-    function create(textDocument, edits) {
-        return { textDocument: textDocument, edits: edits };
-    }
-    TextDocumentEdit.create = create;
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate)
-            && VersionedTextDocumentIdentifier.is(candidate.textDocument)
-            && Array.isArray(candidate.edits);
-    }
-    TextDocumentEdit.is = is;
-})(TextDocumentEdit || (TextDocumentEdit = {}));
-var CreateFile;
-(function (CreateFile) {
-    function create(uri, options) {
-        var result = {
-            kind: 'create',
-            uri: uri
-        };
-        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
-            result.options = options;
-        }
-        return result;
-    }
-    CreateFile.create = create;
-    function is(value) {
-        var candidate = value;
-        return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
-            (candidate.options === void 0 ||
-                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
-    }
-    CreateFile.is = is;
-})(CreateFile || (CreateFile = {}));
-var RenameFile;
-(function (RenameFile) {
-    function create(oldUri, newUri, options) {
-        var result = {
-            kind: 'rename',
-            oldUri: oldUri,
-            newUri: newUri
-        };
-        if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
-            result.options = options;
-        }
-        return result;
-    }
-    RenameFile.create = create;
-    function is(value) {
-        var candidate = value;
-        return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
-            (candidate.options === void 0 ||
-                ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
-    }
-    RenameFile.is = is;
-})(RenameFile || (RenameFile = {}));
-var DeleteFile;
-(function (DeleteFile) {
-    function create(uri, options) {
-        var result = {
-            kind: 'delete',
-            uri: uri
-        };
-        if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
-            result.options = options;
-        }
-        return result;
-    }
-    DeleteFile.create = create;
-    function is(value) {
-        var candidate = value;
-        return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
-            (candidate.options === void 0 ||
-                ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
-    }
-    DeleteFile.is = is;
-})(DeleteFile || (DeleteFile = {}));
-var WorkspaceEdit;
-(function (WorkspaceEdit) {
-    function is(value) {
-        var candidate = value;
-        return candidate &&
-            (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
-            (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
-                if (Is.string(change.kind)) {
-                    return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
-                }
-                else {
-                    return TextDocumentEdit.is(change);
-                }
-            }));
-    }
-    WorkspaceEdit.is = is;
-})(WorkspaceEdit || (WorkspaceEdit = {}));
-var TextEditChangeImpl = /** @class */ (function () {
-    function TextEditChangeImpl(edits) {
-        this.edits = edits;
-    }
-    TextEditChangeImpl.prototype.insert = function (position, newText) {
-        this.edits.push(TextEdit.insert(position, newText));
-    };
-    TextEditChangeImpl.prototype.replace = function (range, newText) {
-        this.edits.push(TextEdit.replace(range, newText));
-    };
-    TextEditChangeImpl.prototype.delete = function (range) {
-        this.edits.push(TextEdit.del(range));
-    };
-    TextEditChangeImpl.prototype.add = function (edit) {
-        this.edits.push(edit);
-    };
-    TextEditChangeImpl.prototype.all = function () {
-        return this.edits;
-    };
-    TextEditChangeImpl.prototype.clear = function () {
-        this.edits.splice(0, this.edits.length);
-    };
-    return TextEditChangeImpl;
-}());
+var ImplementationRequest;
+(function (ImplementationRequest) {
+    ImplementationRequest.method = 'textDocument/implementation';
+    ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
+    /** @deprecated Use ImplementationRequest.type */
+    ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
+//# sourceMappingURL=protocol.implementation.js.map
+
+/***/ }),
+/* 66 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+// @ts-ignore: to avoid inlining LocatioLink as dynamic import
+let __noDynamicImport;
 /**
- * A workspace change helps constructing changes to a workspace.
+ * A request to resolve the type definition locations of a symbol at a given text
+ * document position. The request's parameter is of type [TextDocumentPositioParams]
+ * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
+ * Thenable that resolves to such.
  */
-var WorkspaceChange = /** @class */ (function () {
-    function WorkspaceChange(workspaceEdit) {
-        var _this = this;
-        this._textEditChanges = Object.create(null);
-        if (workspaceEdit) {
-            this._workspaceEdit = workspaceEdit;
-            if (workspaceEdit.documentChanges) {
-                workspaceEdit.documentChanges.forEach(function (change) {
-                    if (TextDocumentEdit.is(change)) {
-                        var textEditChange = new TextEditChangeImpl(change.edits);
-                        _this._textEditChanges[change.textDocument.uri] = textEditChange;
-                    }
-                });
-            }
-            else if (workspaceEdit.changes) {
-                Object.keys(workspaceEdit.changes).forEach(function (key) {
-                    var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
-                    _this._textEditChanges[key] = textEditChange;
-                });
-            }
-        }
-    }
-    Object.defineProperty(WorkspaceChange.prototype, "edit", {
-        /**
-         * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
-         * use to be returned from a workspace edit operation like rename.
-         */
-        get: function () {
-            return this._workspaceEdit;
-        },
-        enumerable: true,
-        configurable: true
-    });
-    WorkspaceChange.prototype.getTextEditChange = function (key) {
-        if (VersionedTextDocumentIdentifier.is(key)) {
-            if (!this._workspaceEdit) {
-                this._workspaceEdit = {
-                    documentChanges: []
-                };
-            }
-            if (!this._workspaceEdit.documentChanges) {
-                throw new Error('Workspace edit is not configured for document changes.');
-            }
-            var textDocument = key;
-            var result = this._textEditChanges[textDocument.uri];
-            if (!result) {
-                var edits = [];
-                var textDocumentEdit = {
-                    textDocument: textDocument,
-                    edits: edits
-                };
-                this._workspaceEdit.documentChanges.push(textDocumentEdit);
-                result = new TextEditChangeImpl(edits);
-                this._textEditChanges[textDocument.uri] = result;
-            }
-            return result;
-        }
-        else {
-            if (!this._workspaceEdit) {
-                this._workspaceEdit = {
-                    changes: Object.create(null)
-                };
-            }
-            if (!this._workspaceEdit.changes) {
-                throw new Error('Workspace edit is not configured for normal text edit changes.');
-            }
-            var result = this._textEditChanges[key];
-            if (!result) {
-                var edits = [];
-                this._workspaceEdit.changes[key] = edits;
-                result = new TextEditChangeImpl(edits);
-                this._textEditChanges[key] = result;
-            }
-            return result;
-        }
-    };
-    WorkspaceChange.prototype.createFile = function (uri, options) {
-        this.checkDocumentChanges();
-        this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
-    };
-    WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
-        this.checkDocumentChanges();
-        this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
-    };
-    WorkspaceChange.prototype.deleteFile = function (uri, options) {
-        this.checkDocumentChanges();
-        this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
-    };
-    WorkspaceChange.prototype.checkDocumentChanges = function () {
-        if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
-            throw new Error('Workspace edit is not configured for document changes.');
-        }
-    };
-    return WorkspaceChange;
-}());
+var TypeDefinitionRequest;
+(function (TypeDefinitionRequest) {
+    TypeDefinitionRequest.method = 'textDocument/typeDefinition';
+    TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
+    /** @deprecated Use TypeDefinitionRequest.type */
+    TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
+//# sourceMappingURL=protocol.typeDefinition.js.map
+
+/***/ }),
+/* 67 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
 
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const messages_1 = __webpack_require__(62);
 /**
- * The TextDocumentIdentifier namespace provides helper functions to work with
- * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
+ * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
  */
-var TextDocumentIdentifier;
-(function (TextDocumentIdentifier) {
-    /**
-     * Creates a new TextDocumentIdentifier literal.
-     * @param uri The document's uri.
-     */
-    function create(uri) {
-        return { uri: uri };
-    }
-    TextDocumentIdentifier.create = create;
-    /**
-     * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.string(candidate.uri);
-    }
-    TextDocumentIdentifier.is = is;
-})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
+var WorkspaceFoldersRequest;
+(function (WorkspaceFoldersRequest) {
+    WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
+})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
 /**
- * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
- * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
+ * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
+ * folder configuration changes.
  */
-var VersionedTextDocumentIdentifier;
-(function (VersionedTextDocumentIdentifier) {
-    /**
-     * Creates a new VersionedTextDocumentIdentifier literal.
-     * @param uri The document's uri.
-     * @param uri The document's text.
-     */
-    function create(uri, version) {
-        return { uri: uri, version: version };
-    }
-    VersionedTextDocumentIdentifier.create = create;
-    /**
-     * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
-    }
-    VersionedTextDocumentIdentifier.is = is;
-})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
+var DidChangeWorkspaceFoldersNotification;
+(function (DidChangeWorkspaceFoldersNotification) {
+    DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
+})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
+//# sourceMappingURL=protocol.workspaceFolders.js.map
+
+/***/ }),
+/* 68 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const messages_1 = __webpack_require__(62);
 /**
- * The TextDocumentItem namespace provides helper functions to work with
- * [TextDocumentItem](#TextDocumentItem) literals.
+ * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
+ * configuration setting.
+ *
+ * This pull model replaces the old push model were the client signaled configuration change via an
+ * event. If the server still needs to react to configuration changes (since the server caches the
+ * result of `workspace/configuration` requests) the server should register for an empty configuration
+ * change event and empty the cache if such an event is received.
  */
-var TextDocumentItem;
-(function (TextDocumentItem) {
-    /**
-     * Creates a new TextDocumentItem literal.
-     * @param uri The document's uri.
-     * @param languageId The document's language identifier.
-     * @param version The document's version number.
-     * @param text The document's text.
-     */
-    function create(uri, languageId, version, text) {
-        return { uri: uri, languageId: languageId, version: version, text: text };
-    }
-    TextDocumentItem.create = create;
-    /**
-     * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
-    }
-    TextDocumentItem.is = is;
-})(TextDocumentItem || (TextDocumentItem = {}));
+var ConfigurationRequest;
+(function (ConfigurationRequest) {
+    ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
+})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
+//# sourceMappingURL=protocol.configuration.js.map
+
+/***/ }),
+/* 69 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
 /**
- * Describes the content type that a client supports in various
- * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
- *
- * Please note that `MarkupKinds` must not start with a `$`. This kinds
- * are reserved for internal usage.
+ * A request to list all color symbols found in a given text document. The request's
+ * parameter is of type [DocumentColorParams](#DocumentColorParams) the
+ * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
+ * that resolves to such.
  */
-var MarkupKind;
-(function (MarkupKind) {
-    /**
-     * Plain text is supported as a content format
-     */
-    MarkupKind.PlainText = 'plaintext';
+var DocumentColorRequest;
+(function (DocumentColorRequest) {
+    DocumentColorRequest.method = 'textDocument/documentColor';
+    DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
+    /** @deprecated Use DocumentColorRequest.type */
+    DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
+/**
+ * A request to list all presentation for a color. The request's
+ * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
+ * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
+ * that resolves to such.
+ */
+var ColorPresentationRequest;
+(function (ColorPresentationRequest) {
+    ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
+})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
+//# sourceMappingURL=protocol.colorProvider.js.map
+
+/***/ }),
+/* 70 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+/**
+ * Enum of known range kinds
+ */
+var FoldingRangeKind;
+(function (FoldingRangeKind) {
     /**
-     * Markdown is supported as a content format
+     * Folding range for a comment
      */
-    MarkupKind.Markdown = 'markdown';
-})(MarkupKind || (MarkupKind = {}));
-(function (MarkupKind) {
+    FoldingRangeKind["Comment"] = "comment";
     /**
-     * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
+     * Folding range for a imports or includes
      */
-    function is(value) {
-        var candidate = value;
-        return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
-    }
-    MarkupKind.is = is;
-})(MarkupKind || (MarkupKind = {}));
-var MarkupContent;
-(function (MarkupContent) {
+    FoldingRangeKind["Imports"] = "imports";
     /**
-     * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
+     * Folding range for a region (e.g. `#region`)
      */
-    function is(value) {
-        var candidate = value;
-        return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
-    }
-    MarkupContent.is = is;
-})(MarkupContent || (MarkupContent = {}));
+    FoldingRangeKind["Region"] = "region";
+})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
 /**
- * The kind of a completion entry.
+ * A request to provide folding ranges in a document. The request's
+ * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
+ * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
+ * that resolves to such.
  */
-var CompletionItemKind;
-(function (CompletionItemKind) {
-    CompletionItemKind.Text = 1;
-    CompletionItemKind.Method = 2;
-    CompletionItemKind.Function = 3;
-    CompletionItemKind.Constructor = 4;
-    CompletionItemKind.Field = 5;
-    CompletionItemKind.Variable = 6;
-    CompletionItemKind.Class = 7;
-    CompletionItemKind.Interface = 8;
-    CompletionItemKind.Module = 9;
-    CompletionItemKind.Property = 10;
-    CompletionItemKind.Unit = 11;
-    CompletionItemKind.Value = 12;
-    CompletionItemKind.Enum = 13;
-    CompletionItemKind.Keyword = 14;
-    CompletionItemKind.Snippet = 15;
-    CompletionItemKind.Color = 16;
-    CompletionItemKind.File = 17;
-    CompletionItemKind.Reference = 18;
-    CompletionItemKind.Folder = 19;
-    CompletionItemKind.EnumMember = 20;
-    CompletionItemKind.Constant = 21;
-    CompletionItemKind.Struct = 22;
-    CompletionItemKind.Event = 23;
-    CompletionItemKind.Operator = 24;
-    CompletionItemKind.TypeParameter = 25;
-})(CompletionItemKind || (CompletionItemKind = {}));
+var FoldingRangeRequest;
+(function (FoldingRangeRequest) {
+    FoldingRangeRequest.method = 'textDocument/foldingRange';
+    FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
+    /** @deprecated Use FoldingRangeRequest.type */
+    FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
+//# sourceMappingURL=protocol.foldingRange.js.map
+
+/***/ }),
+/* 71 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+// @ts-ignore: to avoid inlining LocatioLink as dynamic import
+let __noDynamicImport;
+/**
+ * A request to resolve the type definition locations of a symbol at a given text
+ * document position. The request's parameter is of type [TextDocumentPositioParams]
+ * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
+ * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
+ * to such.
+ */
+var DeclarationRequest;
+(function (DeclarationRequest) {
+    DeclarationRequest.method = 'textDocument/declaration';
+    DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
+    /** @deprecated Use DeclarationRequest.type */
+    DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
+//# sourceMappingURL=protocol.declaration.js.map
+
+/***/ }),
+/* 72 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+/**
+ * A request to provide selection ranges in a document. The request's
+ * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
+ * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
+ * that resolves to such.
+ */
+var SelectionRangeRequest;
+(function (SelectionRangeRequest) {
+    SelectionRangeRequest.method = 'textDocument/selectionRange';
+    SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
+    /** @deprecated  Use SelectionRangeRequest.type */
+    SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
+})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
+//# sourceMappingURL=protocol.selectionRange.js.map
+
+/***/ }),
+/* 73 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+const messages_1 = __webpack_require__(62);
+var WorkDoneProgress;
+(function (WorkDoneProgress) {
+    WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
+})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
+/**
+ * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
+ * reporting from the server.
+ */
+var WorkDoneProgressCreateRequest;
+(function (WorkDoneProgressCreateRequest) {
+    WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
+})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
+/**
+ * The `window/workDoneProgress/cancel` notification is sent from  the client to the server to cancel a progress
+ * initiated on the server side.
+ */
+var WorkDoneProgressCancelNotification;
+(function (WorkDoneProgressCancelNotification) {
+    WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
+})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
+//# sourceMappingURL=protocol.progress.js.map
+
+/***/ }),
+/* 74 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) TypeFox and others. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const messages_1 = __webpack_require__(62);
+/**
+ * A request to result a `CallHierarchyItem` in a document at a given position.
+ * Can be used as an input to a incoming or outgoing call hierarchy.
+ *
+ * @since 3.16.0
+ */
+var CallHierarchyPrepareRequest;
+(function (CallHierarchyPrepareRequest) {
+    CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
+    CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
+})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
+/**
+ * A request to resolve the incoming calls for a given `CallHierarchyItem`.
+ *
+ * @since 3.16.0
+ */
+var CallHierarchyIncomingCallsRequest;
+(function (CallHierarchyIncomingCallsRequest) {
+    CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
+    CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
+})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
+/**
+ * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
+ *
+ * @since 3.16.0
+ */
+var CallHierarchyOutgoingCallsRequest;
+(function (CallHierarchyOutgoingCallsRequest) {
+    CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
+    CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
+})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
+//# sourceMappingURL=protocol.callHierarchy.js.map
+
+/***/ }),
+/* 75 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_jsonrpc_1 = __webpack_require__(46);
+function createProtocolConnection(input, output, logger, options) {
+    if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {
+        options = { connectionStrategy: options };
+    }
+    return vscode_jsonrpc_1.createMessageConnection(input, output, logger, options);
+}
+exports.createProtocolConnection = createProtocolConnection;
+//# sourceMappingURL=connection.js.map
+
+/***/ }),
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const messages_1 = __webpack_require__(62);
 /**
- * Defines whether the insert text in a completion item should be interpreted as
- * plain text or a snippet.
+ * A set of predefined token types. This set is not fixed
+ * an clients can specify additional token types via the
+ * corresponding client capabilities.
+ *
+ * @since 3.16.0 - Proposed state
  */
-var InsertTextFormat;
-(function (InsertTextFormat) {
-    /**
-     * The primary text to be inserted is treated as a plain string.
-     */
-    InsertTextFormat.PlainText = 1;
-    /**
-     * The primary text to be inserted is treated as a snippet.
-     *
-     * A snippet can define tab stops and placeholders with `$1`, `$2`
-     * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
-     * the end of the snippet. Placeholders with equal identifiers are linked,
-     * that is typing in one will update others too.
-     *
-     * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
-     */
-    InsertTextFormat.Snippet = 2;
-})(InsertTextFormat || (InsertTextFormat = {}));
+var SemanticTokenTypes;
+(function (SemanticTokenTypes) {
+    SemanticTokenTypes["namespace"] = "namespace";
+    SemanticTokenTypes["type"] = "type";
+    SemanticTokenTypes["class"] = "class";
+    SemanticTokenTypes["enum"] = "enum";
+    SemanticTokenTypes["interface"] = "interface";
+    SemanticTokenTypes["struct"] = "struct";
+    SemanticTokenTypes["typeParameter"] = "typeParameter";
+    SemanticTokenTypes["parameter"] = "parameter";
+    SemanticTokenTypes["variable"] = "variable";
+    SemanticTokenTypes["property"] = "property";
+    SemanticTokenTypes["enumMember"] = "enumMember";
+    SemanticTokenTypes["event"] = "event";
+    SemanticTokenTypes["function"] = "function";
+    SemanticTokenTypes["member"] = "member";
+    SemanticTokenTypes["macro"] = "macro";
+    SemanticTokenTypes["keyword"] = "keyword";
+    SemanticTokenTypes["modifier"] = "modifier";
+    SemanticTokenTypes["comment"] = "comment";
+    SemanticTokenTypes["string"] = "string";
+    SemanticTokenTypes["number"] = "number";
+    SemanticTokenTypes["regexp"] = "regexp";
+    SemanticTokenTypes["operator"] = "operator";
+})(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
 /**
- * The CompletionItem namespace provides functions to deal with
- * completion items.
+ * A set of predefined token modifiers. This set is not fixed
+ * an clients can specify additional token types via the
+ * corresponding client capabilities.
+ *
+ * @since 3.16.0 - Proposed state
  */
-var CompletionItem;
-(function (CompletionItem) {
-    /**
-     * Create a completion item and seed it with a label.
-     * @param label The completion item's label
-     */
-    function create(label) {
-        return { label: label };
-    }
-    CompletionItem.create = create;
-})(CompletionItem || (CompletionItem = {}));
+var SemanticTokenModifiers;
+(function (SemanticTokenModifiers) {
+    SemanticTokenModifiers["declaration"] = "declaration";
+    SemanticTokenModifiers["definition"] = "definition";
+    SemanticTokenModifiers["readonly"] = "readonly";
+    SemanticTokenModifiers["static"] = "static";
+    SemanticTokenModifiers["deprecated"] = "deprecated";
+    SemanticTokenModifiers["abstract"] = "abstract";
+    SemanticTokenModifiers["async"] = "async";
+    SemanticTokenModifiers["modification"] = "modification";
+    SemanticTokenModifiers["documentation"] = "documentation";
+    SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
+})(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
 /**
- * The CompletionList namespace provides functions to deal with
- * completion lists.
+ * @since 3.16.0 - Proposed state
  */
-var CompletionList;
-(function (CompletionList) {
-    /**
-     * Creates a new completion list.
-     *
-     * @param items The completion items.
-     * @param isIncomplete The list is not complete.
-     */
-    function create(items, isIncomplete) {
-        return { items: items ? items : [], isIncomplete: !!isIncomplete };
-    }
-    CompletionList.create = create;
-})(CompletionList || (CompletionList = {}));
-var MarkedString;
-(function (MarkedString) {
-    /**
-     * Creates a marked string from plain text.
-     *
-     * @param plainText The plain text.
-     */
-    function fromPlainText(plainText) {
-        return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
-    }
-    MarkedString.fromPlainText = fromPlainText;
-    /**
-     * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
-    }
-    MarkedString.is = is;
-})(MarkedString || (MarkedString = {}));
-var Hover;
-(function (Hover) {
-    /**
-     * Checks whether the given value conforms to the [Hover](#Hover) interface.
-     */
+var SemanticTokens;
+(function (SemanticTokens) {
     function is(value) {
-        var candidate = value;
-        return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
-            MarkedString.is(candidate.contents) ||
-            Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
+        const candidate = value;
+        return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
+            Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
     }
-    Hover.is = is;
-})(Hover || (Hover = {}));
+    SemanticTokens.is = is;
+})(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
 /**
- * The ParameterInformation namespace provides helper functions to work with
- * [ParameterInformation](#ParameterInformation) literals.
+ * @since 3.16.0 - Proposed state
  */
-var ParameterInformation;
-(function (ParameterInformation) {
-    /**
-     * Creates a new parameter information literal.
-     *
-     * @param label A label string.
-     * @param documentation A doc string.
-     */
-    function create(label, documentation) {
-        return documentation ? { label: label, documentation: documentation } : { label: label };
-    }
-    ParameterInformation.create = create;
-    ;
-})(ParameterInformation || (ParameterInformation = {}));
+var SemanticTokensRequest;
+(function (SemanticTokensRequest) {
+    SemanticTokensRequest.method = 'textDocument/semanticTokens';
+    SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
+})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
 /**
- * The SignatureInformation namespace provides helper functions to work with
- * [SignatureInformation](#SignatureInformation) literals.
+ * @since 3.16.0 - Proposed state
  */
-var SignatureInformation;
-(function (SignatureInformation) {
-    function create(label, documentation) {
-        var parameters = [];
-        for (var _i = 2; _i < arguments.length; _i++) {
-            parameters[_i - 2] = arguments[_i];
-        }
-        var result = { label: label };
-        if (Is.defined(documentation)) {
-            result.documentation = documentation;
-        }
-        if (Is.defined(parameters)) {
-            result.parameters = parameters;
-        }
-        else {
-            result.parameters = [];
-        }
-        return result;
-    }
-    SignatureInformation.create = create;
-})(SignatureInformation || (SignatureInformation = {}));
+var SemanticTokensEditsRequest;
+(function (SemanticTokensEditsRequest) {
+    SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
+    SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
+})(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
 /**
- * A document highlight kind.
+ * @since 3.16.0 - Proposed state
  */
-var DocumentHighlightKind;
-(function (DocumentHighlightKind) {
-    /**
-     * A textual occurrence.
-     */
-    DocumentHighlightKind.Text = 1;
-    /**
-     * Read-access of a symbol, like reading a variable.
-     */
-    DocumentHighlightKind.Read = 2;
-    /**
-     * Write-access of a symbol, like writing to a variable.
-     */
-    DocumentHighlightKind.Write = 3;
-})(DocumentHighlightKind || (DocumentHighlightKind = {}));
+var SemanticTokensRangeRequest;
+(function (SemanticTokensRangeRequest) {
+    SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
+    SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
+})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
+//# sourceMappingURL=protocol.semanticTokens.proposed.js.map
+
+/***/ }),
+/* 77 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+class ValueUUID {
+    constructor(_value) {
+        this._value = _value;
+        // empty
+    }
+    asHex() {
+        return this._value;
+    }
+    equals(other) {
+        return this.asHex() === other.asHex();
+    }
+}
+class V4UUID extends ValueUUID {
+    constructor() {
+        super([
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            '-',
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            '-',
+            '4',
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            '-',
+            V4UUID._oneOf(V4UUID._timeHighBits),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            '-',
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+            V4UUID._randomHex(),
+        ].join(''));
+    }
+    static _oneOf(array) {
+        return array[Math.floor(array.length * Math.random())];
+    }
+    static _randomHex() {
+        return V4UUID._oneOf(V4UUID._chars);
+    }
+}
+V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
+V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
 /**
- * DocumentHighlight namespace to provide helper functions to work with
- * [DocumentHighlight](#DocumentHighlight) literals.
+ * An empty UUID that contains only zeros.
  */
-var DocumentHighlight;
-(function (DocumentHighlight) {
-    /**
-     * Create a DocumentHighlight object.
-     * @param range The range the highlight applies to.
-     */
-    function create(range, kind) {
-        var result = { range: range };
-        if (Is.number(kind)) {
-            result.kind = kind;
-        }
-        return result;
-    }
-    DocumentHighlight.create = create;
-})(DocumentHighlight || (DocumentHighlight = {}));
+exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
+function v4() {
+    return new V4UUID();
+}
+exports.v4 = v4;
+const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+function isUUID(value) {
+    return _UUIDPattern.test(value);
+}
+exports.isUUID = isUUID;
 /**
- * A symbol kind.
+ * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
+ * @param value A uuid string.
  */
-var SymbolKind;
-(function (SymbolKind) {
-    SymbolKind.File = 1;
-    SymbolKind.Module = 2;
-    SymbolKind.Namespace = 3;
-    SymbolKind.Package = 4;
-    SymbolKind.Class = 5;
-    SymbolKind.Method = 6;
-    SymbolKind.Property = 7;
-    SymbolKind.Field = 8;
-    SymbolKind.Constructor = 9;
-    SymbolKind.Enum = 10;
-    SymbolKind.Interface = 11;
-    SymbolKind.Function = 12;
-    SymbolKind.Variable = 13;
-    SymbolKind.Constant = 14;
-    SymbolKind.String = 15;
-    SymbolKind.Number = 16;
-    SymbolKind.Boolean = 17;
-    SymbolKind.Array = 18;
-    SymbolKind.Object = 19;
-    SymbolKind.Key = 20;
-    SymbolKind.Null = 21;
-    SymbolKind.EnumMember = 22;
-    SymbolKind.Struct = 23;
-    SymbolKind.Event = 24;
-    SymbolKind.Operator = 25;
-    SymbolKind.TypeParameter = 26;
-})(SymbolKind || (SymbolKind = {}));
-var SymbolInformation;
-(function (SymbolInformation) {
-    /**
-     * Creates a new symbol information literal.
-     *
-     * @param name The name of the symbol.
-     * @param kind The kind of the symbol.
-     * @param range The range of the location of the symbol.
-     * @param uri The resource of the location of symbol, defaults to the current document.
-     * @param containerName The name of the symbol containing the symbol.
-     */
-    function create(name, kind, range, uri, containerName) {
-        var result = {
-            name: name,
-            kind: kind,
-            location: { uri: uri, range: range }
+function parse(value) {
+    if (!isUUID(value)) {
+        throw new Error('invalid uuid');
+    }
+    return new ValueUUID(value);
+}
+exports.parse = parse;
+function generateUuid() {
+    return v4().asHex();
+}
+exports.generateUuid = generateUuid;
+//# sourceMappingURL=uuid.js.map
+
+/***/ }),
+/* 78 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_languageserver_protocol_1 = __webpack_require__(44);
+const uuid_1 = __webpack_require__(77);
+class WorkDoneProgressReporterImpl {
+    constructor(_connection, _token) {
+        this._connection = _connection;
+        this._token = _token;
+        WorkDoneProgressReporterImpl.Instances.set(this._token, this);
+    }
+    begin(title, percentage, message, cancellable) {
+        let param = {
+            kind: 'begin',
+            title,
+            percentage,
+            message,
+            cancellable
         };
-        if (containerName) {
-            result.containerName = containerName;
+        this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
+    }
+    report(arg0, arg1) {
+        let param = {
+            kind: 'report'
+        };
+        if (typeof arg0 === 'number') {
+            param.percentage = arg0;
+            if (arg1 !== undefined) {
+                param.message = arg1;
+            }
         }
-        return result;
+        else {
+            param.message = arg0;
+        }
+        this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);
     }
-    SymbolInformation.create = create;
-})(SymbolInformation || (SymbolInformation = {}));
-/**
- * Represents programming constructs like variables, classes, interfaces etc.
- * that appear in a document. Document symbols can be hierarchical and they
- * have two ranges: one that encloses its definition and one that points to
- * its most interesting range, e.g. the range of an identifier.
- */
-var DocumentSymbol = /** @class */ (function () {
-    function DocumentSymbol() {
+    done() {
+        WorkDoneProgressReporterImpl.Instances.delete(this._token);
+        this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });
     }
-    return DocumentSymbol;
-}());
-
-(function (DocumentSymbol) {
-    /**
-     * Creates a new symbol information literal.
-     *
-     * @param name The name of the symbol.
-     * @param detail The detail of the symbol.
-     * @param kind The kind of the symbol.
-     * @param range The range of the symbol.
-     * @param selectionRange The selectionRange of the symbol.
-     * @param children Children of the symbol.
-     */
-    function create(name, detail, kind, range, selectionRange, children) {
-        var result = {
-            name: name,
-            detail: detail,
-            kind: kind,
-            range: range,
-            selectionRange: selectionRange
-        };
-        if (children !== void 0) {
-            result.children = children;
+}
+WorkDoneProgressReporterImpl.Instances = new Map();
+class WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl {
+    constructor(connection, token) {
+        super(connection, token);
+        this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
+    }
+    get token() {
+        return this._source.token;
+    }
+    done() {
+        this._source.dispose();
+        super.done();
+    }
+    cancel() {
+        this._source.cancel();
+    }
+}
+class NullProgressReporter {
+    constructor() {
+    }
+    begin() {
+    }
+    report() {
+    }
+    done() {
+    }
+}
+class NullProgressServerReporter extends NullProgressReporter {
+    constructor() {
+        super();
+        this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();
+    }
+    get token() {
+        return this._source.token;
+    }
+    done() {
+        this._source.dispose();
+    }
+    cancel() {
+        this._source.cancel();
+    }
+}
+function attachWorkDone(connection, params) {
+    if (params === undefined || params.workDoneToken === undefined) {
+        return new NullProgressReporter();
+    }
+    const token = params.workDoneToken;
+    delete params.workDoneToken;
+    return new WorkDoneProgressReporterImpl(connection, token);
+}
+exports.attachWorkDone = attachWorkDone;
+exports.ProgressFeature = (Base) => {
+    return class extends Base {
+        constructor() {
+            super();
+            this._progressSupported = false;
+        }
+        initialize(capabilities) {
+            var _a;
+            if (((_a = capabilities === null || capabilities === void 0 ? void 0 : capabilities.window) === null || _a === void 0 ? void 0 : _a.workDoneProgress) === true) {
+                this._progressSupported = true;
+                this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
+                    let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
+                    if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {
+                        progress.cancel();
+                    }
+                });
+            }
         }
-        return result;
+        attachWorkDoneProgress(token) {
+            if (token === undefined) {
+                return new NullProgressReporter();
+            }
+            else {
+                return new WorkDoneProgressReporterImpl(this.connection, token);
+            }
+        }
+        createWorkDoneProgress() {
+            if (this._progressSupported) {
+                const token = uuid_1.generateUuid();
+                return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {
+                    const result = new WorkDoneProgressServerReporterImpl(this.connection, token);
+                    return result;
+                });
+            }
+            else {
+                return Promise.resolve(new NullProgressServerReporter());
+            }
+        }
+    };
+};
+var ResultProgress;
+(function (ResultProgress) {
+    ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();
+})(ResultProgress || (ResultProgress = {}));
+class ResultProgressReporterImpl {
+    constructor(_connection, _token) {
+        this._connection = _connection;
+        this._token = _token;
+    }
+    report(data) {
+        this._connection.sendProgress(ResultProgress.type, this._token, data);
     }
-    DocumentSymbol.create = create;
-    /**
-     * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return candidate &&
-            Is.string(candidate.name) && Is.number(candidate.kind) &&
-            Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
-            (candidate.detail === void 0 || Is.string(candidate.detail)) &&
-            (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
-            (candidate.children === void 0 || Array.isArray(candidate.children));
+}
+function attachPartialResult(connection, params) {
+    if (params === undefined || params.partialResultToken === undefined) {
+        return undefined;
     }
-    DocumentSymbol.is = is;
-})(DocumentSymbol || (DocumentSymbol = {}));
-/**
- * A set of predefined code action kinds
- */
-var CodeActionKind;
-(function (CodeActionKind) {
-    /**
-     * Base kind for quickfix actions: 'quickfix'
-     */
-    CodeActionKind.QuickFix = 'quickfix';
-    /**
-     * Base kind for refactoring actions: 'refactor'
-     */
-    CodeActionKind.Refactor = 'refactor';
-    /**
-     * Base kind for refactoring extraction actions: 'refactor.extract'
-     *
-     * Example extract actions:
-     *
-     * - Extract method
-     * - Extract function
-     * - Extract variable
-     * - Extract interface from class
-     * - ...
-     */
-    CodeActionKind.RefactorExtract = 'refactor.extract';
-    /**
-     * Base kind for refactoring inline actions: 'refactor.inline'
-     *
-     * Example inline actions:
-     *
-     * - Inline function
-     * - Inline variable
-     * - Inline constant
-     * - ...
-     */
-    CodeActionKind.RefactorInline = 'refactor.inline';
-    /**
-     * Base kind for refactoring rewrite actions: 'refactor.rewrite'
-     *
-     * Example rewrite actions:
-     *
-     * - Convert JavaScript function to class
-     * - Add or remove parameter
-     * - Encapsulate field
-     * - Make method static
-     * - Move method to base class
-     * - ...
-     */
-    CodeActionKind.RefactorRewrite = 'refactor.rewrite';
-    /**
-     * Base kind for source actions: `source`
-     *
-     * Source code actions apply to the entire file.
-     */
-    CodeActionKind.Source = 'source';
-    /**
-     * Base kind for an organize imports source action: `source.organizeImports`
-     */
-    CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
-})(CodeActionKind || (CodeActionKind = {}));
+    const token = params.partialResultToken;
+    delete params.partialResultToken;
+    return new ResultProgressReporterImpl(connection, token);
+}
+exports.attachPartialResult = attachPartialResult;
+//# sourceMappingURL=progress.js.map
+
+/***/ }),
+/* 79 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_languageserver_protocol_1 = __webpack_require__(44);
+const Is = __webpack_require__(42);
+exports.ConfigurationFeature = (Base) => {
+    return class extends Base {
+        getConfiguration(arg) {
+            if (!arg) {
+                return this._getConfiguration({});
+            }
+            else if (Is.string(arg)) {
+                return this._getConfiguration({ section: arg });
+            }
+            else {
+                return this._getConfiguration(arg);
+            }
+        }
+        _getConfiguration(arg) {
+            let params = {
+                items: Array.isArray(arg) ? arg : [arg]
+            };
+            return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
+                return Array.isArray(arg) ? result : result[0];
+            });
+        }
+    };
+};
+//# sourceMappingURL=configuration.js.map
+
+/***/ }),
+/* 80 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_languageserver_protocol_1 = __webpack_require__(44);
+exports.WorkspaceFoldersFeature = (Base) => {
+    return class extends Base {
+        initialize(capabilities) {
+            let workspaceCapabilities = capabilities.workspace;
+            if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
+                this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
+                this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
+                    this._onDidChangeWorkspaceFolders.fire(params.event);
+                });
+            }
+        }
+        getWorkspaceFolders() {
+            return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
+        }
+        get onDidChangeWorkspaceFolders() {
+            if (!this._onDidChangeWorkspaceFolders) {
+                throw new Error('Client doesn\'t support sending workspace folder change events.');
+            }
+            if (!this._unregistration) {
+                this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
+            }
+            return this._onDidChangeWorkspaceFolders.event;
+        }
+    };
+};
+//# sourceMappingURL=workspaceFolders.js.map
+
+/***/ }),
+/* 81 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_languageserver_protocol_1 = __webpack_require__(44);
+exports.CallHierarchyFeature = (Base) => {
+    return class extends Base {
+        get callHierarchy() {
+            return {
+                onPrepare: (handler) => {
+                    this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {
+                        return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);
+                    });
+                },
+                onIncomingCalls: (handler) => {
+                    const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;
+                    this.connection.onRequest(type, (params, cancel) => {
+                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
+                    });
+                },
+                onOutgoingCalls: (handler) => {
+                    const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;
+                    this.connection.onRequest(type, (params, cancel) => {
+                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
+                    });
+                }
+            };
+        }
+    };
+};
+//# sourceMappingURL=callHierarchy.js.map
+
+/***/ }),
+/* 82 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(__filename) {
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const url = __webpack_require__(83);
+const path = __webpack_require__(1);
+const fs = __webpack_require__(2);
+const child_process_1 = __webpack_require__(84);
 /**
- * The CodeActionContext namespace provides helper functions to work with
- * [CodeActionContext](#CodeActionContext) literals.
+ * @deprecated Use the `vscode-uri` npm module which provides a more
+ * complete implementation of handling VS Code URIs.
  */
-var CodeActionContext;
-(function (CodeActionContext) {
-    /**
-     * Creates a new CodeActionContext literal.
-     */
-    function create(diagnostics, only) {
-        var result = { diagnostics: diagnostics };
-        if (only !== void 0 && only !== null) {
-            result.only = only;
+function uriToFilePath(uri) {
+    let parsed = url.parse(uri);
+    if (parsed.protocol !== 'file:' || !parsed.path) {
+        return undefined;
+    }
+    let segments = parsed.path.split('/');
+    for (var i = 0, len = segments.length; i < len; i++) {
+        segments[i] = decodeURIComponent(segments[i]);
+    }
+    if (process.platform === 'win32' && segments.length > 1) {
+        let first = segments[0];
+        let second = segments[1];
+        // Do we have a drive letter and we started with a / which is the
+        // case if the first segement is empty (see split above)
+        if (first.length === 0 && second.length > 1 && second[1] === ':') {
+            // Remove first slash
+            segments.shift();
+        }
+    }
+    return path.normalize(segments.join('/'));
+}
+exports.uriToFilePath = uriToFilePath;
+function isWindows() {
+    return process.platform === 'win32';
+}
+function resolve(moduleName, nodePath, cwd, tracer) {
+    const nodePathKey = 'NODE_PATH';
+    const app = [
+        'var p = process;',
+        'p.on(\'message\',function(m){',
+        'if(m.c===\'e\'){',
+        'p.exit(0);',
+        '}',
+        'else if(m.c===\'rs\'){',
+        'try{',
+        'var r=require.resolve(m.a);',
+        'p.send({c:\'r\',s:true,r:r});',
+        '}',
+        'catch(err){',
+        'p.send({c:\'r\',s:false});',
+        '}',
+        '}',
+        '});'
+    ].join('');
+    return new Promise((resolve, reject) => {
+        let env = process.env;
+        let newEnv = Object.create(null);
+        Object.keys(env).forEach(key => newEnv[key] = env[key]);
+        if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {
+            if (newEnv[nodePathKey]) {
+                newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
+            }
+            else {
+                newEnv[nodePathKey] = nodePath;
+            }
+            if (tracer) {
+                tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
+            }
+        }
+        newEnv['ELECTRON_RUN_AS_NODE'] = '1';
+        try {
+            let cp = child_process_1.fork('', [], {
+                cwd: cwd,
+                env: newEnv,
+                execArgv: ['-e', app]
+            });
+            if (cp.pid === void 0) {
+                reject(new Error(`Starting process to resolve node module  ${moduleName} failed`));
+                return;
+            }
+            cp.on('error', (error) => {
+                reject(error);
+            });
+            cp.on('message', (message) => {
+                if (message.c === 'r') {
+                    cp.send({ c: 'e' });
+                    if (message.s) {
+                        resolve(message.r);
+                    }
+                    else {
+                        reject(new Error(`Failed to resolve module: ${moduleName}`));
+                    }
+                }
+            });
+            let message = {
+                c: 'rs',
+                a: moduleName
+            };
+            cp.send(message);
+        }
+        catch (error) {
+            reject(error);
         }
-        return result;
-    }
-    CodeActionContext.create = create;
-    /**
-     * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
+    });
+}
+exports.resolve = resolve;
+/**
+ * Resolve the global npm package path.
+ * @deprecated Since this depends on the used package manager and their version the best is that servers
+ * implement this themselves since they know best what kind of package managers to support.
+ * @param tracer the tracer to use
+ */
+function resolveGlobalNodePath(tracer) {
+    let npmCommand = 'npm';
+    const env = Object.create(null);
+    Object.keys(process.env).forEach(key => env[key] = process.env[key]);
+    env['NO_UPDATE_NOTIFIER'] = 'true';
+    const options = {
+        encoding: 'utf8',
+        env
+    };
+    if (isWindows()) {
+        npmCommand = 'npm.cmd';
+        options.shell = true;
     }
-    CodeActionContext.is = is;
-})(CodeActionContext || (CodeActionContext = {}));
-var CodeAction;
-(function (CodeAction) {
-    function create(title, commandOrEdit, kind) {
-        var result = { title: title };
-        if (Command.is(commandOrEdit)) {
-            result.command = commandOrEdit;
+    let handler = () => { };
+    try {
+        process.on('SIGPIPE', handler);
+        let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
+        if (!stdout) {
+            if (tracer) {
+                tracer(`'npm config get prefix' didn't return a value.`);
+            }
+            return undefined;
         }
-        else {
-            result.edit = commandOrEdit;
+        let prefix = stdout.trim();
+        if (tracer) {
+            tracer(`'npm config get prefix' value is: ${prefix}`);
         }
-        if (kind !== void null) {
-            result.kind = kind;
+        if (prefix.length > 0) {
+            if (isWindows()) {
+                return path.join(prefix, 'node_modules');
+            }
+            else {
+                return path.join(prefix, 'lib', 'node_modules');
+            }
         }
-        return result;
+        return undefined;
     }
-    CodeAction.create = create;
-    function is(value) {
-        var candidate = value;
-        return candidate && Is.string(candidate.title) &&
-            (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
-            (candidate.kind === void 0 || Is.string(candidate.kind)) &&
-            (candidate.edit !== void 0 || candidate.command !== void 0) &&
-            (candidate.command === void 0 || Command.is(candidate.command)) &&
-            (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
+    catch (err) {
+        return undefined;
     }
-    CodeAction.is = is;
-})(CodeAction || (CodeAction = {}));
-/**
- * The CodeLens namespace provides helper functions to work with
- * [CodeLens](#CodeLens) literals.
+    finally {
+        process.removeListener('SIGPIPE', handler);
+    }
+}
+exports.resolveGlobalNodePath = resolveGlobalNodePath;
+/*
+ * Resolve the global yarn pakage path.
+ * @deprecated Since this depends on the used package manager and their version the best is that servers
+ * implement this themselves since they know best what kind of package managers to support.
+ * @param tracer the tracer to use
  */
-var CodeLens;
-(function (CodeLens) {
-    /**
-     * Creates a new CodeLens literal.
-     */
-    function create(range, data) {
-        var result = { range: range };
-        if (Is.defined(data))
-            result.data = data;
-        return result;
+function resolveGlobalYarnPath(tracer) {
+    let yarnCommand = 'yarn';
+    let options = {
+        encoding: 'utf8'
+    };
+    if (isWindows()) {
+        yarnCommand = 'yarn.cmd';
+        options.shell = true;
     }
-    CodeLens.create = create;
-    /**
-     * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
+    let handler = () => { };
+    try {
+        process.on('SIGPIPE', handler);
+        let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
+        let stdout = results.stdout;
+        if (!stdout) {
+            if (tracer) {
+                tracer(`'yarn global dir' didn't return a value.`);
+                if (results.stderr) {
+                    tracer(results.stderr);
+                }
+            }
+            return undefined;
+        }
+        let lines = stdout.trim().split(/\r?\n/);
+        for (let line of lines) {
+            try {
+                let yarn = JSON.parse(line);
+                if (yarn.type === 'log') {
+                    return path.join(yarn.data, 'node_modules');
+                }
+            }
+            catch (e) {
+                // Do nothing. Ignore the line
+            }
+        }
+        return undefined;
     }
-    CodeLens.is = is;
-})(CodeLens || (CodeLens = {}));
-/**
- * The FormattingOptions namespace provides helper functions to work with
- * [FormattingOptions](#FormattingOptions) literals.
- */
-var FormattingOptions;
-(function (FormattingOptions) {
-    /**
-     * Creates a new FormattingOptions literal.
-     */
-    function create(tabSize, insertSpaces) {
-        return { tabSize: tabSize, insertSpaces: insertSpaces };
+    catch (err) {
+        return undefined;
     }
-    FormattingOptions.create = create;
-    /**
-     * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
+    finally {
+        process.removeListener('SIGPIPE', handler);
     }
-    FormattingOptions.is = is;
-})(FormattingOptions || (FormattingOptions = {}));
-/**
- * A document link is a range in a text document that links to an internal or external resource, like another
- * text document or a web site.
- */
-var DocumentLink = /** @class */ (function () {
-    function DocumentLink() {
+}
+exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
+var FileSystem;
+(function (FileSystem) {
+    let _isCaseSensitive = undefined;
+    function isCaseSensitive() {
+        if (_isCaseSensitive !== void 0) {
+            return _isCaseSensitive;
+        }
+        if (process.platform === 'win32') {
+            _isCaseSensitive = false;
+        }
+        else {
+            // convert current file name to upper case / lower case and check if file exists
+            // (guards against cases when name is already all uppercase or lowercase)
+            _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
+        }
+        return _isCaseSensitive;
     }
-    return DocumentLink;
-}());
-
-/**
- * The DocumentLink namespace provides helper functions to work with
- * [DocumentLink](#DocumentLink) literals.
- */
-(function (DocumentLink) {
-    /**
-     * Creates a new DocumentLink literal.
-     */
-    function create(range, target, data) {
-        return { range: range, target: target, data: data };
+    FileSystem.isCaseSensitive = isCaseSensitive;
+    function isParent(parent, child) {
+        if (isCaseSensitive()) {
+            return path.normalize(child).indexOf(path.normalize(parent)) === 0;
+        }
+        else {
+            return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;
+        }
     }
-    DocumentLink.create = create;
-    /**
-     * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
+    FileSystem.isParent = isParent;
+})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
+function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
+    if (nodePath) {
+        if (!path.isAbsolute(nodePath)) {
+            nodePath = path.join(workspaceRoot, nodePath);
+        }
+        return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
+            if (FileSystem.isParent(nodePath, value)) {
+                return value;
+            }
+            else {
+                return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
+            }
+        }).then(undefined, (_error) => {
+            return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
+        });
     }
-    DocumentLink.is = is;
-})(DocumentLink || (DocumentLink = {}));
-/**
- * The SelectionRange namespace provides helper function to work with
- * SelectionRange literals.
- */
-var SelectionRange;
-(function (SelectionRange) {
-    /**
-     * Creates a new SelectionRange
-     * @param range the range.
-     * @param parent an optional parent.
-     */
-    function create(range, parent) {
-        return { range: range, parent: parent };
+    else {
+        return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
     }
-    SelectionRange.create = create;
-    function is(value) {
-        var candidate = value;
-        return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
+}
+exports.resolveModulePath = resolveModulePath;
+//# sourceMappingURL=files.js.map
+/* WEBPACK VAR INJECTION */}.call(this, "/index.js"))
+
+/***/ }),
+/* 83 */
+/***/ (function(module, exports) {
+
+module.exports = require("url");
+
+/***/ }),
+/* 84 */
+/***/ (function(module, exports) {
+
+module.exports = require("child_process");
+
+/***/ }),
+/* 85 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ----------------------------------------------------------------------------------------- */
+
+
+module.exports = __webpack_require__(44);
+
+/***/ }),
+/* 86 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+const st = __webpack_require__(87);
+__export(__webpack_require__(44));
+__export(__webpack_require__(43));
+var ProposedFeatures;
+(function (ProposedFeatures) {
+    ProposedFeatures.all = {
+        __brand: 'features',
+        languages: st.SemanticTokensFeature
+    };
+    ProposedFeatures.SemanticTokensBuilder = st.SemanticTokensBuilder;
+})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
+//# sourceMappingURL=api.js.map
+
+/***/ }),
+/* 87 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+Object.defineProperty(exports, "__esModule", { value: true });
+const vscode_languageserver_protocol_1 = __webpack_require__(44);
+exports.SemanticTokensFeature = (Base) => {
+    return class extends Base {
+        get semanticTokens() {
+            return {
+                on: (handler) => {
+                    const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRequest.type;
+                    this.connection.onRequest(type, (params, cancel) => {
+                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
+                    });
+                },
+                onEdits: (handler) => {
+                    const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensEditsRequest.type;
+                    this.connection.onRequest(type, (params, cancel) => {
+                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
+                    });
+                },
+                onRange: (handler) => {
+                    const type = vscode_languageserver_protocol_1.Proposed.SemanticTokensRangeRequest.type;
+                    this.connection.onRequest(type, (params, cancel) => {
+                        return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));
+                    });
+                }
+            };
+        }
+    };
+};
+class SemanticTokensBuilder {
+    constructor() {
+        this._prevData = undefined;
+        this.initialize();
+    }
+    initialize() {
+        this._id = Date.now();
+        this._prevLine = 0;
+        this._prevChar = 0;
+        this._data = [];
+        this._dataLen = 0;
+    }
+    push(line, char, length, tokenType, tokenModifiers) {
+        let pushLine = line;
+        let pushChar = char;
+        if (this._dataLen > 0) {
+            pushLine -= this._prevLine;
+            if (pushLine === 0) {
+                pushChar -= this._prevChar;
+            }
+        }
+        this._data[this._dataLen++] = pushLine;
+        this._data[this._dataLen++] = pushChar;
+        this._data[this._dataLen++] = length;
+        this._data[this._dataLen++] = tokenType;
+        this._data[this._dataLen++] = tokenModifiers;
+        this._prevLine = line;
+        this._prevChar = char;
+    }
+    get id() {
+        return this._id.toString();
+    }
+    previousResult(id) {
+        if (this.id === id) {
+            this._prevData = this._data;
+        }
+        this.initialize();
+    }
+    build() {
+        this._prevData = undefined;
+        return {
+            resultId: this.id,
+            data: this._data
+        };
     }
-    SelectionRange.is = is;
-})(SelectionRange || (SelectionRange = {}));
-var EOL = ['\n', '\r\n', '\r'];
-var TextDocument;
-(function (TextDocument) {
-    /**
-     * Creates a new ITextDocument literal from the given uri and content.
-     * @param uri The document's uri.
-     * @param languageId  The document's language Id.
-     * @param content The document's content.
-     */
-    function create(uri, languageId, version, content) {
-        return new FullTextDocument(uri, languageId, version, content);
+    canBuildEdits() {
+        return this._prevData !== undefined;
+    }
+    buildEdits() {
+        if (this._prevData !== undefined) {
+            const prevDataLength = this._prevData.length;
+            const dataLength = this._data.length;
+            let startIndex = 0;
+            while (startIndex < dataLength && startIndex < prevDataLength && this._prevData[startIndex] === this._data[startIndex]) {
+                startIndex++;
+            }
+            if (startIndex < dataLength && startIndex < prevDataLength) {
+                // Find end index
+                let endIndex = 0;
+                while (endIndex < dataLength && endIndex < prevDataLength && this._prevData[prevDataLength - 1 - endIndex] === this._data[dataLength - 1 - endIndex]) {
+                    endIndex++;
+                }
+                const newData = this._data.slice(startIndex, dataLength - endIndex);
+                const result = {
+                    resultId: this.id,
+                    edits: [
+                        { start: startIndex, deleteCount: prevDataLength - endIndex - startIndex, data: newData }
+                    ]
+                };
+                return result;
+            }
+            else if (startIndex < dataLength) {
+                return { resultId: this.id, edits: [
+                        { start: startIndex, deleteCount: 0, data: this._data.slice(startIndex) }
+                    ] };
+            }
+            else if (startIndex < prevDataLength) {
+                return { resultId: this.id, edits: [
+                        { start: startIndex, deleteCount: prevDataLength - startIndex }
+                    ] };
+            }
+            else {
+                return { resultId: this.id, edits: [] };
+            }
+        }
+        else {
+            return this.build();
+        }
+    }
+}
+exports.SemanticTokensBuilder = SemanticTokensBuilder;
+//# sourceMappingURL=semanticTokens.proposed.js.map
+
+/***/ }),
+/* 88 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.runSafe = exports.runSafeAsync = exports.formatError = void 0;
+const vscode_languageserver_1 = __webpack_require__(41);
+function formatError(message, err) {
+    if (err instanceof Error) {
+        let error = err;
+        return `${message}: ${error.message}\n${error.stack}`;
     }
-    TextDocument.create = create;
-    /**
-     * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
-     */
-    function is(value) {
-        var candidate = value;
-        return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
-            && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
+    else if (typeof err === 'string') {
+        return `${message}: ${err}`;
     }
-    TextDocument.is = is;
-    function applyEdits(document, edits) {
-        var text = document.getText();
-        var sortedEdits = mergeSort(edits, function (a, b) {
-            var diff = a.range.start.line - b.range.start.line;
-            if (diff === 0) {
-                return a.range.start.character - b.range.start.character;
+    else if (err) {
+        return `${message}: ${err.toString()}`;
+    }
+    return message;
+}
+exports.formatError = formatError;
+function runSafeAsync(func, errorVal, errorMessage, token) {
+    return new Promise((resolve) => {
+        setImmediate(() => {
+            if (token.isCancellationRequested) {
+                resolve(cancelValue());
             }
-            return diff;
+            return func().then(result => {
+                if (token.isCancellationRequested) {
+                    resolve(cancelValue());
+                    return;
+                }
+                else {
+                    resolve(result);
+                }
+            }, e => {
+                console.error(formatError(errorMessage, e));
+                resolve(errorVal);
+            });
         });
-        var lastModifiedOffset = text.length;
-        for (var i = sortedEdits.length - 1; i >= 0; i--) {
-            var e = sortedEdits[i];
-            var startOffset = document.offsetAt(e.range.start);
-            var endOffset = document.offsetAt(e.range.end);
-            if (endOffset <= lastModifiedOffset) {
-                text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
+    });
+}
+exports.runSafeAsync = runSafeAsync;
+function runSafe(func, errorVal, errorMessage, token) {
+    return new Promise((resolve) => {
+        setImmediate(() => {
+            if (token.isCancellationRequested) {
+                resolve(cancelValue());
             }
             else {
-                throw new Error('Overlapping edit');
+                try {
+                    let result = func();
+                    if (token.isCancellationRequested) {
+                        resolve(cancelValue());
+                        return;
+                    }
+                    else {
+                        resolve(result);
+                    }
+                }
+                catch (e) {
+                    console.error(formatError(errorMessage, e));
+                    resolve(errorVal);
+                }
+            }
+        });
+    });
+}
+exports.runSafe = runSafe;
+function cancelValue() {
+    console.log('cancelled');
+    return new vscode_languageserver_1.ResponseError(vscode_languageserver_1.ErrorCodes.RequestCancelled, 'Request cancelled');
+}
+
+
+/***/ }),
+/* 89 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+    return new (P || (P = Promise))(function (resolve, reject) {
+        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+    });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.startServer = void 0;
+const vscode_languageserver_1 = __webpack_require__(41);
+const runner_1 = __webpack_require__(88);
+const vscode_json_languageservice_1 = __webpack_require__(90);
+const languageModelCache_1 = __webpack_require__(113);
+const requests_1 = __webpack_require__(114);
+var SchemaAssociationNotification;
+(function (SchemaAssociationNotification) {
+    SchemaAssociationNotification.type = new vscode_languageserver_1.NotificationType('json/schemaAssociations');
+})(SchemaAssociationNotification || (SchemaAssociationNotification = {}));
+var VSCodeContentRequest;
+(function (VSCodeContentRequest) {
+    VSCodeContentRequest.type = new vscode_languageserver_1.RequestType('vscode/content');
+})(VSCodeContentRequest || (VSCodeContentRequest = {}));
+var SchemaContentChangeNotification;
+(function (SchemaContentChangeNotification) {
+    SchemaContentChangeNotification.type = new vscode_languageserver_1.NotificationType('json/schemaContent');
+})(SchemaContentChangeNotification || (SchemaContentChangeNotification = {}));
+var ResultLimitReachedNotification;
+(function (ResultLimitReachedNotification) {
+    ResultLimitReachedNotification.type = new vscode_languageserver_1.NotificationType('json/resultLimitReached');
+})(ResultLimitReachedNotification || (ResultLimitReachedNotification = {}));
+var ForceValidateRequest;
+(function (ForceValidateRequest) {
+    ForceValidateRequest.type = new vscode_languageserver_1.RequestType('json/validate');
+})(ForceValidateRequest || (ForceValidateRequest = {}));
+const workspaceContext = {
+    resolveRelativePath: (relativePath, resource) => {
+        const base = resource.substr(0, resource.lastIndexOf('/') + 1);
+        return requests_1.resolvePath(base, relativePath);
+    }
+};
+function startServer(connection, runtime) {
+    function getSchemaRequestService(handledSchemas = ['https', 'http', 'file']) {
+        const builtInHandlers = {};
+        for (let protocol of handledSchemas) {
+            if (protocol === 'file') {
+                builtInHandlers[protocol] = runtime.file;
+            }
+            else if (protocol === 'http' || protocol === 'https') {
+                builtInHandlers[protocol] = runtime.http;
             }
-            lastModifiedOffset = startOffset;
         }
-        return text;
+        return (uri) => {
+            const protocol = uri.substr(0, uri.indexOf(':'));
+            const builtInHandler = builtInHandlers[protocol];
+            if (builtInHandler) {
+                return builtInHandler.getContent(uri);
+            }
+            return connection.sendRequest(VSCodeContentRequest.type, uri).then(responseText => {
+                return responseText;
+            }, error => {
+                return Promise.reject(error.message);
+            });
+        };
     }
-    TextDocument.applyEdits = applyEdits;
-    function mergeSort(data, compare) {
-        if (data.length <= 1) {
-            // sorted
-            return data;
+    // create the JSON language service
+    let languageService = vscode_json_languageservice_1.getLanguageService({
+        workspaceContext,
+        contributions: [],
+        clientCapabilities: vscode_json_languageservice_1.ClientCapabilities.LATEST
+    });
+    // Create a text document manager.
+    const documents = new vscode_languageserver_1.TextDocuments(vscode_json_languageservice_1.TextDocument);
+    // Make the text document manager listen on the connection
+    // for open, change and close text document events
+    documents.listen(connection);
+    let clientSnippetSupport = false;
+    let dynamicFormatterRegistration = false;
+    let hierarchicalDocumentSymbolSupport = false;
+    let foldingRangeLimitDefault = Number.MAX_VALUE;
+    let foldingRangeLimit = Number.MAX_VALUE;
+    let resultLimit = Number.MAX_VALUE;
+    let formatterMaxNumberOfEdits = Number.MAX_VALUE;
+    // After the server has started the client sends an initialize request. The server receives
+    // in the passed params the rootPath of the workspace plus the client capabilities.
+    connection.onInitialize((params) => {
+        var _a, _b, _c, _d, _e;
+        const handledProtocols = (_a = params.initializationOptions) === null || _a === void 0 ? void 0 : _a.handledSchemaProtocols;
+        languageService = vscode_json_languageservice_1.getLanguageService({
+            schemaRequestService: getSchemaRequestService(handledProtocols),
+            workspaceContext,
+            contributions: [],
+            clientCapabilities: params.capabilities
+        });
+        function getClientCapability(name, def) {
+            const keys = name.split('.');
+            let c = params.capabilities;
+            for (let i = 0; c && i < keys.length; i++) {
+                if (!c.hasOwnProperty(keys[i])) {
+                    return def;
+                }
+                c = c[keys[i]];
+            }
+            return c;
+        }
+        clientSnippetSupport = getClientCapability('textDocument.completion.completionItem.snippetSupport', false);
+        dynamicFormatterRegistration = getClientCapability('textDocument.rangeFormatting.dynamicRegistration', false) && (typeof ((_b = params.initializationOptions) === null || _b === void 0 ? void 0 : _b.provideFormatter) !== 'boolean');
+        foldingRangeLimitDefault = getClientCapability('textDocument.foldingRange.rangeLimit', Number.MAX_VALUE);
+        hierarchicalDocumentSymbolSupport = getClientCapability('textDocument.documentSymbol.hierarchicalDocumentSymbolSupport', false);
+        formatterMaxNumberOfEdits = ((_e = (_d = (_c = params.initializationOptions) === null || _c === void 0 ? void 0 : _c.customCapabilities) === null || _d === void 0 ? void 0 : _d.rangeFormatting) === null || _e === void 0 ? void 0 : _e.editLimit) || Number.MAX_VALUE;
+        const capabilities = {
+            textDocumentSync: vscode_languageserver_1.TextDocumentSyncKind.Incremental,
+            completionProvider: clientSnippetSupport ? {
+                resolveProvider: false,
+                triggerCharacters: ['"', ':']
+            } : undefined,
+            hoverProvider: true,
+            documentSymbolProvider: true,
+            documentRangeFormattingProvider: params.initializationOptions.provideFormatter === true,
+            colorProvider: {},
+            foldingRangeProvider: true,
+            selectionRangeProvider: true,
+            definitionProvider: true
+        };
+        return { capabilities };
+    });
+    const limitExceededWarnings = function () {
+        const pendingWarnings = {};
+        return {
+            cancel(uri) {
+                const warning = pendingWarnings[uri];
+                if (warning && warning.timeout) {
+                    clearTimeout(warning.timeout);
+                    delete pendingWarnings[uri];
+                }
+            },
+            onResultLimitExceeded(uri, resultLimit, name) {
+                return () => {
+                    let warning = pendingWarnings[uri];
+                    if (warning) {
+                        if (!warning.timeout) {
+                            // already shown
+                            return;
+                        }
+                        warning.features[name] = name;
+                        warning.timeout.refresh();
+                    }
+                    else {
+                        warning = { features: { [name]: name } };
+                        warning.timeout = setTimeout(() => {
+                            connection.sendNotification(ResultLimitReachedNotification.type, `${requests_1.basename(uri)}: For performance reasons, ${Object.keys(warning.features).join(' and ')} have been limited to ${resultLimit} items.`);
+                            warning.timeout = undefined;
+                        }, 2000);
+                        pendingWarnings[uri] = warning;
+                    }
+                };
+            }
+        };
+    }();
+    let jsonConfigurationSettings = undefined;
+    let schemaAssociations = undefined;
+    let formatterRegistration = null;
+    // The settings have changed. Is send on server activation as well.
+    connection.onDidChangeConfiguration((change) => {
+        let settings = change.settings;
+        if (runtime.configureHttpRequests) {
+            runtime.configureHttpRequests(settings.http && settings.http.proxy, settings.http && settings.http.proxyStrictSSL);
+        }
+        jsonConfigurationSettings = settings.json && settings.json.schemas;
+        updateConfiguration();
+        foldingRangeLimit = Math.trunc(Math.max(settings.json && settings.json.resultLimit || foldingRangeLimitDefault, 0));
+        resultLimit = Math.trunc(Math.max(settings.json && settings.json.resultLimit || Number.MAX_VALUE, 0));
+        // dynamically enable & disable the formatter
+        if (dynamicFormatterRegistration) {
+            const enableFormatter = settings && settings.json && settings.json.format && settings.json.format.enable;
+            if (enableFormatter) {
+                if (!formatterRegistration) {
+                    formatterRegistration = connection.client.register(vscode_languageserver_1.DocumentRangeFormattingRequest.type, { documentSelector: [{ language: 'json' }, { language: 'jsonc' }] });
+                }
+            }
+            else if (formatterRegistration) {
+                formatterRegistration.then(r => r.dispose());
+                formatterRegistration = null;
+            }
         }
-        var p = (data.length / 2) | 0;
-        var left = data.slice(0, p);
-        var right = data.slice(p);
-        mergeSort(left, compare);
-        mergeSort(right, compare);
-        var leftIdx = 0;
-        var rightIdx = 0;
-        var i = 0;
-        while (leftIdx < left.length && rightIdx < right.length) {
-            var ret = compare(left[leftIdx], right[rightIdx]);
-            if (ret <= 0) {
-                // smaller_equal -> take left to preserve order
-                data[i++] = left[leftIdx++];
+    });
+    // The jsonValidation extension configuration has changed
+    connection.onNotification(SchemaAssociationNotification.type, associations => {
+        schemaAssociations = associations;
+        updateConfiguration();
+    });
+    // A schema has changed
+    connection.onNotification(SchemaContentChangeNotification.type, uri => {
+        languageService.resetSchema(uri);
+    });
+    // Retry schema validation on all open documents
+    connection.onRequest(ForceValidateRequest.type, uri => {
+        return new Promise(resolve => {
+            const document = documents.get(uri);
+            if (document) {
+                updateConfiguration();
+                validateTextDocument(document, diagnostics => {
+                    resolve(diagnostics);
+                });
             }
             else {
-                // greater -> take right
-                data[i++] = right[rightIdx++];
+                resolve([]);
+            }
+        });
+    });
+    function updateConfiguration() {
+        const languageSettings = {
+            validate: true,
+            allowComments: true,
+            schemas: new Array()
+        };
+        if (schemaAssociations) {
+            if (Array.isArray(schemaAssociations)) {
+                Array.prototype.push.apply(languageSettings.schemas, schemaAssociations);
+            }
+            else {
+                for (const pattern in schemaAssociations) {
+                    const association = schemaAssociations[pattern];
+                    if (Array.isArray(association)) {
+                        association.forEach(uri => {
+                            languageSettings.schemas.push({ uri, fileMatch: [pattern] });
+                        });
+                    }
+                }
             }
         }
-        while (leftIdx < left.length) {
-            data[i++] = left[leftIdx++];
-        }
-        while (rightIdx < right.length) {
-            data[i++] = right[rightIdx++];
+        if (jsonConfigurationSettings) {
+            jsonConfigurationSettings.forEach((schema, index) => {
+                let uri = schema.url;
+                if (!uri && schema.schema) {
+                    uri = schema.schema.id || `vscode://schemas/custom/${index}`;
+                }
+                if (uri) {
+                    languageSettings.schemas.push({ uri, fileMatch: schema.fileMatch, schema: schema.schema });
+                }
+            });
         }
-        return data;
+        languageService.configure(languageSettings);
+        // Revalidate any open text documents
+        documents.all().forEach(triggerValidation);
     }
-})(TextDocument || (TextDocument = {}));
-/**
- * Represents reasons why a text document is saved.
- */
-var TextDocumentSaveReason;
-(function (TextDocumentSaveReason) {
-    /**
-     * Manually triggered, e.g. by the user pressing save, by starting debugging,
-     * or by an API call.
-     */
-    TextDocumentSaveReason.Manual = 1;
-    /**
-     * Automatic after a delay.
-     */
-    TextDocumentSaveReason.AfterDelay = 2;
-    /**
-     * When the editor lost focus.
-     */
-    TextDocumentSaveReason.FocusOut = 3;
-})(TextDocumentSaveReason || (TextDocumentSaveReason = {}));
-var FullTextDocument = /** @class */ (function () {
-    function FullTextDocument(uri, languageId, version, content) {
-        this._uri = uri;
-        this._languageId = languageId;
-        this._version = version;
-        this._content = content;
-        this._lineOffsets = null;
+    // The content of a text document has changed. This event is emitted
+    // when the text document first opened or when its content has changed.
+    documents.onDidChangeContent((change) => {
+        limitExceededWarnings.cancel(change.document.uri);
+        triggerValidation(change.document);
+    });
+    // a document has closed: clear all diagnostics
+    documents.onDidClose(event => {
+        limitExceededWarnings.cancel(event.document.uri);
+        cleanPendingValidation(event.document);
+        connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
+    });
+    const pendingValidationRequests = {};
+    const validationDelayMs = 300;
+    function cleanPendingValidation(textDocument) {
+        const request = pendingValidationRequests[textDocument.uri];
+        if (request) {
+            clearTimeout(request);
+            delete pendingValidationRequests[textDocument.uri];
+        }
+    }
+    function triggerValidation(textDocument) {
+        cleanPendingValidation(textDocument);
+        pendingValidationRequests[textDocument.uri] = setTimeout(() => {
+            delete pendingValidationRequests[textDocument.uri];
+            validateTextDocument(textDocument);
+        }, validationDelayMs);
+    }
+    function validateTextDocument(textDocument, callback) {
+        const respond = (diagnostics) => {
+            connection.sendDiagnostics({ uri: textDocument.uri, diagnostics });
+            if (callback) {
+                callback(diagnostics);
+            }
+        };
+        if (textDocument.getText().length === 0) {
+            respond([]); // ignore empty documents
+            return;
+        }
+        const jsonDocument = getJSONDocument(textDocument);
+        const version = textDocument.version;
+        const documentSettings = textDocument.languageId === 'jsonc' ? { comments: 'ignore', trailingCommas: 'warning' } : { comments: 'error', trailingCommas: 'error' };
+        languageService.doValidation(textDocument, jsonDocument, documentSettings).then(diagnostics => {
+            setImmediate(() => {
+                const currDocument = documents.get(textDocument.uri);
+                if (currDocument && currDocument.version === version) {
+                    respond(diagnostics); // Send the computed diagnostics to VSCode.
+                }
+            });
+        }, error => {
+            connection.console.error(runner_1.formatError(`Error while validating ${textDocument.uri}`, error));
+        });
     }
-    Object.defineProperty(FullTextDocument.prototype, "uri", {
-        get: function () {
-            return this._uri;
-        },
-        enumerable: true,
-        configurable: true
+    connection.onDidChangeWatchedFiles((change) => {
+        // Monitored files have changed in VSCode
+        let hasChanges = false;
+        change.changes.forEach(c => {
+            if (languageService.resetSchema(c.uri)) {
+                hasChanges = true;
+            }
+        });
+        if (hasChanges) {
+            documents.all().forEach(triggerValidation);
+        }
     });
-    Object.defineProperty(FullTextDocument.prototype, "languageId", {
-        get: function () {
-            return this._languageId;
-        },
-        enumerable: true,
-        configurable: true
+    const jsonDocuments = languageModelCache_1.getLanguageModelCache(10, 60, document => languageService.parseJSONDocument(document));
+    documents.onDidClose(e => {
+        jsonDocuments.onDocumentRemoved(e.document);
+    });
+    connection.onShutdown(() => {
+        jsonDocuments.dispose();
+    });
+    function getJSONDocument(document) {
+        return jsonDocuments.get(document);
+    }
+    connection.onCompletion((textDocumentPosition, token) => {
+        return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
+            const document = documents.get(textDocumentPosition.textDocument.uri);
+            if (document) {
+                const jsonDocument = getJSONDocument(document);
+                return languageService.doComplete(document, textDocumentPosition.position, jsonDocument);
+            }
+            return null;
+        }), null, `Error while computing completions for ${textDocumentPosition.textDocument.uri}`, token);
     });
-    Object.defineProperty(FullTextDocument.prototype, "version", {
-        get: function () {
-            return this._version;
-        },
-        enumerable: true,
-        configurable: true
+    connection.onHover((textDocumentPositionParams, token) => {
+        return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
+            const document = documents.get(textDocumentPositionParams.textDocument.uri);
+            if (document) {
+                const jsonDocument = getJSONDocument(document);
+                return languageService.doHover(document, textDocumentPositionParams.position, jsonDocument);
+            }
+            return null;
+        }), null, `Error while computing hover for ${textDocumentPositionParams.textDocument.uri}`, token);
     });
-    FullTextDocument.prototype.getText = function (range) {
-        if (range) {
-            var start = this.offsetAt(range.start);
-            var end = this.offsetAt(range.end);
-            return this._content.substring(start, end);
-        }
-        return this._content;
-    };
-    FullTextDocument.prototype.update = function (event, version) {
-        this._content = event.text;
-        this._version = version;
-        this._lineOffsets = null;
-    };
-    FullTextDocument.prototype.getLineOffsets = function () {
-        if (this._lineOffsets === null) {
-            var lineOffsets = [];
-            var text = this._content;
-            var isLineStart = true;
-            for (var i = 0; i < text.length; i++) {
-                if (isLineStart) {
-                    lineOffsets.push(i);
-                    isLineStart = false;
+    connection.onDocumentSymbol((documentSymbolParams, token) => {
+        return runner_1.runSafe(() => {
+            const document = documents.get(documentSymbolParams.textDocument.uri);
+            if (document) {
+                const jsonDocument = getJSONDocument(document);
+                const onResultLimitExceeded = limitExceededWarnings.onResultLimitExceeded(document.uri, resultLimit, 'document symbols');
+                if (hierarchicalDocumentSymbolSupport) {
+                    return languageService.findDocumentSymbols2(document, jsonDocument, { resultLimit, onResultLimitExceeded });
                 }
-                var ch = text.charAt(i);
-                isLineStart = (ch === '\r' || ch === '\n');
-                if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
-                    i++;
+                else {
+                    return languageService.findDocumentSymbols(document, jsonDocument, { resultLimit, onResultLimitExceeded });
                 }
             }
-            if (isLineStart && text.length > 0) {
-                lineOffsets.push(text.length);
+            return [];
+        }, [], `Error while computing document symbols for ${documentSymbolParams.textDocument.uri}`, token);
+    });
+    connection.onDocumentRangeFormatting((formatParams, token) => {
+        return runner_1.runSafe(() => {
+            const document = documents.get(formatParams.textDocument.uri);
+            if (document) {
+                const edits = languageService.format(document, formatParams.range, formatParams.options);
+                if (edits.length > formatterMaxNumberOfEdits) {
+                    const newText = vscode_json_languageservice_1.TextDocument.applyEdits(document, edits);
+                    return [vscode_languageserver_1.TextEdit.replace(vscode_json_languageservice_1.Range.create(vscode_json_languageservice_1.Position.create(0, 0), document.positionAt(document.getText().length)), newText)];
+                }
+                return edits;
             }
-            this._lineOffsets = lineOffsets;
-        }
-        return this._lineOffsets;
-    };
-    FullTextDocument.prototype.positionAt = function (offset) {
-        offset = Math.max(Math.min(offset, this._content.length), 0);
-        var lineOffsets = this.getLineOffsets();
-        var low = 0, high = lineOffsets.length;
-        if (high === 0) {
-            return Position.create(0, offset);
-        }
-        while (low < high) {
-            var mid = Math.floor((low + high) / 2);
-            if (lineOffsets[mid] > offset) {
-                high = mid;
+            return [];
+        }, [], `Error while formatting range for ${formatParams.textDocument.uri}`, token);
+    });
+    connection.onDocumentColor((params, token) => {
+        return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
+            const document = documents.get(params.textDocument.uri);
+            if (document) {
+                const onResultLimitExceeded = limitExceededWarnings.onResultLimitExceeded(document.uri, resultLimit, 'document colors');
+                const jsonDocument = getJSONDocument(document);
+                return languageService.findDocumentColors(document, jsonDocument, { resultLimit, onResultLimitExceeded });
             }
-            else {
-                low = mid + 1;
+            return [];
+        }), [], `Error while computing document colors for ${params.textDocument.uri}`, token);
+    });
+    connection.onColorPresentation((params, token) => {
+        return runner_1.runSafe(() => {
+            const document = documents.get(params.textDocument.uri);
+            if (document) {
+                const jsonDocument = getJSONDocument(document);
+                return languageService.getColorPresentations(document, jsonDocument, params.color, params.range);
             }
+            return [];
+        }, [], `Error while computing color presentations for ${params.textDocument.uri}`, token);
+    });
+    connection.onFoldingRanges((params, token) => {
+        return runner_1.runSafe(() => {
+            const document = documents.get(params.textDocument.uri);
+            if (document) {
+                const onRangeLimitExceeded = limitExceededWarnings.onResultLimitExceeded(document.uri, foldingRangeLimit, 'folding ranges');
+                return languageService.getFoldingRanges(document, { rangeLimit: foldingRangeLimit, onRangeLimitExceeded });
+            }
+            return null;
+        }, null, `Error while computing folding ranges for ${params.textDocument.uri}`, token);
+    });
+    connection.onSelectionRanges((params, token) => {
+        return runner_1.runSafe(() => {
+            const document = documents.get(params.textDocument.uri);
+            if (document) {
+                const jsonDocument = getJSONDocument(document);
+                return languageService.getSelectionRanges(document, params.positions, jsonDocument);
+            }
+            return [];
+        }, [], `Error while computing selection ranges for ${params.textDocument.uri}`, token);
+    });
+    connection.onDefinition((params, token) => {
+        return runner_1.runSafeAsync(() => __awaiter(this, void 0, void 0, function* () {
+            const document = documents.get(params.textDocument.uri);
+            if (document) {
+                const jsonDocument = getJSONDocument(document);
+                return languageService.findDefinition(document, params.position, jsonDocument);
+            }
+            return [];
+        }), [], `Error while computing definitions for ${params.textDocument.uri}`, token);
+    });
+    // Listen on the connection
+    connection.listen();
+}
+exports.startServer = startServer;
+
+
+/***/ }),
+/* 90 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLanguageService", function() { return getLanguageService; });
+/* harmony import */ var _services_jsonCompletion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91);
+/* harmony import */ var _services_jsonHover__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(104);
+/* harmony import */ var _services_jsonValidation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(105);
+/* harmony import */ var _services_jsonDocumentSymbols__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(107);
+/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92);
+/* harmony import */ var _services_configuration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(109);
+/* harmony import */ var _services_jsonSchemaService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(106);
+/* harmony import */ var _services_jsonFolding__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(110);
+/* harmony import */ var _services_jsonSelectionRanges__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(111);
+/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(93);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(99);
+/* harmony import */ var _services_jsonDefinition__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(112);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["TextDocument"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Range"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["TextEdit"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Color"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["ColorInformation"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["ColorPresentation"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["FoldingRange"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["FoldingRangeKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["SelectionRange"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Diagnostic"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["DiagnosticSeverity"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["CompletionItem"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["CompletionItemKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["CompletionList"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Position"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["InsertTextFormat"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["MarkupContent"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["MarkupKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["SymbolInformation"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["SymbolKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["DocumentSymbol"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Location"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Hover"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["MarkedString"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["FormattingOptions"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ErrorCode", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["ErrorCode"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["ClientCapabilities"]; });
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+function getLanguageService(params) {
+    var promise = params.promiseConstructor || Promise;
+    var jsonSchemaService = new _services_jsonSchemaService__WEBPACK_IMPORTED_MODULE_6__["JSONSchemaService"](params.schemaRequestService, params.workspaceContext, promise);
+    jsonSchemaService.setSchemaContributions(_services_configuration__WEBPACK_IMPORTED_MODULE_5__["schemaContributions"]);
+    var jsonCompletion = new _services_jsonCompletion__WEBPACK_IMPORTED_MODULE_0__["JSONCompletion"](jsonSchemaService, params.contributions, promise, params.clientCapabilities);
+    var jsonHover = new _services_jsonHover__WEBPACK_IMPORTED_MODULE_1__["JSONHover"](jsonSchemaService, params.contributions, promise);
+    var jsonDocumentSymbols = new _services_jsonDocumentSymbols__WEBPACK_IMPORTED_MODULE_3__["JSONDocumentSymbols"](jsonSchemaService);
+    var jsonValidation = new _services_jsonValidation__WEBPACK_IMPORTED_MODULE_2__["JSONValidation"](jsonSchemaService, promise);
+    return {
+        configure: function (settings) {
+            jsonSchemaService.clearExternalSchemas();
+            if (settings.schemas) {
+                settings.schemas.forEach(function (settings) {
+                    jsonSchemaService.registerExternalSchema(settings.uri, settings.fileMatch, settings.schema);
+                });
+            }
+            jsonValidation.configure(settings);
+        },
+        resetSchema: function (uri) { return jsonSchemaService.onResourceChange(uri); },
+        doValidation: jsonValidation.doValidation.bind(jsonValidation),
+        parseJSONDocument: function (document) { return Object(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_4__["parse"])(document, { collectComments: true }); },
+        newJSONDocument: function (root, diagnostics) { return Object(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_4__["newJSONDocument"])(root, diagnostics); },
+        getMatchingSchemas: jsonSchemaService.getMatchingSchemas.bind(jsonSchemaService),
+        doResolve: jsonCompletion.doResolve.bind(jsonCompletion),
+        doComplete: jsonCompletion.doComplete.bind(jsonCompletion),
+        findDocumentSymbols: jsonDocumentSymbols.findDocumentSymbols.bind(jsonDocumentSymbols),
+        findDocumentSymbols2: jsonDocumentSymbols.findDocumentSymbols2.bind(jsonDocumentSymbols),
+        findColorSymbols: function (d, s) { return jsonDocumentSymbols.findDocumentColors(d, s).then(function (s) { return s.map(function (s) { return s.range; }); }); },
+        findDocumentColors: jsonDocumentSymbols.findDocumentColors.bind(jsonDocumentSymbols),
+        getColorPresentations: jsonDocumentSymbols.getColorPresentations.bind(jsonDocumentSymbols),
+        doHover: jsonHover.doHover.bind(jsonHover),
+        getFoldingRanges: _services_jsonFolding__WEBPACK_IMPORTED_MODULE_7__["getFoldingRanges"],
+        getSelectionRanges: _services_jsonSelectionRanges__WEBPACK_IMPORTED_MODULE_8__["getSelectionRanges"],
+        findDefinition: _services_jsonDefinition__WEBPACK_IMPORTED_MODULE_11__["findDefinition"],
+        format: function (d, r, o) {
+            var range = undefined;
+            if (r) {
+                var offset = d.offsetAt(r.start);
+                var length = d.offsetAt(r.end) - offset;
+                range = { offset: offset, length: length };
+            }
+            var options = { tabSize: o ? o.tabSize : 4, insertSpaces: o ? o.insertSpaces : true, eol: '\n' };
+            return Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_9__["format"])(d.getText(), range, options).map(function (e) {
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["TextEdit"].replace(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_10__["Range"].create(d.positionAt(e.offset), d.positionAt(e.offset + e.length)), e.content);
+            });
         }
-        // low is the least x for which the line offset is larger than the current offset
-        // or array.length if no line offset is larger than the current offset
-        var line = low - 1;
-        return Position.create(line, offset - lineOffsets[line]);
-    };
-    FullTextDocument.prototype.offsetAt = function (position) {
-        var lineOffsets = this.getLineOffsets();
-        if (position.line >= lineOffsets.length) {
-            return this._content.length;
-        }
-        else if (position.line < 0) {
-            return 0;
-        }
-        var lineOffset = lineOffsets[position.line];
-        var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
-        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
     };
-    Object.defineProperty(FullTextDocument.prototype, "lineCount", {
-        get: function () {
-            return this.getLineOffsets().length;
-        },
-        enumerable: true,
-        configurable: true
-    });
-    return FullTextDocument;
-}());
-var Is;
-(function (Is) {
-    var toString = Object.prototype.toString;
-    function defined(value) {
-        return typeof value !== 'undefined';
-    }
-    Is.defined = defined;
-    function undefined(value) {
-        return typeof value === 'undefined';
-    }
-    Is.undefined = undefined;
-    function boolean(value) {
-        return value === true || value === false;
-    }
-    Is.boolean = boolean;
-    function string(value) {
-        return toString.call(value) === '[object String]';
-    }
-    Is.string = string;
-    function number(value) {
-        return toString.call(value) === '[object Number]';
-    }
-    Is.number = number;
-    function func(value) {
-        return toString.call(value) === '[object Function]';
-    }
-    Is.func = func;
-    function objectLiteral(value) {
-        // Strictly speaking class instances pass this check as well. Since the LSP
-        // doesn't use classes we ignore this for now. If we do we need to add something
-        // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
-        return value !== null && typeof value === 'object';
-    }
-    Is.objectLiteral = objectLiteral;
-    function typedArray(value, check) {
-        return Array.isArray(value) && value.every(check);
-    }
-    Is.typedArray = typedArray;
-})(Is || (Is = {}));
+}
 
 
 /***/ }),
-/* 81 */
+/* 91 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONCompletion", function() { return JSONCompletion; });
-/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82);
-/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83);
-/* harmony import */ var _utils_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(90);
-/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91);
-/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88);
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(80);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76);
+/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92);
+/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93);
+/* harmony import */ var _utils_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(102);
+/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(103);
+/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(99);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(101);
 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_6__);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -16218,6 +10831,8 @@ __webpack_require__.r(__webpack_exports__);
 
 
 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_6__["loadMessageBundle"]();
+var valueCommitCharacters = [',', '}', ']'];
+var propertyCommitCharacters = [':'];
 var JSONCompletion = /** @class */ (function () {
     function JSONCompletion(schemaService, contributions, promiseConstructor, clientCapabilities) {
         if (contributions === void 0) { contributions = []; }
@@ -16227,12 +10842,12 @@ var JSONCompletion = /** @class */ (function () {
         this.contributions = contributions;
         this.promiseConstructor = promiseConstructor;
         this.clientCapabilities = clientCapabilities;
-        this.templateVarIdCounter = 0;
     }
     JSONCompletion.prototype.doResolve = function (item) {
         for (var i = this.contributions.length - 1; i >= 0; i--) {
-            if (this.contributions[i].resolveCompletion) {
-                var resolver = this.contributions[i].resolveCompletion(item);
+            var resolveCompletion = this.contributions[i].resolveCompletion;
+            if (resolveCompletion) {
+                var resolver = resolveCompletion(item);
                 if (resolver) {
                     return resolver;
                 }
@@ -16246,32 +10861,53 @@ var JSONCompletion = /** @class */ (function () {
             items: [],
             isIncomplete: false
         };
+        var text = document.getText();
         var offset = document.offsetAt(position);
         var node = doc.getNodeFromOffset(offset, true);
         if (this.isInComment(document, node ? node.offset : 0, offset)) {
             return Promise.resolve(result);
         }
+        if (node && (offset === node.offset + node.length) && offset > 0) {
+            var ch = text[offset - 1];
+            if (node.type === 'object' && ch === '}' || node.type === 'array' && ch === ']') {
+                // after ] or }
+                node = node.parent;
+            }
+        }
         var currentWord = this.getCurrentWord(document, offset);
-        var overwriteRange = null;
+        var overwriteRange;
         if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) {
-            overwriteRange = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["Range"].create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
+            overwriteRange = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["Range"].create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
         }
         else {
             var overwriteStart = offset - currentWord.length;
-            if (overwriteStart > 0 && document.getText()[overwriteStart - 1] === '"') {
+            if (overwriteStart > 0 && text[overwriteStart - 1] === '"') {
                 overwriteStart--;
             }
-            overwriteRange = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["Range"].create(document.positionAt(overwriteStart), position);
+            overwriteRange = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["Range"].create(document.positionAt(overwriteStart), position);
         }
+        var supportsCommitCharacters = false; //this.doesSupportsCommitCharacters(); disabled for now, waiting for new API: https://github.com/microsoft/vscode/issues/42544
         var proposed = {};
         var collector = {
             add: function (suggestion) {
-                var existing = proposed[suggestion.label];
+                var label = suggestion.label;
+                var existing = proposed[label];
                 if (!existing) {
-                    proposed[suggestion.label] = suggestion;
-                    if (overwriteRange) {
-                        suggestion.textEdit = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["TextEdit"].replace(overwriteRange, suggestion.insertText);
+                    label = label.replace(/[\n]/g, '↵');
+                    if (label.length > 60) {
+                        var shortendedLabel = label.substr(0, 57).trim() + '...';
+                        if (!proposed[shortendedLabel]) {
+                            label = shortendedLabel;
+                        }
+                    }
+                    if (overwriteRange && suggestion.insertText !== undefined) {
+                        suggestion.textEdit = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["TextEdit"].replace(overwriteRange, suggestion.insertText);
                     }
+                    if (supportsCommitCharacters) {
+                        suggestion.commitCharacters = suggestion.kind === _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property ? propertyCommitCharacters : valueCommitCharacters;
+                    }
+                    suggestion.label = label;
+                    proposed[label] = suggestion;
                     result.items.push(suggestion);
                 }
                 else if (!existing.documentation) {
@@ -16295,14 +10931,14 @@ var JSONCompletion = /** @class */ (function () {
             var collectionPromises = [];
             var addValue = true;
             var currentKey = '';
-            var currentProperty = null;
+            var currentProperty = undefined;
             if (node) {
                 if (node.type === 'string') {
                     var parent = node.parent;
                     if (parent && parent.type === 'property' && parent.keyNode === node) {
                         addValue = !parent.valueNode;
                         currentProperty = parent;
-                        currentKey = document.getText().substr(node.offset + 1, node.length - 2);
+                        currentKey = text.substr(node.offset + 1, node.length - 2);
                         if (parent) {
                             node = parent.parent;
                         }
@@ -16319,7 +10955,7 @@ var JSONCompletion = /** @class */ (function () {
                 var properties = node.properties;
                 properties.forEach(function (p) {
                     if (!currentProperty || currentProperty !== p) {
-                        proposed[p.keyNode.value] = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItem"].create('__');
+                        proposed[p.keyNode.value] = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItem"].create('__');
                     }
                 });
                 var separatorAfter_1 = '';
@@ -16341,12 +10977,12 @@ var JSONCompletion = /** @class */ (function () {
                         collectionPromises.push(collectPromise);
                     }
                 });
-                if ((!schema && currentWord.length > 0 && document.getText().charAt(offset - currentWord.length - 1) !== '"')) {
+                if ((!schema && currentWord.length > 0 && text.charAt(offset - currentWord.length - 1) !== '"')) {
                     collector.add({
-                        kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
+                        kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
                         label: _this.getLabelForValue(currentWord),
-                        insertText: _this.getInsertTextForProperty(currentWord, null, false, separatorAfter_1),
-                        insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: '',
+                        insertText: _this.getInsertTextForProperty(currentWord, undefined, false, separatorAfter_1),
+                        insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: '',
                     });
                     collector.setAsIncomplete();
                 }
@@ -16388,14 +11024,17 @@ var JSONCompletion = /** @class */ (function () {
                         var propertySchema = schemaProperties_1[key];
                         if (typeof propertySchema === 'object' && !propertySchema.deprecationMessage && !propertySchema.doNotSuggest) {
                             var proposal = {
-                                kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
-                                label: _this.sanitizeLabel(key),
+                                kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
+                                label: key,
                                 insertText: _this.getInsertTextForProperty(key, propertySchema, addValue, separatorAfter),
-                                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                                 filterText: _this.getFilterTextForValue(key),
                                 documentation: _this.fromMarkup(propertySchema.markdownDescription) || propertySchema.description || '',
                             };
-                            if (Object(_utils_strings__WEBPACK_IMPORTED_MODULE_3__["endsWith"])(proposal.insertText, "$1" + separatorAfter)) {
+                            if (propertySchema.suggestSortText !== undefined) {
+                                proposal.sortText = propertySchema.suggestSortText;
+                            }
+                            if (proposal.insertText && Object(_utils_strings__WEBPACK_IMPORTED_MODULE_3__["endsWith"])(proposal.insertText, "$1" + separatorAfter)) {
                                 proposal.command = {
                                     title: 'Suggest',
                                     command: 'editor.action.triggerSuggest'
@@ -16405,6 +11044,45 @@ var JSONCompletion = /** @class */ (function () {
                         }
                     });
                 }
+                var schemaPropertyNames_1 = s.schema.propertyNames;
+                if (typeof schemaPropertyNames_1 === 'object' && !schemaPropertyNames_1.deprecationMessage && !schemaPropertyNames_1.doNotSuggest) {
+                    var propertyNameCompletionItem = function (name, enumDescription) {
+                        if (enumDescription === void 0) { enumDescription = undefined; }
+                        var proposal = {
+                            kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
+                            label: name,
+                            insertText: _this.getInsertTextForProperty(name, undefined, addValue, separatorAfter),
+                            insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                            filterText: _this.getFilterTextForValue(name),
+                            documentation: enumDescription || _this.fromMarkup(schemaPropertyNames_1.markdownDescription) || schemaPropertyNames_1.description || '',
+                        };
+                        if (schemaPropertyNames_1.suggestSortText !== undefined) {
+                            proposal.sortText = schemaPropertyNames_1.suggestSortText;
+                        }
+                        if (proposal.insertText && Object(_utils_strings__WEBPACK_IMPORTED_MODULE_3__["endsWith"])(proposal.insertText, "$1" + separatorAfter)) {
+                            proposal.command = {
+                                title: 'Suggest',
+                                command: 'editor.action.triggerSuggest'
+                            };
+                        }
+                        collector.add(proposal);
+                    };
+                    if (schemaPropertyNames_1.enum) {
+                        for (var i = 0; i < schemaPropertyNames_1.enum.length; i++) {
+                            var enumDescription = undefined;
+                            if (schemaPropertyNames_1.markdownEnumDescriptions && i < schemaPropertyNames_1.markdownEnumDescriptions.length) {
+                                enumDescription = _this.fromMarkup(schemaPropertyNames_1.markdownEnumDescriptions[i]);
+                            }
+                            else if (schemaPropertyNames_1.enumDescriptions && i < schemaPropertyNames_1.enumDescriptions.length) {
+                                enumDescription = schemaPropertyNames_1.enumDescriptions[i];
+                            }
+                            propertyNameCompletionItem(schemaPropertyNames_1.enum[i], enumDescription);
+                        }
+                    }
+                    if (schemaPropertyNames_1.const) {
+                        propertyNameCompletionItem(schemaPropertyNames_1.const);
+                    }
+                }
             }
         });
     };
@@ -16414,10 +11092,10 @@ var JSONCompletion = /** @class */ (function () {
             obj.properties.forEach(function (p) {
                 var key = p.keyNode.value;
                 collector.add({
-                    kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
-                    label: _this.sanitizeLabel(key),
+                    kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
+                    label: key,
                     insertText: _this.getInsertTextForValue(key, ''),
-                    insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                    insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                     filterText: _this.getFilterTextForValue(key),
                     documentation: ''
                 });
@@ -16445,10 +11123,10 @@ var JSONCompletion = /** @class */ (function () {
         }
         else if (node.type === 'object') {
             collector.add({
-                kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
+                kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property,
                 label: '$schema',
-                insertText: this.getInsertTextForProperty('$schema', null, true, ''),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: '',
+                insertText: this.getInsertTextForProperty('$schema', undefined, true, ''),
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: '',
                 filterText: this.getFilterTextForValue("$schema")
             });
         }
@@ -16465,26 +11143,26 @@ var JSONCompletion = /** @class */ (function () {
                 kind: this.getSuggestionKind('object'),
                 label: 'Empty object',
                 insertText: this.getInsertTextForValue({}, ''),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                 documentation: ''
             });
             collector.add({
                 kind: this.getSuggestionKind('array'),
                 label: 'Empty array',
                 insertText: this.getInsertTextForValue([], ''),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                 documentation: ''
             });
             return;
         }
         var separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator);
         var collectSuggestionsForValues = function (value) {
-            if (!_parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["contains"](value.parent, offset, true)) {
+            if (value.parent && !_parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["contains"](value.parent, offset, true)) {
                 collector.add({
                     kind: _this.getSuggestionKind(value.type),
                     label: _this.getLabelTextForMatchingNode(value, document),
                     insertText: _this.getInsertTextForMatchingNode(value, document, separatorAfter),
-                    insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: ''
+                    insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: ''
                 });
             }
             if (value.type === 'boolean') {
@@ -16492,7 +11170,7 @@ var JSONCompletion = /** @class */ (function () {
             }
         };
         if (node.type === 'property') {
-            if (offset > node.colonOffset) {
+            if (offset > (node.colonOffset || 0)) {
                 var valueNode = node.valueNode;
                 if (valueNode && (offset > (valueNode.offset + valueNode.length) || valueNode.type === 'object' || valueNode.type === 'array')) {
                     return;
@@ -16528,10 +11206,9 @@ var JSONCompletion = /** @class */ (function () {
         }
     };
     JSONCompletion.prototype.getValueCompletions = function (schema, doc, node, offset, document, collector, types) {
-        var _this = this;
         var offsetForSeparator = offset;
-        var parentKey = null;
-        var valueNode = null;
+        var parentKey = undefined;
+        var valueNode = undefined;
         if (node && (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null')) {
             offsetForSeparator = node.offset + node.length;
             valueNode = node;
@@ -16541,7 +11218,7 @@ var JSONCompletion = /** @class */ (function () {
             this.addSchemaValueCompletions(schema.schema, '', collector, types);
             return;
         }
-        if ((node.type === 'property') && offset > node.colonOffset) {
+        if ((node.type === 'property') && offset > (node.colonOffset || 0)) {
             var valueNode_1 = node.valueNode;
             if (valueNode_1 && offset > (valueNode_1.offset + valueNode_1.length)) {
                 return; // we are past the value node
@@ -16549,39 +11226,59 @@ var JSONCompletion = /** @class */ (function () {
             parentKey = node.keyNode.value;
             node = node.parent;
         }
-        if (node && (parentKey !== null || node.type === 'array')) {
-            var separatorAfter_2 = this.evaluateSeparatorAfter(document, offsetForSeparator);
+        if (node && (parentKey !== undefined || node.type === 'array')) {
+            var separatorAfter = this.evaluateSeparatorAfter(document, offsetForSeparator);
             var matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset, valueNode);
-            matchingSchemas.forEach(function (s) {
+            for (var _i = 0, matchingSchemas_1 = matchingSchemas; _i < matchingSchemas_1.length; _i++) {
+                var s = matchingSchemas_1[_i];
                 if (s.node === node && !s.inverted && s.schema) {
                     if (node.type === 'array' && s.schema.items) {
                         if (Array.isArray(s.schema.items)) {
-                            var index = _this.findItemAtOffset(node, document, offset);
+                            var index = this.findItemAtOffset(node, document, offset);
                             if (index < s.schema.items.length) {
-                                _this.addSchemaValueCompletions(s.schema.items[index], separatorAfter_2, collector, types);
+                                this.addSchemaValueCompletions(s.schema.items[index], separatorAfter, collector, types);
                             }
                         }
                         else {
-                            _this.addSchemaValueCompletions(s.schema.items, separatorAfter_2, collector, types);
+                            this.addSchemaValueCompletions(s.schema.items, separatorAfter, collector, types);
                         }
                     }
-                    if (s.schema.properties) {
-                        var propertySchema = s.schema.properties[parentKey];
-                        if (propertySchema) {
-                            _this.addSchemaValueCompletions(propertySchema, separatorAfter_2, collector, types);
+                    if (parentKey !== undefined) {
+                        var propertyMatched = false;
+                        if (s.schema.properties) {
+                            var propertySchema = s.schema.properties[parentKey];
+                            if (propertySchema) {
+                                propertyMatched = true;
+                                this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types);
+                            }
+                        }
+                        if (s.schema.patternProperties && !propertyMatched) {
+                            for (var _a = 0, _b = Object.keys(s.schema.patternProperties); _a < _b.length; _a++) {
+                                var pattern = _b[_a];
+                                var regex = new RegExp(pattern);
+                                if (regex.test(parentKey)) {
+                                    propertyMatched = true;
+                                    var propertySchema = s.schema.patternProperties[pattern];
+                                    this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types);
+                                }
+                            }
+                        }
+                        if (s.schema.additionalProperties && !propertyMatched) {
+                            var propertySchema = s.schema.additionalProperties;
+                            this.addSchemaValueCompletions(propertySchema, separatorAfter, collector, types);
                         }
                     }
                 }
-            });
+            }
             if (parentKey === '$schema' && !node.parent) {
-                this.addDollarSchemaCompletions(separatorAfter_2, collector);
+                this.addDollarSchemaCompletions(separatorAfter, collector);
             }
             if (types['boolean']) {
-                this.addBooleanValueCompletion(true, separatorAfter_2, collector);
-                this.addBooleanValueCompletion(false, separatorAfter_2, collector);
+                this.addBooleanValueCompletion(true, separatorAfter, collector);
+                this.addBooleanValueCompletion(false, separatorAfter, collector);
             }
             if (types['null']) {
-                this.addNullValueCompletion(separatorAfter_2, collector);
+                this.addNullValueCompletion(separatorAfter, collector);
             }
         }
     };
@@ -16598,10 +11295,10 @@ var JSONCompletion = /** @class */ (function () {
             if (node.type === 'string' || node.type === 'number' || node.type === 'boolean' || node.type === 'null') {
                 node = node.parent;
             }
-            if ((node.type === 'property') && offset > node.colonOffset) {
+            if (node && (node.type === 'property') && offset > (node.colonOffset || 0)) {
                 var parentKey_4 = node.keyNode.value;
                 var valueNode = node.valueNode;
-                if (!valueNode || offset <= (valueNode.offset + valueNode.length)) {
+                if ((!valueNode || offset <= (valueNode.offset + valueNode.length)) && node.parent) {
                     var location_2 = _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](node.parent);
                     this.contributions.forEach(function (contribution) {
                         var collectPromise = contribution.collectValueCompletions(document.uri, location_2, parentKey_4, collector);
@@ -16645,7 +11342,7 @@ var JSONCompletion = /** @class */ (function () {
                 kind: this.getSuggestionKind(type),
                 label: this.getLabelForValue(value),
                 insertText: this.getInsertTextForValue(value, separatorAfter),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                 detail: localize('json.suggest.default', 'Default value')
             });
             hasProposals = true;
@@ -16662,7 +11359,7 @@ var JSONCompletion = /** @class */ (function () {
                     kind: _this.getSuggestionKind(type),
                     label: _this.getLabelForValue(value),
                     insertText: _this.getInsertTextForValue(value, separatorAfter),
-                    insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet
+                    insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet
                 });
                 hasProposals = true;
             });
@@ -16693,21 +11390,24 @@ var JSONCompletion = /** @class */ (function () {
                         type = 'array';
                     }
                     insertText = prefix + indent + s.bodyText.split('\n').join('\n' + indent) + suffix + separatorAfter;
-                    label = label || _this.sanitizeLabel(insertText),
+                    label = label || insertText,
                         filterText = insertText.replace(/[\n]/g, ''); // remove new lines
                 }
+                else {
+                    return;
+                }
                 collector.add({
                     kind: _this.getSuggestionKind(type),
                     label: label,
                     documentation: _this.fromMarkup(s.markdownDescription) || s.description,
                     insertText: insertText,
-                    insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                    insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                     filterText: filterText
                 });
                 hasProposals = true;
             });
         }
-        if (!hasProposals && typeof schema.items === 'object' && !Array.isArray(schema.items)) {
+        if (!hasProposals && typeof schema.items === 'object' && !Array.isArray(schema.items) && arrayDepth < 5 /* beware of recursion */) {
             this.addDefaultValueCompletions(schema.items, separatorAfter, collector, arrayDepth + 1);
         }
     };
@@ -16717,7 +11417,7 @@ var JSONCompletion = /** @class */ (function () {
                 kind: this.getSuggestionKind(schema.type),
                 label: this.getLabelForValue(schema.const),
                 insertText: this.getInsertTextForValue(schema.const, separatorAfter),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                 documentation: this.fromMarkup(schema.markdownDescription) || schema.description
             });
         }
@@ -16735,7 +11435,7 @@ var JSONCompletion = /** @class */ (function () {
                     kind: this.getSuggestionKind(schema.type),
                     label: this.getLabelForValue(enm),
                     insertText: this.getInsertTextForValue(enm, separatorAfter),
-                    insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                    insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                     documentation: documentation
                 });
             }
@@ -16749,7 +11449,7 @@ var JSONCompletion = /** @class */ (function () {
         if (Array.isArray(type)) {
             type.forEach(function (t) { return types[t] = true; });
         }
-        else {
+        else if (type) {
             types[type] = true;
         }
     };
@@ -16759,7 +11459,7 @@ var JSONCompletion = /** @class */ (function () {
                 kind: this.getSuggestionKind('object'),
                 label: '{}',
                 insertText: this.getInsertTextForGuessedValue({}, separatorAfter),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                 detail: localize('defaults.object', 'New object'),
                 documentation: ''
             });
@@ -16769,7 +11469,7 @@ var JSONCompletion = /** @class */ (function () {
                 kind: this.getSuggestionKind('array'),
                 label: '[]',
                 insertText: this.getInsertTextForGuessedValue([], separatorAfter),
-                insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+                insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
                 detail: localize('defaults.array', 'New array'),
                 documentation: ''
             });
@@ -16780,7 +11480,7 @@ var JSONCompletion = /** @class */ (function () {
             kind: this.getSuggestionKind('boolean'),
             label: value ? 'true' : 'false',
             insertText: this.getInsertTextForValue(value, separatorAfter),
-            insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+            insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
             documentation: ''
         });
     };
@@ -16789,7 +11489,7 @@ var JSONCompletion = /** @class */ (function () {
             kind: this.getSuggestionKind('null'),
             label: 'null',
             insertText: 'null' + separatorAfter,
-            insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
+            insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet,
             documentation: ''
         });
     };
@@ -16797,22 +11497,15 @@ var JSONCompletion = /** @class */ (function () {
         var _this = this;
         var schemaIds = this.schemaService.getRegisteredSchemaIds(function (schema) { return schema === 'http' || schema === 'https'; });
         schemaIds.forEach(function (schemaId) { return collector.add({
-            kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Module,
+            kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Module,
             label: _this.getLabelForValue(schemaId),
             filterText: _this.getFilterTextForValue(schemaId),
             insertText: _this.getInsertTextForValue(schemaId, separatorAfter),
-            insertTextFormat: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: ''
-        }); });
-    };
-    JSONCompletion.prototype.sanitizeLabel = function (label) {
-        label = label.replace(/[\n]/g, '↵');
-        if (label.length > 57) {
-            label = label.substr(0, 57).trim() + '...';
-        }
-        return label;
+            insertTextFormat: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["InsertTextFormat"].Snippet, documentation: ''
+        }); });
     };
     JSONCompletion.prototype.getLabelForValue = function (value) {
-        return this.sanitizeLabel(JSON.stringify(value));
+        return JSON.stringify(value);
     };
     JSONCompletion.prototype.getFilterTextForValue = function (value) {
         return JSON.stringify(value);
@@ -16822,8 +11515,7 @@ var JSONCompletion = /** @class */ (function () {
     };
     JSONCompletion.prototype.getLabelForSnippetValue = function (value) {
         var label = JSON.stringify(value);
-        label = label.replace(/\$\{\d+:([^}]+)\}|\$\d+/g, '$1');
-        return this.sanitizeLabel(label);
+        return label.replace(/\$\{\d+:([^}]+)\}|\$\d+/g, '$1');
     };
     JSONCompletion.prototype.getInsertTextForPlainText = function (text) {
         return text.replace(/[\\\$\}]/g, '\\$&'); // escape $, \ and } 
@@ -16870,16 +11562,16 @@ var JSONCompletion = /** @class */ (function () {
     JSONCompletion.prototype.getSuggestionKind = function (type) {
         if (Array.isArray(type)) {
             var array = type;
-            type = array.length > 0 ? array[0] : null;
+            type = array.length > 0 ? array[0] : undefined;
         }
         if (!type) {
-            return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Value;
+            return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Value;
         }
         switch (type) {
-            case 'string': return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Value;
-            case 'object': return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Module;
-            case 'property': return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property;
-            default: return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Value;
+            case 'string': return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Value;
+            case 'object': return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Module;
+            case 'property': return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Property;
+            default: return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["CompletionItemKind"].Value;
         }
     };
     JSONCompletion.prototype.getLabelTextForMatchingNode = function (node, document) {
@@ -16934,6 +11626,12 @@ var JSONCompletion = /** @class */ (function () {
                 }
                 nValueProposals++;
             }
+            if (Array.isArray(propertySchema.examples) && propertySchema.examples.length) {
+                if (!value) {
+                    value = this.getInsertTextForGuessedValue(propertySchema.examples[0], '');
+                }
+                nValueProposals += propertySchema.examples.length;
+            }
             if (nValueProposals === 0) {
                 var type = Array.isArray(propertySchema.type) ? propertySchema.type[0] : propertySchema.type;
                 if (!type) {
@@ -17027,7 +11725,7 @@ var JSONCompletion = /** @class */ (function () {
     JSONCompletion.prototype.fromMarkup = function (markupString) {
         if (markupString && this.doesSupportMarkdown()) {
             return {
-                kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["MarkupKind"].Markdown,
+                kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["MarkupKind"].Markdown,
                 value: markupString
             };
         }
@@ -17036,17 +11734,24 @@ var JSONCompletion = /** @class */ (function () {
     JSONCompletion.prototype.doesSupportMarkdown = function () {
         if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_4__["isDefined"])(this.supportsMarkdown)) {
             var completion = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.completion;
-            this.supportsMarkdown = completion && completion.completionItem && Array.isArray(completion.completionItem.documentationFormat) && completion.completionItem.documentationFormat.indexOf(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_5__["MarkupKind"].Markdown) !== -1;
+            this.supportsMarkdown = completion && completion.completionItem && Array.isArray(completion.completionItem.documentationFormat) && completion.completionItem.documentationFormat.indexOf(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_5__["MarkupKind"].Markdown) !== -1;
         }
         return this.supportsMarkdown;
     };
+    JSONCompletion.prototype.doesSupportsCommitCharacters = function () {
+        if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_4__["isDefined"])(this.supportsCommitCharacters)) {
+            var completion = this.clientCapabilities.textDocument && this.clientCapabilities.textDocument.completion;
+            this.supportsCommitCharacters = completion && completion.completionItem && !!completion.completionItem.commitCharactersSupport;
+        }
+        return this.supportsCommitCharacters;
+    };
     return JSONCompletion;
 }());
 
 
 
 /***/ }),
-/* 82 */
+/* 92 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
@@ -17068,12 +11773,11 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "contains", function() { return contains; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONDocument", function() { return JSONDocument; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return parse; });
-/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83);
-/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(88);
-/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76);
+/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93);
+/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(99);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(101);
 /* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_3__);
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(80);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
@@ -17095,12 +11799,17 @@ var __extends = (undefined && undefined.__extends) || (function () {
 
 
 
-
 var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__["loadMessageBundle"]();
-var colorHexPattern = /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/;
-var emailPattern = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+var formats = {
+    'color-hex': { errorMessage: localize('colorHexFormatWarning', 'Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ },
+    'date-time': { errorMessage: localize('dateTimeFormatWarning', 'String is not a RFC3339 date-time.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },
+    'date': { errorMessage: localize('dateFormatWarning', 'String is not a RFC3339 date.'), pattern: /^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i },
+    'time': { errorMessage: localize('timeFormatWarning', 'String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },
+    'email': { errorMessage: localize('emailFormatWarning', 'String is not an e-mail address.'), pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ }
+};
 var ASTNodeImpl = /** @class */ (function () {
     function ASTNodeImpl(parent, offset, length) {
+        if (length === void 0) { length = 0; }
         this.offset = offset;
         this.length = length;
         this.parent = parent;
@@ -17109,7 +11818,7 @@ var ASTNodeImpl = /** @class */ (function () {
         get: function () {
             return [];
         },
-        enumerable: true,
+        enumerable: false,
         configurable: true
     });
     ASTNodeImpl.prototype.toString = function () {
@@ -17152,7 +11861,7 @@ var ArrayASTNodeImpl = /** @class */ (function (_super) {
         get: function () {
             return this.items;
         },
-        enumerable: true,
+        enumerable: false,
         configurable: true
     });
     return ArrayASTNodeImpl;
@@ -17183,17 +11892,18 @@ var StringASTNodeImpl = /** @class */ (function (_super) {
 
 var PropertyASTNodeImpl = /** @class */ (function (_super) {
     __extends(PropertyASTNodeImpl, _super);
-    function PropertyASTNodeImpl(parent, offset) {
+    function PropertyASTNodeImpl(parent, offset, keyNode) {
         var _this = _super.call(this, parent, offset) || this;
         _this.type = 'property';
         _this.colonOffset = -1;
+        _this.keyNode = keyNode;
         return _this;
     }
     Object.defineProperty(PropertyASTNodeImpl.prototype, "children", {
         get: function () {
             return this.valueNode ? [this.keyNode, this.valueNode] : [this.keyNode];
         },
-        enumerable: true,
+        enumerable: false,
         configurable: true
     });
     return PropertyASTNodeImpl;
@@ -17211,7 +11921,7 @@ var ObjectASTNodeImpl = /** @class */ (function (_super) {
         get: function () {
             return this.properties;
         },
-        enumerable: true,
+        enumerable: false,
         configurable: true
     });
     return ObjectASTNodeImpl;
@@ -17231,7 +11941,6 @@ var EnumMatch;
 var SchemaCollector = /** @class */ (function () {
     function SchemaCollector(focusOffset, exclude) {
         if (focusOffset === void 0) { focusOffset = -1; }
-        if (exclude === void 0) { exclude = null; }
         this.focusOffset = focusOffset;
         this.exclude = exclude;
         this.schemas = [];
@@ -17240,8 +11949,7 @@ var SchemaCollector = /** @class */ (function () {
         this.schemas.push(schema);
     };
     SchemaCollector.prototype.merge = function (other) {
-        var _a;
-        (_a = this.schemas).push.apply(_a, other.schemas);
+        Array.prototype.push.apply(this.schemas, other.schemas);
     };
     SchemaCollector.prototype.include = function (node) {
         return (this.focusOffset === -1 || contains(node, this.focusOffset)) && (node !== this.exclude);
@@ -17256,7 +11964,7 @@ var NoOpSchemaCollector = /** @class */ (function () {
     }
     Object.defineProperty(NoOpSchemaCollector.prototype, "schemas", {
         get: function () { return []; },
-        enumerable: true,
+        enumerable: false,
         configurable: true
     });
     NoOpSchemaCollector.prototype.add = function (schema) { };
@@ -17273,7 +11981,7 @@ var ValidationResult = /** @class */ (function () {
         this.propertiesValueMatches = 0;
         this.primaryValueMatches = 0;
         this.enumValueMatch = false;
-        this.enumValues = null;
+        this.enumValues = undefined;
     }
     ValidationResult.prototype.hasProblems = function () {
         return !!this.problems.length;
@@ -17354,7 +12062,7 @@ var JSONDocument = /** @class */ (function () {
         if (this.root) {
             return jsonc_parser__WEBPACK_IMPORTED_MODULE_0__["findNodeAtOffset"](this.root, offset, includeRightBound);
         }
-        return void 0;
+        return undefined;
     };
     JSONDocument.prototype.visit = function (visitor) {
         if (this.root) {
@@ -17376,15 +12084,14 @@ var JSONDocument = /** @class */ (function () {
             var validationResult = new ValidationResult();
             validate(this.root, schema, validationResult, NoOpSchemaCollector.instance);
             return validationResult.problems.map(function (p) {
-                var range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["Range"].create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length));
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["Diagnostic"].create(range, p.message, p.severity, p.code);
+                var range = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["Range"].create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length));
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["Diagnostic"].create(range, p.message, p.severity, p.code);
             });
         }
-        return null;
+        return undefined;
     };
     JSONDocument.prototype.getMatchingSchemas = function (schema, focusOffset, exclude) {
         if (focusOffset === void 0) { focusOffset = -1; }
-        if (exclude === void 0) { exclude = null; }
         var matchingSchemas = new SchemaCollector(focusOffset, exclude);
         if (this.root && schema) {
             validate(this.root, schema, new ValidationResult(), matchingSchemas);
@@ -17394,10 +12101,11 @@ var JSONDocument = /** @class */ (function () {
     return JSONDocument;
 }());
 
-function validate(node, schema, validationResult, matchingSchemas) {
-    if (!node || !matchingSchemas.include(node)) {
+function validate(n, schema, validationResult, matchingSchemas) {
+    if (!n || !matchingSchemas.include(n)) {
         return;
     }
+    var node = n;
     switch (node.type) {
         case 'object':
             _validateObjectNode(node, schema, validationResult, matchingSchemas);
@@ -17424,7 +12132,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!schema.type.some(matchesType)) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: schema.errorMessage || localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}.', schema.type.join(', '))
                 });
             }
@@ -17433,7 +12141,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!matchesType(schema.type)) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: schema.errorMessage || localize('typeMismatchWarning', 'Incorrect type. Expected "{0}".', schema.type)
                 });
             }
@@ -17452,7 +12160,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!subValidationResult.hasProblems()) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: localize('notSchemaWarning', "Matches a schema that is not allowed.")
                 });
             }
@@ -17465,7 +12173,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
         var testAlternatives = function (alternatives, maxOneMatch) {
             var matches = [];
             // remember the best match that is used for error messages
-            var bestMatch = null;
+            var bestMatch = undefined;
             for (var _i = 0, alternatives_1 = alternatives; _i < alternatives_1.length; _i++) {
                 var subSchemaRef = alternatives_1[_i];
                 var subSchema = asSchema(subSchemaRef);
@@ -17502,11 +12210,11 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (matches.length > 1 && maxOneMatch) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: 1 },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: localize('oneOfWarning', "Matches multiple schemas when only one must validate.")
                 });
             }
-            if (bestMatch !== null) {
+            if (bestMatch) {
                 validationResult.merge(bestMatch.validationResult);
                 validationResult.propertiesMatches += bestMatch.validationResult.propertiesMatches;
                 validationResult.propertiesValueMatches += bestMatch.validationResult.propertiesValueMatches;
@@ -17563,7 +12271,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!enumValueMatch) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     code: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].EnumValueMismatch,
                     message: schema.errorMessage || localize('enumWarning', 'Value is not accepted. Valid values: {0}.', schema.enum.map(function (v) { return JSON.stringify(v); }).join(', '))
                 });
@@ -17574,7 +12282,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["equals"])(val, schema.const)) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     code: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].EnumValueMismatch,
                     message: schema.errorMessage || localize('constWarning', 'Value must be {0}.', JSON.stringify(schema.const))
                 });
@@ -17588,18 +12296,45 @@ function validate(node, schema, validationResult, matchingSchemas) {
         if (schema.deprecationMessage && node.parent) {
             validationResult.problems.push({
                 location: { offset: node.parent.offset, length: node.parent.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: schema.deprecationMessage
             });
         }
     }
     function _validateNumberNode(node, schema, validationResult, matchingSchemas) {
         var val = node.value;
+        function normalizeFloats(float) {
+            var _a;
+            var parts = /^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(float.toString());
+            return parts && {
+                value: Number(parts[1] + (parts[2] || '')),
+                multiplier: (((_a = parts[2]) === null || _a === void 0 ? void 0 : _a.length) || 0) - (parseInt(parts[3]) || 0)
+            };
+        }
+        ;
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(schema.multipleOf)) {
-            if (val % schema.multipleOf !== 0) {
+            var remainder = -1;
+            if (Number.isInteger(schema.multipleOf)) {
+                remainder = val % schema.multipleOf;
+            }
+            else {
+                var normMultipleOf = normalizeFloats(schema.multipleOf);
+                var normValue = normalizeFloats(val);
+                if (normMultipleOf && normValue) {
+                    var multiplier = Math.pow(10, Math.abs(normValue.multiplier - normMultipleOf.multiplier));
+                    if (normValue.multiplier < normMultipleOf.multiplier) {
+                        normValue.value *= multiplier;
+                    }
+                    else {
+                        normMultipleOf.value *= multiplier;
+                    }
+                    remainder = normValue.value % normMultipleOf.value;
+                }
+            }
+            if (remainder !== 0) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: localize('multipleOfWarning', 'Value is not divisible by {0}.', schema.multipleOf)
                 });
             }
@@ -17611,19 +12346,19 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isBoolean"])(exclusive) && exclusive) {
                 return limit;
             }
-            return void 0;
+            return undefined;
         }
         function getLimit(limit, exclusive) {
             if (!Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isBoolean"])(exclusive) || !exclusive) {
                 return limit;
             }
-            return void 0;
+            return undefined;
         }
         var exclusiveMinimum = getExclusiveLimit(schema.minimum, schema.exclusiveMinimum);
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(exclusiveMinimum) && val <= exclusiveMinimum) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('exclusiveMinimumWarning', 'Value is below the exclusive minimum of {0}.', exclusiveMinimum)
             });
         }
@@ -17631,7 +12366,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(exclusiveMaximum) && val >= exclusiveMaximum) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('exclusiveMaximumWarning', 'Value is above the exclusive maximum of {0}.', exclusiveMaximum)
             });
         }
@@ -17639,7 +12374,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(minimum) && val < minimum) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('minimumWarning', 'Value is below the minimum of {0}.', minimum)
             });
         }
@@ -17647,7 +12382,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(maximum) && val > maximum) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('maximumWarning', 'Value is above the maximum of {0}.', maximum)
             });
         }
@@ -17656,14 +12391,14 @@ function validate(node, schema, validationResult, matchingSchemas) {
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(schema.minLength) && node.value.length < schema.minLength) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('minLengthWarning', 'String is shorter than the minimum length of {0}.', schema.minLength)
             });
         }
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(schema.maxLength) && node.value.length > schema.maxLength) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('maxLengthWarning', 'String is longer than the maximum length of {0}.', schema.maxLength)
             });
         }
@@ -17672,7 +12407,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!regex.test(node.value)) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: schema.patternErrorMessage || schema.errorMessage || localize('patternWarning', 'String does not match the pattern of "{0}".', schema.pattern)
                 });
             }
@@ -17698,34 +12433,25 @@ function validate(node, schema, validationResult, matchingSchemas) {
                         if (errorMessage) {
                             validationResult.problems.push({
                                 location: { offset: node.offset, length: node.length },
-                                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                                 message: schema.patternErrorMessage || schema.errorMessage || localize('uriFormatWarning', 'String is not a URI: {0}', errorMessage)
                             });
                         }
                     }
                     break;
-                case 'email':
-                    {
-                        if (!node.value.match(emailPattern)) {
-                            validationResult.problems.push({
-                                location: { offset: node.offset, length: node.length },
-                                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
-                                message: schema.patternErrorMessage || schema.errorMessage || localize('emailFormatWarning', 'String is not an e-mail address.')
-                            });
-                        }
-                    }
-                    break;
                 case 'color-hex':
-                    {
-                        if (!node.value.match(colorHexPattern)) {
-                            validationResult.problems.push({
-                                location: { offset: node.offset, length: node.length },
-                                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
-                                message: schema.patternErrorMessage || schema.errorMessage || localize('colorHexFormatWarning', 'Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.')
-                            });
-                        }
+                case 'date-time':
+                case 'date':
+                case 'time':
+                case 'email':
+                    var format = formats[schema.format];
+                    if (!node.value || !format.pattern.exec(node.value)) {
+                        validationResult.problems.push({
+                            location: { offset: node.offset, length: node.length },
+                            severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
+                            message: schema.patternErrorMessage || schema.errorMessage || format.errorMessage
+                        });
                     }
-                    break;
                 default:
             }
         }
@@ -17757,7 +12483,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
                 else if (schema.additionalItems === false) {
                     validationResult.problems.push({
                         location: { offset: node.offset, length: node.length },
-                        severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                        severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                         message: localize('additionalItemsWarning', 'Array has too many items according to schema. Expected {0} or fewer.', subSchemas.length)
                     });
                 }
@@ -17784,7 +12510,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (!doesContain) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: schema.errorMessage || localize('requiredItemMissingWarning', 'Array does not contain required item.')
                 });
             }
@@ -17792,14 +12518,14 @@ function validate(node, schema, validationResult, matchingSchemas) {
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(schema.minItems) && node.items.length < schema.minItems) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('minItemsWarning', 'Array has too few items. Expected {0} or more.', schema.minItems)
             });
         }
         if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_1__["isNumber"])(schema.maxItems) && node.items.length > schema.maxItems) {
             validationResult.problems.push({
                 location: { offset: node.offset, length: node.length },
-                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                 message: localize('maxItemsWarning', 'Array has too many items. Expected {0} or fewer.', schema.maxItems)
             });
         }
@@ -17811,7 +12537,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (duplicates) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: localize('uniqueItemsWarning', 'Array has duplicate items.')
                 });
             }
@@ -17834,7 +12560,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
                     var location = keyNode ? { offset: keyNode.offset, length: keyNode.length } : { offset: node.offset, length: 1 };
                     validationResult.problems.push({
                         location: location,
-                        severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                        severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                         message: localize('MissingRequiredPropWarning', 'Missing property "{0}".', propertyName)
                     });
                 }
@@ -17859,7 +12585,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
                             var propertyNode = child.parent;
                             validationResult.problems.push({
                                 location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },
-                                severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                                severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                                 message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)
                             });
                         }
@@ -17892,7 +12618,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
                                     var propertyNode = child.parent;
                                     validationResult.problems.push({
                                         location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },
-                                        severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                                        severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                                         message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)
                                     });
                                 }
@@ -17931,7 +12657,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
                         var propertyNode = child.parent;
                         validationResult.problems.push({
                             location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },
-                            severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                            severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                             message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)
                         });
                     }
@@ -17942,7 +12668,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (node.properties.length > schema.maxProperties) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: localize('MaxPropWarning', 'Object has more properties than limit of {0}.', schema.maxProperties)
                 });
             }
@@ -17951,7 +12677,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
             if (node.properties.length < schema.minProperties) {
                 validationResult.problems.push({
                     location: { offset: node.offset, length: node.length },
-                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                     message: localize('MinPropWarning', 'Object has fewer properties than the required number of {0}', schema.minProperties)
                 });
             }
@@ -17968,7 +12694,7 @@ function validate(node, schema, validationResult, matchingSchemas) {
                             if (!seenKeys[requiredProp]) {
                                 validationResult.problems.push({
                                     location: { offset: node.offset, length: node.length },
-                                    severity: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning,
+                                    severity: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning,
                                     message: localize('RequiredDependentPropWarning', 'Object is missing property {0} required by property {1}.', requiredProp, key)
                                 });
                             }
@@ -18005,7 +12731,7 @@ function parse(textDocument, config) {
     var lastProblemOffset = -1;
     var text = textDocument.getText();
     var scanner = jsonc_parser__WEBPACK_IMPORTED_MODULE_0__["createScanner"](text, false);
-    var commentRanges = config && config.collectComments ? [] : void 0;
+    var commentRanges = config && config.collectComments ? [] : undefined;
     function _scanNext() {
         while (true) {
             var token_1 = scanner.scan();
@@ -18014,7 +12740,7 @@ function parse(textDocument, config) {
                 case 12 /* LineCommentTrivia */:
                 case 13 /* BlockCommentTrivia */:
                     if (Array.isArray(commentRanges)) {
-                        commentRanges.push(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["Range"].create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength())));
+                        commentRanges.push(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["Range"].create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength())));
                     }
                     break;
                 case 15 /* Trivia */:
@@ -18033,15 +12759,15 @@ function parse(textDocument, config) {
         return false;
     }
     function _errorAtRange(message, code, startOffset, endOffset, severity) {
-        if (severity === void 0) { severity = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Error; }
+        if (severity === void 0) { severity = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Error; }
         if (problems.length === 0 || startOffset !== lastProblemOffset) {
-            var range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["Range"].create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset));
-            problems.push(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["Diagnostic"].create(range, message, severity, code, textDocument.languageId));
+            var range = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["Range"].create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset));
+            problems.push(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["Diagnostic"].create(range, message, severity, code, textDocument.languageId));
             lastProblemOffset = startOffset;
         }
     }
     function _error(message, code, node, skipUntilAfter, skipUntil) {
-        if (node === void 0) { node = null; }
+        if (node === void 0) { node = undefined; }
         if (skipUntilAfter === void 0) { skipUntilAfter = []; }
         if (skipUntil === void 0) { skipUntil = []; }
         var start = scanner.getTokenOffset();
@@ -18104,7 +12830,7 @@ function parse(textDocument, config) {
     }
     function _parseArray(parent) {
         if (scanner.getToken() !== 3 /* OpenBracketToken */) {
-            return null;
+            return undefined;
         }
         var node = new ArrayASTNodeImpl(parent, scanner.getTokenOffset());
         _scanNext(); // consume OpenBracketToken
@@ -18127,9 +12853,9 @@ function parse(textDocument, config) {
             else if (needsComma) {
                 _error(localize('ExpectedComma', 'Expected comma'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].CommaExpected);
             }
-            var item = _parseValue(node, count++);
+            var item = _parseValue(node);
             if (!item) {
-                _error(localize('PropertyExpected', 'Value expected'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].ValueExpected, null, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);
+                _error(localize('PropertyExpected', 'Value expected'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].ValueExpected, undefined, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);
             }
             else {
                 node.items.push(item);
@@ -18141,8 +12867,9 @@ function parse(textDocument, config) {
         }
         return _finalize(node, true);
     }
+    var keyPlaceholder = new StringASTNodeImpl(undefined, 0, 0);
     function _parseProperty(parent, keysSeen) {
-        var node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset());
+        var node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset(), keyPlaceholder);
         var key = _parseString(node);
         if (!key) {
             if (scanner.getToken() === 16 /* Unknown */) {
@@ -18154,15 +12881,15 @@ function parse(textDocument, config) {
                 _scanNext(); // consume Unknown
             }
             else {
-                return null;
+                return undefined;
             }
         }
         node.keyNode = key;
         var seen = keysSeen[key.value];
         if (seen) {
-            _errorAtRange(localize('DuplicateKeyWarning', "Duplicate object key"), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning);
+            _errorAtRange(localize('DuplicateKeyWarning', "Duplicate object key"), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning);
             if (typeof seen === 'object') {
-                _errorAtRange(localize('DuplicateKeyWarning', "Duplicate object key"), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_4__["DiagnosticSeverity"].Warning);
+                _errorAtRange(localize('DuplicateKeyWarning', "Duplicate object key"), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["DiagnosticSeverity"].Warning);
             }
             keysSeen[key.value] = true; // if the same key is duplicate again, avoid duplicate error reporting
         }
@@ -18180,7 +12907,7 @@ function parse(textDocument, config) {
                 return node;
             }
         }
-        var value = _parseValue(node, key.value);
+        var value = _parseValue(node);
         if (!value) {
             return _error(localize('ValueExpected', 'Value expected'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].ValueExpected, node, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);
         }
@@ -18190,7 +12917,7 @@ function parse(textDocument, config) {
     }
     function _parseObject(parent) {
         if (scanner.getToken() !== 1 /* OpenBraceToken */) {
-            return null;
+            return undefined;
         }
         var node = new ObjectASTNodeImpl(parent, scanner.getTokenOffset());
         var keysSeen = Object.create(null);
@@ -18215,7 +12942,7 @@ function parse(textDocument, config) {
             }
             var property = _parseProperty(node, keysSeen);
             if (!property) {
-                _error(localize('PropertyExpected', 'Property expected'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].PropertyExpected, null, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);
+                _error(localize('PropertyExpected', 'Property expected'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].PropertyExpected, undefined, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);
             }
             else {
                 node.properties.push(property);
@@ -18229,7 +12956,7 @@ function parse(textDocument, config) {
     }
     function _parseString(parent) {
         if (scanner.getToken() !== 10 /* StringLiteral */) {
-            return null;
+            return undefined;
         }
         var node = new StringASTNodeImpl(parent, scanner.getTokenOffset());
         node.value = scanner.getTokenValue();
@@ -18237,7 +12964,7 @@ function parse(textDocument, config) {
     }
     function _parseNumber(parent) {
         if (scanner.getToken() !== 11 /* NumericLiteral */) {
-            return null;
+            return undefined;
         }
         var node = new NumberASTNodeImpl(parent, scanner.getTokenOffset());
         if (scanner.getTokenError() === 0 /* None */) {
@@ -18266,16 +12993,16 @@ function parse(textDocument, config) {
             case 9 /* FalseKeyword */:
                 return _finalize(new BooleanASTNodeImpl(parent, false, scanner.getTokenOffset()), true);
             default:
-                return null;
+                return undefined;
         }
     }
-    function _parseValue(parent, name) {
+    function _parseValue(parent) {
         return _parseArray(parent) || _parseObject(parent) || _parseString(parent) || _parseNumber(parent) || _parseLiteral(parent);
     }
-    var _root = null;
+    var _root = undefined;
     var token = _scanNext();
     if (token !== 17 /* EOF */) {
-        _root = _parseValue(null, null);
+        _root = _parseValue(_root);
         if (!_root) {
             _error(localize('Invalid symbol', 'Expected a JSON object, array or literal.'), _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].Undefined);
         }
@@ -18288,7 +13015,7 @@ function parse(textDocument, config) {
 
 
 /***/ }),
-/* 83 */
+/* 93 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
@@ -18307,10 +13034,10 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "modify", function() { return modify; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyEdits", function() { return applyEdits; });
-/* harmony import */ var _impl_format__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84);
-/* harmony import */ var _impl_edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86);
-/* harmony import */ var _impl_scanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85);
-/* harmony import */ var _impl_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(87);
+/* harmony import */ var _impl_format__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
+/* harmony import */ var _impl_edit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(96);
+/* harmony import */ var _impl_scanner__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95);
+/* harmony import */ var _impl_parser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
@@ -18416,7 +13143,7 @@ function format(documentText, range, options) {
  * To apply edits to an input, you can use `applyEdits`.
  */
 function modify(text, path, value, options) {
-    return _impl_edit__WEBPACK_IMPORTED_MODULE_1__["setProperty"](text, path, value, options.formattingOptions, options.getInsertionIndex);
+    return _impl_edit__WEBPACK_IMPORTED_MODULE_1__["setProperty"](text, path, value, options);
 }
 /**
  * Applies edits to a input string.
@@ -18427,17 +13154,17 @@ function applyEdits(text, edits) {
     }
     return text;
 }
-//# sourceMappingURL=main.js.map
+
 
 /***/ }),
-/* 84 */
+/* 94 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEOL", function() { return isEOL; });
-/* harmony import */ var _scanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
+/* harmony import */ var _scanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
@@ -18632,10 +13359,10 @@ function getEOL(options, text) {
 function isEOL(text, offset) {
     return '\r\n'.indexOf(text.charAt(offset)) !== -1;
 }
-//# sourceMappingURL=format.js.map
+
 
 /***/ }),
-/* 85 */
+/* 95 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
@@ -18652,7 +13379,8 @@ __webpack_require__.r(__webpack_exports__);
  */
 function createScanner(text, ignoreTrivia) {
     if (ignoreTrivia === void 0) { ignoreTrivia = false; }
-    var pos = 0, len = text.length, value = '', tokenOffset = 0, token = 16 /* Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* None */;
+    var len = text.length;
+    var pos = 0, value = '', tokenOffset = 0, token = 16 /* Unknown */, lineNumber = 0, lineStartOffset = 0, tokenLineStartOffset = 0, prevTokenLineStartOffset = 0, scanError = 0 /* None */;
     function scanHexDigits(count, exact) {
         var digits = 0;
         var value = 0;
@@ -18749,8 +13477,8 @@ function createScanner(text, ignoreTrivia) {
                     scanError = 2 /* UnexpectedEndOfString */;
                     break;
                 }
-                ch = text.charCodeAt(pos++);
-                switch (ch) {
+                var ch2 = text.charCodeAt(pos++);
+                switch (ch2) {
                     case 34 /* doubleQuote */:
                         result += '\"';
                         break;
@@ -18776,9 +13504,9 @@ function createScanner(text, ignoreTrivia) {
                         result += '\t';
                         break;
                     case 117 /* u */:
-                        var ch_1 = scanHexDigits(4, true);
-                        if (ch_1 >= 0) {
-                            result += String.fromCharCode(ch_1);
+                        var ch3 = scanHexDigits(4, true);
+                        if (ch3 >= 0) {
+                            result += String.fromCharCode(ch3);
                         }
                         else {
                             scanError = 4 /* InvalidUnicode */;
@@ -19003,10 +13731,10 @@ function isLineBreak(ch) {
 function isDigit(ch) {
     return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;
 }
-//# sourceMappingURL=scanner.js.map
+
 
 /***/ }),
-/* 86 */
+/* 96 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
@@ -19015,8 +13743,8 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setProperty", function() { return setProperty; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyEdit", function() { return applyEdit; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isWS", function() { return isWS; });
-/* harmony import */ var _format__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84);
-/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87);
+/* harmony import */ var _format__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
+/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
@@ -19024,10 +13752,10 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
-function removeProperty(text, path, formattingOptions) {
-    return setProperty(text, path, void 0, formattingOptions);
+function removeProperty(text, path, options) {
+    return setProperty(text, path, void 0, options);
 }
-function setProperty(text, originalPath, value, formattingOptions, getInsertionIndex) {
+function setProperty(text, originalPath, value, options) {
     var _a;
     var path = originalPath.slice();
     var errors = [];
@@ -19054,7 +13782,7 @@ function setProperty(text, originalPath, value, formattingOptions, getInsertionI
         if (value === void 0) { // delete
             throw new Error('Can not delete in empty document');
         }
-        return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, formattingOptions);
+        return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options);
     }
     else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) {
         var existing = Object(_parser__WEBPACK_IMPORTED_MODULE_1__["findNodeAtLocation"])(parent, [lastSegment]);
@@ -19079,11 +13807,11 @@ function setProperty(text, originalPath, value, formattingOptions, getInsertionI
                         removeEnd = next.offset;
                     }
                 }
-                return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, formattingOptions);
+                return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options);
             }
             else {
                 // set value of existing property
-                return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, formattingOptions);
+                return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options);
             }
         }
         else {
@@ -19091,7 +13819,7 @@ function setProperty(text, originalPath, value, formattingOptions, getInsertionI
                 return []; // property does not exist, nothing to do
             }
             var newProperty = JSON.stringify(lastSegment) + ": " + JSON.stringify(value);
-            var index = getInsertionIndex ? getInsertionIndex(parent.children.map(function (p) { return p.children[0].value; })) : parent.children.length;
+            var index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(function (p) { return p.children[0].value; })) : parent.children.length;
             var edit = void 0;
             if (index > 0) {
                 var previous = parent.children[index - 1];
@@ -19103,7 +13831,7 @@ function setProperty(text, originalPath, value, formattingOptions, getInsertionI
             else {
                 edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' };
             }
-            return withFormatting(text, edit, formattingOptions);
+            return withFormatting(text, edit, options);
         }
     }
     else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) {
@@ -19119,40 +13847,58 @@ function setProperty(text, originalPath, value, formattingOptions, getInsertionI
                 var previous = parent.children[parent.children.length - 1];
                 edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };
             }
-            return withFormatting(text, edit, formattingOptions);
+            return withFormatting(text, edit, options);
         }
-        else {
-            if (value === void 0 && parent.children.length >= 0) {
-                //Removal
-                var removalIndex = lastSegment;
-                var toRemove = parent.children[removalIndex];
-                var edit = void 0;
-                if (parent.children.length === 1) {
-                    // only item
-                    edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' };
-                }
-                else if (parent.children.length - 1 === removalIndex) {
-                    // last item
-                    var previous = parent.children[removalIndex - 1];
-                    var offset = previous.offset + previous.length;
-                    var parentEndOffset = parent.offset + parent.length;
-                    edit = { offset: offset, length: parentEndOffset - 2 - offset, content: '' };
-                }
-                else {
-                    edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' };
-                }
-                return withFormatting(text, edit, formattingOptions);
+        else if (value === void 0 && parent.children.length >= 0) {
+            // Removal
+            var removalIndex = lastSegment;
+            var toRemove = parent.children[removalIndex];
+            var edit = void 0;
+            if (parent.children.length === 1) {
+                // only item
+                edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' };
+            }
+            else if (parent.children.length - 1 === removalIndex) {
+                // last item
+                var previous = parent.children[removalIndex - 1];
+                var offset = previous.offset + previous.length;
+                var parentEndOffset = parent.offset + parent.length;
+                edit = { offset: offset, length: parentEndOffset - 2 - offset, content: '' };
+            }
+            else {
+                edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' };
+            }
+            return withFormatting(text, edit, options);
+        }
+        else if (value !== void 0) {
+            var edit = void 0;
+            var newProperty = "" + JSON.stringify(value);
+            if (!options.isArrayInsertion && parent.children.length > lastSegment) {
+                var toModify = parent.children[lastSegment];
+                edit = { offset: toModify.offset, length: toModify.length, content: newProperty };
+            }
+            else if (parent.children.length === 0 || lastSegment === 0) {
+                edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' };
             }
             else {
-                throw new Error('Array modification not supported yet');
+                var index = lastSegment > parent.children.length ? parent.children.length : lastSegment;
+                var previous = parent.children[index - 1];
+                edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };
             }
+            return withFormatting(text, edit, options);
+        }
+        else {
+            throw new Error("Can not " + (value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')) + " Array index " + insertIndex + " as length is not sufficient");
         }
     }
     else {
         throw new Error("Can not add " + (typeof lastSegment !== 'number' ? 'index' : 'property') + " to parent of type " + parent.type);
     }
 }
-function withFormatting(text, edit, formattingOptions) {
+function withFormatting(text, edit, options) {
+    if (!options.formattingOptions) {
+        return [edit];
+    }
     // apply the edit
     var newText = applyEdit(text, edit);
     // format the new text
@@ -19166,7 +13912,7 @@ function withFormatting(text, edit, formattingOptions) {
             end++;
         }
     }
-    var edits = Object(_format__WEBPACK_IMPORTED_MODULE_0__["format"])(newText, { offset: begin, length: end - begin }, formattingOptions);
+    var edits = Object(_format__WEBPACK_IMPORTED_MODULE_0__["format"])(newText, { offset: begin, length: end - begin }, options.formattingOptions);
     // apply the formatting edits and track the begin and end offsets of the changes
     for (var i = edits.length - 1; i >= 0; i--) {
         var edit_1 = edits[i];
@@ -19185,10 +13931,10 @@ function applyEdit(text, edit) {
 function isWS(text, offset) {
     return '\r\n \t'.indexOf(text.charAt(offset)) !== -1;
 }
-//# sourceMappingURL=edit.js.map
+
 
 /***/ }),
-/* 87 */
+/* 97 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
@@ -19203,7 +13949,8 @@ __webpack_require__.r(__webpack_exports__);
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findNodeAtOffset", function() { return findNodeAtOffset; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "visit", function() { return visit; });
 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stripComments", function() { return stripComments; });
-/* harmony import */ var _scanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNodeType", function() { return getNodeType; });
+/* harmony import */ var _scanner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
@@ -19222,13 +13969,13 @@ var ParseOptions;
 function getLocation(text, position) {
     var segments = []; // strings or numbers
     var earlyReturnException = new Object();
-    var previousNode = void 0;
+    var previousNode = undefined;
     var previousNodeInst = {
         value: {},
         offset: 0,
         length: 0,
         type: 'object',
-        parent: void 0
+        parent: undefined
     };
     var isAtPropertyKey = false;
     function setPreviousNode(value, offset, length, type) {
@@ -19236,7 +13983,7 @@ function getLocation(text, position) {
         previousNodeInst.offset = offset;
         previousNodeInst.length = length;
         previousNodeInst.type = type;
-        previousNodeInst.colonOffset = void 0;
+        previousNodeInst.colonOffset = undefined;
         previousNode = previousNodeInst;
     }
     try {
@@ -19245,7 +13992,7 @@ function getLocation(text, position) {
                 if (position <= offset) {
                     throw earlyReturnException;
                 }
-                previousNode = void 0;
+                previousNode = undefined;
                 isAtPropertyKey = position > offset;
                 segments.push(''); // push a placeholder (will be replaced)
             },
@@ -19263,28 +14010,28 @@ function getLocation(text, position) {
                 if (position <= offset) {
                     throw earlyReturnException;
                 }
-                previousNode = void 0;
+                previousNode = undefined;
                 segments.pop();
             },
             onArrayBegin: function (offset, length) {
                 if (position <= offset) {
                     throw earlyReturnException;
                 }
-                previousNode = void 0;
+                previousNode = undefined;
                 segments.push(0);
             },
             onArrayEnd: function (offset, length) {
                 if (position <= offset) {
                     throw earlyReturnException;
                 }
-                previousNode = void 0;
+                previousNode = undefined;
                 segments.pop();
             },
             onLiteralValue: function (value, offset, length) {
                 if (position < offset) {
                     throw earlyReturnException;
                 }
-                setPreviousNode(value, offset, length, getLiteralNodeType(value));
+                setPreviousNode(value, offset, length, getNodeType(value));
                 if (position <= offset + length) {
                     throw earlyReturnException;
                 }
@@ -19296,7 +14043,7 @@ function getLocation(text, position) {
                 if (sep === ':' && previousNode && previousNode.type === 'property') {
                     previousNode.colonOffset = offset;
                     isAtPropertyKey = false;
-                    previousNode = void 0;
+                    previousNode = undefined;
                 }
                 else if (sep === ',') {
                     var last = segments[segments.length - 1];
@@ -19307,7 +14054,7 @@ function getLocation(text, position) {
                         isAtPropertyKey = true;
                         segments[segments.length - 1] = '';
                     }
-                    previousNode = void 0;
+                    previousNode = undefined;
                 }
             }
         });
@@ -19349,7 +14096,7 @@ function parse(text, errors, options) {
         if (Array.isArray(currentParent)) {
             currentParent.push(value);
         }
-        else if (currentProperty) {
+        else if (currentProperty !== null) {
             currentParent[currentProperty] = value;
         }
     }
@@ -19391,7 +14138,7 @@ function parse(text, errors, options) {
 function parseTree(text, errors, options) {
     if (errors === void 0) { errors = []; }
     if (options === void 0) { options = ParseOptions.DEFAULT; }
-    var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: void 0 }; // artificial root
+    var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root
     function ensurePropertyComplete(endOffset) {
         if (currentParent.type === 'property') {
             currentParent.length = endOffset - currentParent.offset;
@@ -19411,6 +14158,7 @@ function parseTree(text, errors, options) {
             currentParent.children.push({ type: 'string', value: name, offset: offset, length: length, parent: currentParent });
         },
         onObjectEnd: function (offset, length) {
+            ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete
             currentParent.length = offset + length - currentParent.offset;
             currentParent = currentParent.parent;
             ensurePropertyComplete(offset + length);
@@ -19424,7 +14172,7 @@ function parseTree(text, errors, options) {
             ensurePropertyComplete(offset + length);
         },
         onLiteralValue: function (value, offset, length) {
-            onValue({ type: getLiteralNodeType(value), offset: offset, length: length, parent: currentParent, value: value });
+            onValue({ type: getNodeType(value), offset: offset, length: length, parent: currentParent, value: value });
             ensurePropertyComplete(offset + length);
         },
         onSeparator: function (sep, offset, length) {
@@ -19453,14 +14201,14 @@ function parseTree(text, errors, options) {
  */
 function findNodeAtLocation(root, path) {
     if (!root) {
-        return void 0;
+        return undefined;
     }
     var node = root;
     for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {
         var segment = path_1[_i];
         if (typeof segment === 'string') {
             if (node.type !== 'object' || !Array.isArray(node.children)) {
-                return void 0;
+                return undefined;
             }
             var found = false;
             for (var _a = 0, _b = node.children; _a < _b.length; _a++) {
@@ -19472,13 +14220,13 @@ function findNodeAtLocation(root, path) {
                 }
             }
             if (!found) {
-                return void 0;
+                return undefined;
             }
         }
         else {
             var index = segment;
             if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {
-                return void 0;
+                return undefined;
             }
             node = node.children[index];
         }
@@ -19528,7 +14276,7 @@ function getNodeValue(node) {
         case 'boolean':
             return node.value;
         default:
-            return void 0;
+            return undefined;
     }
 }
 function contains(node, offset, includeRightBound) {
@@ -19552,7 +14300,7 @@ function findNodeAtOffset(node, offset, includeRightBound) {
         }
         return node;
     }
-    return void 0;
+    return undefined;
 }
 /**
  * Parses the given text and invokes the visitor functions for each object, array and literal reached.
@@ -19771,7 +14519,11 @@ function visit(text, visitor, options) {
     }
     scanNext();
     if (_scanner.getToken() === 17 /* EOF */) {
-        return true;
+        if (options.allowEmptyContent) {
+            return true;
+        }
+        handleError(4 /* ValueExpected */, [], []);
+        return false;
     }
     if (!parseValue()) {
         handleError(4 /* ValueExpected */, [], []);
@@ -19799,7 +14551,7 @@ function stripComments(text, replaceCh) {
                 if (offset !== pos) {
                     parts.push(text.substring(offset, pos));
                 }
-                if (replaceCh !== void 0) {
+                if (replaceCh !== undefined) {
                     parts.push(_scanner.getTokenValue().replace(/[^\r\n]/g, replaceCh));
                 }
                 offset = _scanner.getPosition();
@@ -19808,18 +14560,27 @@ function stripComments(text, replaceCh) {
     } while (kind !== 17 /* EOF */);
     return parts.join('');
 }
-function getLiteralNodeType(value) {
+function getNodeType(value) {
     switch (typeof value) {
         case 'boolean': return 'boolean';
         case 'number': return 'number';
         case 'string': return 'string';
+        case 'object': {
+            if (!value) {
+                return 'null';
+            }
+            else if (Array.isArray(value)) {
+                return 'array';
+            }
+            return 'object';
+        }
         default: return 'null';
     }
 }
-//# sourceMappingURL=parser.js.map
+
 
 /***/ }),
-/* 88 */
+/* 98 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
@@ -19876,464 +14637,86 @@ function equals(one, other) {
         }
         for (i = 0; i < oneKeys.length; i++) {
             if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {
-                return false;
-            }
-        }
-    }
-    return true;
-}
-function isNumber(val) {
-    return typeof val === 'number';
-}
-function isDefined(val) {
-    return typeof val !== 'undefined';
-}
-function isBoolean(val) {
-    return typeof val === 'boolean';
-}
-function isString(val) {
-    return typeof val === 'string';
-}
-
-
-/***/ }),
-/* 89 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorCode", function() { return ErrorCode; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return ClientCapabilities; });
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80);
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Color"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorInformation"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorPresentation"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRange"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRangeKind"]; });
-
-/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"]; });
-
-
-
-/**
- * Error codes used by diagnostics
- */
-var ErrorCode;
-(function (ErrorCode) {
-    ErrorCode[ErrorCode["Undefined"] = 0] = "Undefined";
-    ErrorCode[ErrorCode["EnumValueMismatch"] = 1] = "EnumValueMismatch";
-    ErrorCode[ErrorCode["UnexpectedEndOfComment"] = 257] = "UnexpectedEndOfComment";
-    ErrorCode[ErrorCode["UnexpectedEndOfString"] = 258] = "UnexpectedEndOfString";
-    ErrorCode[ErrorCode["UnexpectedEndOfNumber"] = 259] = "UnexpectedEndOfNumber";
-    ErrorCode[ErrorCode["InvalidUnicode"] = 260] = "InvalidUnicode";
-    ErrorCode[ErrorCode["InvalidEscapeCharacter"] = 261] = "InvalidEscapeCharacter";
-    ErrorCode[ErrorCode["InvalidCharacter"] = 262] = "InvalidCharacter";
-    ErrorCode[ErrorCode["PropertyExpected"] = 513] = "PropertyExpected";
-    ErrorCode[ErrorCode["CommaExpected"] = 514] = "CommaExpected";
-    ErrorCode[ErrorCode["ColonExpected"] = 515] = "ColonExpected";
-    ErrorCode[ErrorCode["ValueExpected"] = 516] = "ValueExpected";
-    ErrorCode[ErrorCode["CommaOrCloseBacketExpected"] = 517] = "CommaOrCloseBacketExpected";
-    ErrorCode[ErrorCode["CommaOrCloseBraceExpected"] = 518] = "CommaOrCloseBraceExpected";
-    ErrorCode[ErrorCode["TrailingComma"] = 519] = "TrailingComma";
-    ErrorCode[ErrorCode["DuplicateKey"] = 520] = "DuplicateKey";
-    ErrorCode[ErrorCode["CommentNotPermitted"] = 521] = "CommentNotPermitted";
-    ErrorCode[ErrorCode["SchemaResolveError"] = 768] = "SchemaResolveError";
-})(ErrorCode || (ErrorCode = {}));
-var ClientCapabilities;
-(function (ClientCapabilities) {
-    ClientCapabilities.LATEST = {
-        textDocument: {
-            completion: {
-                completionItem: {
-                    documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText]
-                }
-            }
-        }
-    };
-})(ClientCapabilities || (ClientCapabilities = {}));
-
-
-/***/ }),
-/* 90 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringifyObject", function() { return stringifyObject; });
-/*---------------------------------------------------------------------------------------------
-*  Copyright (c) Microsoft Corporation. All rights reserved.
-*  Licensed under the MIT License. See License.txt in the project root for license information.
-*--------------------------------------------------------------------------------------------*/
-function stringifyObject(obj, indent, stringifyLiteral) {
-    if (obj !== null && typeof obj === 'object') {
-        var newIndent = indent + '\t';
-        if (Array.isArray(obj)) {
-            if (obj.length === 0) {
-                return '[]';
-            }
-            var result = '[\n';
-            for (var i = 0; i < obj.length; i++) {
-                result += newIndent + stringifyObject(obj[i], newIndent, stringifyLiteral);
-                if (i < obj.length - 1) {
-                    result += ',';
-                }
-                result += '\n';
-            }
-            result += indent + ']';
-            return result;
-        }
-        else {
-            var keys = Object.keys(obj);
-            if (keys.length === 0) {
-                return '{}';
-            }
-            var result = '{\n';
-            for (var i = 0; i < keys.length; i++) {
-                var key = keys[i];
-                result += newIndent + JSON.stringify(key) + ': ' + stringifyObject(obj[key], newIndent, stringifyLiteral);
-                if (i < keys.length - 1) {
-                    result += ',';
-                }
-                result += '\n';
-            }
-            result += indent + '}';
-            return result;
-        }
-    }
-    return stringifyLiteral(obj);
-}
-
-
-/***/ }),
-/* 91 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return startsWith; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return endsWith; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertSimple2RegExpPattern", function() { return convertSimple2RegExpPattern; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
-/*---------------------------------------------------------------------------------------------
-*  Copyright (c) Microsoft Corporation. All rights reserved.
-*  Licensed under the MIT License. See License.txt in the project root for license information.
-*--------------------------------------------------------------------------------------------*/
-function startsWith(haystack, needle) {
-    if (haystack.length < needle.length) {
-        return false;
-    }
-    for (var i = 0; i < needle.length; i++) {
-        if (haystack[i] !== needle[i]) {
-            return false;
+                return false;
+            }
         }
     }
     return true;
 }
-/**
- * Determines if haystack ends with needle.
- */
-function endsWith(haystack, needle) {
-    var diff = haystack.length - needle.length;
-    if (diff > 0) {
-        return haystack.lastIndexOf(needle) === diff;
-    }
-    else if (diff === 0) {
-        return haystack === needle;
-    }
-    else {
-        return false;
-    }
+function isNumber(val) {
+    return typeof val === 'number';
 }
-function convertSimple2RegExpPattern(pattern) {
-    return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*');
+function isDefined(val) {
+    return typeof val !== 'undefined';
 }
-function repeat(value, count) {
-    var s = '';
-    while (count > 0) {
-        if ((count & 1) === 1) {
-            s += value;
-        }
-        value += value;
-        count = count >>> 1;
-    }
-    return s;
+function isBoolean(val) {
+    return typeof val === 'boolean';
+}
+function isString(val) {
+    return typeof val === 'string';
 }
 
 
 /***/ }),
-/* 92 */
+/* 99 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONHover", function() { return JSONHover; });
-/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82);
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80);
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorCode", function() { return ErrorCode; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ClientCapabilities", function() { return ClientCapabilities; });
+/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"]; });
 
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["TextEdit"]; });
 
-var JSONHover = /** @class */ (function () {
-    function JSONHover(schemaService, contributions, promiseConstructor) {
-        if (contributions === void 0) { contributions = []; }
-        this.schemaService = schemaService;
-        this.contributions = contributions;
-        this.promise = promiseConstructor || Promise;
-    }
-    JSONHover.prototype.doHover = function (document, position, doc) {
-        var offset = document.offsetAt(position);
-        var node = doc.getNodeFromOffset(offset);
-        if (!node || (node.type === 'object' || node.type === 'array') && offset > node.offset + 1 && offset < node.offset + node.length - 1) {
-            return this.promise.resolve(null);
-        }
-        var hoverRangeNode = node;
-        // use the property description when hovering over an object key
-        if (node.type === 'string') {
-            var parent = node.parent;
-            if (parent && parent.type === 'property' && parent.keyNode === node) {
-                node = parent.valueNode;
-                if (!node) {
-                    return this.promise.resolve(null);
-                }
-            }
-        }
-        var hoverRange = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Range"].create(document.positionAt(hoverRangeNode.offset), document.positionAt(hoverRangeNode.offset + hoverRangeNode.length));
-        var createHover = function (contents) {
-            var result = {
-                contents: contents,
-                range: hoverRange
-            };
-            return result;
-        };
-        var location = _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](node);
-        for (var i = this.contributions.length - 1; i >= 0; i--) {
-            var contribution = this.contributions[i];
-            var promise = contribution.getInfoContribution(document.uri, location);
-            if (promise) {
-                return promise.then(function (htmlContent) { return createHover(htmlContent); });
-            }
-        }
-        return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {
-            if (schema) {
-                var matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset);
-                var title_1 = null;
-                var markdownDescription_1 = null;
-                var markdownEnumValueDescription_1 = null, enumValue_1 = null;
-                matchingSchemas.every(function (s) {
-                    if (s.node === node && !s.inverted && s.schema) {
-                        title_1 = title_1 || s.schema.title;
-                        markdownDescription_1 = markdownDescription_1 || s.schema.markdownDescription || toMarkdown(s.schema.description);
-                        if (s.schema.enum) {
-                            var idx = s.schema.enum.indexOf(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](node));
-                            if (s.schema.markdownEnumDescriptions) {
-                                markdownEnumValueDescription_1 = s.schema.markdownEnumDescriptions[idx];
-                            }
-                            else if (s.schema.enumDescriptions) {
-                                markdownEnumValueDescription_1 = toMarkdown(s.schema.enumDescriptions[idx]);
-                            }
-                            if (markdownEnumValueDescription_1) {
-                                enumValue_1 = s.schema.enum[idx];
-                                if (typeof enumValue_1 !== 'string') {
-                                    enumValue_1 = JSON.stringify(enumValue_1);
-                                }
-                            }
-                        }
-                    }
-                    return true;
-                });
-                var result = '';
-                if (title_1) {
-                    result = toMarkdown(title_1);
-                }
-                if (markdownDescription_1) {
-                    if (result.length > 0) {
-                        result += "\n\n";
-                    }
-                    result += markdownDescription_1;
-                }
-                if (markdownEnumValueDescription_1) {
-                    if (result.length > 0) {
-                        result += "\n\n";
-                    }
-                    result += "`" + toMarkdownCodeBlock(enumValue_1) + "`: " + markdownEnumValueDescription_1;
-                }
-                return createHover([result]);
-            }
-            return null;
-        });
-    };
-    return JSONHover;
-}());
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Color"]; });
 
-function toMarkdown(plain) {
-    if (plain) {
-        var res = plain.replace(/([^\n\r])(\r?\n)([^\n\r])/gm, '$1\n\n$3'); // single new lines to \n\n (Markdown paragraph)
-        return res.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
-    }
-    return void 0;
-}
-function toMarkdownCodeBlock(content) {
-    // see https://daringfireball.net/projects/markdown/syntax#precode
-    if (content.indexOf('`') !== -1) {
-        return '`` ' + content + ' ``';
-    }
-    return content;
-}
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorInformation"]; });
 
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["ColorPresentation"]; });
 
-/***/ }),
-/* 93 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRange"]; });
 
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONValidation", function() { return JSONValidation; });
-/* harmony import */ var _jsonSchemaService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94);
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80);
-/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(76);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_3__);
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FoldingRangeKind"]; });
 
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"]; });
 
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Diagnostic"]; });
 
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DiagnosticSeverity"]; });
 
-var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_3__["loadMessageBundle"]();
-var JSONValidation = /** @class */ (function () {
-    function JSONValidation(jsonSchemaService, promiseConstructor) {
-        this.jsonSchemaService = jsonSchemaService;
-        this.promise = promiseConstructor;
-        this.validationEnabled = true;
-    }
-    JSONValidation.prototype.configure = function (raw) {
-        if (raw) {
-            this.validationEnabled = raw.validate;
-            this.commentSeverity = raw.allowComments ? void 0 : vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Error;
-        }
-    };
-    JSONValidation.prototype.doValidation = function (textDocument, jsonDocument, documentSettings, schema) {
-        var _this = this;
-        if (!this.validationEnabled) {
-            return this.promise.resolve([]);
-        }
-        var diagnostics = [];
-        var added = {};
-        var addProblem = function (problem) {
-            // remove duplicated messages
-            var signature = problem.range.start.line + ' ' + problem.range.start.character + ' ' + problem.message;
-            if (!added[signature]) {
-                added[signature] = true;
-                diagnostics.push(problem);
-            }
-        };
-        var getDiagnostics = function (schema) {
-            var trailingCommaSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.trailingCommas) : vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Error;
-            var commentSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;
-            if (schema) {
-                if (schema.errors.length && jsonDocument.root) {
-                    var astRoot = jsonDocument.root;
-                    var property = astRoot.type === 'object' ? astRoot.properties[0] : null;
-                    if (property && property.keyNode.value === '$schema') {
-                        var node = property.valueNode || property;
-                        var range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Range"].create(textDocument.positionAt(node.offset), textDocument.positionAt(node.offset + node.length));
-                        addProblem(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Diagnostic"].create(range, schema.errors[0], vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Warning, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].SchemaResolveError));
-                    }
-                    else {
-                        var range = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Range"].create(textDocument.positionAt(astRoot.offset), textDocument.positionAt(astRoot.offset + 1));
-                        addProblem(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Diagnostic"].create(range, schema.errors[0], vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Warning, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].SchemaResolveError));
-                    }
-                }
-                else {
-                    var semanticErrors = jsonDocument.validate(textDocument, schema.schema);
-                    if (semanticErrors) {
-                        semanticErrors.forEach(addProblem);
-                    }
-                }
-                if (schemaAllowsComments(schema.schema)) {
-                    trailingCommaSeverity = commentSeverity = void 0;
-                }
-            }
-            for (var _i = 0, _a = jsonDocument.syntaxErrors; _i < _a.length; _i++) {
-                var p = _a[_i];
-                if (p.code === _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].TrailingComma) {
-                    if (typeof trailingCommaSeverity !== 'number') {
-                        continue;
-                    }
-                    p.severity = trailingCommaSeverity;
-                }
-                addProblem(p);
-            }
-            if (typeof commentSeverity === 'number') {
-                var message_1 = localize('InvalidCommentToken', 'Comments are not permitted in JSON.');
-                jsonDocument.comments.forEach(function (c) {
-                    addProblem(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["Diagnostic"].create(c, message_1, commentSeverity, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["ErrorCode"].CommentNotPermitted));
-                });
-            }
-            return diagnostics;
-        };
-        if (schema) {
-            var id = schema.id || ('schemaservice://untitled/' + idCounter++);
-            return this.jsonSchemaService.resolveSchemaContent(new _jsonSchemaService__WEBPACK_IMPORTED_MODULE_0__["UnresolvedSchema"](schema), id, {}).then(function (resolvedSchema) {
-                return getDiagnostics(resolvedSchema);
-            });
-        }
-        return this.jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(function (schema) {
-            return getDiagnostics(schema);
-        });
-    };
-    return JSONValidation;
-}());
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItem"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionItemKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["CompletionList"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["InsertTextFormat"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupContent"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolInformation"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SymbolKind"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["DocumentSymbol"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Location"]; });
+
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Hover"]; });
 
-var idCounter = 0;
-function schemaAllowsComments(schemaRef) {
-    if (schemaRef && typeof schemaRef === 'object') {
-        if (schemaRef.allowComments) {
-            return true;
-        }
-        if (schemaRef.allOf) {
-            return schemaRef.allOf.some(schemaAllowsComments);
-        }
-    }
-    return false;
-}
-function toDiagnosticSeverity(severityLevel) {
-    switch (severityLevel) {
-        case 'error': return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Error;
-        case 'warning': return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Warning;
-        case 'ignore': return void 0;
-    }
-    return void 0;
-}
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkedString"]; });
 
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["FormattingOptions"]; });
 
-/***/ }),
-/* 94 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* harmony import */ var vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100);
+/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return vscode_languageserver_textdocument__WEBPACK_IMPORTED_MODULE_1__["TextDocument"]; });
 
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnresolvedSchema", function() { return UnresolvedSchema; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedSchema", function() { return ResolvedSchema; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONSchemaService", function() { return JSONSchemaService; });
-/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83);
-/* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95);
-/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91);
-/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_4__);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
@@ -20341,2269 +14724,7085 @@ __webpack_require__.r(__webpack_exports__);
 
 
 
+/**
+ * Error codes used by diagnostics
+ */
+var ErrorCode;
+(function (ErrorCode) {
+    ErrorCode[ErrorCode["Undefined"] = 0] = "Undefined";
+    ErrorCode[ErrorCode["EnumValueMismatch"] = 1] = "EnumValueMismatch";
+    ErrorCode[ErrorCode["UnexpectedEndOfComment"] = 257] = "UnexpectedEndOfComment";
+    ErrorCode[ErrorCode["UnexpectedEndOfString"] = 258] = "UnexpectedEndOfString";
+    ErrorCode[ErrorCode["UnexpectedEndOfNumber"] = 259] = "UnexpectedEndOfNumber";
+    ErrorCode[ErrorCode["InvalidUnicode"] = 260] = "InvalidUnicode";
+    ErrorCode[ErrorCode["InvalidEscapeCharacter"] = 261] = "InvalidEscapeCharacter";
+    ErrorCode[ErrorCode["InvalidCharacter"] = 262] = "InvalidCharacter";
+    ErrorCode[ErrorCode["PropertyExpected"] = 513] = "PropertyExpected";
+    ErrorCode[ErrorCode["CommaExpected"] = 514] = "CommaExpected";
+    ErrorCode[ErrorCode["ColonExpected"] = 515] = "ColonExpected";
+    ErrorCode[ErrorCode["ValueExpected"] = 516] = "ValueExpected";
+    ErrorCode[ErrorCode["CommaOrCloseBacketExpected"] = 517] = "CommaOrCloseBacketExpected";
+    ErrorCode[ErrorCode["CommaOrCloseBraceExpected"] = 518] = "CommaOrCloseBraceExpected";
+    ErrorCode[ErrorCode["TrailingComma"] = 519] = "TrailingComma";
+    ErrorCode[ErrorCode["DuplicateKey"] = 520] = "DuplicateKey";
+    ErrorCode[ErrorCode["CommentNotPermitted"] = 521] = "CommentNotPermitted";
+    ErrorCode[ErrorCode["SchemaResolveError"] = 768] = "SchemaResolveError";
+})(ErrorCode || (ErrorCode = {}));
+var ClientCapabilities;
+(function (ClientCapabilities) {
+    ClientCapabilities.LATEST = {
+        textDocument: {
+            completion: {
+                completionItem: {
+                    documentationFormat: [vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].Markdown, vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["MarkupKind"].PlainText],
+                    commitCharactersSupport: true
+                }
+            }
+        }
+    };
+})(ClientCapabilities || (ClientCapabilities = {}));
 
 
-var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__["loadMessageBundle"]();
-var FilePatternAssociation = /** @class */ (function () {
-    function FilePatternAssociation(pattern) {
-        try {
-            this.patternRegExp = new RegExp(_utils_strings__WEBPACK_IMPORTED_MODULE_2__["convertSimple2RegExpPattern"](pattern) + '$');
-        }
-        catch (e) {
-            // invalid pattern
-            this.patternRegExp = null;
-        }
-        this.schemas = [];
+/***/ }),
+/* 100 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
+/* --------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ * ------------------------------------------------------------------------------------------ */
+
+var FullTextDocument = /** @class */ (function () {
+    function FullTextDocument(uri, languageId, version, content) {
+        this._uri = uri;
+        this._languageId = languageId;
+        this._version = version;
+        this._content = content;
+        this._lineOffsets = undefined;
     }
-    FilePatternAssociation.prototype.addSchema = function (id) {
-        this.schemas.push(id);
+    Object.defineProperty(FullTextDocument.prototype, "uri", {
+        get: function () {
+            return this._uri;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    Object.defineProperty(FullTextDocument.prototype, "languageId", {
+        get: function () {
+            return this._languageId;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    Object.defineProperty(FullTextDocument.prototype, "version", {
+        get: function () {
+            return this._version;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    FullTextDocument.prototype.getText = function (range) {
+        if (range) {
+            var start = this.offsetAt(range.start);
+            var end = this.offsetAt(range.end);
+            return this._content.substring(start, end);
+        }
+        return this._content;
     };
-    FilePatternAssociation.prototype.matchesPattern = function (fileName) {
-        return this.patternRegExp && this.patternRegExp.test(fileName);
+    FullTextDocument.prototype.update = function (changes, version) {
+        for (var _i = 0, changes_1 = changes; _i < changes_1.length; _i++) {
+            var change = changes_1[_i];
+            if (FullTextDocument.isIncremental(change)) {
+                // makes sure start is before end
+                var range = getWellformedRange(change.range);
+                // update content
+                var startOffset = this.offsetAt(range.start);
+                var endOffset = this.offsetAt(range.end);
+                this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
+                // update the offsets
+                var startLine = Math.max(range.start.line, 0);
+                var endLine = Math.max(range.end.line, 0);
+                var lineOffsets = this._lineOffsets;
+                var addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
+                if (endLine - startLine === addedLineOffsets.length) {
+                    for (var i = 0, len = addedLineOffsets.length; i < len; i++) {
+                        lineOffsets[i + startLine + 1] = addedLineOffsets[i];
+                    }
+                }
+                else {
+                    if (addedLineOffsets.length < 10000) {
+                        lineOffsets.splice.apply(lineOffsets, [startLine + 1, endLine - startLine].concat(addedLineOffsets));
+                    }
+                    else { // avoid too many arguments for splice
+                        this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
+                    }
+                }
+                var diff = change.text.length - (endOffset - startOffset);
+                if (diff !== 0) {
+                    for (var i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
+                        lineOffsets[i] = lineOffsets[i] + diff;
+                    }
+                }
+            }
+            else if (FullTextDocument.isFull(change)) {
+                this._content = change.text;
+                this._lineOffsets = undefined;
+            }
+            else {
+                throw new Error('Unknown change event received');
+            }
+        }
+        this._version = version;
     };
-    FilePatternAssociation.prototype.getSchemas = function () {
-        return this.schemas;
+    FullTextDocument.prototype.getLineOffsets = function () {
+        if (this._lineOffsets === undefined) {
+            this._lineOffsets = computeLineOffsets(this._content, true);
+        }
+        return this._lineOffsets;
     };
-    return FilePatternAssociation;
-}());
-var SchemaHandle = /** @class */ (function () {
-    function SchemaHandle(service, url, unresolvedSchemaContent) {
-        this.service = service;
-        this.url = url;
-        this.dependencies = {};
-        if (unresolvedSchemaContent) {
-            this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent));
+    FullTextDocument.prototype.positionAt = function (offset) {
+        offset = Math.max(Math.min(offset, this._content.length), 0);
+        var lineOffsets = this.getLineOffsets();
+        var low = 0, high = lineOffsets.length;
+        if (high === 0) {
+            return { line: 0, character: offset };
         }
-    }
-    SchemaHandle.prototype.getUnresolvedSchema = function () {
-        if (!this.unresolvedSchema) {
-            this.unresolvedSchema = this.service.loadSchema(this.url);
+        while (low < high) {
+            var mid = Math.floor((low + high) / 2);
+            if (lineOffsets[mid] > offset) {
+                high = mid;
+            }
+            else {
+                low = mid + 1;
+            }
         }
-        return this.unresolvedSchema;
+        // low is the least x for which the line offset is larger than the current offset
+        // or array.length if no line offset is larger than the current offset
+        var line = low - 1;
+        return { line: line, character: offset - lineOffsets[line] };
     };
-    SchemaHandle.prototype.getResolvedSchema = function () {
-        var _this = this;
-        if (!this.resolvedSchema) {
-            this.resolvedSchema = this.getUnresolvedSchema().then(function (unresolved) {
-                return _this.service.resolveSchemaContent(unresolved, _this.url, _this.dependencies);
-            });
+    FullTextDocument.prototype.offsetAt = function (position) {
+        var lineOffsets = this.getLineOffsets();
+        if (position.line >= lineOffsets.length) {
+            return this._content.length;
         }
-        return this.resolvedSchema;
+        else if (position.line < 0) {
+            return 0;
+        }
+        var lineOffset = lineOffsets[position.line];
+        var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
+        return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
     };
-    SchemaHandle.prototype.clearSchema = function () {
-        this.resolvedSchema = null;
-        this.unresolvedSchema = null;
-        this.dependencies = {};
+    Object.defineProperty(FullTextDocument.prototype, "lineCount", {
+        get: function () {
+            return this.getLineOffsets().length;
+        },
+        enumerable: true,
+        configurable: true
+    });
+    FullTextDocument.isIncremental = function (event) {
+        var candidate = event;
+        return candidate !== undefined && candidate !== null &&
+            typeof candidate.text === 'string' && candidate.range !== undefined &&
+            (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
     };
-    return SchemaHandle;
-}());
-var UnresolvedSchema = /** @class */ (function () {
-    function UnresolvedSchema(schema, errors) {
-        if (errors === void 0) { errors = []; }
-        this.schema = schema;
-        this.errors = errors;
-    }
-    return UnresolvedSchema;
+    FullTextDocument.isFull = function (event) {
+        var candidate = event;
+        return candidate !== undefined && candidate !== null &&
+            typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
+    };
+    return FullTextDocument;
 }());
-
-var ResolvedSchema = /** @class */ (function () {
-    function ResolvedSchema(schema, errors) {
-        if (errors === void 0) { errors = []; }
-        this.schema = schema;
-        this.errors = errors;
+var TextDocument;
+(function (TextDocument) {
+    /**
+     * Creates a new text document.
+     *
+     * @param uri The document's uri.
+     * @param languageId  The document's language Id.
+     * @param version The document's initial version number.
+     * @param content The document's content.
+     */
+    function create(uri, languageId, version, content) {
+        return new FullTextDocument(uri, languageId, version, content);
     }
-    ResolvedSchema.prototype.getSection = function (path) {
-        return _parser_jsonParser__WEBPACK_IMPORTED_MODULE_3__["asSchema"](this.getSectionRecursive(path, this.schema));
-    };
-    ResolvedSchema.prototype.getSectionRecursive = function (path, schema) {
-        if (!schema || typeof schema === 'boolean' || path.length === 0) {
-            return schema;
+    TextDocument.create = create;
+    /**
+     * Updates a TextDocument by modifing its content.
+     *
+     * @param document the document to update. Only documents created by TextDocument.create are valid inputs.
+     * @param changes the changes to apply to the document.
+     * @returns The updated TextDocument. Note: That's the same document instance passed in as first parameter.
+     *
+     */
+    function update(document, changes, version) {
+        if (document instanceof FullTextDocument) {
+            document.update(changes, version);
+            return document;
         }
-        var next = path.shift();
-        if (schema.properties && typeof schema.properties[next]) {
-            return this.getSectionRecursive(path, schema.properties[next]);
+        else {
+            throw new Error('TextDocument.update: document must be created by TextDocument.create');
         }
-        else if (schema.patternProperties) {
-            for (var _i = 0, _a = Object.keys(schema.patternProperties); _i < _a.length; _i++) {
-                var pattern = _a[_i];
-                var regex = new RegExp(pattern);
-                if (regex.test(next)) {
-                    return this.getSectionRecursive(path, schema.patternProperties[pattern]);
-                }
+    }
+    TextDocument.update = update;
+    function applyEdits(document, edits) {
+        var text = document.getText();
+        var sortedEdits = mergeSort(edits.map(getWellformedEdit), function (a, b) {
+            var diff = a.range.start.line - b.range.start.line;
+            if (diff === 0) {
+                return a.range.start.character - b.range.start.character;
+            }
+            return diff;
+        });
+        var lastModifiedOffset = 0;
+        var spans = [];
+        for (var _i = 0, sortedEdits_1 = sortedEdits; _i < sortedEdits_1.length; _i++) {
+            var e = sortedEdits_1[_i];
+            var startOffset = document.offsetAt(e.range.start);
+            if (startOffset < lastModifiedOffset) {
+                throw new Error('Overlapping edit');
             }
+            else if (startOffset > lastModifiedOffset) {
+                spans.push(text.substring(lastModifiedOffset, startOffset));
+            }
+            if (e.newText.length) {
+                spans.push(e.newText);
+            }
+            lastModifiedOffset = document.offsetAt(e.range.end);
+        }
+        spans.push(text.substr(lastModifiedOffset));
+        return spans.join('');
+    }
+    TextDocument.applyEdits = applyEdits;
+})(TextDocument || (TextDocument = {}));
+function mergeSort(data, compare) {
+    if (data.length <= 1) {
+        // sorted
+        return data;
+    }
+    var p = (data.length / 2) | 0;
+    var left = data.slice(0, p);
+    var right = data.slice(p);
+    mergeSort(left, compare);
+    mergeSort(right, compare);
+    var leftIdx = 0;
+    var rightIdx = 0;
+    var i = 0;
+    while (leftIdx < left.length && rightIdx < right.length) {
+        var ret = compare(left[leftIdx], right[rightIdx]);
+        if (ret <= 0) {
+            // smaller_equal -> take left to preserve order
+            data[i++] = left[leftIdx++];
         }
-        else if (typeof schema.additionalProperties === 'object') {
-            return this.getSectionRecursive(path, schema.additionalProperties);
+        else {
+            // greater -> take right
+            data[i++] = right[rightIdx++];
         }
-        else if (next.match('[0-9]+')) {
-            if (Array.isArray(schema.items)) {
-                var index = parseInt(next, 10);
-                if (!isNaN(index) && schema.items[index]) {
-                    return this.getSectionRecursive(path, schema.items[index]);
-                }
-            }
-            else if (schema.items) {
-                return this.getSectionRecursive(path, schema.items);
+    }
+    while (leftIdx < left.length) {
+        data[i++] = left[leftIdx++];
+    }
+    while (rightIdx < right.length) {
+        data[i++] = right[rightIdx++];
+    }
+    return data;
+}
+function computeLineOffsets(text, isAtLineStart, textOffset) {
+    if (textOffset === void 0) { textOffset = 0; }
+    var result = isAtLineStart ? [textOffset] : [];
+    for (var i = 0; i < text.length; i++) {
+        var ch = text.charCodeAt(i);
+        if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
+            if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
+                i++;
             }
+            result.push(textOffset + i + 1);
         }
-        return null;
-    };
-    return ResolvedSchema;
-}());
+    }
+    return result;
+}
+function getWellformedRange(range) {
+    var start = range.start;
+    var end = range.end;
+    if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
+        return { start: end, end: start };
+    }
+    return range;
+}
+function getWellformedEdit(textEdit) {
+    var range = getWellformedRange(textEdit.range);
+    if (range !== textEdit.range) {
+        return { newText: textEdit.newText, range: range };
+    }
+    return textEdit;
+}
+
+
+/***/ }),
+/* 101 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/* --------------------------------------------------------------------------------------------\r
+ * Copyright (c) Microsoft Corporation. All rights reserved.\r
+ * Licensed under the MIT License. See License.txt in the project root for license information.\r
+ * ------------------------------------------------------------------------------------------ */\r
+\r
+Object.defineProperty(exports, "__esModule", { value: true });\r
+var path = __webpack_require__(1);\r
+var fs = __webpack_require__(2);\r
+var toString = Object.prototype.toString;\r
+function isDefined(value) {\r
+    return typeof value !== 'undefined';\r
+}\r
+function isNumber(value) {\r
+    return toString.call(value) === '[object Number]';\r
+}\r
+function isString(value) {\r
+    return toString.call(value) === '[object String]';\r
+}\r
+function isBoolean(value) {\r
+    return value === true || value === false;\r
+}\r
+function readJsonFileSync(filename) {\r
+    return JSON.parse(fs.readFileSync(filename, 'utf8'));\r
+}\r
+var MessageFormat;\r
+(function (MessageFormat) {\r
+    MessageFormat["file"] = "file";\r
+    MessageFormat["bundle"] = "bundle";\r
+    MessageFormat["both"] = "both";\r
+})(MessageFormat = exports.MessageFormat || (exports.MessageFormat = {}));\r
+var BundleFormat;\r
+(function (BundleFormat) {\r
+    // the nls.bundle format\r
+    BundleFormat["standalone"] = "standalone";\r
+    BundleFormat["languagePack"] = "languagePack";\r
+})(BundleFormat = exports.BundleFormat || (exports.BundleFormat = {}));\r
+var LocalizeInfo;\r
+(function (LocalizeInfo) {\r
+    function is(value) {\r
+        var candidate = value;\r
+        return candidate && isDefined(candidate.key) && isDefined(candidate.comment);\r
+    }\r
+    LocalizeInfo.is = is;\r
+})(LocalizeInfo || (LocalizeInfo = {}));\r
+var resolvedLanguage;\r
+var resolvedBundles;\r
+var options;\r
+var isPseudo;\r
+function initializeSettings() {\r
+    options = { locale: undefined, language: undefined, languagePackSupport: false, cacheLanguageResolution: true, messageFormat: MessageFormat.bundle };\r
+    if (isString(process.env.VSCODE_NLS_CONFIG)) {\r
+        try {\r
+            var vscodeOptions_1 = JSON.parse(process.env.VSCODE_NLS_CONFIG);\r
+            var language = void 0;\r
+            var locale = void 0;\r
+            if (vscodeOptions_1.availableLanguages) {\r
+                var value = vscodeOptions_1.availableLanguages['*'];\r
+                if (isString(value)) {\r
+                    language = value;\r
+                }\r
+            }\r
+            if (isString(vscodeOptions_1.locale)) {\r
+                options.locale = vscodeOptions_1.locale.toLowerCase();\r
+            }\r
+            if (language === undefined) {\r
+                options.language = options.locale;\r
+            }\r
+            else if (language !== 'en') {\r
+                options.language = language;\r
+            }\r
+            if (isBoolean(vscodeOptions_1._languagePackSupport)) {\r
+                options.languagePackSupport = vscodeOptions_1._languagePackSupport;\r
+            }\r
+            if (isString(vscodeOptions_1._cacheRoot)) {\r
+                options.cacheRoot = vscodeOptions_1._cacheRoot;\r
+            }\r
+            if (isString(vscodeOptions_1._languagePackId)) {\r
+                options.languagePackId = vscodeOptions_1._languagePackId;\r
+            }\r
+            if (isString(vscodeOptions_1._translationsConfigFile)) {\r
+                options.translationsConfigFile = vscodeOptions_1._translationsConfigFile;\r
+                try {\r
+                    options.translationsConfig = readJsonFileSync(options.translationsConfigFile);\r
+                }\r
+                catch (error) {\r
+                    // We can't read the translation config file. Mark the cache as corrupted.\r
+                    if (vscodeOptions_1._corruptedFile) {\r
+                        var dirname = path.dirname(vscodeOptions_1._corruptedFile);\r
+                        fs.exists(dirname, function (exists) {\r
+                            if (exists) {\r
+                                fs.writeFile(vscodeOptions_1._corruptedFile, 'corrupted', 'utf8', function (err) {\r
+                                    console.error(err);\r
+                                });\r
+                            }\r
+                        });\r
+                    }\r
+                }\r
+            }\r
+        }\r
+        catch (_a) {\r
+            // Do nothing.\r
+        }\r
+    }\r
+    isPseudo = options.locale === 'pseudo';\r
+    resolvedLanguage = undefined;\r
+    resolvedBundles = Object.create(null);\r
+}\r
+initializeSettings();\r
+function supportsLanguagePack() {\r
+    return options.languagePackSupport === true && options.cacheRoot !== undefined && options.languagePackId !== undefined && options.translationsConfigFile !== undefined\r
+        && options.translationsConfig !== undefined;\r
+}\r
+function format(message, args) {\r
+    var result;\r
+    if (isPseudo) {\r
+        // FF3B and FF3D is the Unicode zenkaku representation for [ and ]\r
+        message = '\uFF3B' + message.replace(/[aouei]/g, '$&$&') + '\uFF3D';\r
+    }\r
+    if (args.length === 0) {\r
+        result = message;\r
+    }\r
+    else {\r
+        result = message.replace(/\{(\d+)\}/g, function (match, rest) {\r
+            var index = rest[0];\r
+            var arg = args[index];\r
+            var replacement = match;\r
+            if (typeof arg === 'string') {\r
+                replacement = arg;\r
+            }\r
+            else if (typeof arg === 'number' || typeof arg === 'boolean' || arg === void 0 || arg === null) {\r
+                replacement = String(arg);\r
+            }\r
+            return replacement;\r
+        });\r
+    }\r
+    return result;\r
+}\r
+function createScopedLocalizeFunction(messages) {\r
+    return function (key, message) {\r
+        var args = [];\r
+        for (var _i = 2; _i < arguments.length; _i++) {\r
+            args[_i - 2] = arguments[_i];\r
+        }\r
+        if (isNumber(key)) {\r
+            if (key >= messages.length) {\r
+                console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: " + new Error('').stack);\r
+                return;\r
+            }\r
+            return format(messages[key], args);\r
+        }\r
+        else {\r
+            if (isString(message)) {\r
+                console.warn("Message " + message + " didn't get externalized correctly.");\r
+                return format(message, args);\r
+            }\r
+            else {\r
+                console.error("Broken localize call found. Stacktrace is\n: " + new Error('').stack);\r
+            }\r
+        }\r
+    };\r
+}\r
+function localize(key, message) {\r
+    var args = [];\r
+    for (var _i = 2; _i < arguments.length; _i++) {\r
+        args[_i - 2] = arguments[_i];\r
+    }\r
+    return format(message, args);\r
+}\r
+function resolveLanguage(file) {\r
+    var resolvedLanguage;\r
+    if (options.cacheLanguageResolution && resolvedLanguage) {\r
+        resolvedLanguage = resolvedLanguage;\r
+    }\r
+    else {\r
+        if (isPseudo || !options.language) {\r
+            resolvedLanguage = '.nls.json';\r
+        }\r
+        else {\r
+            var locale = options.language;\r
+            while (locale) {\r
+                var candidate = '.nls.' + locale + '.json';\r
+                if (fs.existsSync(file + candidate)) {\r
+                    resolvedLanguage = candidate;\r
+                    break;\r
+                }\r
+                else {\r
+                    var index = locale.lastIndexOf('-');\r
+                    if (index > 0) {\r
+                        locale = locale.substring(0, index);\r
+                    }\r
+                    else {\r
+                        resolvedLanguage = '.nls.json';\r
+                        locale = null;\r
+                    }\r
+                }\r
+            }\r
+        }\r
+        if (options.cacheLanguageResolution) {\r
+            resolvedLanguage = resolvedLanguage;\r
+        }\r
+    }\r
+    return file + resolvedLanguage;\r
+}\r
+function findInTheBoxBundle(root) {\r
+    var language = options.language;\r
+    while (language) {\r
+        var candidate = path.join(root, "nls.bundle." + language + ".json");\r
+        if (fs.existsSync(candidate)) {\r
+            return candidate;\r
+        }\r
+        else {\r
+            var index = language.lastIndexOf('-');\r
+            if (index > 0) {\r
+                language = language.substring(0, index);\r
+            }\r
+            else {\r
+                language = undefined;\r
+            }\r
+        }\r
+    }\r
+    // Test if we can reslove the default bundle.\r
+    if (language === undefined) {\r
+        var candidate = path.join(root, 'nls.bundle.json');\r
+        if (fs.existsSync(candidate)) {\r
+            return candidate;\r
+        }\r
+    }\r
+    return undefined;\r
+}\r
+function mkdir(directory) {\r
+    try {\r
+        fs.mkdirSync(directory);\r
+    }\r
+    catch (err) {\r
+        if (err.code === 'EEXIST') {\r
+            return;\r
+        }\r
+        else if (err.code === 'ENOENT') {\r
+            var parent = path.dirname(directory);\r
+            if (parent !== directory) {\r
+                mkdir(parent);\r
+                fs.mkdirSync(directory);\r
+            }\r
+        }\r
+        else {\r
+            throw err;\r
+        }\r
+    }\r
+}\r
+function createDefaultNlsBundle(folder) {\r
+    var metaData = readJsonFileSync(path.join(folder, 'nls.metadata.json'));\r
+    var result = Object.create(null);\r
+    for (var module_1 in metaData) {\r
+        var entry = metaData[module_1];\r
+        result[module_1] = entry.messages;\r
+    }\r
+    return result;\r
+}\r
+function createNLSBundle(header, metaDataPath) {\r
+    var languagePackLocation = options.translationsConfig[header.id];\r
+    if (!languagePackLocation) {\r
+        return undefined;\r
+    }\r
+    var languagePack = readJsonFileSync(languagePackLocation).contents;\r
+    var metaData = readJsonFileSync(path.join(metaDataPath, 'nls.metadata.json'));\r
+    var result = Object.create(null);\r
+    for (var module_2 in metaData) {\r
+        var entry = metaData[module_2];\r
+        var translations = languagePack[header.outDir + "/" + module_2];\r
+        if (translations) {\r
+            var resultMessages = [];\r
+            for (var i = 0; i < entry.keys.length; i++) {\r
+                var messageKey = entry.keys[i];\r
+                var key = isString(messageKey) ? messageKey : messageKey.key;\r
+                var translatedMessage = translations[key];\r
+                if (translatedMessage === undefined) {\r
+                    translatedMessage = entry.messages[i];\r
+                }\r
+                resultMessages.push(translatedMessage);\r
+            }\r
+            result[module_2] = resultMessages;\r
+        }\r
+        else {\r
+            result[module_2] = entry.messages;\r
+        }\r
+    }\r
+    return result;\r
+}\r
+function touch(file) {\r
+    var d = new Date();\r
+    fs.utimes(file, d, d, function () {\r
+        // Do nothing. Ignore\r
+    });\r
+}\r
+function cacheBundle(key, bundle) {\r
+    resolvedBundles[key] = bundle;\r
+    return bundle;\r
+}\r
+function loadNlsBundleOrCreateFromI18n(header, bundlePath) {\r
+    var result;\r
+    var bundle = path.join(options.cacheRoot, header.id + "-" + header.hash + ".json");\r
+    var useMemoryOnly = false;\r
+    var writeBundle = false;\r
+    try {\r
+        result = JSON.parse(fs.readFileSync(bundle, { encoding: 'utf8', flag: 'r' }));\r
+        touch(bundle);\r
+        return result;\r
+    }\r
+    catch (err) {\r
+        if (err.code === 'ENOENT') {\r
+            writeBundle = true;\r
+        }\r
+        else if (err instanceof SyntaxError) {\r
+            // We have a syntax error. So no valid JSON. Use\r
+            console.log("Syntax error parsing message bundle: " + err.message + ".");\r
+            fs.unlink(bundle, function (err) {\r
+                if (err) {\r
+                    console.error("Deleting corrupted bundle " + bundle + " failed.");\r
+                }\r
+            });\r
+            useMemoryOnly = true;\r
+        }\r
+        else {\r
+            throw err;\r
+        }\r
+    }\r
+    result = createNLSBundle(header, bundlePath);\r
+    if (!result || useMemoryOnly) {\r
+        return result;\r
+    }\r
+    if (writeBundle) {\r
+        try {\r
+            fs.writeFileSync(bundle, JSON.stringify(result), { encoding: 'utf8', flag: 'wx' });\r
+        }\r
+        catch (err) {\r
+            if (err.code === 'EEXIST') {\r
+                return result;\r
+            }\r
+            throw err;\r
+        }\r
+    }\r
+    return result;\r
+}\r
+function loadDefaultNlsBundle(bundlePath) {\r
+    try {\r
+        return createDefaultNlsBundle(bundlePath);\r
+    }\r
+    catch (err) {\r
+        console.log("Generating default bundle from meta data failed.", err);\r
+        return undefined;\r
+    }\r
+}\r
+function loadNlsBundle(header, bundlePath) {\r
+    var result;\r
+    // Core decided to use a language pack. Do the same in the extension\r
+    if (supportsLanguagePack()) {\r
+        try {\r
+            result = loadNlsBundleOrCreateFromI18n(header, bundlePath);\r
+        }\r
+        catch (err) {\r
+            console.log("Load or create bundle failed ", err);\r
+        }\r
+    }\r
+    if (!result) {\r
+        // No language pack found, but core is running in language pack mode\r
+        // Don't try to use old in the box bundles since the might be stale\r
+        // Fall right back to the default bundle.\r
+        if (options.languagePackSupport) {\r
+            return loadDefaultNlsBundle(bundlePath);\r
+        }\r
+        var candidate = findInTheBoxBundle(bundlePath);\r
+        if (candidate) {\r
+            try {\r
+                return readJsonFileSync(candidate);\r
+            }\r
+            catch (err) {\r
+                console.log("Loading in the box message bundle failed.", err);\r
+            }\r
+        }\r
+        result = loadDefaultNlsBundle(bundlePath);\r
+    }\r
+    return result;\r
+}\r
+function tryFindMetaDataHeaderFile(file) {\r
+    var result;\r
+    var dirname = path.dirname(file);\r
+    while (true) {\r
+        result = path.join(dirname, 'nls.metadata.header.json');\r
+        if (fs.existsSync(result)) {\r
+            break;\r
+        }\r
+        var parent = path.dirname(dirname);\r
+        if (parent === dirname) {\r
+            result = undefined;\r
+            break;\r
+        }\r
+        else {\r
+            dirname = parent;\r
+        }\r
+    }\r
+    return result;\r
+}\r
+function loadMessageBundle(file) {\r
+    if (!file) {\r
+        // No file. We are in dev mode. Return the default\r
+        // localize function.\r
+        return localize;\r
+    }\r
+    // Remove extension since we load json files.\r
+    var ext = path.extname(file);\r
+    if (ext) {\r
+        file = file.substr(0, file.length - ext.length);\r
+    }\r
+    if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.bundle) {\r
+        var headerFile = tryFindMetaDataHeaderFile(file);\r
+        if (headerFile) {\r
+            var bundlePath = path.dirname(headerFile);\r
+            var bundle = resolvedBundles[bundlePath];\r
+            if (bundle === undefined) {\r
+                try {\r
+                    var header = JSON.parse(fs.readFileSync(headerFile, 'utf8'));\r
+                    try {\r
+                        var nlsBundle = loadNlsBundle(header, bundlePath);\r
+                        bundle = cacheBundle(bundlePath, nlsBundle ? { header: header, nlsBundle: nlsBundle } : null);\r
+                    }\r
+                    catch (err) {\r
+                        console.error('Failed to load nls bundle', err);\r
+                        bundle = cacheBundle(bundlePath, null);\r
+                    }\r
+                }\r
+                catch (err) {\r
+                    console.error('Failed to read header file', err);\r
+                    bundle = cacheBundle(bundlePath, null);\r
+                }\r
+            }\r
+            if (bundle) {\r
+                var module_3 = file.substr(bundlePath.length + 1).replace(/\\/g, '/');\r
+                var messages = bundle.nlsBundle[module_3];\r
+                if (messages === undefined) {\r
+                    console.error("Messages for file " + file + " not found. See console for details.");\r
+                    return function () {\r
+                        return 'Messages not found.';\r
+                    };\r
+                }\r
+                return createScopedLocalizeFunction(messages);\r
+            }\r
+        }\r
+    }\r
+    if (options.messageFormat === MessageFormat.both || options.messageFormat === MessageFormat.file) {\r
+        // Try to load a single file bundle\r
+        try {\r
+            var json = readJsonFileSync(resolveLanguage(file));\r
+            if (Array.isArray(json)) {\r
+                return createScopedLocalizeFunction(json);\r
+            }\r
+            else {\r
+                if (isDefined(json.messages) && isDefined(json.keys)) {\r
+                    return createScopedLocalizeFunction(json.messages);\r
+                }\r
+                else {\r
+                    console.error("String bundle '" + file + "' uses an unsupported format.");\r
+                    return function () {\r
+                        return 'File bundle has unsupported format. See console for details';\r
+                    };\r
+                }\r
+            }\r
+        }\r
+        catch (err) {\r
+            if (err.code !== 'ENOENT') {\r
+                console.error('Failed to load single file bundle', err);\r
+            }\r
+        }\r
+    }\r
+    console.error("Failed to load message bundle for file " + file);\r
+    return function () {\r
+        return 'Failed to load message bundle. See console for details.';\r
+    };\r
+}\r
+exports.loadMessageBundle = loadMessageBundle;\r
+function config(opts) {\r
+    if (opts) {\r
+        if (isString(opts.locale)) {\r
+            options.locale = opts.locale.toLowerCase();\r
+            options.language = options.locale;\r
+            resolvedLanguage = undefined;\r
+            resolvedBundles = Object.create(null);\r
+        }\r
+        if (opts.messageFormat !== undefined) {\r
+            options.messageFormat = opts.messageFormat;\r
+        }\r
+        if (opts.bundleFormat === BundleFormat.standalone && options.languagePackSupport === true) {\r
+            options.languagePackSupport = false;\r
+        }\r
+    }\r
+    isPseudo = options.locale === 'pseudo';\r
+    return loadMessageBundle;\r
+}\r
+exports.config = config;\r
+//# sourceMappingURL=main.js.map
 
-var JSONSchemaService = /** @class */ (function () {
-    function JSONSchemaService(requestService, contextService, promiseConstructor) {
-        this.contextService = contextService;
-        this.requestService = requestService;
-        this.promiseConstructor = promiseConstructor || Promise;
-        this.callOnDispose = [];
-        this.contributionSchemas = {};
-        this.contributionAssociations = {};
-        this.schemasById = {};
-        this.filePatternAssociations = [];
-        this.filePatternAssociationById = {};
-        this.registeredSchemasIds = {};
-    }
-    JSONSchemaService.prototype.getRegisteredSchemaIds = function (filter) {
-        return Object.keys(this.registeredSchemasIds).filter(function (id) {
-            var scheme = vscode_uri__WEBPACK_IMPORTED_MODULE_1__["URI"].parse(id).scheme;
-            return scheme !== 'schemaservice' && (!filter || filter(scheme));
-        });
-    };
-    Object.defineProperty(JSONSchemaService.prototype, "promise", {
-        get: function () {
-            return this.promiseConstructor;
-        },
-        enumerable: true,
-        configurable: true
-    });
-    JSONSchemaService.prototype.dispose = function () {
-        while (this.callOnDispose.length > 0) {
-            this.callOnDispose.pop()();
-        }
-    };
-    JSONSchemaService.prototype.onResourceChange = function (uri) {
-        var _this = this;
-        var hasChanges = false;
-        uri = this.normalizeId(uri);
-        var toWalk = [uri];
-        var all = Object.keys(this.schemasById).map(function (key) { return _this.schemasById[key]; });
-        while (toWalk.length) {
-            var curr = toWalk.pop();
-            for (var i = 0; i < all.length; i++) {
-                var handle = all[i];
-                if (handle && (handle.url === curr || handle.dependencies[curr])) {
-                    if (handle.url !== curr) {
-                        toWalk.push(handle.url);
-                    }
-                    handle.clearSchema();
-                    all[i] = undefined;
-                    hasChanges = true;
-                }
-            }
-        }
-        return hasChanges;
-    };
-    JSONSchemaService.prototype.normalizeId = function (id) {
-        // remove trailing '#', normalize drive capitalization
-        try {
-            return vscode_uri__WEBPACK_IMPORTED_MODULE_1__["URI"].parse(id).toString();
-        }
-        catch (e) {
-            return id;
-        }
-    };
-    JSONSchemaService.prototype.setSchemaContributions = function (schemaContributions) {
-        if (schemaContributions.schemas) {
-            var schemas = schemaContributions.schemas;
-            for (var id in schemas) {
-                var normalizedId = this.normalizeId(id);
-                this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]);
+/***/ }),
+/* 102 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringifyObject", function() { return stringifyObject; });
+/*---------------------------------------------------------------------------------------------
+*  Copyright (c) Microsoft Corporation. All rights reserved.
+*  Licensed under the MIT License. See License.txt in the project root for license information.
+*--------------------------------------------------------------------------------------------*/
+function stringifyObject(obj, indent, stringifyLiteral) {
+    if (obj !== null && typeof obj === 'object') {
+        var newIndent = indent + '\t';
+        if (Array.isArray(obj)) {
+            if (obj.length === 0) {
+                return '[]';
             }
-        }
-        if (schemaContributions.schemaAssociations) {
-            var schemaAssociations = schemaContributions.schemaAssociations;
-            for (var pattern in schemaAssociations) {
-                var associations = schemaAssociations[pattern];
-                this.contributionAssociations[pattern] = associations;
-                var fpa = this.getOrAddFilePatternAssociation(pattern);
-                for (var _i = 0, associations_1 = associations; _i < associations_1.length; _i++) {
-                    var schemaId = associations_1[_i];
-                    var id = this.normalizeId(schemaId);
-                    fpa.addSchema(id);
+            var result = '[\n';
+            for (var i = 0; i < obj.length; i++) {
+                result += newIndent + stringifyObject(obj[i], newIndent, stringifyLiteral);
+                if (i < obj.length - 1) {
+                    result += ',';
                 }
+                result += '\n';
             }
+            result += indent + ']';
+            return result;
         }
-    };
-    JSONSchemaService.prototype.addSchemaHandle = function (id, unresolvedSchemaContent) {
-        var schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent);
-        this.schemasById[id] = schemaHandle;
-        return schemaHandle;
-    };
-    JSONSchemaService.prototype.getOrAddSchemaHandle = function (id, unresolvedSchemaContent) {
-        return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent);
-    };
-    JSONSchemaService.prototype.getOrAddFilePatternAssociation = function (pattern) {
-        var fpa = this.filePatternAssociationById[pattern];
-        if (!fpa) {
-            fpa = new FilePatternAssociation(pattern);
-            this.filePatternAssociationById[pattern] = fpa;
-            this.filePatternAssociations.push(fpa);
-        }
-        return fpa;
-    };
-    JSONSchemaService.prototype.registerExternalSchema = function (uri, filePatterns, unresolvedSchemaContent) {
-        if (filePatterns === void 0) { filePatterns = null; }
-        var id = this.normalizeId(uri);
-        this.registeredSchemasIds[id] = true;
-        if (filePatterns) {
-            for (var _i = 0, filePatterns_1 = filePatterns; _i < filePatterns_1.length; _i++) {
-                var pattern = filePatterns_1[_i];
-                this.getOrAddFilePatternAssociation(pattern).addSchema(id);
+        else {
+            var keys = Object.keys(obj);
+            if (keys.length === 0) {
+                return '{}';
             }
-        }
-        return unresolvedSchemaContent ? this.addSchemaHandle(id, unresolvedSchemaContent) : this.getOrAddSchemaHandle(id);
-    };
-    JSONSchemaService.prototype.clearExternalSchemas = function () {
-        this.schemasById = {};
-        this.filePatternAssociations = [];
-        this.filePatternAssociationById = {};
-        this.registeredSchemasIds = {};
-        for (var id in this.contributionSchemas) {
-            this.schemasById[id] = this.contributionSchemas[id];
-            this.registeredSchemasIds[id] = true;
-        }
-        for (var pattern in this.contributionAssociations) {
-            var fpa = this.getOrAddFilePatternAssociation(pattern);
-            for (var _i = 0, _a = this.contributionAssociations[pattern]; _i < _a.length; _i++) {
-                var schemaId = _a[_i];
-                var id = this.normalizeId(schemaId);
-                fpa.addSchema(id);
+            var result = '{\n';
+            for (var i = 0; i < keys.length; i++) {
+                var key = keys[i];
+                result += newIndent + JSON.stringify(key) + ': ' + stringifyObject(obj[key], newIndent, stringifyLiteral);
+                if (i < keys.length - 1) {
+                    result += ',';
+                }
+                result += '\n';
             }
+            result += indent + '}';
+            return result;
         }
-    };
-    JSONSchemaService.prototype.getResolvedSchema = function (schemaId) {
-        var id = this.normalizeId(schemaId);
-        var schemaHandle = this.schemasById[id];
-        if (schemaHandle) {
-            return schemaHandle.getResolvedSchema();
+    }
+    return stringifyLiteral(obj);
+}
+
+
+/***/ }),
+/* 103 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startsWith", function() { return startsWith; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endsWith", function() { return endsWith; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertSimple2RegExpPattern", function() { return convertSimple2RegExpPattern; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
+/*---------------------------------------------------------------------------------------------
+*  Copyright (c) Microsoft Corporation. All rights reserved.
+*  Licensed under the MIT License. See License.txt in the project root for license information.
+*--------------------------------------------------------------------------------------------*/
+function startsWith(haystack, needle) {
+    if (haystack.length < needle.length) {
+        return false;
+    }
+    for (var i = 0; i < needle.length; i++) {
+        if (haystack[i] !== needle[i]) {
+            return false;
         }
-        return this.promise.resolve(null);
-    };
-    JSONSchemaService.prototype.loadSchema = function (url) {
-        if (!this.requestService) {
-            var errorMessage = localize('json.schema.norequestservice', 'Unable to load schema from \'{0}\'. No schema request service available', toDisplayString(url));
-            return this.promise.resolve(new UnresolvedSchema({}, [errorMessage]));
+    }
+    return true;
+}
+/**
+ * Determines if haystack ends with needle.
+ */
+function endsWith(haystack, needle) {
+    var diff = haystack.length - needle.length;
+    if (diff > 0) {
+        return haystack.lastIndexOf(needle) === diff;
+    }
+    else if (diff === 0) {
+        return haystack === needle;
+    }
+    else {
+        return false;
+    }
+}
+function convertSimple2RegExpPattern(pattern) {
+    return pattern.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, '\\$&').replace(/[\*]/g, '.*');
+}
+function repeat(value, count) {
+    var s = '';
+    while (count > 0) {
+        if ((count & 1) === 1) {
+            s += value;
         }
-        return this.requestService(url).then(function (content) {
-            if (!content) {
-                var errorMessage = localize('json.schema.nocontent', 'Unable to load schema from \'{0}\': No content.', toDisplayString(url));
-                return new UnresolvedSchema({}, [errorMessage]);
-            }
-            var schemaContent = {};
-            var jsonErrors = [];
-            schemaContent = jsonc_parser__WEBPACK_IMPORTED_MODULE_0__["parse"](content, jsonErrors);
-            var errors = jsonErrors.length ? [localize('json.schema.invalidFormat', 'Unable to parse content from \'{0}\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)] : [];
-            return new UnresolvedSchema(schemaContent, errors);
-        }, function (error) {
-            var errorMessage = error.toString();
-            var errorSplit = error.toString().split('Error: ');
-            if (errorSplit.length > 1) {
-                // more concise error message, URL and context are attached by caller anyways
-                errorMessage = errorSplit[1];
-            }
-            return new UnresolvedSchema({}, [errorMessage]);
-        });
-    };
-    JSONSchemaService.prototype.resolveSchemaContent = function (schemaToResolve, schemaURL, dependencies) {
-        var _this = this;
-        var resolveErrors = schemaToResolve.errors.slice(0);
-        var schema = schemaToResolve.schema;
-        var contextService = this.contextService;
-        var findSection = function (schema, path) {
-            if (!path) {
-                return schema;
-            }
-            var current = schema;
-            if (path[0] === '/') {
-                path = path.substr(1);
-            }
-            path.split('/').some(function (part) {
-                current = current[part];
-                return !current;
-            });
-            return current;
-        };
-        var merge = function (target, sourceRoot, sourceURI, path) {
-            var section = findSection(sourceRoot, path);
-            if (section) {
-                for (var key in section) {
-                    if (section.hasOwnProperty(key) && !target.hasOwnProperty(key)) {
-                        target[key] = section[key];
-                    }
+        value += value;
+        count = count >>> 1;
+    }
+    return s;
+}
+
+
+/***/ }),
+/* 104 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONHover", function() { return JSONHover; });
+/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99);
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+
+var JSONHover = /** @class */ (function () {
+    function JSONHover(schemaService, contributions, promiseConstructor) {
+        if (contributions === void 0) { contributions = []; }
+        this.schemaService = schemaService;
+        this.contributions = contributions;
+        this.promise = promiseConstructor || Promise;
+    }
+    JSONHover.prototype.doHover = function (document, position, doc) {
+        var offset = document.offsetAt(position);
+        var node = doc.getNodeFromOffset(offset);
+        if (!node || (node.type === 'object' || node.type === 'array') && offset > node.offset + 1 && offset < node.offset + node.length - 1) {
+            return this.promise.resolve(null);
+        }
+        var hoverRangeNode = node;
+        // use the property description when hovering over an object key
+        if (node.type === 'string') {
+            var parent = node.parent;
+            if (parent && parent.type === 'property' && parent.keyNode === node) {
+                node = parent.valueNode;
+                if (!node) {
+                    return this.promise.resolve(null);
                 }
             }
-            else {
-                resolveErrors.push(localize('json.schema.invalidref', '$ref \'{0}\' in \'{1}\' can not be resolved.', path, sourceURI));
-            }
-        };
-        var resolveExternalLink = function (node, uri, linkPath, parentSchemaURL, parentSchemaDependencies) {
-            if (contextService && !/^\w+:\/\/.*/.test(uri)) {
-                uri = contextService.resolveRelativePath(uri, parentSchemaURL);
-            }
-            uri = _this.normalizeId(uri);
-            var referencedHandle = _this.getOrAddSchemaHandle(uri);
-            return referencedHandle.getUnresolvedSchema().then(function (unresolvedSchema) {
-                parentSchemaDependencies[uri] = true;
-                if (unresolvedSchema.errors.length) {
-                    var loc = linkPath ? uri + '#' + linkPath : uri;
-                    resolveErrors.push(localize('json.schema.problemloadingref', 'Problems loading reference \'{0}\': {1}', loc, unresolvedSchema.errors[0]));
-                }
-                merge(node, unresolvedSchema.schema, uri, linkPath);
-                return resolveRefs(node, unresolvedSchema.schema, uri, referencedHandle.dependencies);
-            });
+        }
+        var hoverRange = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Range"].create(document.positionAt(hoverRangeNode.offset), document.positionAt(hoverRangeNode.offset + hoverRangeNode.length));
+        var createHover = function (contents) {
+            var result = {
+                contents: contents,
+                range: hoverRange
+            };
+            return result;
         };
-        var resolveRefs = function (node, parentSchema, parentSchemaURL, parentSchemaDependencies) {
-            if (!node || typeof node !== 'object') {
-                return Promise.resolve(null);
+        var location = _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodePath"](node);
+        for (var i = this.contributions.length - 1; i >= 0; i--) {
+            var contribution = this.contributions[i];
+            var promise = contribution.getInfoContribution(document.uri, location);
+            if (promise) {
+                return promise.then(function (htmlContent) { return createHover(htmlContent); });
             }
-            var toWalk = [node];
-            var seen = [];
-            var openPromises = [];
-            var collectEntries = function () {
-                var entries = [];
-                for (var _i = 0; _i < arguments.length; _i++) {
-                    entries[_i] = arguments[_i];
-                }
-                for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) {
-                    var entry = entries_1[_a];
-                    if (typeof entry === 'object') {
-                        toWalk.push(entry);
-                    }
-                }
-            };
-            var collectMapEntries = function () {
-                var maps = [];
-                for (var _i = 0; _i < arguments.length; _i++) {
-                    maps[_i] = arguments[_i];
-                }
-                for (var _a = 0, maps_1 = maps; _a < maps_1.length; _a++) {
-                    var map = maps_1[_a];
-                    if (typeof map === 'object') {
-                        for (var key in map) {
-                            var entry = map[key];
-                            if (typeof entry === 'object') {
-                                toWalk.push(entry);
+        }
+        return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {
+            if (schema && node) {
+                var matchingSchemas = doc.getMatchingSchemas(schema.schema, node.offset);
+                var title_1 = undefined;
+                var markdownDescription_1 = undefined;
+                var markdownEnumValueDescription_1 = undefined, enumValue_1 = undefined;
+                matchingSchemas.every(function (s) {
+                    if (s.node === node && !s.inverted && s.schema) {
+                        title_1 = title_1 || s.schema.title;
+                        markdownDescription_1 = markdownDescription_1 || s.schema.markdownDescription || toMarkdown(s.schema.description);
+                        if (s.schema.enum) {
+                            var idx = s.schema.enum.indexOf(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](node));
+                            if (s.schema.markdownEnumDescriptions) {
+                                markdownEnumValueDescription_1 = s.schema.markdownEnumDescriptions[idx];
+                            }
+                            else if (s.schema.enumDescriptions) {
+                                markdownEnumValueDescription_1 = toMarkdown(s.schema.enumDescriptions[idx]);
+                            }
+                            if (markdownEnumValueDescription_1) {
+                                enumValue_1 = s.schema.enum[idx];
+                                if (typeof enumValue_1 !== 'string') {
+                                    enumValue_1 = JSON.stringify(enumValue_1);
+                                }
                             }
                         }
                     }
+                    return true;
+                });
+                var result = '';
+                if (title_1) {
+                    result = toMarkdown(title_1);
                 }
-            };
-            var collectArrayEntries = function () {
-                var arrays = [];
-                for (var _i = 0; _i < arguments.length; _i++) {
-                    arrays[_i] = arguments[_i];
+                if (markdownDescription_1) {
+                    if (result.length > 0) {
+                        result += "\n\n";
+                    }
+                    result += markdownDescription_1;
                 }
-                for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {
-                    var array = arrays_1[_a];
-                    if (Array.isArray(array)) {
-                        for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {
-                            var entry = array_1[_b];
-                            if (typeof entry === 'object') {
-                                toWalk.push(entry);
-                            }
-                        }
+                if (markdownEnumValueDescription_1) {
+                    if (result.length > 0) {
+                        result += "\n\n";
                     }
+                    result += "`" + toMarkdownCodeBlock(enumValue_1) + "`: " + markdownEnumValueDescription_1;
                 }
-            };
-            var handleRef = function (next) {
-                var seenRefs = [];
-                while (next.$ref) {
-                    var ref = next.$ref;
-                    var segments = ref.split('#', 2);
-                    delete next.$ref;
-                    if (segments[0].length > 0) {
-                        openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentSchemaURL, parentSchemaDependencies));
-                        return;
+                return createHover([result]);
+            }
+            return null;
+        });
+    };
+    return JSONHover;
+}());
+
+function toMarkdown(plain) {
+    if (plain) {
+        var res = plain.replace(/([^\n\r])(\r?\n)([^\n\r])/gm, '$1\n\n$3'); // single new lines to \n\n (Markdown paragraph)
+        return res.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
+    }
+    return undefined;
+}
+function toMarkdownCodeBlock(content) {
+    // see https://daringfireball.net/projects/markdown/syntax#precode
+    if (content.indexOf('`') !== -1) {
+        return '`` ' + content + ' ``';
+    }
+    return content;
+}
+
+
+/***/ }),
+/* 105 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONValidation", function() { return JSONValidation; });
+/* harmony import */ var _jsonSchemaService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(106);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(101);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_2__);
+/* harmony import */ var _utils_objects__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98);
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+
+
+
+var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_2__["loadMessageBundle"]();
+var JSONValidation = /** @class */ (function () {
+    function JSONValidation(jsonSchemaService, promiseConstructor) {
+        this.jsonSchemaService = jsonSchemaService;
+        this.promise = promiseConstructor;
+        this.validationEnabled = true;
+    }
+    JSONValidation.prototype.configure = function (raw) {
+        if (raw) {
+            this.validationEnabled = raw.validate;
+            this.commentSeverity = raw.allowComments ? undefined : _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Error;
+        }
+    };
+    JSONValidation.prototype.doValidation = function (textDocument, jsonDocument, documentSettings, schema) {
+        var _this = this;
+        if (!this.validationEnabled) {
+            return this.promise.resolve([]);
+        }
+        var diagnostics = [];
+        var added = {};
+        var addProblem = function (problem) {
+            // remove duplicated messages
+            var signature = problem.range.start.line + ' ' + problem.range.start.character + ' ' + problem.message;
+            if (!added[signature]) {
+                added[signature] = true;
+                diagnostics.push(problem);
+            }
+        };
+        var getDiagnostics = function (schema) {
+            var trailingCommaSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.trailingCommas) : _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Error;
+            var commentSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.comments) : _this.commentSeverity;
+            if (schema) {
+                if (schema.errors.length && jsonDocument.root) {
+                    var astRoot = jsonDocument.root;
+                    var property = astRoot.type === 'object' ? astRoot.properties[0] : undefined;
+                    if (property && property.keyNode.value === '$schema') {
+                        var node = property.valueNode || property;
+                        var range = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Range"].create(textDocument.positionAt(node.offset), textDocument.positionAt(node.offset + node.length));
+                        addProblem(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Diagnostic"].create(range, schema.errors[0], _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Warning, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ErrorCode"].SchemaResolveError));
                     }
                     else {
-                        if (seenRefs.indexOf(ref) === -1) {
-                            merge(next, parentSchema, parentSchemaURL, segments[1]); // can set next.$ref again, use seenRefs to avoid circle
-                            seenRefs.push(ref);
-                        }
+                        var range = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Range"].create(textDocument.positionAt(astRoot.offset), textDocument.positionAt(astRoot.offset + 1));
+                        addProblem(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Diagnostic"].create(range, schema.errors[0], _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Warning, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ErrorCode"].SchemaResolveError));
                     }
                 }
-                collectEntries(next.items, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);
-                collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);
-                collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);
-            };
-            while (toWalk.length) {
-                var next = toWalk.pop();
-                if (seen.indexOf(next) >= 0) {
-                    continue;
+                else {
+                    var semanticErrors = jsonDocument.validate(textDocument, schema.schema);
+                    if (semanticErrors) {
+                        semanticErrors.forEach(addProblem);
+                    }
                 }
-                seen.push(next);
-                handleRef(next);
-            }
-            return _this.promise.all(openPromises);
-        };
-        return resolveRefs(schema, schema, schemaURL, dependencies).then(function (_) { return new ResolvedSchema(schema, resolveErrors); });
-    };
-    JSONSchemaService.prototype.getSchemaForResource = function (resource, document) {
-        // first use $schema if present
-        if (document && document.root && document.root.type === 'object') {
-            var schemaProperties = document.root.properties.filter(function (p) { return (p.keyNode.value === '$schema') && p.valueNode && p.valueNode.type === 'string'; });
-            if (schemaProperties.length > 0) {
-                var schemeId = _parser_jsonParser__WEBPACK_IMPORTED_MODULE_3__["getNodeValue"](schemaProperties[0].valueNode);
-                if (schemeId && _utils_strings__WEBPACK_IMPORTED_MODULE_2__["startsWith"](schemeId, '.') && this.contextService) {
-                    schemeId = this.contextService.resolveRelativePath(schemeId, resource);
+                if (schemaAllowsComments(schema.schema)) {
+                    commentSeverity = undefined;
                 }
-                if (schemeId) {
-                    var id = this.normalizeId(schemeId);
-                    return this.getOrAddSchemaHandle(id).getResolvedSchema();
+                if (schemaAllowsTrailingCommas(schema.schema)) {
+                    trailingCommaSeverity = undefined;
+                }
+            }
+            for (var _i = 0, _a = jsonDocument.syntaxErrors; _i < _a.length; _i++) {
+                var p = _a[_i];
+                if (p.code === _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ErrorCode"].TrailingComma) {
+                    if (typeof trailingCommaSeverity !== 'number') {
+                        continue;
+                    }
+                    p.severity = trailingCommaSeverity;
                 }
+                addProblem(p);
+            }
+            if (typeof commentSeverity === 'number') {
+                var message_1 = localize('InvalidCommentToken', 'Comments are not permitted in JSON.');
+                jsonDocument.comments.forEach(function (c) {
+                    addProblem(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Diagnostic"].create(c, message_1, commentSeverity, _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["ErrorCode"].CommentNotPermitted));
+                });
             }
+            return diagnostics;
+        };
+        if (schema) {
+            var id = schema.id || ('schemaservice://untitled/' + idCounter++);
+            return this.jsonSchemaService.resolveSchemaContent(new _jsonSchemaService__WEBPACK_IMPORTED_MODULE_0__["UnresolvedSchema"](schema), id, {}).then(function (resolvedSchema) {
+                return getDiagnostics(resolvedSchema);
+            });
+        }
+        return this.jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(function (schema) {
+            return getDiagnostics(schema);
+        });
+    };
+    return JSONValidation;
+}());
+
+var idCounter = 0;
+function schemaAllowsComments(schemaRef) {
+    if (schemaRef && typeof schemaRef === 'object') {
+        if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_3__["isBoolean"])(schemaRef.allowComments)) {
+            return schemaRef.allowComments;
         }
-        var seen = Object.create(null);
-        var schemas = [];
-        for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) {
-            var entry = _a[_i];
-            if (entry.matchesPattern(resource)) {
-                for (var _b = 0, _c = entry.getSchemas(); _b < _c.length; _b++) {
-                    var schemaId = _c[_b];
-                    if (!seen[schemaId]) {
-                        schemas.push(schemaId);
-                        seen[schemaId] = true;
-                    }
+        if (schemaRef.allOf) {
+            for (var _i = 0, _a = schemaRef.allOf; _i < _a.length; _i++) {
+                var schema = _a[_i];
+                var allow = schemaAllowsComments(schema);
+                if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_3__["isBoolean"])(allow)) {
+                    return allow;
                 }
             }
         }
-        if (schemas.length > 0) {
-            return this.createCombinedSchema(resource, schemas).getResolvedSchema();
-        }
-        return this.promise.resolve(null);
-    };
-    JSONSchemaService.prototype.createCombinedSchema = function (resource, schemaIds) {
-        if (schemaIds.length === 1) {
-            return this.getOrAddSchemaHandle(schemaIds[0]);
+    }
+    return undefined;
+}
+function schemaAllowsTrailingCommas(schemaRef) {
+    if (schemaRef && typeof schemaRef === 'object') {
+        if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_3__["isBoolean"])(schemaRef.allowTrailingCommas)) {
+            return schemaRef.allowTrailingCommas;
         }
-        else {
-            var combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource);
-            var combinedSchema = {
-                allOf: schemaIds.map(function (schemaId) { return ({ $ref: schemaId }); })
-            };
-            return this.addSchemaHandle(combinedSchemaId, combinedSchema);
+        var deprSchemaRef = schemaRef;
+        if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_3__["isBoolean"])(deprSchemaRef['allowsTrailingCommas'])) { // deprecated
+            return deprSchemaRef['allowsTrailingCommas'];
         }
-    };
-    return JSONSchemaService;
-}());
-
-function toDisplayString(url) {
-    try {
-        var uri = vscode_uri__WEBPACK_IMPORTED_MODULE_1__["URI"].parse(url);
-        if (uri.scheme === 'file') {
-            return uri.fsPath;
+        if (schemaRef.allOf) {
+            for (var _i = 0, _a = schemaRef.allOf; _i < _a.length; _i++) {
+                var schema = _a[_i];
+                var allow = schemaAllowsTrailingCommas(schema);
+                if (Object(_utils_objects__WEBPACK_IMPORTED_MODULE_3__["isBoolean"])(allow)) {
+                    return allow;
+                }
+            }
         }
     }
-    catch (e) {
-        // ignore
+    return undefined;
+}
+function toDiagnosticSeverity(severityLevel) {
+    switch (severityLevel) {
+        case 'error': return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Error;
+        case 'warning': return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["DiagnosticSeverity"].Warning;
+        case 'ignore': return undefined;
     }
-    return url;
+    return undefined;
 }
 
 
 /***/ }),
-/* 95 */
+/* 106 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUriThrowOnMissingScheme", function() { return setUriThrowOnMissingScheme; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnresolvedSchema", function() { return UnresolvedSchema; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResolvedSchema", function() { return ResolvedSchema; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONSchemaService", function() { return JSONSchemaService; });
+/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93);
+/* harmony import */ var vscode_uri__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35);
+/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(103);
+/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(101);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_4__);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
 
-var __extends = (undefined && undefined.__extends) || (function () {
-    var extendStatics = Object.setPrototypeOf ||
-        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
-        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-    return function (d, b) {
-        extendStatics(d, b);
-        function __() { this.constructor = d; }
-        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-    };
-})();
-var isWindows;
-if (typeof process === 'object') {
-    isWindows = process.platform === 'win32';
-}
-else if (typeof navigator === 'object') {
-    var userAgent = navigator.userAgent;
-    isWindows = userAgent.indexOf('Windows') >= 0;
-}
-//#endregion
-var _schemePattern = /^\w[\w\d+.-]*$/;
-var _singleSlashStart = /^\//;
-var _doubleSlashStart = /^\/\//;
-var _throwOnMissingSchema = true;
-/**
- * @internal
- */
-function setUriThrowOnMissingScheme(value) {
-    var old = _throwOnMissingSchema;
-    _throwOnMissingSchema = value;
-    return old;
-}
-function _validateUri(ret, _strict) {
-    // scheme, must be set
-    if (!ret.scheme) {
-        if (_strict || _throwOnMissingSchema) {
-            throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
+
+
+
+
+var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_4__["loadMessageBundle"]();
+var FilePatternAssociation = /** @class */ (function () {
+    function FilePatternAssociation(pattern, uris) {
+        this.patternRegExps = [];
+        this.isInclude = [];
+        try {
+            for (var _i = 0, pattern_1 = pattern; _i < pattern_1.length; _i++) {
+                var p = pattern_1[_i];
+                var include = p[0] !== '!';
+                if (!include) {
+                    p = p.substring(1);
+                }
+                this.patternRegExps.push(new RegExp(_utils_strings__WEBPACK_IMPORTED_MODULE_2__["convertSimple2RegExpPattern"](p) + '$'));
+                this.isInclude.push(include);
+            }
+            this.uris = uris;
         }
-        else {
-            // console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
+        catch (e) {
+            // invalid pattern
+            this.patternRegExps.length = 0;
+            this.isInclude.length = 0;
+            this.uris = [];
         }
     }
-    // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
-    // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
-    if (ret.scheme && !_schemePattern.test(ret.scheme)) {
-        throw new Error('[UriError]: Scheme contains illegal characters.');
-    }
-    // path, http://tools.ietf.org/html/rfc3986#section-3.3
-    // If a URI contains an authority component, then the path component
-    // must either be empty or begin with a slash ("/") character.  If a URI
-    // does not contain an authority component, then the path cannot begin
-    // with two slash characters ("//").
-    if (ret.path) {
-        if (ret.authority) {
-            if (!_singleSlashStart.test(ret.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');
+    FilePatternAssociation.prototype.matchesPattern = function (fileName) {
+        var match = false;
+        for (var i = 0; i < this.patternRegExps.length; i++) {
+            var regExp = this.patternRegExps[i];
+            if (regExp.test(fileName)) {
+                match = this.isInclude[i];
             }
         }
-        else {
-            if (_doubleSlashStart.test(ret.path)) {
-                throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
-            }
+        return match;
+    };
+    FilePatternAssociation.prototype.getURIs = function () {
+        return this.uris;
+    };
+    return FilePatternAssociation;
+}());
+var SchemaHandle = /** @class */ (function () {
+    function SchemaHandle(service, url, unresolvedSchemaContent) {
+        this.service = service;
+        this.url = url;
+        this.dependencies = {};
+        if (unresolvedSchemaContent) {
+            this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent));
         }
     }
-}
-// for a while we allowed uris *without* schemes and this is the migration
-// for them, e.g. an uri without scheme and without strict-mode warns and falls
-// back to the file-scheme. that should cause the least carnage and still be a
-// clear warning
-function _schemeFix(scheme, _strict) {
-    if (_strict || _throwOnMissingSchema) {
-        return scheme || _empty;
-    }
-    if (!scheme) {
-        // console.trace('BAD uri lacks scheme, falling back to file-scheme.');
-        scheme = 'file';
-    }
-    return scheme;
-}
-// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
-function _referenceResolution(scheme, path) {
-    // the slash-character is our 'default base' as we don't
-    // support constructing URIs relative to other URIs. This
-    // also means that we alter and potentially break paths.
-    // see https://tools.ietf.org/html/rfc3986#section-5.1.4
-    switch (scheme) {
-        case 'https':
-        case 'http':
-        case 'file':
-            if (!path) {
-                path = _slash;
-            }
-            else if (path[0] !== _slash) {
-                path = _slash + path;
-            }
-            break;
-    }
-    return path;
-}
-var _empty = '';
-var _slash = '/';
-var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
-function _isQueryStringScheme(scheme) {
-    if (!scheme) {
-        return false;
+    SchemaHandle.prototype.getUnresolvedSchema = function () {
+        if (!this.unresolvedSchema) {
+            this.unresolvedSchema = this.service.loadSchema(this.url);
+        }
+        return this.unresolvedSchema;
+    };
+    SchemaHandle.prototype.getResolvedSchema = function () {
+        var _this = this;
+        if (!this.resolvedSchema) {
+            this.resolvedSchema = this.getUnresolvedSchema().then(function (unresolved) {
+                return _this.service.resolveSchemaContent(unresolved, _this.url, _this.dependencies);
+            });
+        }
+        return this.resolvedSchema;
+    };
+    SchemaHandle.prototype.clearSchema = function () {
+        this.resolvedSchema = undefined;
+        this.unresolvedSchema = undefined;
+        this.dependencies = {};
+    };
+    return SchemaHandle;
+}());
+var UnresolvedSchema = /** @class */ (function () {
+    function UnresolvedSchema(schema, errors) {
+        if (errors === void 0) { errors = []; }
+        this.schema = schema;
+        this.errors = errors;
     }
-    switch (scheme.toLowerCase()) {
-        case 'http':
-        case 'https':
-        case 'ftp':
-            return true;
+    return UnresolvedSchema;
+}());
+
+var ResolvedSchema = /** @class */ (function () {
+    function ResolvedSchema(schema, errors) {
+        if (errors === void 0) { errors = []; }
+        this.schema = schema;
+        this.errors = errors;
     }
-    return false;
-}
-/**
- * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
- * This class is a simple parser which creates the basic component parts
- * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
- * and encoding.
- *
- *       foo://example.com:8042/over/there?name=ferret#nose
- *       \_/   \______________/\_________/ \_________/ \__/
- *        |           |            |            |        |
- *     scheme     authority       path        query   fragment
- *        |   _____________________|__
- *       / \ /                        \
- *       urn:example:animal:ferret:nose
- */
-var URI = (function () {
-    /**
-     * @internal
-     */
-    function URI(schemeOrData, authority, path, query, fragment, _strict) {
-        if (_strict === void 0) { _strict = false; }
-        if (typeof schemeOrData === 'object') {
-            this.scheme = schemeOrData.scheme || _empty;
-            this.authority = schemeOrData.authority || _empty;
-            this.path = schemeOrData.path || _empty;
-            this.query = schemeOrData.query || _empty;
-            this.fragment = schemeOrData.fragment || _empty;
-            // no validation because it's this URI
-            // that creates uri components.
-            // _validateUri(this);
+    ResolvedSchema.prototype.getSection = function (path) {
+        var schemaRef = this.getSectionRecursive(path, this.schema);
+        if (schemaRef) {
+            return _parser_jsonParser__WEBPACK_IMPORTED_MODULE_3__["asSchema"](schemaRef);
         }
-        else {
-            this.scheme = _schemeFix(schemeOrData, _strict);
-            this.authority = authority || _empty;
-            this.path = _referenceResolution(this.scheme, path || _empty);
-            this.query = query || _empty;
-            this.fragment = fragment || _empty;
-            _validateUri(this, _strict);
+        return undefined;
+    };
+    ResolvedSchema.prototype.getSectionRecursive = function (path, schema) {
+        if (!schema || typeof schema === 'boolean' || path.length === 0) {
+            return schema;
         }
-    }
-    URI.isUri = function (thing) {
-        if (thing instanceof URI) {
-            return true;
+        var next = path.shift();
+        if (schema.properties && typeof schema.properties[next]) {
+            return this.getSectionRecursive(path, schema.properties[next]);
+        }
+        else if (schema.patternProperties) {
+            for (var _i = 0, _a = Object.keys(schema.patternProperties); _i < _a.length; _i++) {
+                var pattern = _a[_i];
+                var regex = new RegExp(pattern);
+                if (regex.test(next)) {
+                    return this.getSectionRecursive(path, schema.patternProperties[pattern]);
+                }
+            }
+        }
+        else if (typeof schema.additionalProperties === 'object') {
+            return this.getSectionRecursive(path, schema.additionalProperties);
         }
-        if (!thing) {
-            return false;
+        else if (next.match('[0-9]+')) {
+            if (Array.isArray(schema.items)) {
+                var index = parseInt(next, 10);
+                if (!isNaN(index) && schema.items[index]) {
+                    return this.getSectionRecursive(path, schema.items[index]);
+                }
+            }
+            else if (schema.items) {
+                return this.getSectionRecursive(path, schema.items);
+            }
         }
-        return typeof thing.authority === 'string'
-            && typeof thing.fragment === 'string'
-            && typeof thing.path === 'string'
-            && typeof thing.query === 'string'
-            && typeof thing.scheme === 'string'
-            && typeof thing.fsPath === 'function'
-            && typeof thing.with === 'function'
-            && typeof thing.toString === 'function';
+        return undefined;
     };
-    Object.defineProperty(URI.prototype, "fsPath", {
-        // ---- filesystem path -----------------------
-        /**
-         * Returns a string representing the corresponding file system path of this URI.
-         * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
-         * platform specific path separator.
-         *
-         * * Will *not* validate the path for invalid characters and semantics.
-         * * Will *not* look at the scheme of this URI.
-         * * The result shall *not* be used for display purposes but for accessing a file on disk.
-         *
-         *
-         * The *difference* to `URI#path` is the use of the platform specific separator and the handling
-         * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
-         *
-         * ```ts
-            const u = URI.parse('file://server/c$/folder/file.txt')
-            u.authority === 'server'
-            u.path === '/shares/c$/file.txt'
-            u.fsPath === '\\server\c$\folder\file.txt'
-        ```
-         *
-         * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
-         * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
-         * with URIs that represent files on disk (`file` scheme).
-         */
+    return ResolvedSchema;
+}());
+
+var JSONSchemaService = /** @class */ (function () {
+    function JSONSchemaService(requestService, contextService, promiseConstructor) {
+        this.contextService = contextService;
+        this.requestService = requestService;
+        this.promiseConstructor = promiseConstructor || Promise;
+        this.callOnDispose = [];
+        this.contributionSchemas = {};
+        this.contributionAssociations = [];
+        this.schemasById = {};
+        this.filePatternAssociations = [];
+        this.registeredSchemasIds = {};
+    }
+    JSONSchemaService.prototype.getRegisteredSchemaIds = function (filter) {
+        return Object.keys(this.registeredSchemasIds).filter(function (id) {
+            var scheme = vscode_uri__WEBPACK_IMPORTED_MODULE_1__["URI"].parse(id).scheme;
+            return scheme !== 'schemaservice' && (!filter || filter(scheme));
+        });
+    };
+    Object.defineProperty(JSONSchemaService.prototype, "promise", {
         get: function () {
-            // if (this.scheme !== 'file') {
-            //         console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
-            // }
-            return _makeFsPath(this);
+            return this.promiseConstructor;
         },
-        enumerable: true,
+        enumerable: false,
         configurable: true
     });
-    // ---- modify to new -------------------------
-    URI.prototype.with = function (change) {
-        if (!change) {
-            return this;
-        }
-        var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
-        if (scheme === undefined) {
-            scheme = this.scheme;
-        }
-        else if (scheme === null) {
-            scheme = _empty;
+    JSONSchemaService.prototype.dispose = function () {
+        while (this.callOnDispose.length > 0) {
+            this.callOnDispose.pop()();
         }
-        if (authority === undefined) {
-            authority = this.authority;
+    };
+    JSONSchemaService.prototype.onResourceChange = function (uri) {
+        var _this = this;
+        var hasChanges = false;
+        uri = normalizeId(uri);
+        var toWalk = [uri];
+        var all = Object.keys(this.schemasById).map(function (key) { return _this.schemasById[key]; });
+        while (toWalk.length) {
+            var curr = toWalk.pop();
+            for (var i = 0; i < all.length; i++) {
+                var handle = all[i];
+                if (handle && (handle.url === curr || handle.dependencies[curr])) {
+                    if (handle.url !== curr) {
+                        toWalk.push(handle.url);
+                    }
+                    handle.clearSchema();
+                    all[i] = undefined;
+                    hasChanges = true;
+                }
+            }
         }
-        else if (authority === null) {
-            authority = _empty;
+        return hasChanges;
+    };
+    JSONSchemaService.prototype.setSchemaContributions = function (schemaContributions) {
+        if (schemaContributions.schemas) {
+            var schemas = schemaContributions.schemas;
+            for (var id in schemas) {
+                var normalizedId = normalizeId(id);
+                this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]);
+            }
         }
-        if (path === undefined) {
-            path = this.path;
+        if (Array.isArray(schemaContributions.schemaAssociations)) {
+            var schemaAssociations = schemaContributions.schemaAssociations;
+            for (var _i = 0, schemaAssociations_1 = schemaAssociations; _i < schemaAssociations_1.length; _i++) {
+                var schemaAssociation = schemaAssociations_1[_i];
+                var uris = schemaAssociation.uris.map(normalizeId);
+                var association = this.addFilePatternAssociation(schemaAssociation.pattern, uris);
+                this.contributionAssociations.push(association);
+            }
         }
-        else if (path === null) {
-            path = _empty;
+    };
+    JSONSchemaService.prototype.addSchemaHandle = function (id, unresolvedSchemaContent) {
+        var schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent);
+        this.schemasById[id] = schemaHandle;
+        return schemaHandle;
+    };
+    JSONSchemaService.prototype.getOrAddSchemaHandle = function (id, unresolvedSchemaContent) {
+        return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent);
+    };
+    JSONSchemaService.prototype.addFilePatternAssociation = function (pattern, uris) {
+        var fpa = new FilePatternAssociation(pattern, uris);
+        this.filePatternAssociations.push(fpa);
+        return fpa;
+    };
+    JSONSchemaService.prototype.registerExternalSchema = function (uri, filePatterns, unresolvedSchemaContent) {
+        var id = normalizeId(uri);
+        this.registeredSchemasIds[id] = true;
+        this.cachedSchemaForResource = undefined;
+        if (filePatterns) {
+            this.addFilePatternAssociation(filePatterns, [uri]);
         }
-        if (query === undefined) {
-            query = this.query;
+        return unresolvedSchemaContent ? this.addSchemaHandle(id, unresolvedSchemaContent) : this.getOrAddSchemaHandle(id);
+    };
+    JSONSchemaService.prototype.clearExternalSchemas = function () {
+        this.schemasById = {};
+        this.filePatternAssociations = [];
+        this.registeredSchemasIds = {};
+        this.cachedSchemaForResource = undefined;
+        for (var id in this.contributionSchemas) {
+            this.schemasById[id] = this.contributionSchemas[id];
+            this.registeredSchemasIds[id] = true;
         }
-        else if (query === null) {
-            query = _empty;
+        for (var _i = 0, _a = this.contributionAssociations; _i < _a.length; _i++) {
+            var contributionAssociation = _a[_i];
+            this.filePatternAssociations.push(contributionAssociation);
         }
-        if (fragment === undefined) {
-            fragment = this.fragment;
+    };
+    JSONSchemaService.prototype.getResolvedSchema = function (schemaId) {
+        var id = normalizeId(schemaId);
+        var schemaHandle = this.schemasById[id];
+        if (schemaHandle) {
+            return schemaHandle.getResolvedSchema();
         }
-        else if (fragment === null) {
-            fragment = _empty;
+        return this.promise.resolve(undefined);
+    };
+    JSONSchemaService.prototype.loadSchema = function (url) {
+        if (!this.requestService) {
+            var errorMessage = localize('json.schema.norequestservice', 'Unable to load schema from \'{0}\'. No schema request service available', toDisplayString(url));
+            return this.promise.resolve(new UnresolvedSchema({}, [errorMessage]));
         }
-        if (scheme === this.scheme
-            && authority === this.authority
-            && path === this.path
-            && query === this.query
-            && fragment === this.fragment) {
-            return this;
+        return this.requestService(url).then(function (content) {
+            if (!content) {
+                var errorMessage = localize('json.schema.nocontent', 'Unable to load schema from \'{0}\': No content.', toDisplayString(url));
+                return new UnresolvedSchema({}, [errorMessage]);
+            }
+            var schemaContent = {};
+            var jsonErrors = [];
+            schemaContent = jsonc_parser__WEBPACK_IMPORTED_MODULE_0__["parse"](content, jsonErrors);
+            var errors = jsonErrors.length ? [localize('json.schema.invalidFormat', 'Unable to parse content from \'{0}\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)] : [];
+            return new UnresolvedSchema(schemaContent, errors);
+        }, function (error) {
+            var errorMessage = error.toString();
+            var errorSplit = error.toString().split('Error: ');
+            if (errorSplit.length > 1) {
+                // more concise error message, URL and context are attached by caller anyways
+                errorMessage = errorSplit[1];
+            }
+            if (_utils_strings__WEBPACK_IMPORTED_MODULE_2__["endsWith"](errorMessage, '.')) {
+                errorMessage = errorMessage.substr(0, errorMessage.length - 1);
+            }
+            return new UnresolvedSchema({}, [localize('json.schema.nocontent', 'Unable to load schema from \'{0}\': {1}.', toDisplayString(url), errorMessage)]);
+        });
+    };
+    JSONSchemaService.prototype.resolveSchemaContent = function (schemaToResolve, schemaURL, dependencies) {
+        var _this = this;
+        var resolveErrors = schemaToResolve.errors.slice(0);
+        var schema = schemaToResolve.schema;
+        if (schema.$schema) {
+            var id = normalizeId(schema.$schema);
+            if (id === 'http://json-schema.org/draft-03/schema') {
+                return this.promise.resolve(new ResolvedSchema({}, [localize('json.schema.draft03.notsupported', "Draft-03 schemas are not supported.")]));
+            }
+            else if (id === 'https://json-schema.org/draft/2019-09/schema') {
+                resolveErrors.push(localize('json.schema.draft201909.notsupported', "Draft 2019-09 schemas are not yet fully supported."));
+            }
         }
-        return new _URI(scheme, authority, path, query, fragment);
+        var contextService = this.contextService;
+        var findSection = function (schema, path) {
+            if (!path) {
+                return schema;
+            }
+            var current = schema;
+            if (path[0] === '/') {
+                path = path.substr(1);
+            }
+            path.split('/').some(function (part) {
+                current = current[part];
+                return !current;
+            });
+            return current;
+        };
+        var merge = function (target, sourceRoot, sourceURI, refSegment) {
+            var path = refSegment ? decodeURIComponent(refSegment) : undefined;
+            var section = findSection(sourceRoot, path);
+            if (section) {
+                for (var key in section) {
+                    if (section.hasOwnProperty(key) && !target.hasOwnProperty(key)) {
+                        target[key] = section[key];
+                    }
+                }
+            }
+            else {
+                resolveErrors.push(localize('json.schema.invalidref', '$ref \'{0}\' in \'{1}\' can not be resolved.', path, sourceURI));
+            }
+        };
+        var resolveExternalLink = function (node, uri, refSegment, parentSchemaURL, parentSchemaDependencies) {
+            if (contextService && !/^\w+:\/\/.*/.test(uri)) {
+                uri = contextService.resolveRelativePath(uri, parentSchemaURL);
+            }
+            uri = normalizeId(uri);
+            var referencedHandle = _this.getOrAddSchemaHandle(uri);
+            return referencedHandle.getUnresolvedSchema().then(function (unresolvedSchema) {
+                parentSchemaDependencies[uri] = true;
+                if (unresolvedSchema.errors.length) {
+                    var loc = refSegment ? uri + '#' + refSegment : uri;
+                    resolveErrors.push(localize('json.schema.problemloadingref', 'Problems loading reference \'{0}\': {1}', loc, unresolvedSchema.errors[0]));
+                }
+                merge(node, unresolvedSchema.schema, uri, refSegment);
+                return resolveRefs(node, unresolvedSchema.schema, uri, referencedHandle.dependencies);
+            });
+        };
+        var resolveRefs = function (node, parentSchema, parentSchemaURL, parentSchemaDependencies) {
+            if (!node || typeof node !== 'object') {
+                return Promise.resolve(null);
+            }
+            var toWalk = [node];
+            var seen = [];
+            var openPromises = [];
+            var collectEntries = function () {
+                var entries = [];
+                for (var _i = 0; _i < arguments.length; _i++) {
+                    entries[_i] = arguments[_i];
+                }
+                for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) {
+                    var entry = entries_1[_a];
+                    if (typeof entry === 'object') {
+                        toWalk.push(entry);
+                    }
+                }
+            };
+            var collectMapEntries = function () {
+                var maps = [];
+                for (var _i = 0; _i < arguments.length; _i++) {
+                    maps[_i] = arguments[_i];
+                }
+                for (var _a = 0, maps_1 = maps; _a < maps_1.length; _a++) {
+                    var map = maps_1[_a];
+                    if (typeof map === 'object') {
+                        for (var k in map) {
+                            var key = k;
+                            var entry = map[key];
+                            if (typeof entry === 'object') {
+                                toWalk.push(entry);
+                            }
+                        }
+                    }
+                }
+            };
+            var collectArrayEntries = function () {
+                var arrays = [];
+                for (var _i = 0; _i < arguments.length; _i++) {
+                    arrays[_i] = arguments[_i];
+                }
+                for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {
+                    var array = arrays_1[_a];
+                    if (Array.isArray(array)) {
+                        for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {
+                            var entry = array_1[_b];
+                            if (typeof entry === 'object') {
+                                toWalk.push(entry);
+                            }
+                        }
+                    }
+                }
+            };
+            var handleRef = function (next) {
+                var seenRefs = [];
+                while (next.$ref) {
+                    var ref = next.$ref;
+                    var segments = ref.split('#', 2);
+                    delete next.$ref;
+                    if (segments[0].length > 0) {
+                        openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentSchemaURL, parentSchemaDependencies));
+                        return;
+                    }
+                    else {
+                        if (seenRefs.indexOf(ref) === -1) {
+                            merge(next, parentSchema, parentSchemaURL, segments[1]); // can set next.$ref again, use seenRefs to avoid circle
+                            seenRefs.push(ref);
+                        }
+                    }
+                }
+                collectEntries(next.items, next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);
+                collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);
+                collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);
+            };
+            while (toWalk.length) {
+                var next = toWalk.pop();
+                if (seen.indexOf(next) >= 0) {
+                    continue;
+                }
+                seen.push(next);
+                handleRef(next);
+            }
+            return _this.promise.all(openPromises);
+        };
+        return resolveRefs(schema, schema, schemaURL, dependencies).then(function (_) { return new ResolvedSchema(schema, resolveErrors); });
     };
-    // ---- parse & validate ------------------------
-    /**
-     * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
-     * `file:///usr/home`, or `scheme:with/path`.
-     *
-     * @param value A string which represents an URI (see `URI#toString`).
-     */
-    URI.parse = function (value, _strict) {
-        if (_strict === void 0) { _strict = false; }
-        var match = _regexp.exec(value);
-        if (!match) {
-            return new _URI(_empty, _empty, _empty, _empty, _empty, _strict);
+    JSONSchemaService.prototype.getSchemaForResource = function (resource, document) {
+        // first use $schema if present
+        if (document && document.root && document.root.type === 'object') {
+            var schemaProperties = document.root.properties.filter(function (p) { return (p.keyNode.value === '$schema') && p.valueNode && p.valueNode.type === 'string'; });
+            if (schemaProperties.length > 0) {
+                var valueNode = schemaProperties[0].valueNode;
+                if (valueNode && valueNode.type === 'string') {
+                    var schemeId = _parser_jsonParser__WEBPACK_IMPORTED_MODULE_3__["getNodeValue"](valueNode);
+                    if (schemeId && _utils_strings__WEBPACK_IMPORTED_MODULE_2__["startsWith"](schemeId, '.') && this.contextService) {
+                        schemeId = this.contextService.resolveRelativePath(schemeId, resource);
+                    }
+                    if (schemeId) {
+                        var id = normalizeId(schemeId);
+                        return this.getOrAddSchemaHandle(id).getResolvedSchema();
+                    }
+                }
+            }
         }
-        return new _URI(match[2] || _empty, decodeURIComponentFast(match[4] || _empty, false, false), decodeURIComponentFast(match[5] || _empty, true, false), decodeURIComponentFast(match[7] || _empty, false, _isQueryStringScheme(match[2])), decodeURIComponentFast(match[9] || _empty, false, false), _strict);
-    };
-    /**
-     * Creates a new URI from a file system path, e.g. `c:\my\files`,
-     * `/usr/home`, or `\\server\share\some\path`.
-     *
-     * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
-     * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
-     * `URI.parse('file://' + path)` because the path might contain characters that are
-     * interpreted (# and ?). See the following sample:
-     * ```ts
-    const good = URI.file('/coding/c#/project1');
-    good.scheme === 'file';
-    good.path === '/coding/c#/project1';
-    good.fragment === '';
-    const bad = URI.parse('file://' + '/coding/c#/project1');
-    bad.scheme === 'file';
-    bad.path === '/coding/c'; // path is now broken
-    bad.fragment === '/project1';
-    ```
-     *
-     * @param path A file system path (see `URI#fsPath`)
-     */
-    URI.file = function (path) {
-        var authority = _empty;
-        // normalize to fwd-slashes on windows,
-        // on other systems bwd-slashes are valid
-        // filename character, e.g. /f\oo/ba\r.txt
-        if (isWindows) {
-            path = path.replace(/\\/g, _slash);
+        if (this.cachedSchemaForResource && this.cachedSchemaForResource.resource === resource) {
+            return this.cachedSchemaForResource.resolvedSchema;
         }
-        // check for authority as used in UNC shares
-        // or use the path as given
-        if (path[0] === _slash && path[1] === _slash) {
-            var idx = path.indexOf(_slash, 2);
-            if (idx === -1) {
-                authority = path.substring(2);
-                path = _slash;
-            }
-            else {
-                authority = path.substring(2, idx);
-                path = path.substring(idx) || _slash;
+        var seen = Object.create(null);
+        var schemas = [];
+        for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) {
+            var entry = _a[_i];
+            if (entry.matchesPattern(resource)) {
+                for (var _b = 0, _c = entry.getURIs(); _b < _c.length; _b++) {
+                    var schemaId = _c[_b];
+                    if (!seen[schemaId]) {
+                        schemas.push(schemaId);
+                        seen[schemaId] = true;
+                    }
+                }
             }
         }
-        return new _URI('file', authority, path, _empty, _empty);
-    };
-    URI.from = function (components) {
-        return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
-    };
-    // ---- printing/externalize ---------------------------
-    /**
-     * Creates a string representation for this URI. It's guaranteed that calling
-     * `URI.parse` with the result of this function creates an URI which is equal
-     * to this URI.
-     *
-     * * The result shall *not* be used for display purposes but for externalization or transport.
-     * * The result will be encoded using the percentage encoding and encoding happens mostly
-     * ignore the scheme-specific encoding rules.
-     *
-     * @param skipEncoding Do not encode the result, default is `false`
-     */
-    URI.prototype.toString = function (skipEncoding) {
-        if (skipEncoding === void 0) { skipEncoding = false; }
-        return _asFormatted(this, skipEncoding);
+        var resolvedSchema = schemas.length > 0 ? this.createCombinedSchema(resource, schemas).getResolvedSchema() : this.promise.resolve(undefined);
+        this.cachedSchemaForResource = { resource: resource, resolvedSchema: resolvedSchema };
+        return resolvedSchema;
     };
-    URI.prototype.toJSON = function () {
-        return this;
-    };
-    URI.revive = function (data) {
-        if (!data) {
-            return data;
-        }
-        else if (data instanceof URI) {
-            return data;
+    JSONSchemaService.prototype.createCombinedSchema = function (resource, schemaIds) {
+        if (schemaIds.length === 1) {
+            return this.getOrAddSchemaHandle(schemaIds[0]);
         }
         else {
-            var result = new _URI(data);
-            result._formatted = data.external;
-            result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
-            return result;
+            var combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource);
+            var combinedSchema = {
+                allOf: schemaIds.map(function (schemaId) { return ({ $ref: schemaId }); })
+            };
+            return this.addSchemaHandle(combinedSchemaId, combinedSchema);
         }
     };
-    return URI;
+    JSONSchemaService.prototype.getMatchingSchemas = function (document, jsonDocument, schema) {
+        if (schema) {
+            var id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++);
+            return this.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {
+                return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(function (s) { return !s.inverted; });
+            });
+        }
+        return this.getSchemaForResource(document.uri, jsonDocument).then(function (schema) {
+            if (schema) {
+                return jsonDocument.getMatchingSchemas(schema.schema).filter(function (s) { return !s.inverted; });
+            }
+            return [];
+        });
+    };
+    return JSONSchemaService;
 }());
 
-var _pathSepMarker = isWindows ? 1 : undefined;
-// tslint:disable-next-line:class-name
-var _URI = (function (_super) {
-    __extends(_URI, _super);
-    function _URI() {
-        var _this = _super !== null && _super.apply(this, arguments) || this;
-        _this._formatted = null;
-        _this._fsPath = null;
-        return _this;
+var idCounter = 0;
+function normalizeId(id) {
+    // remove trailing '#', normalize drive capitalization
+    try {
+        return vscode_uri__WEBPACK_IMPORTED_MODULE_1__["URI"].parse(id).toString();
     }
-    Object.defineProperty(_URI.prototype, "fsPath", {
-        get: function () {
-            if (!this._fsPath) {
-                this._fsPath = _makeFsPath(this);
+    catch (e) {
+        return id;
+    }
+}
+function toDisplayString(url) {
+    try {
+        var uri = vscode_uri__WEBPACK_IMPORTED_MODULE_1__["URI"].parse(url);
+        if (uri.scheme === 'file') {
+            return uri.fsPath;
+        }
+    }
+    catch (e) {
+        // ignore
+    }
+    return url;
+}
+
+
+/***/ }),
+/* 107 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONDocumentSymbols", function() { return JSONDocumentSymbols; });
+/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92);
+/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(103);
+/* harmony import */ var _utils_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(108);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99);
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+
+
+
+var JSONDocumentSymbols = /** @class */ (function () {
+    function JSONDocumentSymbols(schemaService) {
+        this.schemaService = schemaService;
+    }
+    JSONDocumentSymbols.prototype.findDocumentSymbols = function (document, doc, context) {
+        var _this = this;
+        if (context === void 0) { context = { resultLimit: Number.MAX_VALUE }; }
+        var root = doc.root;
+        if (!root) {
+            return [];
+        }
+        var limit = context.resultLimit || Number.MAX_VALUE;
+        // special handling for key bindings
+        var resourceString = document.uri;
+        if ((resourceString === 'vscode://defaultsettings/keybindings.json') || _utils_strings__WEBPACK_IMPORTED_MODULE_1__["endsWith"](resourceString.toLowerCase(), '/user/keybindings.json')) {
+            if (root.type === 'array') {
+                var result_1 = [];
+                for (var _i = 0, _a = root.items; _i < _a.length; _i++) {
+                    var item = _a[_i];
+                    if (item.type === 'object') {
+                        for (var _b = 0, _c = item.properties; _b < _c.length; _b++) {
+                            var property = _c[_b];
+                            if (property.keyNode.value === 'key' && property.valueNode) {
+                                var location = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["Location"].create(document.uri, getRange(document, item));
+                                result_1.push({ name: _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](property.valueNode), kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Function, location: location });
+                                limit--;
+                                if (limit <= 0) {
+                                    if (context && context.onResultLimitExceeded) {
+                                        context.onResultLimitExceeded(resourceString);
+                                    }
+                                    return result_1;
+                                }
+                            }
+                        }
+                    }
+                }
+                return result_1;
+            }
+        }
+        var toVisit = [
+            { node: root, containerName: '' }
+        ];
+        var nextToVisit = 0;
+        var limitExceeded = false;
+        var result = [];
+        var collectOutlineEntries = function (node, containerName) {
+            if (node.type === 'array') {
+                node.items.forEach(function (node) {
+                    if (node) {
+                        toVisit.push({ node: node, containerName: containerName });
+                    }
+                });
             }
-            return this._fsPath;
-        },
-        enumerable: true,
-        configurable: true
-    });
-    _URI.prototype.toString = function (skipEncoding) {
-        if (skipEncoding === void 0) { skipEncoding = false; }
-        if (!skipEncoding) {
-            if (!this._formatted) {
-                this._formatted = _asFormatted(this, false);
+            else if (node.type === 'object') {
+                node.properties.forEach(function (property) {
+                    var valueNode = property.valueNode;
+                    if (valueNode) {
+                        if (limit > 0) {
+                            limit--;
+                            var location = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["Location"].create(document.uri, getRange(document, property));
+                            var childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value;
+                            result.push({ name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), location: location, containerName: containerName });
+                            toVisit.push({ node: valueNode, containerName: childContainerName });
+                        }
+                        else {
+                            limitExceeded = true;
+                        }
+                    }
+                });
             }
-            return this._formatted;
+        };
+        // breath first traversal
+        while (nextToVisit < toVisit.length) {
+            var next = toVisit[nextToVisit++];
+            collectOutlineEntries(next.node, next.containerName);
         }
-        else {
-            // we don't cache that
-            return _asFormatted(this, true);
+        if (limitExceeded && context && context.onResultLimitExceeded) {
+            context.onResultLimitExceeded(resourceString);
         }
+        return result;
     };
-    _URI.prototype.toJSON = function () {
-        var res = {
-            $mid: 1
+    JSONDocumentSymbols.prototype.findDocumentSymbols2 = function (document, doc, context) {
+        var _this = this;
+        if (context === void 0) { context = { resultLimit: Number.MAX_VALUE }; }
+        var root = doc.root;
+        if (!root) {
+            return [];
+        }
+        var limit = context.resultLimit || Number.MAX_VALUE;
+        // special handling for key bindings
+        var resourceString = document.uri;
+        if ((resourceString === 'vscode://defaultsettings/keybindings.json') || _utils_strings__WEBPACK_IMPORTED_MODULE_1__["endsWith"](resourceString.toLowerCase(), '/user/keybindings.json')) {
+            if (root.type === 'array') {
+                var result_2 = [];
+                for (var _i = 0, _a = root.items; _i < _a.length; _i++) {
+                    var item = _a[_i];
+                    if (item.type === 'object') {
+                        for (var _b = 0, _c = item.properties; _b < _c.length; _b++) {
+                            var property = _c[_b];
+                            if (property.keyNode.value === 'key' && property.valueNode) {
+                                var range = getRange(document, item);
+                                var selectionRange = getRange(document, property.keyNode);
+                                result_2.push({ name: _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](property.valueNode), kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Function, range: range, selectionRange: selectionRange });
+                                limit--;
+                                if (limit <= 0) {
+                                    if (context && context.onResultLimitExceeded) {
+                                        context.onResultLimitExceeded(resourceString);
+                                    }
+                                    return result_2;
+                                }
+                            }
+                        }
+                    }
+                }
+                return result_2;
+            }
+        }
+        var result = [];
+        var toVisit = [
+            { node: root, result: result }
+        ];
+        var nextToVisit = 0;
+        var limitExceeded = false;
+        var collectOutlineEntries = function (node, result) {
+            if (node.type === 'array') {
+                node.items.forEach(function (node, index) {
+                    if (node) {
+                        if (limit > 0) {
+                            limit--;
+                            var range = getRange(document, node);
+                            var selectionRange = range;
+                            var name = String(index);
+                            var symbol = { name: name, kind: _this.getSymbolKind(node.type), range: range, selectionRange: selectionRange, children: [] };
+                            result.push(symbol);
+                            toVisit.push({ result: symbol.children, node: node });
+                        }
+                        else {
+                            limitExceeded = true;
+                        }
+                    }
+                });
+            }
+            else if (node.type === 'object') {
+                node.properties.forEach(function (property) {
+                    var valueNode = property.valueNode;
+                    if (valueNode) {
+                        if (limit > 0) {
+                            limit--;
+                            var range = getRange(document, property);
+                            var selectionRange = getRange(document, property.keyNode);
+                            var symbol = { name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), range: range, selectionRange: selectionRange, children: [] };
+                            result.push(symbol);
+                            toVisit.push({ result: symbol.children, node: valueNode });
+                        }
+                        else {
+                            limitExceeded = true;
+                        }
+                    }
+                });
+            }
         };
-        // cached state
-        if (this._fsPath) {
-            res.fsPath = this._fsPath;
-            res._sep = _pathSepMarker;
+        // breath first traversal
+        while (nextToVisit < toVisit.length) {
+            var next = toVisit[nextToVisit++];
+            collectOutlineEntries(next.node, next.result);
         }
-        if (this._formatted) {
-            res.external = this._formatted;
+        if (limitExceeded && context && context.onResultLimitExceeded) {
+            context.onResultLimitExceeded(resourceString);
         }
-        // uri components
-        if (this.path) {
-            res.path = this.path;
+        return result;
+    };
+    JSONDocumentSymbols.prototype.getSymbolKind = function (nodeType) {
+        switch (nodeType) {
+            case 'object':
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Module;
+            case 'string':
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].String;
+            case 'number':
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Number;
+            case 'array':
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Array;
+            case 'boolean':
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Boolean;
+            default: // 'null'
+                return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Variable;
         }
-        if (this.scheme) {
-            res.scheme = this.scheme;
+    };
+    JSONDocumentSymbols.prototype.getKeyLabel = function (property) {
+        var name = property.keyNode.value;
+        if (name) {
+            name = name.replace(/[\n]/g, '↵');
         }
-        if (this.authority) {
-            res.authority = this.authority;
+        if (name && name.trim()) {
+            return name;
         }
-        if (this.query) {
-            res.query = this.query;
+        return "\"" + name + "\"";
+    };
+    JSONDocumentSymbols.prototype.findDocumentColors = function (document, doc, context) {
+        return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {
+            var result = [];
+            if (schema) {
+                var limit = context && typeof context.resultLimit === 'number' ? context.resultLimit : Number.MAX_VALUE;
+                var matchingSchemas = doc.getMatchingSchemas(schema.schema);
+                var visitedNode = {};
+                for (var _i = 0, matchingSchemas_1 = matchingSchemas; _i < matchingSchemas_1.length; _i++) {
+                    var s = matchingSchemas_1[_i];
+                    if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') {
+                        var nodeId = String(s.node.offset);
+                        if (!visitedNode[nodeId]) {
+                            var color = Object(_utils_colors__WEBPACK_IMPORTED_MODULE_2__["colorFromHex"])(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](s.node));
+                            if (color) {
+                                var range = getRange(document, s.node);
+                                result.push({ color: color, range: range });
+                            }
+                            visitedNode[nodeId] = true;
+                            limit--;
+                            if (limit <= 0) {
+                                if (context && context.onResultLimitExceeded) {
+                                    context.onResultLimitExceeded(document.uri);
+                                }
+                                return result;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+        });
+    };
+    JSONDocumentSymbols.prototype.getColorPresentations = function (document, doc, color, range) {
+        var result = [];
+        var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
+        function toTwoDigitHex(n) {
+            var r = n.toString(16);
+            return r.length !== 2 ? '0' + r : r;
         }
-        if (this.fragment) {
-            res.fragment = this.fragment;
+        var label;
+        if (color.alpha === 1) {
+            label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);
         }
-        return res;
+        else {
+            label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));
+        }
+        result.push({ label: label, textEdit: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["TextEdit"].replace(range, JSON.stringify(label)) });
+        return result;
     };
-    return _URI;
-}(URI));
-function isHex(value, pos) {
-    if (pos >= value.length) {
-        return false;
+    return JSONDocumentSymbols;
+}());
+
+function getRange(document, node) {
+    return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_3__["Range"].create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
+}
+
+
+/***/ }),
+/* 108 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hexDigit", function() { return hexDigit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFromHex", function() { return colorFromHex; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFrom256RGB", function() { return colorFrom256RGB; });
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+var Digit0 = 48;
+var Digit9 = 57;
+var A = 65;
+var a = 97;
+var f = 102;
+function hexDigit(charCode) {
+    if (charCode < Digit0) {
+        return 0;
+    }
+    if (charCode <= Digit9) {
+        return charCode - Digit0;
+    }
+    if (charCode < a) {
+        charCode += (a - A);
+    }
+    if (charCode >= a && charCode <= f) {
+        return charCode - a + 10;
     }
-    var code = value.charCodeAt(pos);
-    return (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */) // 0-9
-        || (code >= 97 /* a */ && code <= 102 /* f */) //a-f
-        || (code >= 65 /* A */ && code <= 70 /* F */); //A-F
+    return 0;
 }
-function decodeURIComponentFast(uriComponent, isPath, isQueryString) {
-    var res;
-    var nativeDecodePos = -1;
-    for (var pos = 0; pos < uriComponent.length; pos++) {
-        var code = uriComponent.charCodeAt(pos);
-        // decoding needed
-        if (code === 37 /* PercentSign */ && isHex(uriComponent, pos + 1) && isHex(uriComponent, pos + 2)) {
-            var chA = uriComponent.charCodeAt(pos + 1);
-            var chB = uriComponent.charCodeAt(pos + 2);
-            // when in a path -> check and accept %2f and %2F (fwd slash)
-            // when in a query string -> check and accept %3D, %26, and %3B (equals, ampersand, semi-colon)
-            if ((isPath && chA === 50 /* Digit2 */ && (chB === 70 /* F */ || chB === 102 /* f */))
-                ||
-                    (isQueryString && ((chA === 50 /* Digit2 */ && chB === 54 /* Digit6 */) // %26
-                        ||
-                            (chA === 51 /* Digit3 */ && (chB === 66 /* B */ || chB === 98 /* b */ || chB === 68 /* D */ || chB === 100 /* d */)) // %3D, %3D
-                    ))) {
-                if (nativeDecodePos !== -1) {
-                    res += decodeURIComponent(uriComponent.substring(nativeDecodePos, pos));
-                    nativeDecodePos = -1;
+function colorFromHex(text) {
+    if (text[0] !== '#') {
+        return undefined;
+    }
+    switch (text.length) {
+        case 4:
+            return {
+                red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
+                green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
+                blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
+                alpha: 1
+            };
+        case 5:
+            return {
+                red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
+                green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
+                blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
+                alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
+            };
+        case 7:
+            return {
+                red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
+                green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
+                blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
+                alpha: 1
+            };
+        case 9:
+            return {
+                red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
+                green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
+                blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
+                alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
+            };
+    }
+    return undefined;
+}
+function colorFrom256RGB(red, green, blue, alpha) {
+    if (alpha === void 0) { alpha = 1.0; }
+    return {
+        red: red / 255.0,
+        green: green / 255.0,
+        blue: blue / 255.0,
+        alpha: alpha
+    };
+}
+
+
+/***/ }),
+/* 109 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schemaContributions", function() { return schemaContributions; });
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(101);
+/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
+var schemaContributions = {
+    schemaAssociations: [],
+    schemas: {
+        // refer to the latest schema
+        'http://json-schema.org/schema#': {
+            $ref: 'http://json-schema.org/draft-07/schema#'
+        },
+        // bundle the schema-schema to include (localized) descriptions
+        'http://json-schema.org/draft-04/schema#': {
+            'title': localize('schema.json', 'Describes a JSON file using a schema. See json-schema.org for more info.'),
+            '$schema': 'http://json-schema.org/draft-04/schema#',
+            'definitions': {
+                'schemaArray': {
+                    'type': 'array',
+                    'minItems': 1,
+                    'items': {
+                        '$ref': '#'
+                    }
+                },
+                'positiveInteger': {
+                    'type': 'integer',
+                    'minimum': 0
+                },
+                'positiveIntegerDefault0': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveInteger'
+                        },
+                        {
+                            'default': 0
+                        }
+                    ]
+                },
+                'simpleTypes': {
+                    'type': 'string',
+                    'enum': [
+                        'array',
+                        'boolean',
+                        'integer',
+                        'null',
+                        'number',
+                        'object',
+                        'string'
+                    ]
+                },
+                'stringArray': {
+                    'type': 'array',
+                    'items': {
+                        'type': 'string'
+                    },
+                    'minItems': 1,
+                    'uniqueItems': true
+                }
+            },
+            'type': 'object',
+            'properties': {
+                'id': {
+                    'type': 'string',
+                    'format': 'uri'
+                },
+                '$schema': {
+                    'type': 'string',
+                    'format': 'uri'
+                },
+                'title': {
+                    'type': 'string'
+                },
+                'description': {
+                    'type': 'string'
+                },
+                'default': {},
+                'multipleOf': {
+                    'type': 'number',
+                    'minimum': 0,
+                    'exclusiveMinimum': true
+                },
+                'maximum': {
+                    'type': 'number'
+                },
+                'exclusiveMaximum': {
+                    'type': 'boolean',
+                    'default': false
+                },
+                'minimum': {
+                    'type': 'number'
+                },
+                'exclusiveMinimum': {
+                    'type': 'boolean',
+                    'default': false
+                },
+                'maxLength': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveInteger'
+                        }
+                    ]
+                },
+                'minLength': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveIntegerDefault0'
+                        }
+                    ]
+                },
+                'pattern': {
+                    'type': 'string',
+                    'format': 'regex'
+                },
+                'additionalItems': {
+                    'anyOf': [
+                        {
+                            'type': 'boolean'
+                        },
+                        {
+                            '$ref': '#'
+                        }
+                    ],
+                    'default': {}
+                },
+                'items': {
+                    'anyOf': [
+                        {
+                            '$ref': '#'
+                        },
+                        {
+                            '$ref': '#/definitions/schemaArray'
+                        }
+                    ],
+                    'default': {}
+                },
+                'maxItems': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveInteger'
+                        }
+                    ]
+                },
+                'minItems': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveIntegerDefault0'
+                        }
+                    ]
+                },
+                'uniqueItems': {
+                    'type': 'boolean',
+                    'default': false
+                },
+                'maxProperties': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveInteger'
+                        }
+                    ]
+                },
+                'minProperties': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/positiveIntegerDefault0'
+                        }
+                    ]
+                },
+                'required': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/stringArray'
+                        }
+                    ]
+                },
+                'additionalProperties': {
+                    'anyOf': [
+                        {
+                            'type': 'boolean'
+                        },
+                        {
+                            '$ref': '#'
+                        }
+                    ],
+                    'default': {}
+                },
+                'definitions': {
+                    'type': 'object',
+                    'additionalProperties': {
+                        '$ref': '#'
+                    },
+                    'default': {}
+                },
+                'properties': {
+                    'type': 'object',
+                    'additionalProperties': {
+                        '$ref': '#'
+                    },
+                    'default': {}
+                },
+                'patternProperties': {
+                    'type': 'object',
+                    'additionalProperties': {
+                        '$ref': '#'
+                    },
+                    'default': {}
+                },
+                'dependencies': {
+                    'type': 'object',
+                    'additionalProperties': {
+                        'anyOf': [
+                            {
+                                '$ref': '#'
+                            },
+                            {
+                                '$ref': '#/definitions/stringArray'
+                            }
+                        ]
+                    }
+                },
+                'enum': {
+                    'type': 'array',
+                    'minItems': 1,
+                    'uniqueItems': true
+                },
+                'type': {
+                    'anyOf': [
+                        {
+                            '$ref': '#/definitions/simpleTypes'
+                        },
+                        {
+                            'type': 'array',
+                            'items': {
+                                '$ref': '#/definitions/simpleTypes'
+                            },
+                            'minItems': 1,
+                            'uniqueItems': true
+                        }
+                    ]
+                },
+                'format': {
+                    'anyOf': [
+                        {
+                            'type': 'string',
+                            'enum': [
+                                'date-time',
+                                'uri',
+                                'email',
+                                'hostname',
+                                'ipv4',
+                                'ipv6',
+                                'regex'
+                            ]
+                        },
+                        {
+                            'type': 'string'
+                        }
+                    ]
+                },
+                'allOf': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/schemaArray'
+                        }
+                    ]
+                },
+                'anyOf': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/schemaArray'
+                        }
+                    ]
+                },
+                'oneOf': {
+                    'allOf': [
+                        {
+                            '$ref': '#/definitions/schemaArray'
+                        }
+                    ]
+                },
+                'not': {
+                    'allOf': [
+                        {
+                            '$ref': '#'
+                        }
+                    ]
                 }
-                if (res !== undefined) {
-                    res += uriComponent.substr(pos, 3);
+            },
+            'dependencies': {
+                'exclusiveMaximum': [
+                    'maximum'
+                ],
+                'exclusiveMinimum': [
+                    'minimum'
+                ]
+            },
+            'default': {}
+        },
+        'http://json-schema.org/draft-07/schema#': {
+            'title': localize('schema.json', 'Describes a JSON file using a schema. See json-schema.org for more info.'),
+            'definitions': {
+                'schemaArray': {
+                    'type': 'array',
+                    'minItems': 1,
+                    'items': { '$ref': '#' }
+                },
+                'nonNegativeInteger': {
+                    'type': 'integer',
+                    'minimum': 0
+                },
+                'nonNegativeIntegerDefault0': {
+                    'allOf': [
+                        { '$ref': '#/definitions/nonNegativeInteger' },
+                        { 'default': 0 }
+                    ]
+                },
+                'simpleTypes': {
+                    'enum': [
+                        'array',
+                        'boolean',
+                        'integer',
+                        'null',
+                        'number',
+                        'object',
+                        'string'
+                    ]
+                },
+                'stringArray': {
+                    'type': 'array',
+                    'items': { 'type': 'string' },
+                    'uniqueItems': true,
+                    'default': []
                 }
-                pos += 2;
-                continue;
-            }
-            if (res === undefined) {
-                res = uriComponent.substring(0, pos);
-            }
-            if (nativeDecodePos === -1) {
-                nativeDecodePos = pos;
-            }
-            pos += 2;
-        }
-        else {
-            if (nativeDecodePos !== -1) {
-                res += decodeURIComponent(uriComponent.substring(nativeDecodePos, pos));
-                nativeDecodePos = -1;
-            }
-            if (res !== undefined) {
-                res += String.fromCharCode(code);
-            }
+            },
+            'type': ['object', 'boolean'],
+            'properties': {
+                '$id': {
+                    'type': 'string',
+                    'format': 'uri-reference'
+                },
+                '$schema': {
+                    'type': 'string',
+                    'format': 'uri'
+                },
+                '$ref': {
+                    'type': 'string',
+                    'format': 'uri-reference'
+                },
+                '$comment': {
+                    'type': 'string'
+                },
+                'title': {
+                    'type': 'string'
+                },
+                'description': {
+                    'type': 'string'
+                },
+                'default': true,
+                'readOnly': {
+                    'type': 'boolean',
+                    'default': false
+                },
+                'examples': {
+                    'type': 'array',
+                    'items': true
+                },
+                'multipleOf': {
+                    'type': 'number',
+                    'exclusiveMinimum': 0
+                },
+                'maximum': {
+                    'type': 'number'
+                },
+                'exclusiveMaximum': {
+                    'type': 'number'
+                },
+                'minimum': {
+                    'type': 'number'
+                },
+                'exclusiveMinimum': {
+                    'type': 'number'
+                },
+                'maxLength': { '$ref': '#/definitions/nonNegativeInteger' },
+                'minLength': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },
+                'pattern': {
+                    'type': 'string',
+                    'format': 'regex'
+                },
+                'additionalItems': { '$ref': '#' },
+                'items': {
+                    'anyOf': [
+                        { '$ref': '#' },
+                        { '$ref': '#/definitions/schemaArray' }
+                    ],
+                    'default': true
+                },
+                'maxItems': { '$ref': '#/definitions/nonNegativeInteger' },
+                'minItems': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },
+                'uniqueItems': {
+                    'type': 'boolean',
+                    'default': false
+                },
+                'contains': { '$ref': '#' },
+                'maxProperties': { '$ref': '#/definitions/nonNegativeInteger' },
+                'minProperties': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },
+                'required': { '$ref': '#/definitions/stringArray' },
+                'additionalProperties': { '$ref': '#' },
+                'definitions': {
+                    'type': 'object',
+                    'additionalProperties': { '$ref': '#' },
+                    'default': {}
+                },
+                'properties': {
+                    'type': 'object',
+                    'additionalProperties': { '$ref': '#' },
+                    'default': {}
+                },
+                'patternProperties': {
+                    'type': 'object',
+                    'additionalProperties': { '$ref': '#' },
+                    'propertyNames': { 'format': 'regex' },
+                    'default': {}
+                },
+                'dependencies': {
+                    'type': 'object',
+                    'additionalProperties': {
+                        'anyOf': [
+                            { '$ref': '#' },
+                            { '$ref': '#/definitions/stringArray' }
+                        ]
+                    }
+                },
+                'propertyNames': { '$ref': '#' },
+                'const': true,
+                'enum': {
+                    'type': 'array',
+                    'items': true,
+                    'minItems': 1,
+                    'uniqueItems': true
+                },
+                'type': {
+                    'anyOf': [
+                        { '$ref': '#/definitions/simpleTypes' },
+                        {
+                            'type': 'array',
+                            'items': { '$ref': '#/definitions/simpleTypes' },
+                            'minItems': 1,
+                            'uniqueItems': true
+                        }
+                    ]
+                },
+                'format': { 'type': 'string' },
+                'contentMediaType': { 'type': 'string' },
+                'contentEncoding': { 'type': 'string' },
+                'if': { '$ref': '#' },
+                'then': { '$ref': '#' },
+                'else': { '$ref': '#' },
+                'allOf': { '$ref': '#/definitions/schemaArray' },
+                'anyOf': { '$ref': '#/definitions/schemaArray' },
+                'oneOf': { '$ref': '#/definitions/schemaArray' },
+                'not': { '$ref': '#' }
+            },
+            'default': true
         }
     }
-    if (nativeDecodePos !== -1) {
-        res += decodeURIComponent(uriComponent.substr(nativeDecodePos));
-    }
-    return res !== undefined ? res : uriComponent;
-}
-// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
-var encodeTable = (_a = {},
-    _a[58 /* Colon */] = '%3A',
-    _a[47 /* Slash */] = '%2F',
-    _a[63 /* QuestionMark */] = '%3F',
-    _a[35 /* Hash */] = '%23',
-    _a[91 /* OpenSquareBracket */] = '%5B',
-    _a[93 /* CloseSquareBracket */] = '%5D',
-    _a[64 /* AtSign */] = '%40',
-    _a[33 /* ExclamationMark */] = '%21',
-    _a[36 /* DollarSign */] = '%24',
-    _a[38 /* Ampersand */] = '%26',
-    _a[39 /* SingleQuote */] = '%27',
-    _a[40 /* OpenParen */] = '%28',
-    _a[41 /* CloseParen */] = '%29',
-    _a[42 /* Asterisk */] = '%2A',
-    _a[43 /* Plus */] = '%2B',
-    _a[44 /* Comma */] = '%2C',
-    _a[59 /* Semicolon */] = '%3B',
-    _a[61 /* Equals */] = '%3D',
-    _a[32 /* Space */] = '%20',
-    _a);
-function encodeURIComponentFast(uriComponent, isPath, isQueryString) {
-    var res = undefined;
-    var nativeEncodePos = -1;
-    for (var pos = 0; pos < uriComponent.length; pos++) {
-        var code = uriComponent.charCodeAt(pos);
-        // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
-        if ((code >= 97 /* a */ && code <= 122 /* z */)
-            || (code >= 65 /* A */ && code <= 90 /* Z */)
-            || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
-            || code === 45 /* Dash */
-            || code === 46 /* Period */
-            || code === 95 /* Underline */
-            || code === 126 /* Tilde */
-            || (isPath && code === 47 /* Slash */) // path => allow slash AS-IS
-            || (isQueryString && (code === 61 /* Equals */ || code === 38 /* Ampersand */ || code === 59 /* Semicolon */)) // query string => allow &=;
-        ) {
-            // check if we are delaying native encode
-            if (nativeEncodePos !== -1) {
-                res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
-                nativeEncodePos = -1;
-            }
-            // check if we write into a new string (by default we try to return the param)
-            if (res !== undefined) {
-                res += uriComponent.charAt(pos);
-            }
+};
+var descriptions = {
+    id: localize('schema.json.id', "A unique identifier for the schema."),
+    $schema: localize('schema.json.$schema', "The schema to verify this document against."),
+    title: localize('schema.json.title', "A descriptive title of the element."),
+    description: localize('schema.json.description', "A long description of the element. Used in hover menus and suggestions."),
+    default: localize('schema.json.default', "A default value. Used by suggestions."),
+    multipleOf: localize('schema.json.multipleOf', "A number that should cleanly divide the current value (i.e. have no remainder)."),
+    maximum: localize('schema.json.maximum', "The maximum numerical value, inclusive by default."),
+    exclusiveMaximum: localize('schema.json.exclusiveMaximum', "Makes the maximum property exclusive."),
+    minimum: localize('schema.json.minimum', "The minimum numerical value, inclusive by default."),
+    exclusiveMinimum: localize('schema.json.exclusiveMininum', "Makes the minimum property exclusive."),
+    maxLength: localize('schema.json.maxLength', "The maximum length of a string."),
+    minLength: localize('schema.json.minLength', "The minimum length of a string."),
+    pattern: localize('schema.json.pattern', "A regular expression to match the string against. It is not implicitly anchored."),
+    additionalItems: localize('schema.json.additionalItems', "For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),
+    items: localize('schema.json.items', "For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),
+    maxItems: localize('schema.json.maxItems', "The maximum number of items that can be inside an array. Inclusive."),
+    minItems: localize('schema.json.minItems', "The minimum number of items that can be inside an array. Inclusive."),
+    uniqueItems: localize('schema.json.uniqueItems', "If all of the items in the array must be unique. Defaults to false."),
+    maxProperties: localize('schema.json.maxProperties', "The maximum number of properties an object can have. Inclusive."),
+    minProperties: localize('schema.json.minProperties', "The minimum number of properties an object can have. Inclusive."),
+    required: localize('schema.json.required', "An array of strings that lists the names of all properties required on this object."),
+    additionalProperties: localize('schema.json.additionalProperties', "Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),
+    definitions: localize('schema.json.definitions', "Not used for validation. Place subschemas here that you wish to reference inline with $ref."),
+    properties: localize('schema.json.properties', "A map of property names to schemas for each property."),
+    patternProperties: localize('schema.json.patternProperties', "A map of regular expressions on property names to schemas for matching properties."),
+    dependencies: localize('schema.json.dependencies', "A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),
+    enum: localize('schema.json.enum', "The set of literal values that are valid."),
+    type: localize('schema.json.type', "Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),
+    format: localize('schema.json.format', "Describes the format expected for the value."),
+    allOf: localize('schema.json.allOf', "An array of schemas, all of which must match."),
+    anyOf: localize('schema.json.anyOf', "An array of schemas, where at least one must match."),
+    oneOf: localize('schema.json.oneOf', "An array of schemas, exactly one of which must match."),
+    not: localize('schema.json.not', "A schema which must not match."),
+    $id: localize('schema.json.$id', "A unique identifier for the schema."),
+    $ref: localize('schema.json.$ref', "Reference a definition hosted on any location."),
+    $comment: localize('schema.json.$comment', "Comments from schema authors to readers or maintainers of the schema."),
+    readOnly: localize('schema.json.readOnly', "Indicates that the value of the instance is managed exclusively by the owning authority."),
+    examples: localize('schema.json.examples', "Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),
+    contains: localize('schema.json.contains', "An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema."),
+    propertyNames: localize('schema.json.propertyNames', "If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),
+    const: localize('schema.json.const', "An instance validates successfully against this keyword if its value is equal to the value of the keyword."),
+    contentMediaType: localize('schema.json.contentMediaType', "Describes the media type of a string property."),
+    contentEncoding: localize('schema.json.contentEncoding', "Describes the content encoding of a string property."),
+    if: localize('schema.json.if', "The validation outcome of the \"if\" subschema controls which of the \"then\" or \"else\" keywords are evaluated."),
+    then: localize('schema.json.then', "The \"if\" subschema is used for validation when the \"if\" subschema succeeds."),
+    else: localize('schema.json.else', "The \"else\" subschema is used for validation when the \"if\" subschema fails.")
+};
+for (var schemaName in schemaContributions.schemas) {
+    var schema = schemaContributions.schemas[schemaName];
+    for (var property in schema.properties) {
+        var propertyObject = schema.properties[property];
+        if (typeof propertyObject === 'boolean') {
+            propertyObject = schema.properties[property] = {};
         }
-        else if (code === 37 /* PercentSign */ && isHex(uriComponent, pos + 1) && isHex(uriComponent, pos + 2)) {
-            // at percentage encoded value
-            // check if we are delaying native encode
-            if (nativeEncodePos !== -1) {
-                res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
-                nativeEncodePos = -1;
-            }
-            // check if we write into a new string (by default we try to return the param)
-            if (res !== undefined) {
-                res += uriComponent.substr(pos, 3);
-            }
-            pos += 2;
+        var description = descriptions[property];
+        if (description) {
+            propertyObject['description'] = description;
         }
         else {
-            // encoding needed, we need to allocate a new string
-            if (res === undefined) {
-                res = uriComponent.substr(0, pos);
-            }
-            // check with default table first
-            var escaped = encodeTable[code];
-            if (escaped !== undefined) {
-                // check if we are delaying native encode
-                if (nativeEncodePos !== -1) {
-                    res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
-                    nativeEncodePos = -1;
-                }
-                // append escaped variant to result
-                res += escaped;
-            }
-            else if (nativeEncodePos === -1) {
-                // use native encode only when needed
-                nativeEncodePos = pos;
-            }
+            console.log(property + ": localize('schema.json." + property + "', \"\")");
         }
     }
-    if (nativeEncodePos !== -1) {
-        res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
-    }
-    return res !== undefined ? res : uriComponent;
 }
-function encodeURIComponentMinimal(path) {
-    var res = undefined;
-    for (var pos = 0; pos < path.length; pos++) {
-        var code = path.charCodeAt(pos);
-        if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
-            if (res === undefined) {
-                res = path.substr(0, pos);
+
+
+/***/ }),
+/* 110 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFoldingRanges", function() { return getFoldingRanges; });
+/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93);
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(99);
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+
+function getFoldingRanges(document, context) {
+    var ranges = [];
+    var nestingLevels = [];
+    var stack = [];
+    var prevStart = -1;
+    var scanner = Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_0__["createScanner"])(document.getText(), false);
+    var token = scanner.scan();
+    function addRange(range) {
+        ranges.push(range);
+        nestingLevels.push(stack.length);
+    }
+    while (token !== 17 /* EOF */) {
+        switch (token) {
+            case 1 /* OpenBraceToken */:
+            case 3 /* OpenBracketToken */: {
+                var startLine = document.positionAt(scanner.getTokenOffset()).line;
+                var range = { startLine: startLine, endLine: startLine, kind: token === 1 /* OpenBraceToken */ ? 'object' : 'array' };
+                stack.push(range);
+                break;
             }
-            res += encodeTable[code];
-        }
-        else {
-            if (res !== undefined) {
-                res += path[pos];
+            case 2 /* CloseBraceToken */:
+            case 4 /* CloseBracketToken */: {
+                var kind = token === 2 /* CloseBraceToken */ ? 'object' : 'array';
+                if (stack.length > 0 && stack[stack.length - 1].kind === kind) {
+                    var range = stack.pop();
+                    var line = document.positionAt(scanner.getTokenOffset()).line;
+                    if (range && line > range.startLine + 1 && prevStart !== range.startLine) {
+                        range.endLine = line - 1;
+                        addRange(range);
+                        prevStart = range.startLine;
+                    }
+                }
+                break;
+            }
+            case 13 /* BlockCommentTrivia */: {
+                var startLine = document.positionAt(scanner.getTokenOffset()).line;
+                var endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line;
+                if (scanner.getTokenError() === 1 /* UnexpectedEndOfComment */ && startLine + 1 < document.lineCount) {
+                    scanner.setPosition(document.offsetAt(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["Position"].create(startLine + 1, 0)));
+                }
+                else {
+                    if (startLine < endLine) {
+                        addRange({ startLine: startLine, endLine: endLine, kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["FoldingRangeKind"].Comment });
+                        prevStart = startLine;
+                    }
+                }
+                break;
+            }
+            case 12 /* LineCommentTrivia */: {
+                var text = document.getText().substr(scanner.getTokenOffset(), scanner.getTokenLength());
+                var m = text.match(/^\/\/\s*#(region\b)|(endregion\b)/);
+                if (m) {
+                    var line = document.positionAt(scanner.getTokenOffset()).line;
+                    if (m[1]) { // start pattern match
+                        var range = { startLine: line, endLine: line, kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["FoldingRangeKind"].Region };
+                        stack.push(range);
+                    }
+                    else {
+                        var i = stack.length - 1;
+                        while (i >= 0 && stack[i].kind !== _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_1__["FoldingRangeKind"].Region) {
+                            i--;
+                        }
+                        if (i >= 0) {
+                            var range = stack[i];
+                            stack.length = i;
+                            if (line > range.startLine && prevStart !== range.startLine) {
+                                range.endLine = line;
+                                addRange(range);
+                                prevStart = range.startLine;
+                            }
+                        }
+                    }
+                }
+                break;
             }
         }
+        token = scanner.scan();
     }
-    return res !== undefined ? res : path;
-}
-/**
- * Compute `fsPath` for the given uri
- */
-function _makeFsPath(uri) {
-    var value;
-    if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
-        // unc path: file://shares/c$/far/boo
-        value = "//" + uri.authority + uri.path;
-    }
-    else if (uri.path.charCodeAt(0) === 47 /* Slash */
-        && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
-        && uri.path.charCodeAt(2) === 58 /* Colon */) {
-        // windows drive letter: file:///c:/far/boo
-        value = uri.path[1].toLowerCase() + uri.path.substr(2);
-    }
-    else {
-        // other path
-        value = uri.path;
-    }
-    if (isWindows) {
-        value = value.replace(/\//g, '\\');
-    }
-    return value;
-}
-/**
- * Create the external version of a uri
- */
-function _asFormatted(uri, skipEncoding) {
-    var encoder = !skipEncoding
-        ? encodeURIComponentFast
-        : encodeURIComponentMinimal;
-    var res = '';
-    var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
-    if (scheme) {
-        res += scheme;
-        res += ':';
+    var rangeLimit = context && context.rangeLimit;
+    if (typeof rangeLimit !== 'number' || ranges.length <= rangeLimit) {
+        return ranges;
     }
-    if (authority || scheme === 'file') {
-        res += _slash;
-        res += _slash;
+    if (context && context.onRangeLimitExceeded) {
+        context.onRangeLimitExceeded(document.uri);
     }
-    if (authority) {
-        var idx = authority.indexOf('@');
-        if (idx !== -1) {
-            // <user>@<auth>
-            var userinfo = authority.substr(0, idx);
-            authority = authority.substr(idx + 1);
-            idx = userinfo.indexOf(':');
-            if (idx === -1) {
-                res += encoder(userinfo, false, false);
-            }
-            else {
-                // <user>:<pass>@<auth>
-                res += encoder(userinfo.substr(0, idx), false, false);
-                res += ':';
-                res += encoder(userinfo.substr(idx + 1), false, false);
-            }
-            res += '@';
-        }
-        authority = authority.toLowerCase();
-        idx = authority.indexOf(':');
-        if (idx === -1) {
-            res += encoder(authority, false, false);
-        }
-        else {
-            // <auth>:<port>
-            res += encoder(authority.substr(0, idx), false, false);
-            res += authority.substr(idx);
+    var counts = [];
+    for (var _i = 0, nestingLevels_1 = nestingLevels; _i < nestingLevels_1.length; _i++) {
+        var level = nestingLevels_1[_i];
+        if (level < 30) {
+            counts[level] = (counts[level] || 0) + 1;
         }
     }
-    if (path) {
-        // lower-case windows drive letters in /C:/fff or C:/fff
-        if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
-            var code = path.charCodeAt(1);
-            if (code >= 65 /* A */ && code <= 90 /* Z */) {
-                path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
+    var entries = 0;
+    var maxLevel = 0;
+    for (var i = 0; i < counts.length; i++) {
+        var n = counts[i];
+        if (n) {
+            if (n + entries > rangeLimit) {
+                maxLevel = i;
+                break;
             }
+            entries += n;
         }
-        else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
-            var code = path.charCodeAt(0);
-            if (code >= 65 /* A */ && code <= 90 /* Z */) {
-                path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
+    }
+    var result = [];
+    for (var i = 0; i < ranges.length; i++) {
+        var level = nestingLevels[i];
+        if (typeof level === 'number') {
+            if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) {
+                result.push(ranges[i]);
             }
         }
-        // encode the rest of the path
-        res += encoder(path, true, false);
-    }
-    if (query) {
-        res += '?';
-        res += encoder(query, false, _isQueryStringScheme(scheme));
     }
-    if (fragment) {
-        res += '#';
-        res += !skipEncoding ? encodeURIComponentFast(fragment, false, false) : fragment;
-    }
-    return res;
+    return result;
 }
-var _a;
 
 
 /***/ }),
-/* 96 */
+/* 111 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JSONDocumentSymbols", function() { return JSONDocumentSymbols; });
-/* harmony import */ var _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82);
-/* harmony import */ var _utils_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91);
-/* harmony import */ var _utils_colors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97);
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSelectionRanges", function() { return getSelectionRanges; });
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99);
+/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
 
 
-
-
-var JSONDocumentSymbols = /** @class */ (function () {
-    function JSONDocumentSymbols(schemaService) {
-        this.schemaService = schemaService;
-    }
-    JSONDocumentSymbols.prototype.findDocumentSymbols = function (document, doc) {
-        var _this = this;
-        var root = doc.root;
-        if (!root) {
-            return null;
-        }
-        // special handling for key bindings
-        var resourceString = document.uri;
-        if ((resourceString === 'vscode://defaultsettings/keybindings.json') || _utils_strings__WEBPACK_IMPORTED_MODULE_1__["endsWith"](resourceString.toLowerCase(), '/user/keybindings.json')) {
-            if (root.type === 'array') {
-                var result_1 = [];
-                root.items.forEach(function (item) {
-                    if (item.type === 'object') {
-                        for (var _i = 0, _a = item.properties; _i < _a.length; _i++) {
-                            var property = _a[_i];
-                            if (property.keyNode.value === 'key') {
-                                if (property.valueNode) {
-                                    if (property.valueNode) {
-                                        var location = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["Location"].create(document.uri, getRange(document, item));
-                                        result_1.push({ name: _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](property.valueNode), kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Function, location: location });
-                                    }
-                                    return;
-                                }
-                            }
-                        }
-                    }
-                });
-                return result_1;
-            }
-        }
-        var collectOutlineEntries = function (result, node, containerName) {
-            if (node.type === 'array') {
-                node.items.forEach(function (node) { return collectOutlineEntries(result, node, containerName); });
-            }
-            else if (node.type === 'object') {
-                node.properties.forEach(function (property) {
-                    var location = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["Location"].create(document.uri, getRange(document, property));
-                    var valueNode = property.valueNode;
-                    if (valueNode) {
-                        var childContainerName = containerName ? containerName + '.' + property.keyNode.value : property.keyNode.value;
-                        result.push({ name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), location: location, containerName: containerName });
-                        collectOutlineEntries(result, valueNode, childContainerName);
-                    }
-                });
-            }
-            return result;
-        };
-        var result = collectOutlineEntries([], root, void 0);
-        return result;
-    };
-    JSONDocumentSymbols.prototype.findDocumentSymbols2 = function (document, doc) {
-        var _this = this;
-        var root = doc.root;
-        if (!root) {
-            return null;
-        }
-        // special handling for key bindings
-        var resourceString = document.uri;
-        if ((resourceString === 'vscode://defaultsettings/keybindings.json') || _utils_strings__WEBPACK_IMPORTED_MODULE_1__["endsWith"](resourceString.toLowerCase(), '/user/keybindings.json')) {
-            if (root.type === 'array') {
-                var result_2 = [];
-                root.items.forEach(function (item) {
-                    if (item.type === 'object') {
-                        for (var _i = 0, _a = item.properties; _i < _a.length; _i++) {
-                            var property = _a[_i];
-                            if (property.keyNode.value === 'key') {
-                                if (property.valueNode) {
-                                    var range = getRange(document, item);
-                                    var selectionRange = getRange(document, property.keyNode);
-                                    result_2.push({ name: _parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](property.valueNode), kind: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Function, range: range, selectionRange: selectionRange });
-                                }
-                                return;
-                            }
-                        }
-                    }
-                });
-                return result_2;
-            }
-        }
-        var collectOutlineEntries = function (result, node) {
-            if (node.type === 'array') {
-                node.items.forEach(function (node, index) {
-                    if (node) {
-                        var range = getRange(document, node);
-                        var selectionRange = range;
-                        var name = String(index);
-                        var children = collectOutlineEntries([], node);
-                        result.push({ name: name, kind: _this.getSymbolKind(node.type), range: range, selectionRange: selectionRange, children: children });
-                    }
-                });
-            }
-            else if (node.type === 'object') {
-                node.properties.forEach(function (property) {
-                    var valueNode = property.valueNode;
-                    if (valueNode) {
-                        var range = getRange(document, property);
-                        var selectionRange = getRange(document, property.keyNode);
-                        var children = collectOutlineEntries([], valueNode);
-                        result.push({ name: _this.getKeyLabel(property), kind: _this.getSymbolKind(valueNode.type), range: range, selectionRange: selectionRange, children: children });
+function getSelectionRanges(document, positions, doc) {
+    function getSelectionRange(position) {
+        var offset = document.offsetAt(position);
+        var node = doc.getNodeFromOffset(offset, true);
+        var result = [];
+        while (node) {
+            switch (node.type) {
+                case 'string':
+                case 'object':
+                case 'array':
+                    // range without ", [ or {
+                    var cStart = node.offset + 1, cEnd = node.offset + node.length - 1;
+                    if (cStart < cEnd && offset >= cStart && offset <= cEnd) {
+                        result.push(newRange(cStart, cEnd));
                     }
-                });
+                    result.push(newRange(node.offset, node.offset + node.length));
+                    break;
+                case 'number':
+                case 'boolean':
+                case 'null':
+                case 'property':
+                    result.push(newRange(node.offset, node.offset + node.length));
+                    break;
             }
-            return result;
-        };
-        var result = collectOutlineEntries([], root);
-        return result;
-    };
-    JSONDocumentSymbols.prototype.getSymbolKind = function (nodeType) {
-        switch (nodeType) {
-            case 'object':
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Module;
-            case 'string':
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].String;
-            case 'number':
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Number;
-            case 'array':
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Array;
-            case 'boolean':
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Boolean;
-            default: // 'null'
-                return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["SymbolKind"].Variable;
-        }
-    };
-    JSONDocumentSymbols.prototype.getKeyLabel = function (property) {
-        var name = property.keyNode.value;
-        if (name) {
-            name = name.replace(/[\n]/g, '↵');
-        }
-        if (name && name.trim()) {
-            return name;
-        }
-        return "\"" + name + "\"";
-    };
-    JSONDocumentSymbols.prototype.findDocumentColors = function (document, doc) {
-        return this.schemaService.getSchemaForResource(document.uri, doc).then(function (schema) {
-            var result = [];
-            if (schema) {
-                var matchingSchemas = doc.getMatchingSchemas(schema.schema);
-                var visitedNode = {};
-                for (var _i = 0, matchingSchemas_1 = matchingSchemas; _i < matchingSchemas_1.length; _i++) {
-                    var s = matchingSchemas_1[_i];
-                    if (!s.inverted && s.schema && (s.schema.format === 'color' || s.schema.format === 'color-hex') && s.node && s.node.type === 'string') {
-                        var nodeId = String(s.node.offset);
-                        if (!visitedNode[nodeId]) {
-                            var color = Object(_utils_colors__WEBPACK_IMPORTED_MODULE_2__["colorFromHex"])(_parser_jsonParser__WEBPACK_IMPORTED_MODULE_0__["getNodeValue"](s.node));
-                            if (color) {
-                                var range = getRange(document, s.node);
-                                result.push({ color: color, range: range });
-                            }
-                            visitedNode[nodeId] = true;
-                        }
-                    }
+            if (node.type === 'property' || node.parent && node.parent.type === 'array') {
+                var afterCommaOffset = getOffsetAfterNextToken(node.offset + node.length, 5 /* CommaToken */);
+                if (afterCommaOffset !== -1) {
+                    result.push(newRange(node.offset, afterCommaOffset));
                 }
             }
-            return result;
-        });
-    };
-    JSONDocumentSymbols.prototype.getColorPresentations = function (document, doc, color, range) {
-        var result = [];
-        var red256 = Math.round(color.red * 255), green256 = Math.round(color.green * 255), blue256 = Math.round(color.blue * 255);
-        function toTwoDigitHex(n) {
-            var r = n.toString(16);
-            return r.length !== 2 ? '0' + r : r;
+            node = node.parent;
         }
-        var label;
-        if (color.alpha === 1) {
-            label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256);
+        var current = undefined;
+        for (var index = result.length - 1; index >= 0; index--) {
+            current = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(result[index], current);
         }
-        else {
-            label = "#" + toTwoDigitHex(red256) + toTwoDigitHex(green256) + toTwoDigitHex(blue256) + toTwoDigitHex(Math.round(color.alpha * 255));
+        if (!current) {
+            current = _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(_jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(position, position));
         }
-        result.push({ label: label, textEdit: vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["TextEdit"].replace(range, JSON.stringify(label)) });
-        return result;
-    };
-    return JSONDocumentSymbols;
-}());
-
-function getRange(document, node) {
-    return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_3__["Range"].create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
-}
-
-
-/***/ }),
-/* 97 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hexDigit", function() { return hexDigit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFromHex", function() { return colorFromHex; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "colorFrom256RGB", function() { return colorFrom256RGB; });
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-var Digit0 = 48;
-var Digit9 = 57;
-var A = 65;
-var a = 97;
-var f = 102;
-function hexDigit(charCode) {
-    if (charCode < Digit0) {
-        return 0;
-    }
-    if (charCode <= Digit9) {
-        return charCode - Digit0;
-    }
-    if (charCode < a) {
-        charCode += (a - A);
-    }
-    if (charCode >= a && charCode <= f) {
-        return charCode - a + 10;
-    }
-    return 0;
-}
-function colorFromHex(text) {
-    if (text[0] !== '#') {
-        return null;
-    }
-    switch (text.length) {
-        case 4:
-            return {
-                red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
-                green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
-                blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
-                alpha: 1
-            };
-        case 5:
-            return {
-                red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,
-                green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,
-                blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,
-                alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,
-            };
-        case 7:
-            return {
-                red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
-                green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
-                blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
-                alpha: 1
-            };
-        case 9:
-            return {
-                red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,
-                green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,
-                blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,
-                alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0
-            };
+        return current;
     }
-    return null;
-}
-function colorFrom256RGB(red, green, blue, alpha) {
-    if (alpha === void 0) { alpha = 1.0; }
-    return {
-        red: red / 255.0,
-        green: green / 255.0,
-        blue: blue / 255.0,
-        alpha: alpha
-    };
+    function newRange(start, end) {
+        return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(start), document.positionAt(end));
+    }
+    var scanner = Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(document.getText(), true);
+    function getOffsetAfterNextToken(offset, expectedToken) {
+        scanner.setPosition(offset);
+        var token = scanner.scan();
+        if (token === expectedToken) {
+            return scanner.getTokenOffset() + scanner.getTokenLength();
+        }
+        return -1;
+    }
+    return positions.map(getSelectionRange);
 }
 
 
 /***/ }),
-/* 98 */
+/* 112 */
 /***/ (function(module, __webpack_exports__, __webpack_require__) {
 
 "use strict";
 __webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schemaContributions", function() { return schemaContributions; });
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76);
-/* harmony import */ var vscode_nls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vscode_nls__WEBPACK_IMPORTED_MODULE_0__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findDefinition", function() { return findDefinition; });
+/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(99);
 /*---------------------------------------------------------------------------------------------
  *  Copyright (c) Microsoft Corporation. All rights reserved.
  *  Licensed under the MIT License. See License.txt in the project root for license information.
  *--------------------------------------------------------------------------------------------*/
 
-var localize = vscode_nls__WEBPACK_IMPORTED_MODULE_0__["loadMessageBundle"]();
-var schemaContributions = {
-    schemaAssociations: {},
-    schemas: {
-        // bundle the schema-schema to include (localized) descriptions
-        'http://json-schema.org/draft-04/schema#': {
-            'title': localize('schema.json', 'Describes a JSON file using a schema. See json-schema.org for more info.'),
-            '$schema': 'http://json-schema.org/draft-04/schema#',
-            'definitions': {
-                'schemaArray': {
-                    'type': 'array',
-                    'minItems': 1,
-                    'items': {
-                        '$ref': '#'
-                    }
-                },
-                'positiveInteger': {
-                    'type': 'integer',
-                    'minimum': 0
-                },
-                'positiveIntegerDefault0': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveInteger'
-                        },
-                        {
-                            'default': 0
-                        }
-                    ]
-                },
-                'simpleTypes': {
-                    'type': 'string',
-                    'enum': [
-                        'array',
-                        'boolean',
-                        'integer',
-                        'null',
-                        'number',
-                        'object',
-                        'string'
-                    ]
-                },
-                'stringArray': {
-                    'type': 'array',
-                    'items': {
-                        'type': 'string'
-                    },
-                    'minItems': 1,
-                    'uniqueItems': true
-                }
-            },
-            'type': 'object',
-            'properties': {
-                'id': {
-                    'type': 'string',
-                    'format': 'uri'
-                },
-                '$schema': {
-                    'type': 'string',
-                    'format': 'uri'
-                },
-                'title': {
-                    'type': 'string'
-                },
-                'description': {
-                    'type': 'string'
-                },
-                'default': {},
-                'multipleOf': {
-                    'type': 'number',
-                    'minimum': 0,
-                    'exclusiveMinimum': true
-                },
-                'maximum': {
-                    'type': 'number'
-                },
-                'exclusiveMaximum': {
-                    'type': 'boolean',
-                    'default': false
-                },
-                'minimum': {
-                    'type': 'number'
-                },
-                'exclusiveMinimum': {
-                    'type': 'boolean',
-                    'default': false
-                },
-                'maxLength': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveInteger'
-                        }
-                    ]
-                },
-                'minLength': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveIntegerDefault0'
-                        }
-                    ]
-                },
-                'pattern': {
-                    'type': 'string',
-                    'format': 'regex'
-                },
-                'additionalItems': {
-                    'anyOf': [
-                        {
-                            'type': 'boolean'
-                        },
-                        {
-                            '$ref': '#'
-                        }
-                    ],
-                    'default': {}
-                },
-                'items': {
-                    'anyOf': [
-                        {
-                            '$ref': '#'
-                        },
-                        {
-                            '$ref': '#/definitions/schemaArray'
-                        }
-                    ],
-                    'default': {}
-                },
-                'maxItems': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveInteger'
-                        }
-                    ]
-                },
-                'minItems': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveIntegerDefault0'
-                        }
-                    ]
-                },
-                'uniqueItems': {
-                    'type': 'boolean',
-                    'default': false
-                },
-                'maxProperties': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveInteger'
-                        }
-                    ]
-                },
-                'minProperties': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/positiveIntegerDefault0'
-                        }
-                    ]
-                },
-                'required': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/stringArray'
-                        }
-                    ]
-                },
-                'additionalProperties': {
-                    'anyOf': [
-                        {
-                            'type': 'boolean'
-                        },
-                        {
-                            '$ref': '#'
-                        }
-                    ],
-                    'default': {}
-                },
-                'definitions': {
-                    'type': 'object',
-                    'additionalProperties': {
-                        '$ref': '#'
-                    },
-                    'default': {}
-                },
-                'properties': {
-                    'type': 'object',
-                    'additionalProperties': {
-                        '$ref': '#'
-                    },
-                    'default': {}
-                },
-                'patternProperties': {
-                    'type': 'object',
-                    'additionalProperties': {
-                        '$ref': '#'
-                    },
-                    'default': {}
-                },
-                'dependencies': {
-                    'type': 'object',
-                    'additionalProperties': {
-                        'anyOf': [
-                            {
-                                '$ref': '#'
-                            },
-                            {
-                                '$ref': '#/definitions/stringArray'
-                            }
-                        ]
+function findDefinition(document, position, doc) {
+    var offset = document.offsetAt(position);
+    var node = doc.getNodeFromOffset(offset, true);
+    if (!node || !isRef(node)) {
+        return Promise.resolve([]);
+    }
+    var propertyNode = node.parent;
+    var valueNode = propertyNode.valueNode;
+    var path = valueNode.value;
+    var targetNode = findTargetNode(doc, path);
+    if (!targetNode) {
+        return Promise.resolve([]);
+    }
+    var definition = {
+        targetUri: document.uri,
+        originSelectionRange: createRange(document, valueNode),
+        targetRange: createRange(document, targetNode),
+        targetSelectionRange: createRange(document, targetNode)
+    };
+    return Promise.resolve([definition]);
+}
+function createRange(document, node) {
+    return _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(node.offset), document.positionAt(node.offset + node.length));
+}
+function isRef(node) {
+    return node.type === 'string' &&
+        node.parent &&
+        node.parent.type === 'property' &&
+        node.parent.valueNode === node &&
+        node.parent.keyNode.value === "$ref" ||
+        false;
+}
+function findTargetNode(doc, path) {
+    var tokens = parseJSONPointer(path);
+    if (!tokens) {
+        return null;
+    }
+    return findNode(tokens, doc.root);
+}
+function findNode(pointer, node) {
+    if (!node) {
+        return null;
+    }
+    if (pointer.length === 0) {
+        return node;
+    }
+    var token = pointer.shift();
+    if (node && node.type === 'object') {
+        var propertyNode = node.properties.find(function (propertyNode) { return propertyNode.keyNode.value === token; });
+        if (!propertyNode) {
+            return null;
+        }
+        return findNode(pointer, propertyNode.valueNode);
+    }
+    else if (node && node.type === 'array') {
+        if (token.match(/^(0|[1-9][0-9]*)$/)) {
+            var index = Number.parseInt(token);
+            var arrayItem = node.items[index];
+            if (!arrayItem) {
+                return null;
+            }
+            return findNode(pointer, arrayItem);
+        }
+    }
+    return null;
+}
+function parseJSONPointer(path) {
+    if (path === "#") {
+        return [];
+    }
+    if (path[0] !== '#' || path[1] !== '/') {
+        return null;
+    }
+    return path.substring(2).split(/\//).map(unescape);
+}
+function unescape(str) {
+    return str.replace(/~1/g, '/').replace(/~0/g, '~');
+}
+
+
+/***/ }),
+/* 113 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getLanguageModelCache = void 0;
+function getLanguageModelCache(maxEntries, cleanupIntervalTimeInSec, parse) {
+    let languageModels = {};
+    let nModels = 0;
+    let cleanupInterval = undefined;
+    if (cleanupIntervalTimeInSec > 0) {
+        cleanupInterval = setInterval(() => {
+            let cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
+            let uris = Object.keys(languageModels);
+            for (let uri of uris) {
+                let languageModelInfo = languageModels[uri];
+                if (languageModelInfo.cTime < cutoffTime) {
+                    delete languageModels[uri];
+                    nModels--;
+                }
+            }
+        }, cleanupIntervalTimeInSec * 1000);
+    }
+    return {
+        get(document) {
+            let version = document.version;
+            let languageId = document.languageId;
+            let languageModelInfo = languageModels[document.uri];
+            if (languageModelInfo && languageModelInfo.version === version && languageModelInfo.languageId === languageId) {
+                languageModelInfo.cTime = Date.now();
+                return languageModelInfo.languageModel;
+            }
+            let languageModel = parse(document);
+            languageModels[document.uri] = { languageModel, version, languageId, cTime: Date.now() };
+            if (!languageModelInfo) {
+                nModels++;
+            }
+            if (nModels === maxEntries) {
+                let oldestTime = Number.MAX_VALUE;
+                let oldestUri = null;
+                for (let uri in languageModels) {
+                    let languageModelInfo = languageModels[uri];
+                    if (languageModelInfo.cTime < oldestTime) {
+                        oldestUri = uri;
+                        oldestTime = languageModelInfo.cTime;
                     }
-                },
-                'enum': {
-                    'type': 'array',
-                    'minItems': 1,
-                    'uniqueItems': true
-                },
-                'type': {
-                    'anyOf': [
-                        {
-                            '$ref': '#/definitions/simpleTypes'
-                        },
-                        {
-                            'type': 'array',
-                            'items': {
-                                '$ref': '#/definitions/simpleTypes'
-                            },
-                            'minItems': 1,
-                            'uniqueItems': true
-                        }
-                    ]
-                },
-                'format': {
-                    'anyOf': [
-                        {
-                            'type': 'string',
-                            'enum': [
-                                'date-time',
-                                'uri',
-                                'email',
-                                'hostname',
-                                'ipv4',
-                                'ipv6',
-                                'regex'
-                            ]
-                        },
-                        {
-                            'type': 'string'
-                        }
-                    ]
-                },
-                'allOf': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/schemaArray'
-                        }
-                    ]
-                },
-                'anyOf': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/schemaArray'
-                        }
-                    ]
-                },
-                'oneOf': {
-                    'allOf': [
-                        {
-                            '$ref': '#/definitions/schemaArray'
-                        }
-                    ]
-                },
-                'not': {
-                    'allOf': [
-                        {
-                            '$ref': '#'
-                        }
-                    ]
                 }
-            },
-            'dependencies': {
-                'exclusiveMaximum': [
-                    'maximum'
-                ],
-                'exclusiveMinimum': [
-                    'minimum'
-                ]
-            },
-            'default': {}
+                if (oldestUri) {
+                    delete languageModels[oldestUri];
+                    nModels--;
+                }
+            }
+            return languageModel;
         },
-        'http://json-schema.org/draft-07/schema#': {
-            'title': localize('schema.json', 'Describes a JSON file using a schema. See json-schema.org for more info.'),
-            'definitions': {
-                'schemaArray': {
-                    'type': 'array',
-                    'minItems': 1,
-                    'items': { '$ref': '#' }
-                },
-                'nonNegativeInteger': {
-                    'type': 'integer',
-                    'minimum': 0
-                },
-                'nonNegativeIntegerDefault0': {
-                    'allOf': [
-                        { '$ref': '#/definitions/nonNegativeInteger' },
-                        { 'default': 0 }
-                    ]
-                },
-                'simpleTypes': {
-                    'enum': [
-                        'array',
-                        'boolean',
-                        'integer',
-                        'null',
-                        'number',
-                        'object',
-                        'string'
-                    ]
-                },
-                'stringArray': {
-                    'type': 'array',
-                    'items': { 'type': 'string' },
-                    'uniqueItems': true,
-                    'default': []
+        onDocumentRemoved(document) {
+            let uri = document.uri;
+            if (languageModels[uri]) {
+                delete languageModels[uri];
+                nModels--;
+            }
+        },
+        dispose() {
+            if (typeof cleanupInterval !== 'undefined') {
+                clearInterval(cleanupInterval);
+                cleanupInterval = undefined;
+                languageModels = {};
+                nModels = 0;
+            }
+        }
+    };
+}
+exports.getLanguageModelCache = getLanguageModelCache;
+
+
+/***/ }),
+/* 114 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.joinPath = exports.normalizePath = exports.resolvePath = exports.isAbsolutePath = exports.extname = exports.basename = exports.dirname = exports.getScheme = void 0;
+const vscode_uri_1 = __webpack_require__(35);
+function getScheme(uri) {
+    return uri.substr(0, uri.indexOf(':'));
+}
+exports.getScheme = getScheme;
+function dirname(uri) {
+    const lastIndexOfSlash = uri.lastIndexOf('/');
+    return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
+}
+exports.dirname = dirname;
+function basename(uri) {
+    const lastIndexOfSlash = uri.lastIndexOf('/');
+    return uri.substr(lastIndexOfSlash + 1);
+}
+exports.basename = basename;
+const Slash = '/'.charCodeAt(0);
+const Dot = '.'.charCodeAt(0);
+function extname(uri) {
+    for (let i = uri.length - 1; i >= 0; i--) {
+        const ch = uri.charCodeAt(i);
+        if (ch === Dot) {
+            if (i > 0 && uri.charCodeAt(i - 1) !== Slash) {
+                return uri.substr(i);
+            }
+            else {
+                break;
+            }
+        }
+        else if (ch === Slash) {
+            break;
+        }
+    }
+    return '';
+}
+exports.extname = extname;
+function isAbsolutePath(path) {
+    return path.charCodeAt(0) === Slash;
+}
+exports.isAbsolutePath = isAbsolutePath;
+function resolvePath(uriString, path) {
+    if (isAbsolutePath(path)) {
+        const uri = vscode_uri_1.URI.parse(uriString);
+        const parts = path.split('/');
+        return uri.with({ path: normalizePath(parts) }).toString();
+    }
+    return joinPath(uriString, path);
+}
+exports.resolvePath = resolvePath;
+function normalizePath(parts) {
+    const newParts = [];
+    for (const part of parts) {
+        if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
+            // ignore
+        }
+        else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
+            newParts.pop();
+        }
+        else {
+            newParts.push(part);
+        }
+    }
+    if (parts.length > 1 && parts[parts.length - 1].length === 0) {
+        newParts.push('');
+    }
+    let res = newParts.join('/');
+    if (parts[0].length === 0) {
+        res = '/' + res;
+    }
+    return res;
+}
+exports.normalizePath = normalizePath;
+function joinPath(uriString, ...paths) {
+    const uri = vscode_uri_1.URI.parse(uriString);
+    const parts = uri.path.split('/');
+    for (let path of paths) {
+        parts.push(...path.split('/'));
+    }
+    return uri.with({ path: normalizePath(parts) }).toString();
+}
+exports.joinPath = joinPath;
+
+
+/***/ }),
+/* 115 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*---------------------------------------------------------------------------------------------
+ *  Copyright (c) Microsoft Corporation. All rights reserved.
+ *  Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+Object.defineProperty(exports, "__esModule", { value: true });
+var url_1 = __webpack_require__(83);
+var https = __webpack_require__(116);
+var http = __webpack_require__(117);
+var HttpProxyAgent = __webpack_require__(118);
+var HttpsProxyAgent = __webpack_require__(134);
+var zlib = __webpack_require__(141);
+var nls = __webpack_require__(101);
+if (process.env.VSCODE_NLS_CONFIG) {
+    var VSCODE_NLS_CONFIG = process.env.VSCODE_NLS_CONFIG;
+    nls.config(JSON.parse(VSCODE_NLS_CONFIG));
+}
+var localize = nls.loadMessageBundle();
+var proxyUrl = null;
+var strictSSL = true;
+function configure(_proxyUrl, _strictSSL) {
+    proxyUrl = _proxyUrl;
+    strictSSL = _strictSSL;
+}
+exports.configure = configure;
+function xhr(options) {
+    var agent = getProxyAgent(options.url, { proxyUrl: proxyUrl, strictSSL: strictSSL });
+    options = assign({}, options);
+    options = assign(options, { agent: agent, strictSSL: strictSSL });
+    if (typeof options.followRedirects !== 'number') {
+        options.followRedirects = 5;
+    }
+    return request(options).then(function (result) { return new Promise(function (c, e) {
+        var res = result.res;
+        var readable = res;
+        var encoding = res.headers && res.headers['content-encoding'];
+        var isCompleted = false;
+        if (encoding === 'gzip') {
+            var gunzip = zlib.createGunzip();
+            res.pipe(gunzip);
+            readable = gunzip;
+        }
+        else if (encoding === 'deflate') {
+            var inflate = zlib.createInflate();
+            res.pipe(inflate);
+            readable = inflate;
+        }
+        var data = [];
+        readable.on('data', function (c) { return data.push(c); });
+        readable.on('end', function () {
+            if (isCompleted) {
+                return;
+            }
+            isCompleted = true;
+            if (options.followRedirects > 0 && (res.statusCode >= 300 && res.statusCode <= 303 || res.statusCode === 307)) {
+                var location = res.headers['location'];
+                if (location) {
+                    var newOptions = {
+                        type: options.type, url: location, user: options.user, password: options.password, responseType: options.responseType, headers: options.headers,
+                        timeout: options.timeout, followRedirects: options.followRedirects - 1, data: options.data
+                    };
+                    xhr(newOptions).then(c, e);
+                    return;
                 }
-            },
-            'type': ['object', 'boolean'],
-            'properties': {
-                '$id': {
-                    'type': 'string',
-                    'format': 'uri-reference'
-                },
-                '$schema': {
-                    'type': 'string',
-                    'format': 'uri'
-                },
-                '$ref': {
-                    'type': 'string',
-                    'format': 'uri-reference'
-                },
-                '$comment': {
-                    'type': 'string'
-                },
-                'title': {
-                    'type': 'string'
-                },
-                'description': {
-                    'type': 'string'
-                },
-                'default': true,
-                'readOnly': {
-                    'type': 'boolean',
-                    'default': false
-                },
-                'examples': {
-                    'type': 'array',
-                    'items': true
-                },
-                'multipleOf': {
-                    'type': 'number',
-                    'exclusiveMinimum': 0
-                },
-                'maximum': {
-                    'type': 'number'
-                },
-                'exclusiveMaximum': {
-                    'type': 'number'
-                },
-                'minimum': {
-                    'type': 'number'
-                },
-                'exclusiveMinimum': {
-                    'type': 'number'
-                },
-                'maxLength': { '$ref': '#/definitions/nonNegativeInteger' },
-                'minLength': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },
-                'pattern': {
-                    'type': 'string',
-                    'format': 'regex'
-                },
-                'additionalItems': { '$ref': '#' },
-                'items': {
-                    'anyOf': [
-                        { '$ref': '#' },
-                        { '$ref': '#/definitions/schemaArray' }
-                    ],
-                    'default': true
-                },
-                'maxItems': { '$ref': '#/definitions/nonNegativeInteger' },
-                'minItems': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },
-                'uniqueItems': {
-                    'type': 'boolean',
-                    'default': false
-                },
-                'contains': { '$ref': '#' },
-                'maxProperties': { '$ref': '#/definitions/nonNegativeInteger' },
-                'minProperties': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },
-                'required': { '$ref': '#/definitions/stringArray' },
-                'additionalProperties': { '$ref': '#' },
-                'definitions': {
-                    'type': 'object',
-                    'additionalProperties': { '$ref': '#' },
-                    'default': {}
-                },
-                'properties': {
-                    'type': 'object',
-                    'additionalProperties': { '$ref': '#' },
-                    'default': {}
-                },
-                'patternProperties': {
-                    'type': 'object',
-                    'additionalProperties': { '$ref': '#' },
-                    'propertyNames': { 'format': 'regex' },
-                    'default': {}
-                },
-                'dependencies': {
-                    'type': 'object',
-                    'additionalProperties': {
-                        'anyOf': [
-                            { '$ref': '#' },
-                            { '$ref': '#/definitions/stringArray' }
-                        ]
+            }
+            var response = {
+                responseText: data.join(''),
+                status: res.statusCode,
+                headers: res.headers || {}
+            };
+            if ((res.statusCode >= 200 && res.statusCode < 300) || res.statusCode === 1223) {
+                c(response);
+            }
+            else {
+                e(response);
+            }
+        });
+        readable.on('error', function (err) {
+            var response = {
+                responseText: localize('error', 'Unable to access {0}. Error: {1}', options.url, err.message),
+                status: 500,
+                headers: undefined,
+            };
+            isCompleted = true;
+            e(response);
+        });
+    }); }, function (err) {
+        var message;
+        if (agent) {
+            message = localize('error.cannot.connect.proxy', 'Unable to connect to {0} through a proxy . Error: {1}', options.url, err.message);
+        }
+        else {
+            message = localize('error.cannot.connect', 'Unable to connect to {0}. Error: {1}', options.url, err.message);
+        }
+        return Promise.reject({
+            responseText: message,
+            status: 404
+        });
+    });
+}
+exports.xhr = xhr;
+function assign(destination) {
+    var sources = [];
+    for (var _i = 1; _i < arguments.length; _i++) {
+        sources[_i - 1] = arguments[_i];
+    }
+    sources.forEach(function (source) { return Object.keys(source).forEach(function (key) { return destination[key] = source[key]; }); });
+    return destination;
+}
+function request(options) {
+    var req;
+    return new Promise(function (c, e) {
+        var endpoint = url_1.parse(options.url);
+        var opts = {
+            hostname: endpoint.hostname,
+            port: endpoint.port ? parseInt(endpoint.port) : (endpoint.protocol === 'https:' ? 443 : 80),
+            path: endpoint.path,
+            method: options.type || 'GET',
+            headers: options.headers,
+            agent: options.agent,
+            rejectUnauthorized: (typeof options.strictSSL === 'boolean') ? options.strictSSL : true
+        };
+        if (options.user && options.password) {
+            opts.auth = options.user + ':' + options.password;
+        }
+        var handler = function (res) {
+            if (res.statusCode >= 300 && res.statusCode < 400 && options.followRedirects && options.followRedirects > 0 && res.headers['location']) {
+                c(request(assign({}, options, {
+                    url: res.headers['location'],
+                    followRedirects: options.followRedirects - 1
+                })));
+            }
+            else {
+                c({ req: req, res: res });
+            }
+        };
+        if (endpoint.protocol === 'https:') {
+            req = https.request(opts, handler);
+        }
+        else {
+            req = http.request(opts, handler);
+        }
+        req.on('error', e);
+        if (options.timeout) {
+            req.setTimeout(options.timeout);
+        }
+        if (options.data) {
+            req.write(options.data);
+        }
+        req.end();
+    });
+}
+function getErrorStatusDescription(status) {
+    if (status < 400) {
+        return void 0;
+    }
+    switch (status) {
+        case 400: return localize('status.400', 'Bad request. The request cannot be fulfilled due to bad syntax.');
+        case 401: return localize('status.401', 'Unauthorized. The server is refusing to respond.');
+        case 403: return localize('status.403', 'Forbidden. The server is refusing to respond.');
+        case 404: return localize('status.404', 'Not Found. The requested location could not be found.');
+        case 405: return localize('status.405', 'Method not allowed. A request was made using a request method not supported by that location.');
+        case 406: return localize('status.406', 'Not Acceptable. The server can only generate a response that is not accepted by the client.');
+        case 407: return localize('status.407', 'Proxy Authentication Required. The client must first authenticate itself with the proxy.');
+        case 408: return localize('status.408', 'Request Timeout. The server timed out waiting for the request.');
+        case 409: return localize('status.409', 'Conflict. The request could not be completed because of a conflict in the request.');
+        case 410: return localize('status.410', 'Gone. The requested page is no longer available.');
+        case 411: return localize('status.411', 'Length Required. The "Content-Length" is not defined.');
+        case 412: return localize('status.412', 'Precondition Failed. The precondition given in the request evaluated to false by the server.');
+        case 413: return localize('status.413', 'Request Entity Too Large. The server will not accept the request, because the request entity is too large.');
+        case 414: return localize('status.414', 'Request-URI Too Long. The server will not accept the request, because the URL is too long.');
+        case 415: return localize('status.415', 'Unsupported Media Type. The server will not accept the request, because the media type is not supported.');
+        case 500: return localize('status.500', 'Internal Server Error.');
+        case 501: return localize('status.501', 'Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.');
+        case 503: return localize('status.503', 'Service Unavailable. The server is currently unavailable (overloaded or down).');
+        default: return localize('status.416', 'HTTP status code {0}', status);
+    }
+}
+exports.getErrorStatusDescription = getErrorStatusDescription;
+// proxy handling
+function getSystemProxyURI(requestURL) {
+    if (requestURL.protocol === 'http:') {
+        return process.env.HTTP_PROXY || process.env.http_proxy || null;
+    }
+    else if (requestURL.protocol === 'https:') {
+        return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null;
+    }
+    return null;
+}
+function getProxyAgent(rawRequestURL, options) {
+    if (options === void 0) { options = {}; }
+    var requestURL = url_1.parse(rawRequestURL);
+    var proxyURL = options.proxyUrl || getSystemProxyURI(requestURL);
+    if (!proxyURL) {
+        return null;
+    }
+    var proxyEndpoint = url_1.parse(proxyURL);
+    if (!/^https?:$/.test(proxyEndpoint.protocol)) {
+        return null;
+    }
+    var opts = {
+        host: proxyEndpoint.hostname,
+        port: Number(proxyEndpoint.port),
+        auth: proxyEndpoint.auth,
+        rejectUnauthorized: (typeof options.strictSSL === 'boolean') ? options.strictSSL : true
+    };
+    return requestURL.protocol === 'http:' ? new HttpProxyAgent(opts) : new HttpsProxyAgent(opts);
+}
+
+
+/***/ }),
+/* 116 */
+/***/ (function(module, exports) {
+
+module.exports = require("https");
+
+/***/ }),
+/* 117 */
+/***/ (function(module, exports) {
+
+module.exports = require("http");
+
+/***/ }),
+/* 118 */
+/***/ (function(module, exports, __webpack_require__) {
+
+
+/**
+ * Module dependencies.
+ */
+
+var net = __webpack_require__(16);
+var tls = __webpack_require__(119);
+var url = __webpack_require__(83);
+var Agent = __webpack_require__(120);
+var inherits = __webpack_require__(3).inherits;
+var debug = __webpack_require__(126)('http-proxy-agent');
+
+/**
+ * Module exports.
+ */
+
+module.exports = HttpProxyAgent;
+
+/**
+ * The `HttpProxyAgent` implements an HTTP Agent subclass that connects to the
+ * specified "HTTP proxy server" in order to proxy HTTP requests.
+ *
+ * @api public
+ */
+
+function HttpProxyAgent (opts) {
+  if (!(this instanceof HttpProxyAgent)) return new HttpProxyAgent(opts);
+  if ('string' == typeof opts) opts = url.parse(opts);
+  if (!opts) throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!');
+  debug('creating new HttpProxyAgent instance: %o', opts);
+  Agent.call(this, opts);
+
+  var proxy = Object.assign({}, opts);
+
+  // if `true`, then connect to the proxy server over TLS. defaults to `false`.
+  this.secureProxy = proxy.protocol ? /^https:?$/i.test(proxy.protocol) : false;
+
+  // prefer `hostname` over `host`, and set the `port` if needed
+  proxy.host = proxy.hostname || proxy.host;
+  proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
+
+  if (proxy.host && proxy.path) {
+    // if both a `host` and `path` are specified then it's most likely the
+    // result of a `url.parse()` call... we need to remove the `path` portion so
+    // that `net.connect()` doesn't attempt to open that as a unix socket file.
+    delete proxy.path;
+    delete proxy.pathname;
+  }
+
+  this.proxy = proxy;
+}
+inherits(HttpProxyAgent, Agent);
+
+/**
+ * Called when the node-core HTTP client library is creating a new HTTP request.
+ *
+ * @api public
+ */
+
+HttpProxyAgent.prototype.callback = function connect (req, opts, fn) {
+  var proxy = this.proxy;
+
+  // change the `http.ClientRequest` instance's "path" field
+  // to the absolute path of the URL that will be requested
+  var parsed = url.parse(req.path);
+  if (null == parsed.protocol) parsed.protocol = 'http:';
+  if (null == parsed.hostname) parsed.hostname = opts.hostname || opts.host;
+  if (null == parsed.port) parsed.port = opts.port;
+  if (parsed.port == 80) {
+    // if port is 80, then we can remove the port so that the
+    // ":80" portion is not on the produced URL
+    delete parsed.port;
+  }
+  var absolute = url.format(parsed);
+  req.path = absolute;
+
+  // inject the `Proxy-Authorization` header if necessary
+  if (proxy.auth) {
+    req.setHeader(
+      'Proxy-Authorization',
+      'Basic ' + Buffer.from(proxy.auth).toString('base64')
+    );
+  }
+
+  // create a socket connection to the proxy server
+  var socket;
+  if (this.secureProxy) {
+    socket = tls.connect(proxy);
+  } else {
+    socket = net.connect(proxy);
+  }
+
+  // at this point, the http ClientRequest's internal `_header` field might have
+  // already been set. If this is the case then we'll need to re-generate the
+  // string since we just changed the `req.path`
+  if (req._header) {
+    debug('regenerating stored HTTP header string for request');
+    req._header = null;
+    req._implicitHeader();
+    if (req.output && req.output.length > 0) {
+      debug('patching connection write() output buffer with updated header');
+      // the _header has already been queued to be written to the socket
+      var first = req.output[0];
+      var endOfHeaders = first.indexOf('\r\n\r\n') + 4;
+      req.output[0] = req._header + first.substring(endOfHeaders);
+      debug('output buffer: %o', req.output);
+    }
+  }
+
+  fn(null, socket);
+};
+
+
+/***/ }),
+/* 119 */
+/***/ (function(module, exports) {
+
+module.exports = require("tls");
+
+/***/ }),
+/* 120 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+__webpack_require__(121);
+const inherits = __webpack_require__(3).inherits;
+const promisify = __webpack_require__(122);
+const EventEmitter = __webpack_require__(125).EventEmitter;
+
+module.exports = Agent;
+
+function isAgent(v) {
+  return v && typeof v.addRequest === 'function';
+}
+
+/**
+ * Base `http.Agent` implementation.
+ * No pooling/keep-alive is implemented by default.
+ *
+ * @param {Function} callback
+ * @api public
+ */
+function Agent(callback, _opts) {
+  if (!(this instanceof Agent)) {
+    return new Agent(callback, _opts);
+  }
+
+  EventEmitter.call(this);
+
+  // The callback gets promisified if it has 3 parameters
+  // (i.e. it has a callback function) lazily
+  this._promisifiedCallback = false;
+
+  let opts = _opts;
+  if ('function' === typeof callback) {
+    this.callback = callback;
+  } else if (callback) {
+    opts = callback;
+  }
+
+  // timeout for the socket to be returned from the callback
+  this.timeout = (opts && opts.timeout) || null;
+
+  this.options = opts;
+}
+inherits(Agent, EventEmitter);
+
+/**
+ * Override this function in your subclass!
+ */
+Agent.prototype.callback = function callback(req, opts) {
+  throw new Error(
+    '"agent-base" has no default implementation, you must subclass and override `callback()`'
+  );
+};
+
+/**
+ * Called by node-core's "_http_client.js" module when creating
+ * a new HTTP request with this Agent instance.
+ *
+ * @api public
+ */
+Agent.prototype.addRequest = function addRequest(req, _opts) {
+  const ownOpts = Object.assign({}, _opts);
+
+  // Set default `host` for HTTP to localhost
+  if (null == ownOpts.host) {
+    ownOpts.host = 'localhost';
+  }
+
+  // Set default `port` for HTTP if none was explicitly specified
+  if (null == ownOpts.port) {
+    ownOpts.port = ownOpts.secureEndpoint ? 443 : 80;
+  }
+
+  const opts = Object.assign({}, this.options, ownOpts);
+
+  if (opts.host && opts.path) {
+    // If both a `host` and `path` are specified then it's most likely the
+    // result of a `url.parse()` call... we need to remove the `path` portion so
+    // that `net.connect()` doesn't attempt to open that as a unix socket file.
+    delete opts.path;
+  }
+
+  delete opts.agent;
+  delete opts.hostname;
+  delete opts._defaultAgent;
+  delete opts.defaultPort;
+  delete opts.createConnection;
+
+  // Hint to use "Connection: close"
+  // XXX: non-documented `http` module API :(
+  req._last = true;
+  req.shouldKeepAlive = false;
+
+  // Create the `stream.Duplex` instance
+  let timeout;
+  let timedOut = false;
+  const timeoutMs = this.timeout;
+  const freeSocket = this.freeSocket;
+
+  function onerror(err) {
+    if (req._hadError) return;
+    req.emit('error', err);
+    // For Safety. Some additional errors might fire later on
+    // and we need to make sure we don't double-fire the error event.
+    req._hadError = true;
+  }
+
+  function ontimeout() {
+    timeout = null;
+    timedOut = true;
+    const err = new Error(
+      'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms'
+    );
+    err.code = 'ETIMEOUT';
+    onerror(err);
+  }
+
+  function callbackError(err) {
+    if (timedOut) return;
+    if (timeout != null) {
+      clearTimeout(timeout);
+      timeout = null;
+    }
+    onerror(err);
+  }
+
+  function onsocket(socket) {
+    if (timedOut) return;
+    if (timeout != null) {
+      clearTimeout(timeout);
+      timeout = null;
+    }
+    if (isAgent(socket)) {
+      // `socket` is actually an http.Agent instance, so relinquish
+      // responsibility for this `req` to the Agent from here on
+      socket.addRequest(req, opts);
+    } else if (socket) {
+      function onfree() {
+        freeSocket(socket, opts);
+      }
+      socket.on('free', onfree);
+      req.onSocket(socket);
+    } else {
+      const err = new Error(
+        'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`'
+      );
+      onerror(err);
+    }
+  }
+
+  if (!this._promisifiedCallback && this.callback.length >= 3) {
+    // Legacy callback function - convert to a Promise
+    this.callback = promisify(this.callback, this);
+    this._promisifiedCallback = true;
+  }
+
+  if (timeoutMs > 0) {
+    timeout = setTimeout(ontimeout, timeoutMs);
+  }
+
+  try {
+    Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError);
+  } catch (err) {
+    Promise.reject(err).catch(callbackError);
+  }
+};
+
+Agent.prototype.freeSocket = function freeSocket(socket, opts) {
+  // TODO reuse sockets
+  socket.destroy();
+};
+
+
+/***/ }),
+/* 121 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+const url = __webpack_require__(83);
+const https = __webpack_require__(116);
+
+/**
+ * This currently needs to be applied to all Node.js versions
+ * in order to determine if the `req` is an HTTP or HTTPS request.
+ *
+ * There is currently no PR attempting to move this property upstream.
+ */
+const patchMarker = "__agent_base_https_request_patched__";
+if (!https.request[patchMarker]) {
+  https.request = (function(request) {
+    return function(_options, cb) {
+      let options;
+      if (typeof _options === 'string') {
+        options = url.parse(_options);
+      } else {
+        options = Object.assign({}, _options);
+      }
+      if (null == options.port) {
+        options.port = 443;
+      }
+      options.secureEndpoint = true;
+      return request.call(https, options, cb);
+    };
+  })(https.request);
+  https.request[patchMarker] = true;
+}
+
+/**
+ * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the
+ * patched `https.request()`.
+ *
+ * Ref: https://github.com/nodejs/node/commit/5118f31
+ */
+https.get = function (_url, _options, cb) {
+    let options;
+    if (typeof _url === 'string' && _options && typeof _options !== 'function') {
+      options = Object.assign({}, url.parse(_url), _options);
+    } else if (!_options && !cb) {
+      options = _url;
+    } else if (!cb) {
+      options = _url;
+      cb = _options;
+    }
+
+  const req = https.request(options, cb);
+  req.end();
+  return req;
+};
+
+
+/***/ }),
+/* 122 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/* global module, require */
+module.exports = function () {
+
+    "use strict";
+
+    // Get a promise object. This may be native, or it may be polyfilled
+
+    var ES6Promise = __webpack_require__(123);
+
+    /**
+     * thatLooksLikeAPromiseToMe()
+     *
+     * Duck-types a promise.
+     *
+     * @param {object} o
+     * @return {bool} True if this resembles a promise
+     */
+    function thatLooksLikeAPromiseToMe(o) {
+        return o && typeof o.then === "function" && typeof o.catch === "function";
+    }
+
+    /**
+     * promisify()
+     *
+     * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into
+     * an ES6-compatible Promise. Promisify provides a default callback of the form (error, result)
+     * and rejects when `error` is truthy. You can also supply settings object as the second argument.
+     *
+     * @param {function} original - The function to promisify
+     * @param {object} settings - Settings object
+     * @param {object} settings.thisArg - A `this` context to use. If not set, assume `settings` _is_ `thisArg`
+     * @param {bool} settings.multiArgs - Should multiple arguments be returned as an array?
+     * @return {function} A promisified version of `original`
+     */
+    return function promisify(original, settings) {
+
+        return function () {
+            for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+                args[_key] = arguments[_key];
+            }
+
+            var returnMultipleArguments = settings && settings.multiArgs;
+
+            var target = void 0;
+            if (settings && settings.thisArg) {
+                target = settings.thisArg;
+            } else if (settings) {
+                target = settings;
+            }
+
+            // Return the promisified function
+            return new ES6Promise(function (resolve, reject) {
+
+                // Append the callback bound to the context
+                args.push(function callback(err) {
+
+                    if (err) {
+                        return reject(err);
                     }
-                },
-                'propertyNames': { '$ref': '#' },
-                'const': true,
-                'enum': {
-                    'type': 'array',
-                    'items': true,
-                    'minItems': 1,
-                    'uniqueItems': true
-                },
-                'type': {
-                    'anyOf': [
-                        { '$ref': '#/definitions/simpleTypes' },
-                        {
-                            'type': 'array',
-                            'items': { '$ref': '#/definitions/simpleTypes' },
-                            'minItems': 1,
-                            'uniqueItems': true
-                        }
-                    ]
-                },
-                'format': { 'type': 'string' },
-                'contentMediaType': { 'type': 'string' },
-                'contentEncoding': { 'type': 'string' },
-                'if': { '$ref': '#' },
-                'then': { '$ref': '#' },
-                'else': { '$ref': '#' },
-                'allOf': { '$ref': '#/definitions/schemaArray' },
-                'anyOf': { '$ref': '#/definitions/schemaArray' },
-                'oneOf': { '$ref': '#/definitions/schemaArray' },
-                'not': { '$ref': '#' }
-            },
-            'default': true
+
+                    for (var _len2 = arguments.length, values = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+                        values[_key2 - 1] = arguments[_key2];
+                    }
+
+                    if (false === !!returnMultipleArguments) {
+                        return resolve(values[0]);
+                    }
+
+                    resolve(values);
+                });
+
+                // Call the function
+                var response = original.apply(target, args);
+
+                // If it looks like original already returns a promise,
+                // then just resolve with that promise. Hopefully, the callback function we added will just be ignored.
+                if (thatLooksLikeAPromiseToMe(response)) {
+                    resolve(response);
+                }
+            });
+        };
+    };
+}();
+
+/***/ }),
+/* 123 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/* global self, window, module, global, require */
+module.exports = function () {
+
+    "use strict";
+
+    var globalObject = void 0;
+
+    function isFunction(x) {
+        return typeof x === "function";
+    }
+
+    // Seek the global object
+    if (global !== undefined) {
+        globalObject = global;
+    } else if (window !== undefined && window.document) {
+        globalObject = window;
+    } else {
+        globalObject = self;
+    }
+
+    // Test for any native promise implementation, and if that
+    // implementation appears to conform to the specificaton.
+    // This code mostly nicked from the es6-promise module polyfill
+    // and then fooled with.
+    var hasPromiseSupport = function () {
+
+        // No promise object at all, and it's a non-starter
+        if (!globalObject.hasOwnProperty("Promise")) {
+            return false;
+        }
+
+        // There is a Promise object. Does it conform to the spec?
+        var P = globalObject.Promise;
+
+        // Some of these methods are missing from
+        // Firefox/Chrome experimental implementations
+        if (!P.hasOwnProperty("resolve") || !P.hasOwnProperty("reject")) {
+            return false;
+        }
+
+        if (!P.hasOwnProperty("all") || !P.hasOwnProperty("race")) {
+            return false;
+        }
+
+        // Older version of the spec had a resolver object
+        // as the arg rather than a function
+        return function () {
+
+            var resolve = void 0;
+
+            var p = new globalObject.Promise(function (r) {
+                resolve = r;
+            });
+
+            if (p) {
+                return isFunction(resolve);
+            }
+
+            return false;
+        }();
+    }();
+
+    // Export the native Promise implementation if it
+    // looks like it matches the spec
+    if (hasPromiseSupport) {
+        return globalObject.Promise;
+    }
+
+    //  Otherwise, return the es6-promise polyfill by @jaffathecake.
+    return __webpack_require__(124).Promise;
+}();
+
+/***/ }),
+/* 124 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/*!
+ * @overview es6-promise - a tiny implementation of Promises/A+.
+ * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
+ * @license   Licensed under MIT license
+ *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
+ * @version   v4.2.8+1e68dce6
+ */
+
+(function (global, factory) {
+        true ? module.exports = factory() :
+       undefined;
+}(this, (function () { 'use strict';
+
+function objectOrFunction(x) {
+  var type = typeof x;
+  return x !== null && (type === 'object' || type === 'function');
+}
+
+function isFunction(x) {
+  return typeof x === 'function';
+}
+
+
+
+var _isArray = void 0;
+if (Array.isArray) {
+  _isArray = Array.isArray;
+} else {
+  _isArray = function (x) {
+    return Object.prototype.toString.call(x) === '[object Array]';
+  };
+}
+
+var isArray = _isArray;
+
+var len = 0;
+var vertxNext = void 0;
+var customSchedulerFn = void 0;
+
+var asap = function asap(callback, arg) {
+  queue[len] = callback;
+  queue[len + 1] = arg;
+  len += 2;
+  if (len === 2) {
+    // If len is 2, that means that we need to schedule an async flush.
+    // If additional callbacks are queued before the queue is flushed, they
+    // will be processed by this flush that we are scheduling.
+    if (customSchedulerFn) {
+      customSchedulerFn(flush);
+    } else {
+      scheduleFlush();
+    }
+  }
+};
+
+function setScheduler(scheduleFn) {
+  customSchedulerFn = scheduleFn;
+}
+
+function setAsap(asapFn) {
+  asap = asapFn;
+}
+
+var browserWindow = typeof window !== 'undefined' ? window : undefined;
+var browserGlobal = browserWindow || {};
+var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
+var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
+
+// test for web worker but not in IE10
+var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
+
+// node
+function useNextTick() {
+  // node version 0.10.x displays a deprecation warning when nextTick is used recursively
+  // see https://github.com/cujojs/when/issues/410 for details
+  return function () {
+    return process.nextTick(flush);
+  };
+}
+
+// vertx
+function useVertxTimer() {
+  if (typeof vertxNext !== 'undefined') {
+    return function () {
+      vertxNext(flush);
+    };
+  }
+
+  return useSetTimeout();
+}
+
+function useMutationObserver() {
+  var iterations = 0;
+  var observer = new BrowserMutationObserver(flush);
+  var node = document.createTextNode('');
+  observer.observe(node, { characterData: true });
+
+  return function () {
+    node.data = iterations = ++iterations % 2;
+  };
+}
+
+// web worker
+function useMessageChannel() {
+  var channel = new MessageChannel();
+  channel.port1.onmessage = flush;
+  return function () {
+    return channel.port2.postMessage(0);
+  };
+}
+
+function useSetTimeout() {
+  // Store setTimeout reference so es6-promise will be unaffected by
+  // other code modifying setTimeout (like sinon.useFakeTimers())
+  var globalSetTimeout = setTimeout;
+  return function () {
+    return globalSetTimeout(flush, 1);
+  };
+}
+
+var queue = new Array(1000);
+function flush() {
+  for (var i = 0; i < len; i += 2) {
+    var callback = queue[i];
+    var arg = queue[i + 1];
+
+    callback(arg);
+
+    queue[i] = undefined;
+    queue[i + 1] = undefined;
+  }
+
+  len = 0;
+}
+
+function attemptVertx() {
+  try {
+    var vertx = Function('return this')().require('vertx');
+    vertxNext = vertx.runOnLoop || vertx.runOnContext;
+    return useVertxTimer();
+  } catch (e) {
+    return useSetTimeout();
+  }
+}
+
+var scheduleFlush = void 0;
+// Decide what async method to use to triggering processing of queued callbacks:
+if (isNode) {
+  scheduleFlush = useNextTick();
+} else if (BrowserMutationObserver) {
+  scheduleFlush = useMutationObserver();
+} else if (isWorker) {
+  scheduleFlush = useMessageChannel();
+} else if (browserWindow === undefined && "function" === 'function') {
+  scheduleFlush = attemptVertx();
+} else {
+  scheduleFlush = useSetTimeout();
+}
+
+function then(onFulfillment, onRejection) {
+  var parent = this;
+
+  var child = new this.constructor(noop);
+
+  if (child[PROMISE_ID] === undefined) {
+    makePromise(child);
+  }
+
+  var _state = parent._state;
+
+
+  if (_state) {
+    var callback = arguments[_state - 1];
+    asap(function () {
+      return invokeCallback(_state, child, callback, parent._result);
+    });
+  } else {
+    subscribe(parent, child, onFulfillment, onRejection);
+  }
+
+  return child;
+}
+
+/**
+  `Promise.resolve` returns a promise that will become resolved with the
+  passed `value`. It is shorthand for the following:
+
+  ```javascript
+  let promise = new Promise(function(resolve, reject){
+    resolve(1);
+  });
+
+  promise.then(function(value){
+    // value === 1
+  });
+  ```
+
+  Instead of writing the above, your code now simply becomes the following:
+
+  ```javascript
+  let promise = Promise.resolve(1);
+
+  promise.then(function(value){
+    // value === 1
+  });
+  ```
+
+  @method resolve
+  @static
+  @param {Any} value value that the returned promise will be resolved with
+  Useful for tooling.
+  @return {Promise} a promise that will become fulfilled with the given
+  `value`
+*/
+function resolve$1(object) {
+  /*jshint validthis:true */
+  var Constructor = this;
+
+  if (object && typeof object === 'object' && object.constructor === Constructor) {
+    return object;
+  }
+
+  var promise = new Constructor(noop);
+  resolve(promise, object);
+  return promise;
+}
+
+var PROMISE_ID = Math.random().toString(36).substring(2);
+
+function noop() {}
+
+var PENDING = void 0;
+var FULFILLED = 1;
+var REJECTED = 2;
+
+function selfFulfillment() {
+  return new TypeError("You cannot resolve a promise with itself");
+}
+
+function cannotReturnOwn() {
+  return new TypeError('A promises callback cannot return that same promise.');
+}
+
+function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
+  try {
+    then$$1.call(value, fulfillmentHandler, rejectionHandler);
+  } catch (e) {
+    return e;
+  }
+}
+
+function handleForeignThenable(promise, thenable, then$$1) {
+  asap(function (promise) {
+    var sealed = false;
+    var error = tryThen(then$$1, thenable, function (value) {
+      if (sealed) {
+        return;
+      }
+      sealed = true;
+      if (thenable !== value) {
+        resolve(promise, value);
+      } else {
+        fulfill(promise, value);
+      }
+    }, function (reason) {
+      if (sealed) {
+        return;
+      }
+      sealed = true;
+
+      reject(promise, reason);
+    }, 'Settle: ' + (promise._label || ' unknown promise'));
+
+    if (!sealed && error) {
+      sealed = true;
+      reject(promise, error);
+    }
+  }, promise);
+}
+
+function handleOwnThenable(promise, thenable) {
+  if (thenable._state === FULFILLED) {
+    fulfill(promise, thenable._result);
+  } else if (thenable._state === REJECTED) {
+    reject(promise, thenable._result);
+  } else {
+    subscribe(thenable, undefined, function (value) {
+      return resolve(promise, value);
+    }, function (reason) {
+      return reject(promise, reason);
+    });
+  }
+}
+
+function handleMaybeThenable(promise, maybeThenable, then$$1) {
+  if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
+    handleOwnThenable(promise, maybeThenable);
+  } else {
+    if (then$$1 === undefined) {
+      fulfill(promise, maybeThenable);
+    } else if (isFunction(then$$1)) {
+      handleForeignThenable(promise, maybeThenable, then$$1);
+    } else {
+      fulfill(promise, maybeThenable);
+    }
+  }
+}
+
+function resolve(promise, value) {
+  if (promise === value) {
+    reject(promise, selfFulfillment());
+  } else if (objectOrFunction(value)) {
+    var then$$1 = void 0;
+    try {
+      then$$1 = value.then;
+    } catch (error) {
+      reject(promise, error);
+      return;
+    }
+    handleMaybeThenable(promise, value, then$$1);
+  } else {
+    fulfill(promise, value);
+  }
+}
+
+function publishRejection(promise) {
+  if (promise._onerror) {
+    promise._onerror(promise._result);
+  }
+
+  publish(promise);
+}
+
+function fulfill(promise, value) {
+  if (promise._state !== PENDING) {
+    return;
+  }
+
+  promise._result = value;
+  promise._state = FULFILLED;
+
+  if (promise._subscribers.length !== 0) {
+    asap(publish, promise);
+  }
+}
+
+function reject(promise, reason) {
+  if (promise._state !== PENDING) {
+    return;
+  }
+  promise._state = REJECTED;
+  promise._result = reason;
+
+  asap(publishRejection, promise);
+}
+
+function subscribe(parent, child, onFulfillment, onRejection) {
+  var _subscribers = parent._subscribers;
+  var length = _subscribers.length;
+
+
+  parent._onerror = null;
+
+  _subscribers[length] = child;
+  _subscribers[length + FULFILLED] = onFulfillment;
+  _subscribers[length + REJECTED] = onRejection;
+
+  if (length === 0 && parent._state) {
+    asap(publish, parent);
+  }
+}
+
+function publish(promise) {
+  var subscribers = promise._subscribers;
+  var settled = promise._state;
+
+  if (subscribers.length === 0) {
+    return;
+  }
+
+  var child = void 0,
+      callback = void 0,
+      detail = promise._result;
+
+  for (var i = 0; i < subscribers.length; i += 3) {
+    child = subscribers[i];
+    callback = subscribers[i + settled];
+
+    if (child) {
+      invokeCallback(settled, child, callback, detail);
+    } else {
+      callback(detail);
+    }
+  }
+
+  promise._subscribers.length = 0;
+}
+
+function invokeCallback(settled, promise, callback, detail) {
+  var hasCallback = isFunction(callback),
+      value = void 0,
+      error = void 0,
+      succeeded = true;
+
+  if (hasCallback) {
+    try {
+      value = callback(detail);
+    } catch (e) {
+      succeeded = false;
+      error = e;
+    }
+
+    if (promise === value) {
+      reject(promise, cannotReturnOwn());
+      return;
+    }
+  } else {
+    value = detail;
+  }
+
+  if (promise._state !== PENDING) {
+    // noop
+  } else if (hasCallback && succeeded) {
+    resolve(promise, value);
+  } else if (succeeded === false) {
+    reject(promise, error);
+  } else if (settled === FULFILLED) {
+    fulfill(promise, value);
+  } else if (settled === REJECTED) {
+    reject(promise, value);
+  }
+}
+
+function initializePromise(promise, resolver) {
+  try {
+    resolver(function resolvePromise(value) {
+      resolve(promise, value);
+    }, function rejectPromise(reason) {
+      reject(promise, reason);
+    });
+  } catch (e) {
+    reject(promise, e);
+  }
+}
+
+var id = 0;
+function nextId() {
+  return id++;
+}
+
+function makePromise(promise) {
+  promise[PROMISE_ID] = id++;
+  promise._state = undefined;
+  promise._result = undefined;
+  promise._subscribers = [];
+}
+
+function validationError() {
+  return new Error('Array Methods must be provided an Array');
+}
+
+var Enumerator = function () {
+  function Enumerator(Constructor, input) {
+    this._instanceConstructor = Constructor;
+    this.promise = new Constructor(noop);
+
+    if (!this.promise[PROMISE_ID]) {
+      makePromise(this.promise);
+    }
+
+    if (isArray(input)) {
+      this.length = input.length;
+      this._remaining = input.length;
+
+      this._result = new Array(this.length);
+
+      if (this.length === 0) {
+        fulfill(this.promise, this._result);
+      } else {
+        this.length = this.length || 0;
+        this._enumerate(input);
+        if (this._remaining === 0) {
+          fulfill(this.promise, this._result);
+        }
+      }
+    } else {
+      reject(this.promise, validationError());
+    }
+  }
+
+  Enumerator.prototype._enumerate = function _enumerate(input) {
+    for (var i = 0; this._state === PENDING && i < input.length; i++) {
+      this._eachEntry(input[i], i);
+    }
+  };
+
+  Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
+    var c = this._instanceConstructor;
+    var resolve$$1 = c.resolve;
+
+
+    if (resolve$$1 === resolve$1) {
+      var _then = void 0;
+      var error = void 0;
+      var didError = false;
+      try {
+        _then = entry.then;
+      } catch (e) {
+        didError = true;
+        error = e;
+      }
+
+      if (_then === then && entry._state !== PENDING) {
+        this._settledAt(entry._state, i, entry._result);
+      } else if (typeof _then !== 'function') {
+        this._remaining--;
+        this._result[i] = entry;
+      } else if (c === Promise$1) {
+        var promise = new c(noop);
+        if (didError) {
+          reject(promise, error);
+        } else {
+          handleMaybeThenable(promise, entry, _then);
+        }
+        this._willSettleAt(promise, i);
+      } else {
+        this._willSettleAt(new c(function (resolve$$1) {
+          return resolve$$1(entry);
+        }), i);
+      }
+    } else {
+      this._willSettleAt(resolve$$1(entry), i);
+    }
+  };
+
+  Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
+    var promise = this.promise;
+
+
+    if (promise._state === PENDING) {
+      this._remaining--;
+
+      if (state === REJECTED) {
+        reject(promise, value);
+      } else {
+        this._result[i] = value;
+      }
+    }
+
+    if (this._remaining === 0) {
+      fulfill(promise, this._result);
+    }
+  };
+
+  Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
+    var enumerator = this;
+
+    subscribe(promise, undefined, function (value) {
+      return enumerator._settledAt(FULFILLED, i, value);
+    }, function (reason) {
+      return enumerator._settledAt(REJECTED, i, reason);
+    });
+  };
+
+  return Enumerator;
+}();
+
+/**
+  `Promise.all` accepts an array of promises, and returns a new promise which
+  is fulfilled with an array of fulfillment values for the passed promises, or
+  rejected with the reason of the first passed promise to be rejected. It casts all
+  elements of the passed iterable to promises as it runs this algorithm.
+
+  Example:
+
+  ```javascript
+  let promise1 = resolve(1);
+  let promise2 = resolve(2);
+  let promise3 = resolve(3);
+  let promises = [ promise1, promise2, promise3 ];
+
+  Promise.all(promises).then(function(array){
+    // The array here would be [ 1, 2, 3 ];
+  });
+  ```
+
+  If any of the `promises` given to `all` are rejected, the first promise
+  that is rejected will be given as an argument to the returned promises's
+  rejection handler. For example:
+
+  Example:
+
+  ```javascript
+  let promise1 = resolve(1);
+  let promise2 = reject(new Error("2"));
+  let promise3 = reject(new Error("3"));
+  let promises = [ promise1, promise2, promise3 ];
+
+  Promise.all(promises).then(function(array){
+    // Code here never runs because there are rejected promises!
+  }, function(error) {
+    // error.message === "2"
+  });
+  ```
+
+  @method all
+  @static
+  @param {Array} entries array of promises
+  @param {String} label optional string for labeling the promise.
+  Useful for tooling.
+  @return {Promise} promise that is fulfilled when all `promises` have been
+  fulfilled, or rejected if any of them become rejected.
+  @static
+*/
+function all(entries) {
+  return new Enumerator(this, entries).promise;
+}
+
+/**
+  `Promise.race` returns a new promise which is settled in the same way as the
+  first passed promise to settle.
+
+  Example:
+
+  ```javascript
+  let promise1 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      resolve('promise 1');
+    }, 200);
+  });
+
+  let promise2 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      resolve('promise 2');
+    }, 100);
+  });
+
+  Promise.race([promise1, promise2]).then(function(result){
+    // result === 'promise 2' because it was resolved before promise1
+    // was resolved.
+  });
+  ```
+
+  `Promise.race` is deterministic in that only the state of the first
+  settled promise matters. For example, even if other promises given to the
+  `promises` array argument are resolved, but the first settled promise has
+  become rejected before the other promises became fulfilled, the returned
+  promise will become rejected:
+
+  ```javascript
+  let promise1 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      resolve('promise 1');
+    }, 200);
+  });
+
+  let promise2 = new Promise(function(resolve, reject){
+    setTimeout(function(){
+      reject(new Error('promise 2'));
+    }, 100);
+  });
+
+  Promise.race([promise1, promise2]).then(function(result){
+    // Code here never runs
+  }, function(reason){
+    // reason.message === 'promise 2' because promise 2 became rejected before
+    // promise 1 became fulfilled
+  });
+  ```
+
+  An example real-world use case is implementing timeouts:
+
+  ```javascript
+  Promise.race([ajax('foo.json'), timeout(5000)])
+  ```
+
+  @method race
+  @static
+  @param {Array} promises array of promises to observe
+  Useful for tooling.
+  @return {Promise} a promise which settles in the same way as the first passed
+  promise to settle.
+*/
+function race(entries) {
+  /*jshint validthis:true */
+  var Constructor = this;
+
+  if (!isArray(entries)) {
+    return new Constructor(function (_, reject) {
+      return reject(new TypeError('You must pass an array to race.'));
+    });
+  } else {
+    return new Constructor(function (resolve, reject) {
+      var length = entries.length;
+      for (var i = 0; i < length; i++) {
+        Constructor.resolve(entries[i]).then(resolve, reject);
+      }
+    });
+  }
+}
+
+/**
+  `Promise.reject` returns a promise rejected with the passed `reason`.
+  It is shorthand for the following:
+
+  ```javascript
+  let promise = new Promise(function(resolve, reject){
+    reject(new Error('WHOOPS'));
+  });
+
+  promise.then(function(value){
+    // Code here doesn't run because the promise is rejected!
+  }, function(reason){
+    // reason.message === 'WHOOPS'
+  });
+  ```
+
+  Instead of writing the above, your code now simply becomes the following:
+
+  ```javascript
+  let promise = Promise.reject(new Error('WHOOPS'));
+
+  promise.then(function(value){
+    // Code here doesn't run because the promise is rejected!
+  }, function(reason){
+    // reason.message === 'WHOOPS'
+  });
+  ```
+
+  @method reject
+  @static
+  @param {Any} reason value that the returned promise will be rejected with.
+  Useful for tooling.
+  @return {Promise} a promise rejected with the given `reason`.
+*/
+function reject$1(reason) {
+  /*jshint validthis:true */
+  var Constructor = this;
+  var promise = new Constructor(noop);
+  reject(promise, reason);
+  return promise;
+}
+
+function needsResolver() {
+  throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+}
+
+function needsNew() {
+  throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
+}
+
+/**
+  Promise objects represent the eventual result of an asynchronous operation. The
+  primary way of interacting with a promise is through its `then` method, which
+  registers callbacks to receive either a promise's eventual value or the reason
+  why the promise cannot be fulfilled.
+
+  Terminology
+  -----------
+
+  - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
+  - `thenable` is an object or function that defines a `then` method.
+  - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
+  - `exception` is a value that is thrown using the throw statement.
+  - `reason` is a value that indicates why a promise was rejected.
+  - `settled` the final resting state of a promise, fulfilled or rejected.
+
+  A promise can be in one of three states: pending, fulfilled, or rejected.
+
+  Promises that are fulfilled have a fulfillment value and are in the fulfilled
+  state.  Promises that are rejected have a rejection reason and are in the
+  rejected state.  A fulfillment value is never a thenable.
+
+  Promises can also be said to *resolve* a value.  If this value is also a
+  promise, then the original promise's settled state will match the value's
+  settled state.  So a promise that *resolves* a promise that rejects will
+  itself reject, and a promise that *resolves* a promise that fulfills will
+  itself fulfill.
+
+
+  Basic Usage:
+  ------------
+
+  ```js
+  let promise = new Promise(function(resolve, reject) {
+    // on success
+    resolve(value);
+
+    // on failure
+    reject(reason);
+  });
+
+  promise.then(function(value) {
+    // on fulfillment
+  }, function(reason) {
+    // on rejection
+  });
+  ```
+
+  Advanced Usage:
+  ---------------
+
+  Promises shine when abstracting away asynchronous interactions such as
+  `XMLHttpRequest`s.
+
+  ```js
+  function getJSON(url) {
+    return new Promise(function(resolve, reject){
+      let xhr = new XMLHttpRequest();
+
+      xhr.open('GET', url);
+      xhr.onreadystatechange = handler;
+      xhr.responseType = 'json';
+      xhr.setRequestHeader('Accept', 'application/json');
+      xhr.send();
+
+      function handler() {
+        if (this.readyState === this.DONE) {
+          if (this.status === 200) {
+            resolve(this.response);
+          } else {
+            reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
+          }
         }
+      };
+    });
+  }
+
+  getJSON('/posts.json').then(function(json) {
+    // on fulfillment
+  }, function(reason) {
+    // on rejection
+  });
+  ```
+
+  Unlike callbacks, promises are great composable primitives.
+
+  ```js
+  Promise.all([
+    getJSON('/posts'),
+    getJSON('/comments')
+  ]).then(function(values){
+    values[0] // => postsJSON
+    values[1] // => commentsJSON
+
+    return values;
+  });
+  ```
+
+  @class Promise
+  @param {Function} resolver
+  Useful for tooling.
+  @constructor
+*/
+
+var Promise$1 = function () {
+  function Promise(resolver) {
+    this[PROMISE_ID] = nextId();
+    this._result = this._state = undefined;
+    this._subscribers = [];
+
+    if (noop !== resolver) {
+      typeof resolver !== 'function' && needsResolver();
+      this instanceof Promise ? initializePromise(this, resolver) : needsNew();
+    }
+  }
+
+  /**
+  The primary way of interacting with a promise is through its `then` method,
+  which registers callbacks to receive either a promise's eventual value or the
+  reason why the promise cannot be fulfilled.
+   ```js
+  findUser().then(function(user){
+    // user is available
+  }, function(reason){
+    // user is unavailable, and you are given the reason why
+  });
+  ```
+   Chaining
+  --------
+   The return value of `then` is itself a promise.  This second, 'downstream'
+  promise is resolved with the return value of the first promise's fulfillment
+  or rejection handler, or rejected if the handler throws an exception.
+   ```js
+  findUser().then(function (user) {
+    return user.name;
+  }, function (reason) {
+    return 'default name';
+  }).then(function (userName) {
+    // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
+    // will be `'default name'`
+  });
+   findUser().then(function (user) {
+    throw new Error('Found user, but still unhappy');
+  }, function (reason) {
+    throw new Error('`findUser` rejected and we're unhappy');
+  }).then(function (value) {
+    // never reached
+  }, function (reason) {
+    // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
+    // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
+  });
+  ```
+  If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
+   ```js
+  findUser().then(function (user) {
+    throw new PedagogicalException('Upstream error');
+  }).then(function (value) {
+    // never reached
+  }).then(function (value) {
+    // never reached
+  }, function (reason) {
+    // The `PedgagocialException` is propagated all the way down to here
+  });
+  ```
+   Assimilation
+  ------------
+   Sometimes the value you want to propagate to a downstream promise can only be
+  retrieved asynchronously. This can be achieved by returning a promise in the
+  fulfillment or rejection handler. The downstream promise will then be pending
+  until the returned promise is settled. This is called *assimilation*.
+   ```js
+  findUser().then(function (user) {
+    return findCommentsByAuthor(user);
+  }).then(function (comments) {
+    // The user's comments are now available
+  });
+  ```
+   If the assimliated promise rejects, then the downstream promise will also reject.
+   ```js
+  findUser().then(function (user) {
+    return findCommentsByAuthor(user);
+  }).then(function (comments) {
+    // If `findCommentsByAuthor` fulfills, we'll have the value here
+  }, function (reason) {
+    // If `findCommentsByAuthor` rejects, we'll have the reason here
+  });
+  ```
+   Simple Example
+  --------------
+   Synchronous Example
+   ```javascript
+  let result;
+   try {
+    result = findResult();
+    // success
+  } catch(reason) {
+    // failure
+  }
+  ```
+   Errback Example
+   ```js
+  findResult(function(result, err){
+    if (err) {
+      // failure
+    } else {
+      // success
+    }
+  });
+  ```
+   Promise Example;
+   ```javascript
+  findResult().then(function(result){
+    // success
+  }, function(reason){
+    // failure
+  });
+  ```
+   Advanced Example
+  --------------
+   Synchronous Example
+   ```javascript
+  let author, books;
+   try {
+    author = findAuthor();
+    books  = findBooksByAuthor(author);
+    // success
+  } catch(reason) {
+    // failure
+  }
+  ```
+   Errback Example
+   ```js
+   function foundBooks(books) {
+   }
+   function failure(reason) {
+   }
+   findAuthor(function(author, err){
+    if (err) {
+      failure(err);
+      // failure
+    } else {
+      try {
+        findBoooksByAuthor(author, function(books, err) {
+          if (err) {
+            failure(err);
+          } else {
+            try {
+              foundBooks(books);
+            } catch(reason) {
+              failure(reason);
+            }
+          }
+        });
+      } catch(error) {
+        failure(err);
+      }
+      // success
+    }
+  });
+  ```
+   Promise Example;
+   ```javascript
+  findAuthor().
+    then(findBooksByAuthor).
+    then(function(books){
+      // found books
+  }).catch(function(reason){
+    // something went wrong
+  });
+  ```
+   @method then
+  @param {Function} onFulfilled
+  @param {Function} onRejected
+  Useful for tooling.
+  @return {Promise}
+  */
+
+  /**
+  `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
+  as the catch block of a try/catch statement.
+  ```js
+  function findAuthor(){
+  throw new Error('couldn't find that author');
+  }
+  // synchronous
+  try {
+  findAuthor();
+  } catch(reason) {
+  // something went wrong
+  }
+  // async with promises
+  findAuthor().catch(function(reason){
+  // something went wrong
+  });
+  ```
+  @method catch
+  @param {Function} onRejection
+  Useful for tooling.
+  @return {Promise}
+  */
+
+
+  Promise.prototype.catch = function _catch(onRejection) {
+    return this.then(null, onRejection);
+  };
+
+  /**
+    `finally` will be invoked regardless of the promise's fate just as native
+    try/catch/finally behaves
+  
+    Synchronous example:
+  
+    ```js
+    findAuthor() {
+      if (Math.random() > 0.5) {
+        throw new Error();
+      }
+      return new Author();
+    }
+  
+    try {
+      return findAuthor(); // succeed or fail
+    } catch(error) {
+      return findOtherAuther();
+    } finally {
+      // always runs
+      // doesn't affect the return value
+    }
+    ```
+  
+    Asynchronous example:
+  
+    ```js
+    findAuthor().catch(function(reason){
+      return findOtherAuther();
+    }).finally(function(){
+      // author was either found, or not
+    });
+    ```
+  
+    @method finally
+    @param {Function} callback
+    @return {Promise}
+  */
+
+
+  Promise.prototype.finally = function _finally(callback) {
+    var promise = this;
+    var constructor = promise.constructor;
+
+    if (isFunction(callback)) {
+      return promise.then(function (value) {
+        return constructor.resolve(callback()).then(function () {
+          return value;
+        });
+      }, function (reason) {
+        return constructor.resolve(callback()).then(function () {
+          throw reason;
+        });
+      });
+    }
+
+    return promise.then(callback, callback);
+  };
+
+  return Promise;
+}();
+
+Promise$1.prototype.then = then;
+Promise$1.all = all;
+Promise$1.race = race;
+Promise$1.resolve = resolve$1;
+Promise$1.reject = reject$1;
+Promise$1._setScheduler = setScheduler;
+Promise$1._setAsap = setAsap;
+Promise$1._asap = asap;
+
+/*global self*/
+function polyfill() {
+  var local = void 0;
+
+  if (typeof global !== 'undefined') {
+    local = global;
+  } else if (typeof self !== 'undefined') {
+    local = self;
+  } else {
+    try {
+      local = Function('return this')();
+    } catch (e) {
+      throw new Error('polyfill failed because global object is unavailable in this environment');
+    }
+  }
+
+  var P = local.Promise;
+
+  if (P) {
+    var promiseToString = null;
+    try {
+      promiseToString = Object.prototype.toString.call(P.resolve());
+    } catch (e) {
+      // silently ignored
+    }
+
+    if (promiseToString === '[object Promise]' && !P.cast) {
+      return;
+    }
+  }
+
+  local.Promise = Promise$1;
+}
+
+// Strange compat..
+Promise$1.polyfill = polyfill;
+Promise$1.Promise = Promise$1;
+
+return Promise$1;
+
+})));
+
+
+
+//# sourceMappingURL=es6-promise.map
+
+
+/***/ }),
+/* 125 */
+/***/ (function(module, exports) {
+
+module.exports = require("events");
+
+/***/ }),
+/* 126 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Detect Electron renderer process, which is node, but we should
+ * treat as a browser.
+ */
+
+if (typeof process === 'undefined' || process.type === 'renderer') {
+  module.exports = __webpack_require__(127);
+} else {
+  module.exports = __webpack_require__(130);
+}
+
+
+/***/ }),
+/* 127 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * This is the web browser implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = __webpack_require__(128);
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = 'undefined' != typeof chrome
+               && 'undefined' != typeof chrome.storage
+                  ? chrome.storage.local
+                  : localstorage();
+
+/**
+ * Colors.
+ */
+
+exports.colors = [
+  '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
+  '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
+  '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
+  '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
+  '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
+  '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
+  '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
+  '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
+  '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
+  '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
+  '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
+];
+
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+
+function useColors() {
+  // NB: In an Electron preload script, document will be defined but not fully
+  // initialized. Since we know we're in Chrome, we'll just detect this case
+  // explicitly
+  if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+    return true;
+  }
+
+  // Internet Explorer and Edge do not support colors.
+  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+    return false;
+  }
+
+  // is webkit? http://stackoverflow.com/a/16459606/376773
+  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
+    // is firebug? http://stackoverflow.com/a/398120/376773
+    (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
+    // is firefox >= v31?
+    // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
+    // double check webkit in userAgent just in case we are in a worker
+    (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
+}
+
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+exports.formatters.j = function(v) {
+  try {
+    return JSON.stringify(v);
+  } catch (err) {
+    return '[UnexpectedJSONParseError]: ' + err.message;
+  }
+};
+
+
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+  var useColors = this.useColors;
+
+  args[0] = (useColors ? '%c' : '')
+    + this.namespace
+    + (useColors ? ' %c' : ' ')
+    + args[0]
+    + (useColors ? '%c ' : ' ')
+    + '+' + exports.humanize(this.diff);
+
+  if (!useColors) return;
+
+  var c = 'color: ' + this.color;
+  args.splice(1, 0, c, 'color: inherit')
+
+  // the final "%c" is somewhat tricky, because there could be other
+  // arguments passed either before or after the %c, so we need to
+  // figure out the correct index to insert the CSS into
+  var index = 0;
+  var lastC = 0;
+  args[0].replace(/%[a-zA-Z%]/g, function(match) {
+    if ('%%' === match) return;
+    index++;
+    if ('%c' === match) {
+      // we only are interested in the *last* %c
+      // (the user may have provided their own)
+      lastC = index;
+    }
+  });
+
+  args.splice(lastC, 0, c);
+}
+
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+function log() {
+  // this hackery is required for IE8/9, where
+  // the `console.log` function doesn't have 'apply'
+  return 'object' === typeof console
+    && console.log
+    && Function.prototype.apply.call(console.log, console, arguments);
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+  try {
+    if (null == namespaces) {
+      exports.storage.removeItem('debug');
+    } else {
+      exports.storage.debug = namespaces;
+    }
+  } catch(e) {}
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+  var r;
+  try {
+    r = exports.storage.debug;
+  } catch(e) {}
+
+  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+  if (!r && typeof process !== 'undefined' && 'env' in process) {
+    r = process.env.DEBUG;
+  }
+
+  return r;
+}
+
+/**
+ * Enable namespaces listed in `localStorage.debug` initially.
+ */
+
+exports.enable(load());
+
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+function localstorage() {
+  try {
+    return window.localStorage;
+  } catch (e) {}
+}
+
+
+/***/ }),
+/* 128 */
+/***/ (function(module, exports, __webpack_require__) {
+
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
+exports.coerce = coerce;
+exports.disable = disable;
+exports.enable = enable;
+exports.enabled = enabled;
+exports.humanize = __webpack_require__(129);
+
+/**
+ * Active `debug` instances.
+ */
+exports.instances = [];
+
+/**
+ * The currently active debug mode names, and names to skip.
+ */
+
+exports.names = [];
+exports.skips = [];
+
+/**
+ * Map of special "%n" handling functions, for the debug "format" argument.
+ *
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+ */
+
+exports.formatters = {};
+
+/**
+ * Select a color.
+ * @param {String} namespace
+ * @return {Number}
+ * @api private
+ */
+
+function selectColor(namespace) {
+  var hash = 0, i;
+
+  for (i in namespace) {
+    hash  = ((hash << 5) - hash) + namespace.charCodeAt(i);
+    hash |= 0; // Convert to 32bit integer
+  }
+
+  return exports.colors[Math.abs(hash) % exports.colors.length];
+}
+
+/**
+ * Create a debugger with the given `namespace`.
+ *
+ * @param {String} namespace
+ * @return {Function}
+ * @api public
+ */
+
+function createDebug(namespace) {
+
+  var prevTime;
+
+  function debug() {
+    // disabled?
+    if (!debug.enabled) return;
+
+    var self = debug;
+
+    // set `diff` timestamp
+    var curr = +new Date();
+    var ms = curr - (prevTime || curr);
+    self.diff = ms;
+    self.prev = prevTime;
+    self.curr = curr;
+    prevTime = curr;
+
+    // turn the `arguments` into a proper Array
+    var args = new Array(arguments.length);
+    for (var i = 0; i < args.length; i++) {
+      args[i] = arguments[i];
+    }
+
+    args[0] = exports.coerce(args[0]);
+
+    if ('string' !== typeof args[0]) {
+      // anything else let's inspect with %O
+      args.unshift('%O');
+    }
+
+    // apply any `formatters` transformations
+    var index = 0;
+    args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
+      // if we encounter an escaped % then don't increase the array index
+      if (match === '%%') return match;
+      index++;
+      var formatter = exports.formatters[format];
+      if ('function' === typeof formatter) {
+        var val = args[index];
+        match = formatter.call(self, val);
+
+        // now we need to remove `args[index]` since it's inlined in the `format`
+        args.splice(index, 1);
+        index--;
+      }
+      return match;
+    });
+
+    // apply env-specific formatting (colors, etc.)
+    exports.formatArgs.call(self, args);
+
+    var logFn = debug.log || exports.log || console.log.bind(console);
+    logFn.apply(self, args);
+  }
+
+  debug.namespace = namespace;
+  debug.enabled = exports.enabled(namespace);
+  debug.useColors = exports.useColors();
+  debug.color = selectColor(namespace);
+  debug.destroy = destroy;
+
+  // env-specific initialization logic for debug instances
+  if ('function' === typeof exports.init) {
+    exports.init(debug);
+  }
+
+  exports.instances.push(debug);
+
+  return debug;
+}
+
+function destroy () {
+  var index = exports.instances.indexOf(this);
+  if (index !== -1) {
+    exports.instances.splice(index, 1);
+    return true;
+  } else {
+    return false;
+  }
+}
+
+/**
+ * Enables a debug mode by namespaces. This can include modes
+ * separated by a colon and wildcards.
+ *
+ * @param {String} namespaces
+ * @api public
+ */
+
+function enable(namespaces) {
+  exports.save(namespaces);
+
+  exports.names = [];
+  exports.skips = [];
+
+  var i;
+  var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+  var len = split.length;
+
+  for (i = 0; i < len; i++) {
+    if (!split[i]) continue; // ignore empty strings
+    namespaces = split[i].replace(/\*/g, '.*?');
+    if (namespaces[0] === '-') {
+      exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+    } else {
+      exports.names.push(new RegExp('^' + namespaces + '$'));
+    }
+  }
+
+  for (i = 0; i < exports.instances.length; i++) {
+    var instance = exports.instances[i];
+    instance.enabled = exports.enabled(instance.namespace);
+  }
+}
+
+/**
+ * Disable debug output.
+ *
+ * @api public
+ */
+
+function disable() {
+  exports.enable('');
+}
+
+/**
+ * Returns true if the given mode name is enabled, false otherwise.
+ *
+ * @param {String} name
+ * @return {Boolean}
+ * @api public
+ */
+
+function enabled(name) {
+  if (name[name.length - 1] === '*') {
+    return true;
+  }
+  var i, len;
+  for (i = 0, len = exports.skips.length; i < len; i++) {
+    if (exports.skips[i].test(name)) {
+      return false;
+    }
+  }
+  for (i = 0, len = exports.names.length; i < len; i++) {
+    if (exports.names[i].test(name)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+/**
+ * Coerce `val`.
+ *
+ * @param {Mixed} val
+ * @return {Mixed}
+ * @api private
+ */
+
+function coerce(val) {
+  if (val instanceof Error) return val.stack || val.message;
+  return val;
+}
+
+
+/***/ }),
+/* 129 */
+/***/ (function(module, exports) {
+
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ *  - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+  options = options || {};
+  var type = typeof val;
+  if (type === 'string' && val.length > 0) {
+    return parse(val);
+  } else if (type === 'number' && isNaN(val) === false) {
+    return options.long ? fmtLong(val) : fmtShort(val);
+  }
+  throw new Error(
+    'val is not a non-empty string or a valid number. val=' +
+      JSON.stringify(val)
+  );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+  str = String(str);
+  if (str.length > 100) {
+    return;
+  }
+  var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
+    str
+  );
+  if (!match) {
+    return;
+  }
+  var n = parseFloat(match[1]);
+  var type = (match[2] || 'ms').toLowerCase();
+  switch (type) {
+    case 'years':
+    case 'year':
+    case 'yrs':
+    case 'yr':
+    case 'y':
+      return n * y;
+    case 'days':
+    case 'day':
+    case 'd':
+      return n * d;
+    case 'hours':
+    case 'hour':
+    case 'hrs':
+    case 'hr':
+    case 'h':
+      return n * h;
+    case 'minutes':
+    case 'minute':
+    case 'mins':
+    case 'min':
+    case 'm':
+      return n * m;
+    case 'seconds':
+    case 'second':
+    case 'secs':
+    case 'sec':
+    case 's':
+      return n * s;
+    case 'milliseconds':
+    case 'millisecond':
+    case 'msecs':
+    case 'msec':
+    case 'ms':
+      return n;
+    default:
+      return undefined;
+  }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+  if (ms >= d) {
+    return Math.round(ms / d) + 'd';
+  }
+  if (ms >= h) {
+    return Math.round(ms / h) + 'h';
+  }
+  if (ms >= m) {
+    return Math.round(ms / m) + 'm';
+  }
+  if (ms >= s) {
+    return Math.round(ms / s) + 's';
+  }
+  return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+  return plural(ms, d, 'day') ||
+    plural(ms, h, 'hour') ||
+    plural(ms, m, 'minute') ||
+    plural(ms, s, 'second') ||
+    ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, n, name) {
+  if (ms < n) {
+    return;
+  }
+  if (ms < n * 1.5) {
+    return Math.floor(ms / n) + ' ' + name;
+  }
+  return Math.ceil(ms / n) + ' ' + name + 's';
+}
+
+
+/***/ }),
+/* 130 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Module dependencies.
+ */
+
+var tty = __webpack_require__(131);
+var util = __webpack_require__(3);
+
+/**
+ * This is the Node.js implementation of `debug()`.
+ *
+ * Expose `debug()` as the module.
+ */
+
+exports = module.exports = __webpack_require__(128);
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+
+/**
+ * Colors.
+ */
+
+exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+
+try {
+  var supportsColor = __webpack_require__(132);
+  if (supportsColor && supportsColor.level >= 2) {
+    exports.colors = [
+      20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
+      69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
+      135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+      172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
+      205, 206, 207, 208, 209, 214, 215, 220, 221
+    ];
+  }
+} catch (err) {
+  // swallow - we only care if `supports-color` is available; it doesn't have to be.
+}
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+  return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+  // camel-case
+  var prop = key
+    .substring(6)
+    .toLowerCase()
+    .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+
+  // coerce string value into JS value
+  var val = process.env[key];
+  if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
+  else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
+  else if (val === 'null') val = null;
+  else val = Number(val);
+
+  obj[prop] = val;
+  return obj;
+}, {});
+
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+  return 'colors' in exports.inspectOpts
+    ? Boolean(exports.inspectOpts.colors)
+    : tty.isatty(process.stderr.fd);
+}
+
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+exports.formatters.o = function(v) {
+  this.inspectOpts.colors = this.useColors;
+  return util.inspect(v, this.inspectOpts)
+    .split('\n').map(function(str) {
+      return str.trim()
+    }).join(' ');
+};
+
+/**
+ * Map %o to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+exports.formatters.O = function(v) {
+  this.inspectOpts.colors = this.useColors;
+  return util.inspect(v, this.inspectOpts);
+};
+
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
+
+function formatArgs(args) {
+  var name = this.namespace;
+  var useColors = this.useColors;
+
+  if (useColors) {
+    var c = this.color;
+    var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
+    var prefix = '  ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
+
+    args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+    args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+  } else {
+    args[0] = getDate() + name + ' ' + args[0];
+  }
+}
+
+function getDate() {
+  if (exports.inspectOpts.hideDate) {
+    return '';
+  } else {
+    return new Date().toISOString() + ' ';
+  }
+}
+
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
+
+function log() {
+  return process.stderr.write(util.format.apply(util, arguments) + '\n');
+}
+
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+function save(namespaces) {
+  if (null == namespaces) {
+    // If you set a process.env field to null or undefined, it gets cast to the
+    // string 'null' or 'undefined'. Just delete instead.
+    delete process.env.DEBUG;
+  } else {
+    process.env.DEBUG = namespaces;
+  }
+}
+
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+function load() {
+  return process.env.DEBUG;
+}
+
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+function init (debug) {
+  debug.inspectOpts = {};
+
+  var keys = Object.keys(exports.inspectOpts);
+  for (var i = 0; i < keys.length; i++) {
+    debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+  }
+}
+
+/**
+ * Enable namespaces listed in `process.env.DEBUG` initially.
+ */
+
+exports.enable(load());
+
+
+/***/ }),
+/* 131 */
+/***/ (function(module, exports) {
+
+module.exports = require("tty");
+
+/***/ }),
+/* 132 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+const os = __webpack_require__(14);
+const hasFlag = __webpack_require__(133);
+
+const {env} = process;
+
+let forceColor;
+if (hasFlag('no-color') ||
+       hasFlag('no-colors') ||
+       hasFlag('color=false') ||
+       hasFlag('color=never')) {
+       forceColor = 0;
+} else if (hasFlag('color') ||
+       hasFlag('colors') ||
+       hasFlag('color=true') ||
+       hasFlag('color=always')) {
+       forceColor = 1;
+}
+if ('FORCE_COLOR' in env) {
+       if (env.FORCE_COLOR === true || env.FORCE_COLOR === 'true') {
+               forceColor = 1;
+       } else if (env.FORCE_COLOR === false || env.FORCE_COLOR === 'false') {
+               forceColor = 0;
+       } else {
+               forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
+       }
+}
+
+function translateLevel(level) {
+       if (level === 0) {
+               return false;
+       }
+
+       return {
+               level,
+               hasBasic: true,
+               has256: level >= 2,
+               has16m: level >= 3
+       };
+}
+
+function supportsColor(stream) {
+       if (forceColor === 0) {
+               return 0;
+       }
+
+       if (hasFlag('color=16m') ||
+               hasFlag('color=full') ||
+               hasFlag('color=truecolor')) {
+               return 3;
+       }
+
+       if (hasFlag('color=256')) {
+               return 2;
+       }
+
+       if (stream && !stream.isTTY && forceColor === undefined) {
+               return 0;
+       }
+
+       const min = forceColor || 0;
+
+       if (env.TERM === 'dumb') {
+               return min;
+       }
+
+       if (process.platform === 'win32') {
+               // Node.js 7.5.0 is the first version of Node.js to include a patch to
+               // libuv that enables 256 color output on Windows. Anything earlier and it
+               // won't work. However, here we target Node.js 8 at minimum as it is an LTS
+               // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
+               // release that supports 256 colors. Windows 10 build 14931 is the first release
+               // that supports 16m/TrueColor.
+               const osRelease = os.release().split('.');
+               if (
+                       Number(process.versions.node.split('.')[0]) >= 8 &&
+                       Number(osRelease[0]) >= 10 &&
+                       Number(osRelease[2]) >= 10586
+               ) {
+                       return Number(osRelease[2]) >= 14931 ? 3 : 2;
+               }
+
+               return 1;
+       }
+
+       if ('CI' in env) {
+               if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+                       return 1;
+               }
+
+               return min;
+       }
+
+       if ('TEAMCITY_VERSION' in env) {
+               return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+       }
+
+       if (env.COLORTERM === 'truecolor') {
+               return 3;
+       }
+
+       if ('TERM_PROGRAM' in env) {
+               const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+               switch (env.TERM_PROGRAM) {
+                       case 'iTerm.app':
+                               return version >= 3 ? 3 : 2;
+                       case 'Apple_Terminal':
+                               return 2;
+                       // No default
+               }
+       }
+
+       if (/-256(color)?$/i.test(env.TERM)) {
+               return 2;
+       }
+
+       if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+               return 1;
+       }
+
+       if ('COLORTERM' in env) {
+               return 1;
+       }
+
+       return min;
+}
+
+function getSupportLevel(stream) {
+       const level = supportsColor(stream);
+       return translateLevel(level);
+}
+
+module.exports = {
+       supportsColor: getSupportLevel,
+       stdout: getSupportLevel(process.stdout),
+       stderr: getSupportLevel(process.stderr)
+};
+
+
+/***/ }),
+/* 133 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+module.exports = (flag, argv) => {
+       argv = argv || process.argv;
+       const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+       const pos = argv.indexOf(prefix + flag);
+       const terminatorPos = argv.indexOf('--');
+       return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
+};
+
+
+/***/ }),
+/* 134 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Module dependencies.
+ */
+
+var net = __webpack_require__(16);
+var tls = __webpack_require__(119);
+var url = __webpack_require__(83);
+var assert = __webpack_require__(135);
+var Agent = __webpack_require__(120);
+var inherits = __webpack_require__(3).inherits;
+var debug = __webpack_require__(136)('https-proxy-agent');
+
+/**
+ * Module exports.
+ */
+
+module.exports = HttpsProxyAgent;
+
+/**
+ * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to the
+ * specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
+ *
+ * @api public
+ */
+
+function HttpsProxyAgent(opts) {
+       if (!(this instanceof HttpsProxyAgent)) return new HttpsProxyAgent(opts);
+       if ('string' == typeof opts) opts = url.parse(opts);
+       if (!opts)
+               throw new Error(
+                       'an HTTP(S) proxy server `host` and `port` must be specified!'
+               );
+       debug('creating new HttpsProxyAgent instance: %o', opts);
+       Agent.call(this, opts);
+
+       var proxy = Object.assign({}, opts);
+
+       // if `true`, then connect to the proxy server over TLS. defaults to `false`.
+       this.secureProxy = proxy.protocol
+               ? /^https:?$/i.test(proxy.protocol)
+               : false;
+
+       // prefer `hostname` over `host`, and set the `port` if needed
+       proxy.host = proxy.hostname || proxy.host;
+       proxy.port = +proxy.port || (this.secureProxy ? 443 : 80);
+
+       // ALPN is supported by Node.js >= v5.
+       // attempt to negotiate http/1.1 for proxy servers that support http/2
+       if (this.secureProxy && !('ALPNProtocols' in proxy)) {
+               proxy.ALPNProtocols = ['http 1.1'];
+       }
+
+       if (proxy.host && proxy.path) {
+               // if both a `host` and `path` are specified then it's most likely the
+               // result of a `url.parse()` call... we need to remove the `path` portion so
+               // that `net.connect()` doesn't attempt to open that as a unix socket file.
+               delete proxy.path;
+               delete proxy.pathname;
+       }
+
+       this.proxy = proxy;
+       this.defaultPort = 443;
+}
+inherits(HttpsProxyAgent, Agent);
+
+/**
+ * Called when the node-core HTTP client library is creating a new HTTP request.
+ *
+ * @api public
+ */
+
+HttpsProxyAgent.prototype.callback = function connect(req, opts, fn) {
+       var proxy = this.proxy;
+
+       // create a socket connection to the proxy server
+       var socket;
+       if (this.secureProxy) {
+               socket = tls.connect(proxy);
+       } else {
+               socket = net.connect(proxy);
+       }
+
+       // we need to buffer any HTTP traffic that happens with the proxy before we get
+       // the CONNECT response, so that if the response is anything other than an "200"
+       // response code, then we can re-play the "data" events on the socket once the
+       // HTTP parser is hooked up...
+       var buffers = [];
+       var buffersLength = 0;
+
+       function read() {
+               var b = socket.read();
+               if (b) ondata(b);
+               else socket.once('readable', read);
+       }
+
+       function cleanup() {
+               socket.removeListener('end', onend);
+               socket.removeListener('error', onerror);
+               socket.removeListener('close', onclose);
+               socket.removeListener('readable', read);
+       }
+
+       function onclose(err) {
+               debug('onclose had error %o', err);
+       }
+
+       function onend() {
+               debug('onend');
+       }
+
+       function onerror(err) {
+               cleanup();
+               fn(err);
+       }
+
+       function ondata(b) {
+               buffers.push(b);
+               buffersLength += b.length;
+               var buffered = Buffer.concat(buffers, buffersLength);
+               var str = buffered.toString('ascii');
+
+               if (!~str.indexOf('\r\n\r\n')) {
+                       // keep buffering
+                       debug('have not received end of HTTP headers yet...');
+                       read();
+                       return;
+               }
+
+               var firstLine = str.substring(0, str.indexOf('\r\n'));
+               var statusCode = +firstLine.split(' ')[1];
+               debug('got proxy server response: %o', firstLine);
+
+               if (200 == statusCode) {
+                       // 200 Connected status code!
+                       var sock = socket;
+
+                       // nullify the buffered data since we won't be needing it
+                       buffers = buffered = null;
+
+                       if (opts.secureEndpoint) {
+                               // since the proxy is connecting to an SSL server, we have
+                               // to upgrade this socket connection to an SSL connection
+                               debug(
+                                       'upgrading proxy-connected socket to TLS connection: %o',
+                                       opts.host
+                               );
+                               opts.socket = socket;
+                               opts.servername = opts.servername || opts.host;
+                               opts.host = null;
+                               opts.hostname = null;
+                               opts.port = null;
+                               sock = tls.connect(opts);
+                       }
+
+                       cleanup();
+                       req.once('socket', resume);
+                       fn(null, sock);
+               } else {
+                       // some other status code that's not 200... need to re-play the HTTP header
+                       // "data" events onto the socket once the HTTP machinery is attached so
+                       // that the node core `http` can parse and handle the error status code
+                       cleanup();
+
+                       // the original socket is closed, and a new closed socket is
+                       // returned instead, so that the proxy doesn't get the HTTP request
+                       // written to it (which may contain `Authorization` headers or other
+                       // sensitive data).
+                       //
+                       // See: https://hackerone.com/reports/541502
+                       socket.destroy();
+                       socket = new net.Socket();
+                       socket.readable = true;
+
+
+                       // save a reference to the concat'd Buffer for the `onsocket` callback
+                       buffers = buffered;
+
+                       // need to wait for the "socket" event to re-play the "data" events
+                       req.once('socket', onsocket);
+
+                       fn(null, socket);
+               }
+       }
+
+       function onsocket(socket) {
+               debug('replaying proxy buffer for failed request');
+               assert(socket.listenerCount('data') > 0);
+
+               // replay the "buffers" Buffer onto the `socket`, since at this point
+               // the HTTP module machinery has been hooked up for the user
+               socket.push(buffers);
+
+               // nullify the cached Buffer instance
+               buffers = null;
+       }
+
+       socket.on('error', onerror);
+       socket.on('close', onclose);
+       socket.on('end', onend);
+
+       read();
+
+       var hostname = opts.host + ':' + opts.port;
+       var msg = 'CONNECT ' + hostname + ' HTTP/1.1\r\n';
+
+       var headers = Object.assign({}, proxy.headers);
+       if (proxy.auth) {
+               headers['Proxy-Authorization'] =
+                       'Basic ' + Buffer.from(proxy.auth).toString('base64');
+       }
+
+       // the Host header should only include the port
+       // number when it is a non-standard port
+       var host = opts.host;
+       if (!isDefaultPort(opts.port, opts.secureEndpoint)) {
+               host += ':' + opts.port;
+       }
+       headers['Host'] = host;
+
+       headers['Connection'] = 'close';
+       Object.keys(headers).forEach(function(name) {
+               msg += name + ': ' + headers[name] + '\r\n';
+       });
+
+       socket.write(msg + '\r\n');
+};
+
+/**
+ * Resumes a socket.
+ *
+ * @param {(net.Socket|tls.Socket)} socket The socket to resume
+ * @api public
+ */
+
+function resume(socket) {
+       socket.resume();
+}
+
+function isDefaultPort(port, secure) {
+       return Boolean((!secure && port === 80) || (secure && port === 443));
+}
+
+
+/***/ }),
+/* 135 */
+/***/ (function(module, exports) {
+
+module.exports = require("assert");
+
+/***/ }),
+/* 136 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Detect Electron renderer / nwjs process, which is node, but we should
+ * treat as a browser.
+ */
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
+  module.exports = __webpack_require__(137);
+} else {
+  module.exports = __webpack_require__(140);
+}
+
+
+
+/***/ }),
+/* 137 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+/* eslint-env browser */
+
+/**
+ * This is the web browser implementation of `debug()`.
+ */
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+exports.storage = localstorage();
+/**
+ * Colors.
+ */
+
+exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
+/**
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
+ * and the Firebug extension (any Firefox version) are known
+ * to support "%c" CSS customizations.
+ *
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
+ */
+// eslint-disable-next-line complexity
+
+function useColors() {
+  // NB: In an Electron preload script, document will be defined but not fully
+  // initialized. Since we know we're in Chrome, we'll just detect this case
+  // explicitly
+  if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
+    return true;
+  } // Internet Explorer and Edge do not support colors.
+
+
+  if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
+    return false;
+  } // Is webkit? http://stackoverflow.com/a/16459606/376773
+  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
+
+
+  return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
+  typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
+  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+  typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
+  typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
+}
+/**
+ * Colorize log arguments if enabled.
+ *
+ * @api public
+ */
+
+
+function formatArgs(args) {
+  args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
+
+  if (!this.useColors) {
+    return;
+  }
+
+  var c = 'color: ' + this.color;
+  args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
+  // arguments passed either before or after the %c, so we need to
+  // figure out the correct index to insert the CSS into
+
+  var index = 0;
+  var lastC = 0;
+  args[0].replace(/%[a-zA-Z%]/g, function (match) {
+    if (match === '%%') {
+      return;
     }
+
+    index++;
+
+    if (match === '%c') {
+      // We only are interested in the *last* %c
+      // (the user may have provided their own)
+      lastC = index;
+    }
+  });
+  args.splice(lastC, 0, c);
+}
+/**
+ * Invokes `console.log()` when available.
+ * No-op when `console.log` is not a "function".
+ *
+ * @api public
+ */
+
+
+function log() {
+  var _console;
+
+  // This hackery is required for IE8/9, where
+  // the `console.log` function doesn't have 'apply'
+  return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
+}
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
+
+
+function save(namespaces) {
+  try {
+    if (namespaces) {
+      exports.storage.setItem('debug', namespaces);
+    } else {
+      exports.storage.removeItem('debug');
+    }
+  } catch (error) {// Swallow
+    // XXX (@Qix-) should we be logging these?
+  }
+}
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+
+function load() {
+  var r;
+
+  try {
+    r = exports.storage.getItem('debug');
+  } catch (error) {} // Swallow
+  // XXX (@Qix-) should we be logging these?
+  // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+
+
+  if (!r && typeof process !== 'undefined' && 'env' in process) {
+    r = process.env.DEBUG;
+  }
+
+  return r;
+}
+/**
+ * Localstorage attempts to return the localstorage.
+ *
+ * This is necessary because safari throws
+ * when a user disables cookies/localstorage
+ * and you attempt to access it.
+ *
+ * @return {LocalStorage}
+ * @api private
+ */
+
+
+function localstorage() {
+  try {
+    // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+    // The Browser also has localStorage in the global context.
+    return localStorage;
+  } catch (error) {// Swallow
+    // XXX (@Qix-) should we be logging these?
+  }
+}
+
+module.exports = __webpack_require__(138)(exports);
+var formatters = module.exports.formatters;
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+  try {
+    return JSON.stringify(v);
+  } catch (error) {
+    return '[UnexpectedJSONParseError]: ' + error.message;
+  }
 };
-var descriptions = {
-    id: localize('schema.json.id', "A unique identifier for the schema."),
-    $schema: localize('schema.json.$schema', "The schema to verify this document against."),
-    title: localize('schema.json.title', "A descriptive title of the element."),
-    description: localize('schema.json.description', "A long description of the element. Used in hover menus and suggestions."),
-    default: localize('schema.json.default', "A default value. Used by suggestions."),
-    multipleOf: localize('schema.json.multipleOf', "A number that should cleanly divide the current value (i.e. have no remainder)."),
-    maximum: localize('schema.json.maximum', "The maximum numerical value, inclusive by default."),
-    exclusiveMaximum: localize('schema.json.exclusiveMaximum', "Makes the maximum property exclusive."),
-    minimum: localize('schema.json.minimum', "The minimum numerical value, inclusive by default."),
-    exclusiveMinimum: localize('schema.json.exclusiveMininum', "Makes the minimum property exclusive."),
-    maxLength: localize('schema.json.maxLength', "The maximum length of a string."),
-    minLength: localize('schema.json.minLength', "The minimum length of a string."),
-    pattern: localize('schema.json.pattern', "A regular expression to match the string against. It is not implicitly anchored."),
-    additionalItems: localize('schema.json.additionalItems', "For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),
-    items: localize('schema.json.items', "For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),
-    maxItems: localize('schema.json.maxItems', "The maximum number of items that can be inside an array. Inclusive."),
-    minItems: localize('schema.json.minItems', "The minimum number of items that can be inside an array. Inclusive."),
-    uniqueItems: localize('schema.json.uniqueItems', "If all of the items in the array must be unique. Defaults to false."),
-    maxProperties: localize('schema.json.maxProperties', "The maximum number of properties an object can have. Inclusive."),
-    minProperties: localize('schema.json.minProperties', "The minimum number of properties an object can have. Inclusive."),
-    required: localize('schema.json.required', "An array of strings that lists the names of all properties required on this object."),
-    additionalProperties: localize('schema.json.additionalProperties', "Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),
-    definitions: localize('schema.json.definitions', "Not used for validation. Place subschemas here that you wish to reference inline with $ref."),
-    properties: localize('schema.json.properties', "A map of property names to schemas for each property."),
-    patternProperties: localize('schema.json.patternProperties', "A map of regular expressions on property names to schemas for matching properties."),
-    dependencies: localize('schema.json.dependencies', "A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),
-    enum: localize('schema.json.enum', "The set of literal values that are valid."),
-    type: localize('schema.json.type', "Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),
-    format: localize('schema.json.format', "Describes the format expected for the value."),
-    allOf: localize('schema.json.allOf', "An array of schemas, all of which must match."),
-    anyOf: localize('schema.json.anyOf', "An array of schemas, where at least one must match."),
-    oneOf: localize('schema.json.oneOf', "An array of schemas, exactly one of which must match."),
-    not: localize('schema.json.not', "A schema which must not match."),
-    $id: localize('schema.json.$id', "A unique identifier for the schema."),
-    $ref: localize('schema.json.$ref', "Reference a definition hosted on any location."),
-    $comment: localize('schema.json.$comment', "Comments from schema authors to readers or maintainers of the schema."),
-    readOnly: localize('schema.json.readOnly', "Indicates that the value of the instance is managed exclusively by the owning authority."),
-    examples: localize('schema.json.examples', "Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),
-    contains: localize('schema.json.contains', "An array instance is valid against \"contains\" if at least one of its elements is valid against the given schema."),
-    propertyNames: localize('schema.json.propertyNames', "If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),
-    const: localize('schema.json.const', "An instance validates successfully against this keyword if its value is equal to the value of the keyword."),
-    contentMediaType: localize('schema.json.contentMediaType', "Describes the media type of a string property."),
-    contentEncoding: localize('schema.json.contentEncoding', "Describes the content encoding of a string property."),
-    if: localize('schema.json.if', "The validation outcome of the \"if\" subschema controls which of the \"then\" or \"else\" keywords are evaluated."),
-    then: localize('schema.json.then', "The \"if\" subschema is used for validation when the \"if\" subschema succeeds."),
-    else: localize('schema.json.else', "The \"else\" subschema is used for validation when the \"if\" subschema fails.")
-};
-for (var schemaName in schemaContributions.schemas) {
-    var schema = schemaContributions.schemas[schemaName];
-    for (var property in schema.properties) {
-        var propertyObject = schema.properties[property];
-        if (propertyObject === true) {
-            propertyObject = schema.properties[property] = {};
-        }
-        var description = descriptions[property];
-        if (description) {
-            propertyObject['description'] = description;
+
+
+
+/***/ }),
+/* 138 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * This is the common logic for both the Node.js and web browser
+ * implementations of `debug()`.
+ */
+function setup(env) {
+  createDebug.debug = createDebug;
+  createDebug.default = createDebug;
+  createDebug.coerce = coerce;
+  createDebug.disable = disable;
+  createDebug.enable = enable;
+  createDebug.enabled = enabled;
+  createDebug.humanize = __webpack_require__(139);
+  Object.keys(env).forEach(function (key) {
+    createDebug[key] = env[key];
+  });
+  /**
+  * Active `debug` instances.
+  */
+
+  createDebug.instances = [];
+  /**
+  * The currently active debug mode names, and names to skip.
+  */
+
+  createDebug.names = [];
+  createDebug.skips = [];
+  /**
+  * Map of special "%n" handling functions, for the debug "format" argument.
+  *
+  * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
+  */
+
+  createDebug.formatters = {};
+  /**
+  * Selects a color for a debug namespace
+  * @param {String} namespace The namespace string for the for the debug instance to be colored
+  * @return {Number|String} An ANSI color code for the given namespace
+  * @api private
+  */
+
+  function selectColor(namespace) {
+    var hash = 0;
+
+    for (var i = 0; i < namespace.length; i++) {
+      hash = (hash << 5) - hash + namespace.charCodeAt(i);
+      hash |= 0; // Convert to 32bit integer
+    }
+
+    return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
+  }
+
+  createDebug.selectColor = selectColor;
+  /**
+  * Create a debugger with the given `namespace`.
+  *
+  * @param {String} namespace
+  * @return {Function}
+  * @api public
+  */
+
+  function createDebug(namespace) {
+    var prevTime;
+
+    function debug() {
+      // Disabled?
+      if (!debug.enabled) {
+        return;
+      }
+
+      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+        args[_key] = arguments[_key];
+      }
+
+      var self = debug; // Set `diff` timestamp
+
+      var curr = Number(new Date());
+      var ms = curr - (prevTime || curr);
+      self.diff = ms;
+      self.prev = prevTime;
+      self.curr = curr;
+      prevTime = curr;
+      args[0] = createDebug.coerce(args[0]);
+
+      if (typeof args[0] !== 'string') {
+        // Anything else let's inspect with %O
+        args.unshift('%O');
+      } // Apply any `formatters` transformations
+
+
+      var index = 0;
+      args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
+        // If we encounter an escaped % then don't increase the array index
+        if (match === '%%') {
+          return match;
         }
-        else {
-            console.log(property + ": localize('schema.json." + property + "', \"\")");
+
+        index++;
+        var formatter = createDebug.formatters[format];
+
+        if (typeof formatter === 'function') {
+          var val = args[index];
+          match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
+
+          args.splice(index, 1);
+          index--;
         }
+
+        return match;
+      }); // Apply env-specific formatting (colors, etc.)
+
+      createDebug.formatArgs.call(self, args);
+      var logFn = self.log || createDebug.log;
+      logFn.apply(self, args);
+    }
+
+    debug.namespace = namespace;
+    debug.enabled = createDebug.enabled(namespace);
+    debug.useColors = createDebug.useColors();
+    debug.color = selectColor(namespace);
+    debug.destroy = destroy;
+    debug.extend = extend; // Debug.formatArgs = formatArgs;
+    // debug.rawLog = rawLog;
+    // env-specific initialization logic for debug instances
+
+    if (typeof createDebug.init === 'function') {
+      createDebug.init(debug);
+    }
+
+    createDebug.instances.push(debug);
+    return debug;
+  }
+
+  function destroy() {
+    var index = createDebug.instances.indexOf(this);
+
+    if (index !== -1) {
+      createDebug.instances.splice(index, 1);
+      return true;
+    }
+
+    return false;
+  }
+
+  function extend(namespace, delimiter) {
+    return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
+  }
+  /**
+  * Enables a debug mode by namespaces. This can include modes
+  * separated by a colon and wildcards.
+  *
+  * @param {String} namespaces
+  * @api public
+  */
+
+
+  function enable(namespaces) {
+    createDebug.save(namespaces);
+    createDebug.names = [];
+    createDebug.skips = [];
+    var i;
+    var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
+    var len = split.length;
+
+    for (i = 0; i < len; i++) {
+      if (!split[i]) {
+        // ignore empty strings
+        continue;
+      }
+
+      namespaces = split[i].replace(/\*/g, '.*?');
+
+      if (namespaces[0] === '-') {
+        createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
+      } else {
+        createDebug.names.push(new RegExp('^' + namespaces + '$'));
+      }
+    }
+
+    for (i = 0; i < createDebug.instances.length; i++) {
+      var instance = createDebug.instances[i];
+      instance.enabled = createDebug.enabled(instance.namespace);
+    }
+  }
+  /**
+  * Disable debug output.
+  *
+  * @api public
+  */
+
+
+  function disable() {
+    createDebug.enable('');
+  }
+  /**
+  * Returns true if the given mode name is enabled, false otherwise.
+  *
+  * @param {String} name
+  * @return {Boolean}
+  * @api public
+  */
+
+
+  function enabled(name) {
+    if (name[name.length - 1] === '*') {
+      return true;
+    }
+
+    var i;
+    var len;
+
+    for (i = 0, len = createDebug.skips.length; i < len; i++) {
+      if (createDebug.skips[i].test(name)) {
+        return false;
+      }
     }
+
+    for (i = 0, len = createDebug.names.length; i < len; i++) {
+      if (createDebug.names[i].test(name)) {
+        return true;
+      }
+    }
+
+    return false;
+  }
+  /**
+  * Coerce `val`.
+  *
+  * @param {Mixed} val
+  * @return {Mixed}
+  * @api private
+  */
+
+
+  function coerce(val) {
+    if (val instanceof Error) {
+      return val.stack || val.message;
+    }
+
+    return val;
+  }
+
+  createDebug.enable(createDebug.load());
+  return createDebug;
+}
+
+module.exports = setup;
+
+
+
+/***/ }),
+/* 139 */
+/***/ (function(module, exports) {
+
+/**
+ * Helpers.
+ */
+
+var s = 1000;
+var m = s * 60;
+var h = m * 60;
+var d = h * 24;
+var w = d * 7;
+var y = d * 365.25;
+
+/**
+ * Parse or format the given `val`.
+ *
+ * Options:
+ *
+ *  - `long` verbose formatting [false]
+ *
+ * @param {String|Number} val
+ * @param {Object} [options]
+ * @throws {Error} throw an error if val is not a non-empty string or a number
+ * @return {String|Number}
+ * @api public
+ */
+
+module.exports = function(val, options) {
+  options = options || {};
+  var type = typeof val;
+  if (type === 'string' && val.length > 0) {
+    return parse(val);
+  } else if (type === 'number' && isFinite(val)) {
+    return options.long ? fmtLong(val) : fmtShort(val);
+  }
+  throw new Error(
+    'val is not a non-empty string or a valid number. val=' +
+      JSON.stringify(val)
+  );
+};
+
+/**
+ * Parse the given `str` and return milliseconds.
+ *
+ * @param {String} str
+ * @return {Number}
+ * @api private
+ */
+
+function parse(str) {
+  str = String(str);
+  if (str.length > 100) {
+    return;
+  }
+  var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+    str
+  );
+  if (!match) {
+    return;
+  }
+  var n = parseFloat(match[1]);
+  var type = (match[2] || 'ms').toLowerCase();
+  switch (type) {
+    case 'years':
+    case 'year':
+    case 'yrs':
+    case 'yr':
+    case 'y':
+      return n * y;
+    case 'weeks':
+    case 'week':
+    case 'w':
+      return n * w;
+    case 'days':
+    case 'day':
+    case 'd':
+      return n * d;
+    case 'hours':
+    case 'hour':
+    case 'hrs':
+    case 'hr':
+    case 'h':
+      return n * h;
+    case 'minutes':
+    case 'minute':
+    case 'mins':
+    case 'min':
+    case 'm':
+      return n * m;
+    case 'seconds':
+    case 'second':
+    case 'secs':
+    case 'sec':
+    case 's':
+      return n * s;
+    case 'milliseconds':
+    case 'millisecond':
+    case 'msecs':
+    case 'msec':
+    case 'ms':
+      return n;
+    default:
+      return undefined;
+  }
+}
+
+/**
+ * Short format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtShort(ms) {
+  var msAbs = Math.abs(ms);
+  if (msAbs >= d) {
+    return Math.round(ms / d) + 'd';
+  }
+  if (msAbs >= h) {
+    return Math.round(ms / h) + 'h';
+  }
+  if (msAbs >= m) {
+    return Math.round(ms / m) + 'm';
+  }
+  if (msAbs >= s) {
+    return Math.round(ms / s) + 's';
+  }
+  return ms + 'ms';
+}
+
+/**
+ * Long format for `ms`.
+ *
+ * @param {Number} ms
+ * @return {String}
+ * @api private
+ */
+
+function fmtLong(ms) {
+  var msAbs = Math.abs(ms);
+  if (msAbs >= d) {
+    return plural(ms, msAbs, d, 'day');
+  }
+  if (msAbs >= h) {
+    return plural(ms, msAbs, h, 'hour');
+  }
+  if (msAbs >= m) {
+    return plural(ms, msAbs, m, 'minute');
+  }
+  if (msAbs >= s) {
+    return plural(ms, msAbs, s, 'second');
+  }
+  return ms + ' ms';
+}
+
+/**
+ * Pluralization helper.
+ */
+
+function plural(ms, msAbs, n, name) {
+  var isPlural = msAbs >= n * 1.5;
+  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
 }
 
 
 /***/ }),
-/* 99 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 140 */
+/***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFoldingRanges", function() { return getFoldingRanges; });
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80);
-/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83);
-/* harmony import */ var _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(89);
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
 
 
+/**
+ * Module dependencies.
+ */
+var tty = __webpack_require__(131);
 
-function getFoldingRanges(document, context) {
-    var ranges = [];
-    var nestingLevels = [];
-    var stack = [];
-    var prevStart = -1;
-    var scanner = Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(document.getText(), false);
-    var token = scanner.scan();
-    function addRange(range) {
-        ranges.push(range);
-        nestingLevels.push(stack.length);
-    }
-    while (token !== 17 /* EOF */) {
-        switch (token) {
-            case 1 /* OpenBraceToken */:
-            case 3 /* OpenBracketToken */: {
-                var startLine = document.positionAt(scanner.getTokenOffset()).line;
-                var range = { startLine: startLine, endLine: startLine, kind: token === 1 /* OpenBraceToken */ ? 'object' : 'array' };
-                stack.push(range);
-                break;
-            }
-            case 2 /* CloseBraceToken */:
-            case 4 /* CloseBracketToken */: {
-                var kind = token === 2 /* CloseBraceToken */ ? 'object' : 'array';
-                if (stack.length > 0 && stack[stack.length - 1].kind === kind) {
-                    var range = stack.pop();
-                    var line = document.positionAt(scanner.getTokenOffset()).line;
-                    if (range && line > range.startLine + 1 && prevStart !== range.startLine) {
-                        range.endLine = line - 1;
-                        addRange(range);
-                        prevStart = range.startLine;
-                    }
-                }
-                break;
-            }
-            case 13 /* BlockCommentTrivia */: {
-                var startLine = document.positionAt(scanner.getTokenOffset()).line;
-                var endLine = document.positionAt(scanner.getTokenOffset() + scanner.getTokenLength()).line;
-                if (scanner.getTokenError() === 1 /* UnexpectedEndOfComment */ && startLine + 1 < document.lineCount) {
-                    scanner.setPosition(document.offsetAt(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Position"].create(startLine + 1, 0)));
-                }
-                else {
-                    if (startLine < endLine) {
-                        addRange({ startLine: startLine, endLine: endLine, kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["FoldingRangeKind"].Comment });
-                        prevStart = startLine;
-                    }
-                }
-                break;
-            }
-            case 12 /* LineCommentTrivia */: {
-                var text = document.getText().substr(scanner.getTokenOffset(), scanner.getTokenLength());
-                var m = text.match(/^\/\/\s*#(region\b)|(endregion\b)/);
-                if (m) {
-                    var line = document.positionAt(scanner.getTokenOffset()).line;
-                    if (m[1]) { // start pattern match
-                        var range = { startLine: line, endLine: line, kind: _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["FoldingRangeKind"].Region };
-                        stack.push(range);
-                    }
-                    else {
-                        var i = stack.length - 1;
-                        while (i >= 0 && stack[i].kind !== _jsonLanguageTypes__WEBPACK_IMPORTED_MODULE_2__["FoldingRangeKind"].Region) {
-                            i--;
-                        }
-                        if (i >= 0) {
-                            var range = stack[i];
-                            stack.length = i;
-                            if (line > range.startLine && prevStart !== range.startLine) {
-                                range.endLine = line;
-                                addRange(range);
-                                prevStart = range.startLine;
-                            }
-                        }
-                    }
-                }
-                break;
-            }
-        }
-        token = scanner.scan();
-    }
-    var rangeLimit = context && context.rangeLimit;
-    if (typeof rangeLimit !== 'number' || ranges.length <= rangeLimit) {
-        return ranges;
-    }
-    var counts = [];
-    for (var _i = 0, nestingLevels_1 = nestingLevels; _i < nestingLevels_1.length; _i++) {
-        var level = nestingLevels_1[_i];
-        if (level < 30) {
-            counts[level] = (counts[level] || 0) + 1;
-        }
-    }
-    var entries = 0;
-    var maxLevel = 0;
-    for (var i = 0; i < counts.length; i++) {
-        var n = counts[i];
-        if (n) {
-            if (n + entries > rangeLimit) {
-                maxLevel = i;
-                break;
-            }
-            entries += n;
-        }
-    }
-    var result = [];
-    for (var i = 0; i < ranges.length; i++) {
-        var level = nestingLevels[i];
-        if (typeof level === 'number') {
-            if (level < maxLevel || (level === maxLevel && entries++ < rangeLimit)) {
-                result.push(ranges[i]);
-            }
-        }
-    }
-    return result;
+var util = __webpack_require__(3);
+/**
+ * This is the Node.js implementation of `debug()`.
+ */
+
+
+exports.init = init;
+exports.log = log;
+exports.formatArgs = formatArgs;
+exports.save = save;
+exports.load = load;
+exports.useColors = useColors;
+/**
+ * Colors.
+ */
+
+exports.colors = [6, 2, 3, 4, 5, 1];
+
+try {
+  // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+  // eslint-disable-next-line import/no-extraneous-dependencies
+  var supportsColor = __webpack_require__(132);
+
+  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+    exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
+  }
+} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
+
+/**
+ * Build up the default `inspectOpts` object from the environment variables.
+ *
+ *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
+ */
+
+
+exports.inspectOpts = Object.keys(process.env).filter(function (key) {
+  return /^debug_/i.test(key);
+}).reduce(function (obj, key) {
+  // Camel-case
+  var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
+    return k.toUpperCase();
+  }); // Coerce string value into JS value
+
+  var val = process.env[key];
+
+  if (/^(yes|on|true|enabled)$/i.test(val)) {
+    val = true;
+  } else if (/^(no|off|false|disabled)$/i.test(val)) {
+    val = false;
+  } else if (val === 'null') {
+    val = null;
+  } else {
+    val = Number(val);
+  }
+
+  obj[prop] = val;
+  return obj;
+}, {});
+/**
+ * Is stdout a TTY? Colored output is enabled when `true`.
+ */
+
+function useColors() {
+  return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
 }
+/**
+ * Adds ANSI color escape codes if enabled.
+ *
+ * @api public
+ */
 
 
-/***/ }),
-/* 100 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function formatArgs(args) {
+  var name = this.namespace,
+      useColors = this.useColors;
 
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSelectionRanges", function() { return getSelectionRanges; });
-/* harmony import */ var vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80);
-/* harmony import */ var jsonc_parser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83);
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
+  if (useColors) {
+    var c = this.color;
+    var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
+    var prefix = "  ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
+    args[0] = prefix + args[0].split('\n').join('\n' + prefix);
+    args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
+  } else {
+    args[0] = getDate() + name + ' ' + args[0];
+  }
+}
 
+function getDate() {
+  if (exports.inspectOpts.hideDate) {
+    return '';
+  }
 
-function getSelectionRanges(document, positions, doc) {
-    function getSelectionRange(position) {
-        var offset = document.offsetAt(position);
-        var node = doc.getNodeFromOffset(offset, true);
-        var result = [];
-        while (node) {
-            switch (node.type) {
-                case 'string':
-                case 'object':
-                case 'array':
-                    // range without ", [ or {
-                    var cStart = node.offset + 1, cEnd = node.offset + node.length - 1;
-                    if (cStart < cEnd && offset >= cStart && offset <= cEnd) {
-                        result.push(newRange(cStart, cEnd));
-                    }
-                    result.push(newRange(node.offset, node.offset + node.length));
-                    break;
-                case 'number':
-                case 'boolean':
-                case 'null':
-                case 'property':
-                    result.push(newRange(node.offset, node.offset + node.length));
-                    break;
-            }
-            if (node.type === 'property' || node.parent && node.parent.type === 'array') {
-                var afterCommaOffset = getOffsetAfterNextToken(node.offset + node.length, 5 /* CommaToken */);
-                if (afterCommaOffset !== -1) {
-                    result.push(newRange(node.offset, afterCommaOffset));
-                }
-            }
-            node = node.parent;
-        }
-        var current = undefined;
-        for (var index = result.length - 1; index >= 0; index--) {
-            current = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(result[index], current);
-        }
-        if (!current) {
-            current = vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["SelectionRange"].create(vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(position, position));
-        }
-        return current;
-    }
-    function newRange(start, end) {
-        return vscode_languageserver_types__WEBPACK_IMPORTED_MODULE_0__["Range"].create(document.positionAt(start), document.positionAt(end));
-    }
-    var scanner = Object(jsonc_parser__WEBPACK_IMPORTED_MODULE_1__["createScanner"])(document.getText(), true);
-    function getOffsetAfterNextToken(offset, expectedToken) {
-        scanner.setPosition(offset);
-        var token = scanner.scan();
-        if (token === expectedToken) {
-            return scanner.getTokenOffset() + scanner.getTokenLength();
-        }
-        return -1;
-    }
-    return positions.map(getSelectionRange);
+  return new Date().toISOString() + ' ';
 }
+/**
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
+ */
 
 
-/***/ }),
-/* 101 */
-/***/ (function(module, exports, __webpack_require__) {
+function log() {
+  return process.stderr.write(util.format.apply(util, arguments) + '\n');
+}
+/**
+ * Save `namespaces`.
+ *
+ * @param {String} namespaces
+ * @api private
+ */
 
-"use strict";
 
-/*---------------------------------------------------------------------------------------------
- *  Copyright (c) Microsoft Corporation. All rights reserved.
- *  Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-Object.defineProperty(exports, "__esModule", { value: true });
-function getLanguageModelCache(maxEntries, cleanupIntervalTimeInSec, parse) {
-    let languageModels = {};
-    let nModels = 0;
-    let cleanupInterval = undefined;
-    if (cleanupIntervalTimeInSec > 0) {
-        cleanupInterval = setInterval(() => {
-            let cutoffTime = Date.now() - cleanupIntervalTimeInSec * 1000;
-            let uris = Object.keys(languageModels);
-            for (let uri of uris) {
-                let languageModelInfo = languageModels[uri];
-                if (languageModelInfo.cTime < cutoffTime) {
-                    delete languageModels[uri];
-                    nModels--;
-                }
-            }
-        }, cleanupIntervalTimeInSec * 1000);
-    }
-    return {
-        get(document) {
-            let version = document.version;
-            let languageId = document.languageId;
-            let languageModelInfo = languageModels[document.uri];
-            if (languageModelInfo && languageModelInfo.version === version && languageModelInfo.languageId === languageId) {
-                languageModelInfo.cTime = Date.now();
-                return languageModelInfo.languageModel;
-            }
-            let languageModel = parse(document);
-            languageModels[document.uri] = { languageModel, version, languageId, cTime: Date.now() };
-            if (!languageModelInfo) {
-                nModels++;
-            }
-            if (nModels === maxEntries) {
-                let oldestTime = Number.MAX_VALUE;
-                let oldestUri = null;
-                for (let uri in languageModels) {
-                    let languageModelInfo = languageModels[uri];
-                    if (languageModelInfo.cTime < oldestTime) {
-                        oldestUri = uri;
-                        oldestTime = languageModelInfo.cTime;
-                    }
-                }
-                if (oldestUri) {
-                    delete languageModels[oldestUri];
-                    nModels--;
-                }
-            }
-            return languageModel;
-        },
-        onDocumentRemoved(document) {
-            let uri = document.uri;
-            if (languageModels[uri]) {
-                delete languageModels[uri];
-                nModels--;
-            }
-        },
-        dispose() {
-            if (typeof cleanupInterval !== 'undefined') {
-                clearInterval(cleanupInterval);
-                cleanupInterval = undefined;
-                languageModels = {};
-                nModels = 0;
-            }
-        }
-    };
+function save(namespaces) {
+  if (namespaces) {
+    process.env.DEBUG = namespaces;
+  } else {
+    // If you set a process.env field to null or undefined, it gets cast to the
+    // string 'null' or 'undefined'. Just delete instead.
+    delete process.env.DEBUG;
+  }
 }
-exports.getLanguageModelCache = getLanguageModelCache;
+/**
+ * Load `namespaces`.
+ *
+ * @return {String} returns the previously persisted debug modes
+ * @api private
+ */
+
+
+function load() {
+  return process.env.DEBUG;
+}
+/**
+ * Init logic for `debug` instances.
+ *
+ * Create a new `inspectOpts` object in case `useColors` is set
+ * differently for a particular `debug` instance.
+ */
+
+
+function init(debug) {
+  debug.inspectOpts = {};
+  var keys = Object.keys(exports.inspectOpts);
+
+  for (var i = 0; i < keys.length; i++) {
+    debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
+  }
+}
+
+module.exports = __webpack_require__(138)(exports);
+var formatters = module.exports.formatters;
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+  this.inspectOpts.colors = this.useColors;
+  return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
+};
+/**
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
+ */
+
+
+formatters.O = function (v) {
+  this.inspectOpts.colors = this.useColors;
+  return util.inspect(v, this.inspectOpts);
+};
+
+
 
+/***/ }),
+/* 141 */
+/***/ (function(module, exports) {
+
+module.exports = require("zlib");
 
 /***/ })
 /******/ ])));
\ No newline at end of file