{"version":3,"sources":["webpack:///./node_modules/monaco-editor/esm/vs/language/json/workerManager.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-types/main.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/languageFeatures.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/scanner.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/tokenization.js","webpack:///./node_modules/monaco-editor/esm/vs/language/json/jsonMode.js"],"names":["Position","Range","Location","LocationLink","Color","ColorInformation","ColorPresentation","FoldingRangeKind","FoldingRange","DiagnosticRelatedInformation","DiagnosticSeverity","Diagnostic","Command","TextEdit","TextDocumentEdit","CreateFile","RenameFile","DeleteFile","WorkspaceEdit","STOP_WHEN_IDLE_FOR","WorkerManager","defaults","_this","this","_defaults","_worker","_idleCheckInterval","setInterval","_checkIfIdle","_lastUsedTime","_configChangeListener","onDidChange","_stopWorker","prototype","dispose","_client","clearInterval","timePassedSinceLastUsed","Date","now","_getClient","monaco","editor","createWebWorker","moduleId","label","languageId","createData","languageSettings","diagnosticsOptions","enableSchemaRequest","getProxy","getLanguageServiceWorker","resources","_i","arguments","length","then","client","_","withSyncedResources","create","line","character","is","value","candidate","Is","objectLiteral","number","one","two","three","four","start","end","Error","uri","range","defined","string","undefined","targetUri","targetRange","targetSelectionRange","originSelectionRange","red","green","blue","alpha","color","textEdit","additionalTextEdits","typedArray","startLine","endLine","startCharacter","endCharacter","kind","result","location","message","Warning","Information","Hint","severity","code","source","relatedInformation","title","command","args","replace","newText","insert","position","del","textDocument","edits","VersionedTextDocumentIdentifier","Array","isArray","options","overwrite","ignoreIfExists","boolean","oldUri","newUri","recursive","ignoreIfNotExists","changes","documentChanges","every","change","TextDocumentIdentifier","TextDocumentItem","MarkupKind","MarkupContent","CompletionItemKind","InsertTextFormat","CompletionItem","CompletionList","MarkedString","Hover","ParameterInformation","SignatureInformation","DocumentHighlightKind","DocumentHighlight","SymbolKind","SymbolInformation","TextEditChangeImpl","push","delete","add","edit","all","clear","splice","WorkspaceChange","workspaceEdit","_textEditChanges","Object","_workspaceEdit","forEach","textEditChange","keys","key","defineProperty","get","enumerable","configurable","getTextEditChange","textDocumentEdit","createFile","checkDocumentChanges","renameFile","deleteFile","version","text","PlainText","Markdown","Text","Method","Function","Constructor","Field","Variable","Class","Interface","Module","Property","Unit","Value","Enum","Keyword","Snippet","File","Reference","Folder","EnumMember","Constant","Struct","Event","Operator","TypeParameter","items","isIncomplete","fromPlainText","plainText","language","contents","documentation","parameters","Read","Write","Namespace","Package","String","Number","Boolean","Key","Null","name","containerName","CodeActionKind","CodeActionContext","CodeAction","CodeLens","FormattingOptions","DocumentSymbol","detail","selectionRange","children","deprecated","QuickFix","Refactor","RefactorExtract","RefactorInline","RefactorRewrite","Source","SourceOrganizeImports","diagnostics","only","commandOrEdit","data","tabSize","insertSpaces","DocumentLink","target","TextDocument","TextDocumentSaveReason","content","FullTextDocument","lineCount","func","getText","positionAt","offsetAt","applyEdits","document","sortedEdits","mergeSort","a","b","diff","lastModifiedOffset","i","e","startOffset","endOffset","substring","compare","p","left","slice","right","leftIdx","rightIdx","ret","Manual","AfterDelay","FocusOut","_uri","_languageId","_version","_content","_lineOffsets","update","event","getLineOffsets","lineOffsets","isLineStart","ch","charAt","offset","Math","max","min","low","high","mid","floor","lineOffset","nextLineOffset","toString","call","check","Uri","languageFeatures_Range","DiagnosticsAdapter","_disposables","_listener","onModelAdd","model","handle","modeId","getModeId","onDidChangeContent","clearTimeout","setTimeout","_doValidate","onModelRemoved","setModelMarkers","uriStr","listener","onDidCreateModel","onWillDisposeModel","_resetSchema","onDidChangeModelLanguage","getModels","d","resource","worker","resetSchema","doValidation","markers","map","toDiagnostics","getModel","err","console","error","toSeverity","lsSeverity","MarkerSeverity","Info","diag","startLineNumber","startColumn","endLineNumber","endColumn","fromPosition","column","lineNumber","fromRange","toRange","toCompletionItemKind","mItemKind","languages","toTextEdit","languageFeatures_CompletionAdapter","CompletionAdapter","provideCompletionItems","context","token","doComplete","info","wordInfo","getWordUntilPosition","wordRange","entry","item","insertText","sortText","filterText","insertTextFormat","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","suggestions","isMarkupContent","thing","toMarkdownString","toMarkedStringArray","HoverAdapter","provideHover","doHover","toSymbolKind","mKind","DocumentSymbolAdapter","provideDocumentSymbols","findDocumentSymbols","fromFormattingOptions","ParseOptions","DocumentFormattingEditProvider","provideDocumentFormattingEdits","format","DocumentRangeFormattingEditProvider","provideDocumentRangeFormattingEdits","DocumentColorAdapter","provideDocumentColors","findDocumentColors","infos","provideColorPresentations","getColorPresentations","presentations","presentation","FoldingRangeAdapter","provideFoldingRanges","ranges","toFoldingRangeKind","Comment","Imports","Region","createScanner","ignoreTrivia","pos","len","tokenOffset","scanError","scanHexDigits","count","exact","digits","charCodeAt","setPosition","newPosition","scanNumber","isDigit","scanString","isLineBreak","ch_1","fromCharCode","scanNext","isWhiteSpace","safeLength","commentClosed","isUnknownContentCharacter","scanNextNonTrivia","getPosition","scan","getToken","getTokenValue","getTokenOffset","getTokenLength","getTokenError","DEFAULT","allowTrailingComma","main_createScanner","createTokenizationSupport","supportComments","getInitialState","JSONState","tokenize","state","offsetDelta","stopAtOffset","TOKEN_DELIM_OBJECT","TOKEN_DELIM_ARRAY","TOKEN_DELIM_COLON","TOKEN_DELIM_COMMA","TOKEN_VALUE_BOOLEAN","TOKEN_VALUE_NULL","TOKEN_VALUE_STRING","TOKEN_VALUE_NUMBER","TOKEN_PROPERTY_NAME","TOKEN_COMMENT_BLOCK","TOKEN_COMMENT_LINE","lastWasColon","_state","clone","equals","other","getStateData","setStateData","comments","numberOfInsertedCharacters","adjustOffset","scanner","tokens","endState","type","substr","startIndex","scopes","setupMode","disposables","uris","apply","registerCompletionItemProvider","registerHoverProvider","registerDocumentSymbolProvider","registerDocumentFormattingEditProvider","registerDocumentRangeFormattingEditProvider","setTokensProvider","setLanguageConfiguration","richEditConfiguration","registerColorProvider","registerFoldingRangeProvider","__webpack_require__","__webpack_exports__","wordPattern","lineComment","blockComment","brackets","autoClosingPairs","open","close","notIn"],"mappings":"yHAKA,ICIOA,EAwBAC,EA2BAC,EAwBAC,EA4BAC,EA8BAC,EAyBAC,EA2BAC,EAmBAC,EAsCAC,EAwBAC,EAuBAC,EAyCAC,EA8BAC,EAwCAC,EAiBAC,EAqBAC,EAsBAC,EAqBAC,EDrePC,EAAA,KACAC,EAAA,WACA,SAAAA,EAAAC,GACA,IAAAC,EAAAC,KACAA,KAAAC,UAAAH,EACAE,KAAAE,QAAA,KACAF,KAAAG,mBAAAC,YAAA,WAA2D,OAAAL,EAAAM,gBAA+B,KAC1FL,KAAAM,cAAA,EACAN,KAAAO,sBAAAP,KAAAC,UAAAO,YAAA,WAA6E,OAAAT,EAAAU,gBAsD7E,OApDAZ,EAAAa,UAAAD,YAAA,WACAT,KAAAE,UACAF,KAAAE,QAAAS,UACAX,KAAAE,QAAA,MAEAF,KAAAY,QAAA,MAEAf,EAAAa,UAAAC,QAAA,WACAE,cAAAb,KAAAG,oBACAH,KAAAO,sBAAAI,UACAX,KAAAS,eAEAZ,EAAAa,UAAAL,aAAA,WACA,GAAAL,KAAAE,QAAA,CAGA,IAAAY,EAAAC,KAAAC,MAAAhB,KAAAM,cACAQ,EAAAlB,GACAI,KAAAS,gBAGAZ,EAAAa,UAAAO,WAAA,WAgBA,OAfAjB,KAAAM,cAAAS,KAAAC,MACAhB,KAAAY,UACAZ,KAAAE,QAAAgB,OAAAC,OAAAC,gBAAA,CAEAC,SAAA,8BACAC,MAAAtB,KAAAC,UAAAsB,WAEAC,WAAA,CACAC,iBAAAzB,KAAAC,UAAAyB,mBACAH,WAAAvB,KAAAC,UAAAsB,WACAI,oBAAA3B,KAAAC,UAAAyB,mBAAAC,uBAGA3B,KAAAY,QAAA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BAAApc,EAAA,IAAmFyW,GAAoC3E,KA7BvHuK,EAAAzK,EAAA0K,EAAA,8BAAAf,KA+BA,IAAAW,GAAA,CACAK,YAAA,yCACA1B,SAAA,CACA2B,YAAA,KACAC,aAAA,aAEAC,SAAA,CACA,KAAW,KACX,WAEAC,iBAAA,CACA,CAASC,KAAA,IAASC,MAAA,IAAYC,MAAA,YAC9B,CAASF,KAAA,IAAAC,MAAA,IAAAC,MAAA,YACT,CAASF,KAAA,IAAAC,MAAA,IAAAC,MAAA","file":"js/chunk-2d0c1ed0.4354e978.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nvar STOP_WHEN_IDLE_FOR = 2 * 60 * 1000; // 2min\nvar WorkerManager = /** @class */ (function () {\n function WorkerManager(defaults) {\n var _this = this;\n this._defaults = defaults;\n this._worker = null;\n this._idleCheckInterval = setInterval(function () { return _this._checkIfIdle(); }, 30 * 1000);\n this._lastUsedTime = 0;\n this._configChangeListener = this._defaults.onDidChange(function () { return _this._stopWorker(); });\n }\n WorkerManager.prototype._stopWorker = function () {\n if (this._worker) {\n this._worker.dispose();\n this._worker = null;\n }\n this._client = null;\n };\n WorkerManager.prototype.dispose = function () {\n clearInterval(this._idleCheckInterval);\n this._configChangeListener.dispose();\n this._stopWorker();\n };\n WorkerManager.prototype._checkIfIdle = function () {\n if (!this._worker) {\n return;\n }\n var timePassedSinceLastUsed = Date.now() - this._lastUsedTime;\n if (timePassedSinceLastUsed > STOP_WHEN_IDLE_FOR) {\n this._stopWorker();\n }\n };\n WorkerManager.prototype._getClient = function () {\n this._lastUsedTime = Date.now();\n if (!this._client) {\n this._worker = monaco.editor.createWebWorker({\n // module that exports the create() method and returns a `JSONWorker` instance\n moduleId: 'vs/language/json/jsonWorker',\n label: this._defaults.languageId,\n // passed in to the create() method\n createData: {\n languageSettings: this._defaults.diagnosticsOptions,\n languageId: this._defaults.languageId,\n enableSchemaRequest: this._defaults.diagnosticsOptions.enableSchemaRequest\n }\n });\n this._client = this._worker.getProxy();\n }\n return this._client;\n };\n WorkerManager.prototype.getLanguageServiceWorker = function () {\n var _this = this;\n var resources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n resources[_i] = arguments[_i];\n }\n var _client;\n return this._getClient().then(function (client) {\n _client = client;\n }).then(function (_) {\n return _this._worker.withSyncedResources(resources);\n }).then(function (_) { return _client; });\n };\n return WorkerManager;\n}());\nexport { WorkerManager };\n","/* --------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n * ------------------------------------------------------------------------------------------ */\r\n'use strict';\r\n/**\r\n * The Position namespace provides helper functions to work with\r\n * [Position](#Position) literals.\r\n */\r\nexport var Position;\r\n(function (Position) {\r\n /**\r\n * Creates a new Position literal from the given line and character.\r\n * @param line The position's line.\r\n * @param character The position's character.\r\n */\r\n function create(line, character) {\r\n return { line: line, character: character };\r\n }\r\n Position.create = create;\r\n /**\r\n * Checks whether the given liternal conforms to the [Position](#Position) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);\r\n }\r\n Position.is = is;\r\n})(Position || (Position = {}));\r\n/**\r\n * The Range namespace provides helper functions to work with\r\n * [Range](#Range) literals.\r\n */\r\nexport var Range;\r\n(function (Range) {\r\n function create(one, two, three, four) {\r\n if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {\r\n return { start: Position.create(one, two), end: Position.create(three, four) };\r\n }\r\n else if (Position.is(one) && Position.is(two)) {\r\n return { start: one, end: two };\r\n }\r\n else {\r\n throw new Error(\"Range#create called with invalid arguments[\" + one + \", \" + two + \", \" + three + \", \" + four + \"]\");\r\n }\r\n }\r\n Range.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [Range](#Range) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\r\n }\r\n Range.is = is;\r\n})(Range || (Range = {}));\r\n/**\r\n * The Location namespace provides helper functions to work with\r\n * [Location](#Location) literals.\r\n */\r\nexport var Location;\r\n(function (Location) {\r\n /**\r\n * Creates a Location literal.\r\n * @param uri The location's uri.\r\n * @param range The location's range.\r\n */\r\n function create(uri, range) {\r\n return { uri: uri, range: range };\r\n }\r\n Location.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [Location](#Location) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\r\n }\r\n Location.is = is;\r\n})(Location || (Location = {}));\r\n/**\r\n * The LocationLink namespace provides helper functions to work with\r\n * [LocationLink](#LocationLink) literals.\r\n */\r\nexport var LocationLink;\r\n(function (LocationLink) {\r\n /**\r\n * Creates a LocationLink literal.\r\n * @param targetUri The definition's uri.\r\n * @param targetRange The full range of the definition.\r\n * @param targetSelectionRange The span of the symbol definition at the target.\r\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\r\n */\r\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\r\n return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\r\n }\r\n LocationLink.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\r\n && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))\r\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\r\n }\r\n LocationLink.is = is;\r\n})(LocationLink || (LocationLink = {}));\r\n/**\r\n * The Color namespace provides helper functions to work with\r\n * [Color](#Color) literals.\r\n */\r\nexport var Color;\r\n(function (Color) {\r\n /**\r\n * Creates a new Color literal.\r\n */\r\n function create(red, green, blue, alpha) {\r\n return {\r\n red: red,\r\n green: green,\r\n blue: blue,\r\n alpha: alpha,\r\n };\r\n }\r\n Color.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [Color](#Color) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.number(candidate.red)\r\n && Is.number(candidate.green)\r\n && Is.number(candidate.blue)\r\n && Is.number(candidate.alpha);\r\n }\r\n Color.is = is;\r\n})(Color || (Color = {}));\r\n/**\r\n * The ColorInformation namespace provides helper functions to work with\r\n * [ColorInformation](#ColorInformation) literals.\r\n */\r\nexport var ColorInformation;\r\n(function (ColorInformation) {\r\n /**\r\n * Creates a new ColorInformation literal.\r\n */\r\n function create(range, color) {\r\n return {\r\n range: range,\r\n color: color,\r\n };\r\n }\r\n ColorInformation.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Range.is(candidate.range) && Color.is(candidate.color);\r\n }\r\n ColorInformation.is = is;\r\n})(ColorInformation || (ColorInformation = {}));\r\n/**\r\n * The Color namespace provides helper functions to work with\r\n * [ColorPresentation](#ColorPresentation) literals.\r\n */\r\nexport var ColorPresentation;\r\n(function (ColorPresentation) {\r\n /**\r\n * Creates a new ColorInformation literal.\r\n */\r\n function create(label, textEdit, additionalTextEdits) {\r\n return {\r\n label: label,\r\n textEdit: textEdit,\r\n additionalTextEdits: additionalTextEdits,\r\n };\r\n }\r\n ColorPresentation.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.string(candidate.label)\r\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\r\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\r\n }\r\n ColorPresentation.is = is;\r\n})(ColorPresentation || (ColorPresentation = {}));\r\n/**\r\n * Enum of known range kinds\r\n */\r\nexport var FoldingRangeKind;\r\n(function (FoldingRangeKind) {\r\n /**\r\n * Folding range for a comment\r\n */\r\n FoldingRangeKind[\"Comment\"] = \"comment\";\r\n /**\r\n * Folding range for a imports or includes\r\n */\r\n FoldingRangeKind[\"Imports\"] = \"imports\";\r\n /**\r\n * Folding range for a region (e.g. `#region`)\r\n */\r\n FoldingRangeKind[\"Region\"] = \"region\";\r\n})(FoldingRangeKind || (FoldingRangeKind = {}));\r\n/**\r\n * The folding range namespace provides helper functions to work with\r\n * [FoldingRange](#FoldingRange) literals.\r\n */\r\nexport var FoldingRange;\r\n(function (FoldingRange) {\r\n /**\r\n * Creates a new FoldingRange literal.\r\n */\r\n function create(startLine, endLine, startCharacter, endCharacter, kind) {\r\n var result = {\r\n startLine: startLine,\r\n endLine: endLine\r\n };\r\n if (Is.defined(startCharacter)) {\r\n result.startCharacter = startCharacter;\r\n }\r\n if (Is.defined(endCharacter)) {\r\n result.endCharacter = endCharacter;\r\n }\r\n if (Is.defined(kind)) {\r\n result.kind = kind;\r\n }\r\n return result;\r\n }\r\n FoldingRange.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.number(candidate.startLine) && Is.number(candidate.startLine)\r\n && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))\r\n && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))\r\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\r\n }\r\n FoldingRange.is = is;\r\n})(FoldingRange || (FoldingRange = {}));\r\n/**\r\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\r\n * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\r\n */\r\nexport var DiagnosticRelatedInformation;\r\n(function (DiagnosticRelatedInformation) {\r\n /**\r\n * Creates a new DiagnosticRelatedInformation literal.\r\n */\r\n function create(location, message) {\r\n return {\r\n location: location,\r\n message: message\r\n };\r\n }\r\n DiagnosticRelatedInformation.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\r\n }\r\n DiagnosticRelatedInformation.is = is;\r\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\r\n/**\r\n * The diagnostic's severity.\r\n */\r\nexport var DiagnosticSeverity;\r\n(function (DiagnosticSeverity) {\r\n /**\r\n * Reports an error.\r\n */\r\n DiagnosticSeverity.Error = 1;\r\n /**\r\n * Reports a warning.\r\n */\r\n DiagnosticSeverity.Warning = 2;\r\n /**\r\n * Reports an information.\r\n */\r\n DiagnosticSeverity.Information = 3;\r\n /**\r\n * Reports a hint.\r\n */\r\n DiagnosticSeverity.Hint = 4;\r\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\r\n/**\r\n * The Diagnostic namespace provides helper functions to work with\r\n * [Diagnostic](#Diagnostic) literals.\r\n */\r\nexport var Diagnostic;\r\n(function (Diagnostic) {\r\n /**\r\n * Creates a new Diagnostic literal.\r\n */\r\n function create(range, message, severity, code, source, relatedInformation) {\r\n var result = { range: range, message: message };\r\n if (Is.defined(severity)) {\r\n result.severity = severity;\r\n }\r\n if (Is.defined(code)) {\r\n result.code = code;\r\n }\r\n if (Is.defined(source)) {\r\n result.source = source;\r\n }\r\n if (Is.defined(relatedInformation)) {\r\n result.relatedInformation = relatedInformation;\r\n }\r\n return result;\r\n }\r\n Diagnostic.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate)\r\n && Range.is(candidate.range)\r\n && Is.string(candidate.message)\r\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\r\n && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\r\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\r\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\r\n }\r\n Diagnostic.is = is;\r\n})(Diagnostic || (Diagnostic = {}));\r\n/**\r\n * The Command namespace provides helper functions to work with\r\n * [Command](#Command) literals.\r\n */\r\nexport var Command;\r\n(function (Command) {\r\n /**\r\n * Creates a new Command literal.\r\n */\r\n function create(title, command) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n var result = { title: title, command: command };\r\n if (Is.defined(args) && args.length > 0) {\r\n result.arguments = args;\r\n }\r\n return result;\r\n }\r\n Command.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [Command](#Command) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\r\n }\r\n Command.is = is;\r\n})(Command || (Command = {}));\r\n/**\r\n * The TextEdit namespace provides helper function to create replace,\r\n * insert and delete edits more easily.\r\n */\r\nexport var TextEdit;\r\n(function (TextEdit) {\r\n /**\r\n * Creates a replace text edit.\r\n * @param range The range of text to be replaced.\r\n * @param newText The new text.\r\n */\r\n function replace(range, newText) {\r\n return { range: range, newText: newText };\r\n }\r\n TextEdit.replace = replace;\r\n /**\r\n * Creates a insert text edit.\r\n * @param position The position to insert the text at.\r\n * @param newText The text to be inserted.\r\n */\r\n function insert(position, newText) {\r\n return { range: { start: position, end: position }, newText: newText };\r\n }\r\n TextEdit.insert = insert;\r\n /**\r\n * Creates a delete text edit.\r\n * @param range The range of text to be deleted.\r\n */\r\n function del(range) {\r\n return { range: range, newText: '' };\r\n }\r\n TextEdit.del = del;\r\n function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(candidate)\r\n && Is.string(candidate.newText)\r\n && Range.is(candidate.range);\r\n }\r\n TextEdit.is = is;\r\n})(TextEdit || (TextEdit = {}));\r\n/**\r\n * The TextDocumentEdit namespace provides helper function to create\r\n * an edit that manipulates a text document.\r\n */\r\nexport var TextDocumentEdit;\r\n(function (TextDocumentEdit) {\r\n /**\r\n * Creates a new `TextDocumentEdit`\r\n */\r\n function create(textDocument, edits) {\r\n return { textDocument: textDocument, edits: edits };\r\n }\r\n TextDocumentEdit.create = create;\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate)\r\n && VersionedTextDocumentIdentifier.is(candidate.textDocument)\r\n && Array.isArray(candidate.edits);\r\n }\r\n TextDocumentEdit.is = is;\r\n})(TextDocumentEdit || (TextDocumentEdit = {}));\r\nexport var CreateFile;\r\n(function (CreateFile) {\r\n function create(uri, options) {\r\n var result = {\r\n kind: 'create',\r\n uri: uri\r\n };\r\n if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {\r\n result.options = options;\r\n }\r\n return result;\r\n }\r\n CreateFile.create = create;\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&\r\n (candidate.options === void 0 ||\r\n ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));\r\n }\r\n CreateFile.is = is;\r\n})(CreateFile || (CreateFile = {}));\r\nexport var RenameFile;\r\n(function (RenameFile) {\r\n function create(oldUri, newUri, options) {\r\n var result = {\r\n kind: 'rename',\r\n oldUri: oldUri,\r\n newUri: newUri\r\n };\r\n if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {\r\n result.options = options;\r\n }\r\n return result;\r\n }\r\n RenameFile.create = create;\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&\r\n (candidate.options === void 0 ||\r\n ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));\r\n }\r\n RenameFile.is = is;\r\n})(RenameFile || (RenameFile = {}));\r\nexport var DeleteFile;\r\n(function (DeleteFile) {\r\n function create(uri, options) {\r\n var result = {\r\n kind: 'delete',\r\n uri: uri\r\n };\r\n if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {\r\n result.options = options;\r\n }\r\n return result;\r\n }\r\n DeleteFile.create = create;\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&\r\n (candidate.options === void 0 ||\r\n ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));\r\n }\r\n DeleteFile.is = is;\r\n})(DeleteFile || (DeleteFile = {}));\r\nexport var WorkspaceEdit;\r\n(function (WorkspaceEdit) {\r\n function is(value) {\r\n var candidate = value;\r\n return candidate &&\r\n (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&\r\n (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {\r\n if (Is.string(change.kind)) {\r\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\r\n }\r\n else {\r\n return TextDocumentEdit.is(change);\r\n }\r\n }));\r\n }\r\n WorkspaceEdit.is = is;\r\n})(WorkspaceEdit || (WorkspaceEdit = {}));\r\nvar TextEditChangeImpl = /** @class */ (function () {\r\n function TextEditChangeImpl(edits) {\r\n this.edits = edits;\r\n }\r\n TextEditChangeImpl.prototype.insert = function (position, newText) {\r\n this.edits.push(TextEdit.insert(position, newText));\r\n };\r\n TextEditChangeImpl.prototype.replace = function (range, newText) {\r\n this.edits.push(TextEdit.replace(range, newText));\r\n };\r\n TextEditChangeImpl.prototype.delete = function (range) {\r\n this.edits.push(TextEdit.del(range));\r\n };\r\n TextEditChangeImpl.prototype.add = function (edit) {\r\n this.edits.push(edit);\r\n };\r\n TextEditChangeImpl.prototype.all = function () {\r\n return this.edits;\r\n };\r\n TextEditChangeImpl.prototype.clear = function () {\r\n this.edits.splice(0, this.edits.length);\r\n };\r\n return TextEditChangeImpl;\r\n}());\r\n/**\r\n * A workspace change helps constructing changes to a workspace.\r\n */\r\nvar WorkspaceChange = /** @class */ (function () {\r\n function WorkspaceChange(workspaceEdit) {\r\n var _this = this;\r\n this._textEditChanges = Object.create(null);\r\n if (workspaceEdit) {\r\n this._workspaceEdit = workspaceEdit;\r\n if (workspaceEdit.documentChanges) {\r\n workspaceEdit.documentChanges.forEach(function (change) {\r\n if (TextDocumentEdit.is(change)) {\r\n var textEditChange = new TextEditChangeImpl(change.edits);\r\n _this._textEditChanges[change.textDocument.uri] = textEditChange;\r\n }\r\n });\r\n }\r\n else if (workspaceEdit.changes) {\r\n Object.keys(workspaceEdit.changes).forEach(function (key) {\r\n var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\r\n _this._textEditChanges[key] = textEditChange;\r\n });\r\n }\r\n }\r\n }\r\n Object.defineProperty(WorkspaceChange.prototype, \"edit\", {\r\n /**\r\n * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\r\n * use to be returned from a workspace edit operation like rename.\r\n */\r\n get: function () {\r\n return this._workspaceEdit;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n WorkspaceChange.prototype.getTextEditChange = function (key) {\r\n if (VersionedTextDocumentIdentifier.is(key)) {\r\n if (!this._workspaceEdit) {\r\n this._workspaceEdit = {\r\n documentChanges: []\r\n };\r\n }\r\n if (!this._workspaceEdit.documentChanges) {\r\n throw new Error('Workspace edit is not configured for document changes.');\r\n }\r\n var textDocument = key;\r\n var result = this._textEditChanges[textDocument.uri];\r\n if (!result) {\r\n var edits = [];\r\n var textDocumentEdit = {\r\n textDocument: textDocument,\r\n edits: edits\r\n };\r\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\r\n result = new TextEditChangeImpl(edits);\r\n this._textEditChanges[textDocument.uri] = result;\r\n }\r\n return result;\r\n }\r\n else {\r\n if (!this._workspaceEdit) {\r\n this._workspaceEdit = {\r\n changes: Object.create(null)\r\n };\r\n }\r\n if (!this._workspaceEdit.changes) {\r\n throw new Error('Workspace edit is not configured for normal text edit changes.');\r\n }\r\n var result = this._textEditChanges[key];\r\n if (!result) {\r\n var edits = [];\r\n this._workspaceEdit.changes[key] = edits;\r\n result = new TextEditChangeImpl(edits);\r\n this._textEditChanges[key] = result;\r\n }\r\n return result;\r\n }\r\n };\r\n WorkspaceChange.prototype.createFile = function (uri, options) {\r\n this.checkDocumentChanges();\r\n this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));\r\n };\r\n WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {\r\n this.checkDocumentChanges();\r\n this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));\r\n };\r\n WorkspaceChange.prototype.deleteFile = function (uri, options) {\r\n this.checkDocumentChanges();\r\n this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));\r\n };\r\n WorkspaceChange.prototype.checkDocumentChanges = function () {\r\n if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {\r\n throw new Error('Workspace edit is not configured for document changes.');\r\n }\r\n };\r\n return WorkspaceChange;\r\n}());\r\nexport { WorkspaceChange };\r\n/**\r\n * The TextDocumentIdentifier namespace provides helper functions to work with\r\n * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\r\n */\r\nexport var TextDocumentIdentifier;\r\n(function (TextDocumentIdentifier) {\r\n /**\r\n * Creates a new TextDocumentIdentifier literal.\r\n * @param uri The document's uri.\r\n */\r\n function create(uri) {\r\n return { uri: uri };\r\n }\r\n TextDocumentIdentifier.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.string(candidate.uri);\r\n }\r\n TextDocumentIdentifier.is = is;\r\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\r\n/**\r\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\r\n * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\r\n */\r\nexport var VersionedTextDocumentIdentifier;\r\n(function (VersionedTextDocumentIdentifier) {\r\n /**\r\n * Creates a new VersionedTextDocumentIdentifier literal.\r\n * @param uri The document's uri.\r\n * @param uri The document's text.\r\n */\r\n function create(uri, version) {\r\n return { uri: uri, version: version };\r\n }\r\n VersionedTextDocumentIdentifier.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));\r\n }\r\n VersionedTextDocumentIdentifier.is = is;\r\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\r\n/**\r\n * The TextDocumentItem namespace provides helper functions to work with\r\n * [TextDocumentItem](#TextDocumentItem) literals.\r\n */\r\nexport var TextDocumentItem;\r\n(function (TextDocumentItem) {\r\n /**\r\n * Creates a new TextDocumentItem literal.\r\n * @param uri The document's uri.\r\n * @param languageId The document's language identifier.\r\n * @param version The document's version number.\r\n * @param text The document's text.\r\n */\r\n function create(uri, languageId, version, text) {\r\n return { uri: uri, languageId: languageId, version: version, text: text };\r\n }\r\n TextDocumentItem.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);\r\n }\r\n TextDocumentItem.is = is;\r\n})(TextDocumentItem || (TextDocumentItem = {}));\r\n/**\r\n * Describes the content type that a client supports in various\r\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\r\n *\r\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\r\n * are reserved for internal usage.\r\n */\r\nexport var MarkupKind;\r\n(function (MarkupKind) {\r\n /**\r\n * Plain text is supported as a content format\r\n */\r\n MarkupKind.PlainText = 'plaintext';\r\n /**\r\n * Markdown is supported as a content format\r\n */\r\n MarkupKind.Markdown = 'markdown';\r\n})(MarkupKind || (MarkupKind = {}));\r\n(function (MarkupKind) {\r\n /**\r\n * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\r\n }\r\n MarkupKind.is = is;\r\n})(MarkupKind || (MarkupKind = {}));\r\nexport var MarkupContent;\r\n(function (MarkupContent) {\r\n /**\r\n * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\r\n }\r\n MarkupContent.is = is;\r\n})(MarkupContent || (MarkupContent = {}));\r\n/**\r\n * The kind of a completion entry.\r\n */\r\nexport var CompletionItemKind;\r\n(function (CompletionItemKind) {\r\n CompletionItemKind.Text = 1;\r\n CompletionItemKind.Method = 2;\r\n CompletionItemKind.Function = 3;\r\n CompletionItemKind.Constructor = 4;\r\n CompletionItemKind.Field = 5;\r\n CompletionItemKind.Variable = 6;\r\n CompletionItemKind.Class = 7;\r\n CompletionItemKind.Interface = 8;\r\n CompletionItemKind.Module = 9;\r\n CompletionItemKind.Property = 10;\r\n CompletionItemKind.Unit = 11;\r\n CompletionItemKind.Value = 12;\r\n CompletionItemKind.Enum = 13;\r\n CompletionItemKind.Keyword = 14;\r\n CompletionItemKind.Snippet = 15;\r\n CompletionItemKind.Color = 16;\r\n CompletionItemKind.File = 17;\r\n CompletionItemKind.Reference = 18;\r\n CompletionItemKind.Folder = 19;\r\n CompletionItemKind.EnumMember = 20;\r\n CompletionItemKind.Constant = 21;\r\n CompletionItemKind.Struct = 22;\r\n CompletionItemKind.Event = 23;\r\n CompletionItemKind.Operator = 24;\r\n CompletionItemKind.TypeParameter = 25;\r\n})(CompletionItemKind || (CompletionItemKind = {}));\r\n/**\r\n * Defines whether the insert text in a completion item should be interpreted as\r\n * plain text or a snippet.\r\n */\r\nexport var InsertTextFormat;\r\n(function (InsertTextFormat) {\r\n /**\r\n * The primary text to be inserted is treated as a plain string.\r\n */\r\n InsertTextFormat.PlainText = 1;\r\n /**\r\n * The primary text to be inserted is treated as a snippet.\r\n *\r\n * A snippet can define tab stops and placeholders with `$1`, `$2`\r\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\r\n * the end of the snippet. Placeholders with equal identifiers are linked,\r\n * that is typing in one will update others too.\r\n *\r\n * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md\r\n */\r\n InsertTextFormat.Snippet = 2;\r\n})(InsertTextFormat || (InsertTextFormat = {}));\r\n/**\r\n * The CompletionItem namespace provides functions to deal with\r\n * completion items.\r\n */\r\nexport var CompletionItem;\r\n(function (CompletionItem) {\r\n /**\r\n * Create a completion item and seed it with a label.\r\n * @param label The completion item's label\r\n */\r\n function create(label) {\r\n return { label: label };\r\n }\r\n CompletionItem.create = create;\r\n})(CompletionItem || (CompletionItem = {}));\r\n/**\r\n * The CompletionList namespace provides functions to deal with\r\n * completion lists.\r\n */\r\nexport var CompletionList;\r\n(function (CompletionList) {\r\n /**\r\n * Creates a new completion list.\r\n *\r\n * @param items The completion items.\r\n * @param isIncomplete The list is not complete.\r\n */\r\n function create(items, isIncomplete) {\r\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\r\n }\r\n CompletionList.create = create;\r\n})(CompletionList || (CompletionList = {}));\r\nexport var MarkedString;\r\n(function (MarkedString) {\r\n /**\r\n * Creates a marked string from plain text.\r\n *\r\n * @param plainText The plain text.\r\n */\r\n function fromPlainText(plainText) {\r\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, \"\\\\$&\"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\r\n }\r\n MarkedString.fromPlainText = fromPlainText;\r\n /**\r\n * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\r\n }\r\n MarkedString.is = is;\r\n})(MarkedString || (MarkedString = {}));\r\nexport var Hover;\r\n(function (Hover) {\r\n /**\r\n * Checks whether the given value conforms to the [Hover](#Hover) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\r\n MarkedString.is(candidate.contents) ||\r\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));\r\n }\r\n Hover.is = is;\r\n})(Hover || (Hover = {}));\r\n/**\r\n * The ParameterInformation namespace provides helper functions to work with\r\n * [ParameterInformation](#ParameterInformation) literals.\r\n */\r\nexport var ParameterInformation;\r\n(function (ParameterInformation) {\r\n /**\r\n * Creates a new parameter information literal.\r\n *\r\n * @param label A label string.\r\n * @param documentation A doc string.\r\n */\r\n function create(label, documentation) {\r\n return documentation ? { label: label, documentation: documentation } : { label: label };\r\n }\r\n ParameterInformation.create = create;\r\n ;\r\n})(ParameterInformation || (ParameterInformation = {}));\r\n/**\r\n * The SignatureInformation namespace provides helper functions to work with\r\n * [SignatureInformation](#SignatureInformation) literals.\r\n */\r\nexport var SignatureInformation;\r\n(function (SignatureInformation) {\r\n function create(label, documentation) {\r\n var parameters = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n parameters[_i - 2] = arguments[_i];\r\n }\r\n var result = { label: label };\r\n if (Is.defined(documentation)) {\r\n result.documentation = documentation;\r\n }\r\n if (Is.defined(parameters)) {\r\n result.parameters = parameters;\r\n }\r\n else {\r\n result.parameters = [];\r\n }\r\n return result;\r\n }\r\n SignatureInformation.create = create;\r\n})(SignatureInformation || (SignatureInformation = {}));\r\n/**\r\n * A document highlight kind.\r\n */\r\nexport var DocumentHighlightKind;\r\n(function (DocumentHighlightKind) {\r\n /**\r\n * A textual occurrence.\r\n */\r\n DocumentHighlightKind.Text = 1;\r\n /**\r\n * Read-access of a symbol, like reading a variable.\r\n */\r\n DocumentHighlightKind.Read = 2;\r\n /**\r\n * Write-access of a symbol, like writing to a variable.\r\n */\r\n DocumentHighlightKind.Write = 3;\r\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\r\n/**\r\n * DocumentHighlight namespace to provide helper functions to work with\r\n * [DocumentHighlight](#DocumentHighlight) literals.\r\n */\r\nexport var DocumentHighlight;\r\n(function (DocumentHighlight) {\r\n /**\r\n * Create a DocumentHighlight object.\r\n * @param range The range the highlight applies to.\r\n */\r\n function create(range, kind) {\r\n var result = { range: range };\r\n if (Is.number(kind)) {\r\n result.kind = kind;\r\n }\r\n return result;\r\n }\r\n DocumentHighlight.create = create;\r\n})(DocumentHighlight || (DocumentHighlight = {}));\r\n/**\r\n * A symbol kind.\r\n */\r\nexport var SymbolKind;\r\n(function (SymbolKind) {\r\n SymbolKind.File = 1;\r\n SymbolKind.Module = 2;\r\n SymbolKind.Namespace = 3;\r\n SymbolKind.Package = 4;\r\n SymbolKind.Class = 5;\r\n SymbolKind.Method = 6;\r\n SymbolKind.Property = 7;\r\n SymbolKind.Field = 8;\r\n SymbolKind.Constructor = 9;\r\n SymbolKind.Enum = 10;\r\n SymbolKind.Interface = 11;\r\n SymbolKind.Function = 12;\r\n SymbolKind.Variable = 13;\r\n SymbolKind.Constant = 14;\r\n SymbolKind.String = 15;\r\n SymbolKind.Number = 16;\r\n SymbolKind.Boolean = 17;\r\n SymbolKind.Array = 18;\r\n SymbolKind.Object = 19;\r\n SymbolKind.Key = 20;\r\n SymbolKind.Null = 21;\r\n SymbolKind.EnumMember = 22;\r\n SymbolKind.Struct = 23;\r\n SymbolKind.Event = 24;\r\n SymbolKind.Operator = 25;\r\n SymbolKind.TypeParameter = 26;\r\n})(SymbolKind || (SymbolKind = {}));\r\nexport var SymbolInformation;\r\n(function (SymbolInformation) {\r\n /**\r\n * Creates a new symbol information literal.\r\n *\r\n * @param name The name of the symbol.\r\n * @param kind The kind of the symbol.\r\n * @param range The range of the location of the symbol.\r\n * @param uri The resource of the location of symbol, defaults to the current document.\r\n * @param containerName The name of the symbol containing the symbol.\r\n */\r\n function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }\r\n SymbolInformation.create = create;\r\n})(SymbolInformation || (SymbolInformation = {}));\r\n/**\r\n * Represents programming constructs like variables, classes, interfaces etc.\r\n * that appear in a document. Document symbols can be hierarchical and they\r\n * have two ranges: one that encloses its definition and one that points to\r\n * its most interesting range, e.g. the range of an identifier.\r\n */\r\nvar DocumentSymbol = /** @class */ (function () {\r\n function DocumentSymbol() {\r\n }\r\n return DocumentSymbol;\r\n}());\r\nexport { DocumentSymbol };\r\n(function (DocumentSymbol) {\r\n /**\r\n * Creates a new symbol information literal.\r\n *\r\n * @param name The name of the symbol.\r\n * @param detail The detail of the symbol.\r\n * @param kind The kind of the symbol.\r\n * @param range The range of the symbol.\r\n * @param selectionRange The selectionRange of the symbol.\r\n * @param children Children of the symbol.\r\n */\r\n function create(name, detail, kind, range, selectionRange, children) {\r\n var result = {\r\n name: name,\r\n detail: detail,\r\n kind: kind,\r\n range: range,\r\n selectionRange: selectionRange\r\n };\r\n if (children !== void 0) {\r\n result.children = children;\r\n }\r\n return result;\r\n }\r\n DocumentSymbol.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return candidate &&\r\n Is.string(candidate.name) && Is.number(candidate.kind) &&\r\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\r\n (candidate.detail === void 0 || Is.string(candidate.detail)) &&\r\n (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&\r\n (candidate.children === void 0 || Array.isArray(candidate.children));\r\n }\r\n DocumentSymbol.is = is;\r\n})(DocumentSymbol || (DocumentSymbol = {}));\r\n/**\r\n * A set of predefined code action kinds\r\n */\r\nexport var CodeActionKind;\r\n(function (CodeActionKind) {\r\n /**\r\n * Base kind for quickfix actions: 'quickfix'\r\n */\r\n CodeActionKind.QuickFix = 'quickfix';\r\n /**\r\n * Base kind for refactoring actions: 'refactor'\r\n */\r\n CodeActionKind.Refactor = 'refactor';\r\n /**\r\n * Base kind for refactoring extraction actions: 'refactor.extract'\r\n *\r\n * Example extract actions:\r\n *\r\n * - Extract method\r\n * - Extract function\r\n * - Extract variable\r\n * - Extract interface from class\r\n * - ...\r\n */\r\n CodeActionKind.RefactorExtract = 'refactor.extract';\r\n /**\r\n * Base kind for refactoring inline actions: 'refactor.inline'\r\n *\r\n * Example inline actions:\r\n *\r\n * - Inline function\r\n * - Inline variable\r\n * - Inline constant\r\n * - ...\r\n */\r\n CodeActionKind.RefactorInline = 'refactor.inline';\r\n /**\r\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\r\n *\r\n * Example rewrite actions:\r\n *\r\n * - Convert JavaScript function to class\r\n * - Add or remove parameter\r\n * - Encapsulate field\r\n * - Make method static\r\n * - Move method to base class\r\n * - ...\r\n */\r\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\r\n /**\r\n * Base kind for source actions: `source`\r\n *\r\n * Source code actions apply to the entire file.\r\n */\r\n CodeActionKind.Source = 'source';\r\n /**\r\n * Base kind for an organize imports source action: `source.organizeImports`\r\n */\r\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\r\n})(CodeActionKind || (CodeActionKind = {}));\r\n/**\r\n * The CodeActionContext namespace provides helper functions to work with\r\n * [CodeActionContext](#CodeActionContext) literals.\r\n */\r\nexport var CodeActionContext;\r\n(function (CodeActionContext) {\r\n /**\r\n * Creates a new CodeActionContext literal.\r\n */\r\n function create(diagnostics, only) {\r\n var result = { diagnostics: diagnostics };\r\n if (only !== void 0 && only !== null) {\r\n result.only = only;\r\n }\r\n return result;\r\n }\r\n CodeActionContext.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));\r\n }\r\n CodeActionContext.is = is;\r\n})(CodeActionContext || (CodeActionContext = {}));\r\nexport var CodeAction;\r\n(function (CodeAction) {\r\n function create(title, commandOrEdit, kind) {\r\n var result = { title: title };\r\n if (Command.is(commandOrEdit)) {\r\n result.command = commandOrEdit;\r\n }\r\n else {\r\n result.edit = commandOrEdit;\r\n }\r\n if (kind !== void null) {\r\n result.kind = kind;\r\n }\r\n return result;\r\n }\r\n CodeAction.create = create;\r\n function is(value) {\r\n var candidate = value;\r\n return candidate && Is.string(candidate.title) &&\r\n (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\r\n (candidate.kind === void 0 || Is.string(candidate.kind)) &&\r\n (candidate.edit !== void 0 || candidate.command !== void 0) &&\r\n (candidate.command === void 0 || Command.is(candidate.command)) &&\r\n (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));\r\n }\r\n CodeAction.is = is;\r\n})(CodeAction || (CodeAction = {}));\r\n/**\r\n * The CodeLens namespace provides helper functions to work with\r\n * [CodeLens](#CodeLens) literals.\r\n */\r\nexport var CodeLens;\r\n(function (CodeLens) {\r\n /**\r\n * Creates a new CodeLens literal.\r\n */\r\n function create(range, data) {\r\n var result = { range: range };\r\n if (Is.defined(data))\r\n result.data = data;\r\n return result;\r\n }\r\n CodeLens.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\r\n }\r\n CodeLens.is = is;\r\n})(CodeLens || (CodeLens = {}));\r\n/**\r\n * The FormattingOptions namespace provides helper functions to work with\r\n * [FormattingOptions](#FormattingOptions) literals.\r\n */\r\nexport var FormattingOptions;\r\n(function (FormattingOptions) {\r\n /**\r\n * Creates a new FormattingOptions literal.\r\n */\r\n function create(tabSize, insertSpaces) {\r\n return { tabSize: tabSize, insertSpaces: insertSpaces };\r\n }\r\n FormattingOptions.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\r\n }\r\n FormattingOptions.is = is;\r\n})(FormattingOptions || (FormattingOptions = {}));\r\n/**\r\n * A document link is a range in a text document that links to an internal or external resource, like another\r\n * text document or a web site.\r\n */\r\nvar DocumentLink = /** @class */ (function () {\r\n function DocumentLink() {\r\n }\r\n return DocumentLink;\r\n}());\r\nexport { DocumentLink };\r\n/**\r\n * The DocumentLink namespace provides helper functions to work with\r\n * [DocumentLink](#DocumentLink) literals.\r\n */\r\n(function (DocumentLink) {\r\n /**\r\n * Creates a new DocumentLink literal.\r\n */\r\n function create(range, target, data) {\r\n return { range: range, target: target, data: data };\r\n }\r\n DocumentLink.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\r\n }\r\n DocumentLink.is = is;\r\n})(DocumentLink || (DocumentLink = {}));\r\nexport var EOL = ['\\n', '\\r\\n', '\\r'];\r\nexport var TextDocument;\r\n(function (TextDocument) {\r\n /**\r\n * Creates a new ITextDocument literal from the given uri and content.\r\n * @param uri The document's uri.\r\n * @param languageId The document's language Id.\r\n * @param content The document's content.\r\n */\r\n function create(uri, languageId, version, content) {\r\n return new FullTextDocument(uri, languageId, version, content);\r\n }\r\n TextDocument.create = create;\r\n /**\r\n * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\r\n */\r\n function is(value) {\r\n var candidate = value;\r\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)\r\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\r\n }\r\n TextDocument.is = is;\r\n function applyEdits(document, edits) {\r\n var text = document.getText();\r\n var sortedEdits = mergeSort(edits, function (a, b) {\r\n var diff = a.range.start.line - b.range.start.line;\r\n if (diff === 0) {\r\n return a.range.start.character - b.range.start.character;\r\n }\r\n return diff;\r\n });\r\n var lastModifiedOffset = text.length;\r\n for (var i = sortedEdits.length - 1; i >= 0; i--) {\r\n var e = sortedEdits[i];\r\n var startOffset = document.offsetAt(e.range.start);\r\n var endOffset = document.offsetAt(e.range.end);\r\n if (endOffset <= lastModifiedOffset) {\r\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\r\n }\r\n else {\r\n throw new Error('Overlapping edit');\r\n }\r\n lastModifiedOffset = startOffset;\r\n }\r\n return text;\r\n }\r\n TextDocument.applyEdits = applyEdits;\r\n function mergeSort(data, compare) {\r\n if (data.length <= 1) {\r\n // sorted\r\n return data;\r\n }\r\n var p = (data.length / 2) | 0;\r\n var left = data.slice(0, p);\r\n var right = data.slice(p);\r\n mergeSort(left, compare);\r\n mergeSort(right, compare);\r\n var leftIdx = 0;\r\n var rightIdx = 0;\r\n var i = 0;\r\n while (leftIdx < left.length && rightIdx < right.length) {\r\n var ret = compare(left[leftIdx], right[rightIdx]);\r\n if (ret <= 0) {\r\n // smaller_equal -> take left to preserve order\r\n data[i++] = left[leftIdx++];\r\n }\r\n else {\r\n // greater -> take right\r\n data[i++] = right[rightIdx++];\r\n }\r\n }\r\n while (leftIdx < left.length) {\r\n data[i++] = left[leftIdx++];\r\n }\r\n while (rightIdx < right.length) {\r\n data[i++] = right[rightIdx++];\r\n }\r\n return data;\r\n }\r\n})(TextDocument || (TextDocument = {}));\r\n/**\r\n * Represents reasons why a text document is saved.\r\n */\r\nexport var TextDocumentSaveReason;\r\n(function (TextDocumentSaveReason) {\r\n /**\r\n * Manually triggered, e.g. by the user pressing save, by starting debugging,\r\n * or by an API call.\r\n */\r\n TextDocumentSaveReason.Manual = 1;\r\n /**\r\n * Automatic after a delay.\r\n */\r\n TextDocumentSaveReason.AfterDelay = 2;\r\n /**\r\n * When the editor lost focus.\r\n */\r\n TextDocumentSaveReason.FocusOut = 3;\r\n})(TextDocumentSaveReason || (TextDocumentSaveReason = {}));\r\nvar FullTextDocument = /** @class */ (function () {\r\n function FullTextDocument(uri, languageId, version, content) {\r\n this._uri = uri;\r\n this._languageId = languageId;\r\n this._version = version;\r\n this._content = content;\r\n this._lineOffsets = null;\r\n }\r\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\r\n get: function () {\r\n return this._uri;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\r\n get: function () {\r\n return this._languageId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\r\n get: function () {\r\n return this._version;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n FullTextDocument.prototype.getText = function (range) {\r\n if (range) {\r\n var start = this.offsetAt(range.start);\r\n var end = this.offsetAt(range.end);\r\n return this._content.substring(start, end);\r\n }\r\n return this._content;\r\n };\r\n FullTextDocument.prototype.update = function (event, version) {\r\n this._content = event.text;\r\n this._version = version;\r\n this._lineOffsets = null;\r\n };\r\n FullTextDocument.prototype.getLineOffsets = function () {\r\n if (this._lineOffsets === null) {\r\n var lineOffsets = [];\r\n var text = this._content;\r\n var isLineStart = true;\r\n for (var i = 0; i < text.length; i++) {\r\n if (isLineStart) {\r\n lineOffsets.push(i);\r\n isLineStart = false;\r\n }\r\n var ch = text.charAt(i);\r\n isLineStart = (ch === '\\r' || ch === '\\n');\r\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\r\n i++;\r\n }\r\n }\r\n if (isLineStart && text.length > 0) {\r\n lineOffsets.push(text.length);\r\n }\r\n this._lineOffsets = lineOffsets;\r\n }\r\n return this._lineOffsets;\r\n };\r\n FullTextDocument.prototype.positionAt = function (offset) {\r\n offset = Math.max(Math.min(offset, this._content.length), 0);\r\n var lineOffsets = this.getLineOffsets();\r\n var low = 0, high = lineOffsets.length;\r\n if (high === 0) {\r\n return Position.create(0, offset);\r\n }\r\n while (low < high) {\r\n var mid = Math.floor((low + high) / 2);\r\n if (lineOffsets[mid] > offset) {\r\n high = mid;\r\n }\r\n else {\r\n low = mid + 1;\r\n }\r\n }\r\n // low is the least x for which the line offset is larger than the current offset\r\n // or array.length if no line offset is larger than the current offset\r\n var line = low - 1;\r\n return Position.create(line, offset - lineOffsets[line]);\r\n };\r\n FullTextDocument.prototype.offsetAt = function (position) {\r\n var lineOffsets = this.getLineOffsets();\r\n if (position.line >= lineOffsets.length) {\r\n return this._content.length;\r\n }\r\n else if (position.line < 0) {\r\n return 0;\r\n }\r\n var lineOffset = lineOffsets[position.line];\r\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\r\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\r\n };\r\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\r\n get: function () {\r\n return this.getLineOffsets().length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FullTextDocument;\r\n}());\r\nvar Is;\r\n(function (Is) {\r\n var toString = Object.prototype.toString;\r\n function defined(value) {\r\n return typeof value !== 'undefined';\r\n }\r\n Is.defined = defined;\r\n function undefined(value) {\r\n return typeof value === 'undefined';\r\n }\r\n Is.undefined = undefined;\r\n function boolean(value) {\r\n return value === true || value === false;\r\n }\r\n Is.boolean = boolean;\r\n function string(value) {\r\n return toString.call(value) === '[object String]';\r\n }\r\n Is.string = string;\r\n function number(value) {\r\n return toString.call(value) === '[object Number]';\r\n }\r\n Is.number = number;\r\n function func(value) {\r\n return toString.call(value) === '[object Function]';\r\n }\r\n Is.func = func;\r\n function objectLiteral(value) {\r\n // Strictly speaking class instances pass this check as well. Since the LSP\r\n // doesn't use classes we ignore this for now. If we do we need to add something\r\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\r\n return value !== null && typeof value === 'object';\r\n }\r\n Is.objectLiteral = objectLiteral;\r\n function typedArray(value, check) {\r\n return Array.isArray(value) && value.every(check);\r\n }\r\n Is.typedArray = typedArray;\r\n})(Is || (Is = {}));\r\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as ls from './_deps/vscode-languageserver-types/main.js';\nvar Uri = monaco.Uri;\nvar Range = monaco.Range;\n// --- diagnostics --- ---\nvar DiagnosticsAdapter = /** @class */ (function () {\n function DiagnosticsAdapter(_languageId, _worker, defaults) {\n var _this = this;\n this._languageId = _languageId;\n this._worker = _worker;\n this._disposables = [];\n this._listener = Object.create(null);\n var onModelAdd = function (model) {\n var modeId = model.getModeId();\n if (modeId !== _this._languageId) {\n return;\n }\n var handle;\n _this._listener[model.uri.toString()] = model.onDidChangeContent(function () {\n clearTimeout(handle);\n handle = setTimeout(function () { return _this._doValidate(model.uri, modeId); }, 500);\n });\n _this._doValidate(model.uri, modeId);\n };\n var onModelRemoved = function (model) {\n monaco.editor.setModelMarkers(model, _this._languageId, []);\n var uriStr = model.uri.toString();\n var listener = _this._listener[uriStr];\n if (listener) {\n listener.dispose();\n delete _this._listener[uriStr];\n }\n };\n this._disposables.push(monaco.editor.onDidCreateModel(onModelAdd));\n this._disposables.push(monaco.editor.onWillDisposeModel(function (model) {\n onModelRemoved(model);\n _this._resetSchema(model.uri);\n }));\n this._disposables.push(monaco.editor.onDidChangeModelLanguage(function (event) {\n onModelRemoved(event.model);\n onModelAdd(event.model);\n _this._resetSchema(event.model.uri);\n }));\n this._disposables.push(defaults.onDidChange(function (_) {\n monaco.editor.getModels().forEach(function (model) {\n if (model.getModeId() === _this._languageId) {\n onModelRemoved(model);\n onModelAdd(model);\n }\n });\n }));\n this._disposables.push({\n dispose: function () {\n monaco.editor.getModels().forEach(onModelRemoved);\n for (var key in _this._listener) {\n _this._listener[key].dispose();\n }\n }\n });\n monaco.editor.getModels().forEach(onModelAdd);\n }\n DiagnosticsAdapter.prototype.dispose = function () {\n this._disposables.forEach(function (d) { return d && d.dispose(); });\n this._disposables = [];\n };\n DiagnosticsAdapter.prototype._resetSchema = function (resource) {\n this._worker().then(function (worker) {\n worker.resetSchema(resource.toString());\n });\n };\n DiagnosticsAdapter.prototype._doValidate = function (resource, languageId) {\n this._worker(resource).then(function (worker) {\n return worker.doValidation(resource.toString()).then(function (diagnostics) {\n var markers = diagnostics.map(function (d) { return toDiagnostics(resource, d); });\n var model = monaco.editor.getModel(resource);\n if (model && model.getModeId() === languageId) {\n monaco.editor.setModelMarkers(model, languageId, markers);\n }\n });\n }).then(undefined, function (err) {\n console.error(err);\n });\n };\n return DiagnosticsAdapter;\n}());\nexport { DiagnosticsAdapter };\nfunction toSeverity(lsSeverity) {\n switch (lsSeverity) {\n case ls.DiagnosticSeverity.Error: return monaco.MarkerSeverity.Error;\n case ls.DiagnosticSeverity.Warning: return monaco.MarkerSeverity.Warning;\n case ls.DiagnosticSeverity.Information: return monaco.MarkerSeverity.Info;\n case ls.DiagnosticSeverity.Hint: return monaco.MarkerSeverity.Hint;\n default:\n return monaco.MarkerSeverity.Info;\n }\n}\nfunction toDiagnostics(resource, diag) {\n var code = typeof diag.code === 'number' ? String(diag.code) : diag.code;\n return {\n severity: toSeverity(diag.severity),\n startLineNumber: diag.range.start.line + 1,\n startColumn: diag.range.start.character + 1,\n endLineNumber: diag.range.end.line + 1,\n endColumn: diag.range.end.character + 1,\n message: diag.message,\n code: code,\n source: diag.source\n };\n}\n// --- completion ------\nfunction fromPosition(position) {\n if (!position) {\n return void 0;\n }\n return { character: position.column - 1, line: position.lineNumber - 1 };\n}\nfunction fromRange(range) {\n if (!range) {\n return void 0;\n }\n return { start: { line: range.startLineNumber - 1, character: range.startColumn - 1 }, end: { line: range.endLineNumber - 1, character: range.endColumn - 1 } };\n}\nfunction toRange(range) {\n if (!range) {\n return void 0;\n }\n return new Range(range.start.line + 1, range.start.character + 1, range.end.line + 1, range.end.character + 1);\n}\nfunction toCompletionItemKind(kind) {\n var mItemKind = monaco.languages.CompletionItemKind;\n switch (kind) {\n case ls.CompletionItemKind.Text: return mItemKind.Text;\n case ls.CompletionItemKind.Method: return mItemKind.Method;\n case ls.CompletionItemKind.Function: return mItemKind.Function;\n case ls.CompletionItemKind.Constructor: return mItemKind.Constructor;\n case ls.CompletionItemKind.Field: return mItemKind.Field;\n case ls.CompletionItemKind.Variable: return mItemKind.Variable;\n case ls.CompletionItemKind.Class: return mItemKind.Class;\n case ls.CompletionItemKind.Interface: return mItemKind.Interface;\n case ls.CompletionItemKind.Module: return mItemKind.Module;\n case ls.CompletionItemKind.Property: return mItemKind.Property;\n case ls.CompletionItemKind.Unit: return mItemKind.Unit;\n case ls.CompletionItemKind.Value: return mItemKind.Value;\n case ls.CompletionItemKind.Enum: return mItemKind.Enum;\n case ls.CompletionItemKind.Keyword: return mItemKind.Keyword;\n case ls.CompletionItemKind.Snippet: return mItemKind.Snippet;\n case ls.CompletionItemKind.Color: return mItemKind.Color;\n case ls.CompletionItemKind.File: return mItemKind.File;\n case ls.CompletionItemKind.Reference: return mItemKind.Reference;\n }\n return mItemKind.Property;\n}\nfunction fromCompletionItemKind(kind) {\n var mItemKind = monaco.languages.CompletionItemKind;\n switch (kind) {\n case mItemKind.Text: return ls.CompletionItemKind.Text;\n case mItemKind.Method: return ls.CompletionItemKind.Method;\n case mItemKind.Function: return ls.CompletionItemKind.Function;\n case mItemKind.Constructor: return ls.CompletionItemKind.Constructor;\n case mItemKind.Field: return ls.CompletionItemKind.Field;\n case mItemKind.Variable: return ls.CompletionItemKind.Variable;\n case mItemKind.Class: return ls.CompletionItemKind.Class;\n case mItemKind.Interface: return ls.CompletionItemKind.Interface;\n case mItemKind.Module: return ls.CompletionItemKind.Module;\n case mItemKind.Property: return ls.CompletionItemKind.Property;\n case mItemKind.Unit: return ls.CompletionItemKind.Unit;\n case mItemKind.Value: return ls.CompletionItemKind.Value;\n case mItemKind.Enum: return ls.CompletionItemKind.Enum;\n case mItemKind.Keyword: return ls.CompletionItemKind.Keyword;\n case mItemKind.Snippet: return ls.CompletionItemKind.Snippet;\n case mItemKind.Color: return ls.CompletionItemKind.Color;\n case mItemKind.File: return ls.CompletionItemKind.File;\n case mItemKind.Reference: return ls.CompletionItemKind.Reference;\n }\n return ls.CompletionItemKind.Property;\n}\nfunction toTextEdit(textEdit) {\n if (!textEdit) {\n return void 0;\n }\n return {\n range: toRange(textEdit.range),\n text: textEdit.newText\n };\n}\nvar CompletionAdapter = /** @class */ (function () {\n function CompletionAdapter(_worker) {\n this._worker = _worker;\n }\n Object.defineProperty(CompletionAdapter.prototype, \"triggerCharacters\", {\n get: function () {\n return [' ', ':'];\n },\n enumerable: true,\n configurable: true\n });\n CompletionAdapter.prototype.provideCompletionItems = function (model, position, context, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) {\n return worker.doComplete(resource.toString(), fromPosition(position));\n }).then(function (info) {\n if (!info) {\n return;\n }\n var wordInfo = model.getWordUntilPosition(position);\n var wordRange = new Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);\n var items = info.items.map(function (entry) {\n var item = {\n label: entry.label,\n insertText: entry.insertText || entry.label,\n sortText: entry.sortText,\n filterText: entry.filterText,\n documentation: entry.documentation,\n detail: entry.detail,\n range: wordRange,\n kind: toCompletionItemKind(entry.kind),\n };\n if (entry.textEdit) {\n item.range = toRange(entry.textEdit.range);\n item.insertText = entry.textEdit.newText;\n }\n if (entry.additionalTextEdits) {\n item.additionalTextEdits = entry.additionalTextEdits.map(toTextEdit);\n }\n if (entry.insertTextFormat === ls.InsertTextFormat.Snippet) {\n item.insertTextRules = monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet;\n }\n return item;\n });\n return {\n isIncomplete: info.isIncomplete,\n suggestions: items\n };\n });\n };\n return CompletionAdapter;\n}());\nexport { CompletionAdapter };\nfunction isMarkupContent(thing) {\n return thing && typeof thing === 'object' && typeof thing.kind === 'string';\n}\nfunction toMarkdownString(entry) {\n if (typeof entry === 'string') {\n return {\n value: entry\n };\n }\n if (isMarkupContent(entry)) {\n if (entry.kind === 'plaintext') {\n return {\n value: entry.value.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&')\n };\n }\n return {\n value: entry.value\n };\n }\n return { value: '```' + entry.language + '\\n' + entry.value + '\\n```\\n' };\n}\nfunction toMarkedStringArray(contents) {\n if (!contents) {\n return void 0;\n }\n if (Array.isArray(contents)) {\n return contents.map(toMarkdownString);\n }\n return [toMarkdownString(contents)];\n}\n// --- hover ------\nvar HoverAdapter = /** @class */ (function () {\n function HoverAdapter(_worker) {\n this._worker = _worker;\n }\n HoverAdapter.prototype.provideHover = function (model, position, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) {\n return worker.doHover(resource.toString(), fromPosition(position));\n }).then(function (info) {\n if (!info) {\n return;\n }\n return {\n range: toRange(info.range),\n contents: toMarkedStringArray(info.contents)\n };\n });\n };\n return HoverAdapter;\n}());\nexport { HoverAdapter };\n// --- definition ------\nfunction toLocation(location) {\n return {\n uri: Uri.parse(location.uri),\n range: toRange(location.range)\n };\n}\n// --- document symbols ------\nfunction toSymbolKind(kind) {\n var mKind = monaco.languages.SymbolKind;\n switch (kind) {\n case ls.SymbolKind.File: return mKind.Array;\n case ls.SymbolKind.Module: return mKind.Module;\n case ls.SymbolKind.Namespace: return mKind.Namespace;\n case ls.SymbolKind.Package: return mKind.Package;\n case ls.SymbolKind.Class: return mKind.Class;\n case ls.SymbolKind.Method: return mKind.Method;\n case ls.SymbolKind.Property: return mKind.Property;\n case ls.SymbolKind.Field: return mKind.Field;\n case ls.SymbolKind.Constructor: return mKind.Constructor;\n case ls.SymbolKind.Enum: return mKind.Enum;\n case ls.SymbolKind.Interface: return mKind.Interface;\n case ls.SymbolKind.Function: return mKind.Function;\n case ls.SymbolKind.Variable: return mKind.Variable;\n case ls.SymbolKind.Constant: return mKind.Constant;\n case ls.SymbolKind.String: return mKind.String;\n case ls.SymbolKind.Number: return mKind.Number;\n case ls.SymbolKind.Boolean: return mKind.Boolean;\n case ls.SymbolKind.Array: return mKind.Array;\n }\n return mKind.Function;\n}\nvar DocumentSymbolAdapter = /** @class */ (function () {\n function DocumentSymbolAdapter(_worker) {\n this._worker = _worker;\n }\n DocumentSymbolAdapter.prototype.provideDocumentSymbols = function (model, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) { return worker.findDocumentSymbols(resource.toString()); }).then(function (items) {\n if (!items) {\n return;\n }\n return items.map(function (item) { return ({\n name: item.name,\n detail: '',\n containerName: item.containerName,\n kind: toSymbolKind(item.kind),\n range: toRange(item.location.range),\n selectionRange: toRange(item.location.range)\n }); });\n });\n };\n return DocumentSymbolAdapter;\n}());\nexport { DocumentSymbolAdapter };\nfunction fromFormattingOptions(options) {\n return {\n tabSize: options.tabSize,\n insertSpaces: options.insertSpaces\n };\n}\nvar DocumentFormattingEditProvider = /** @class */ (function () {\n function DocumentFormattingEditProvider(_worker) {\n this._worker = _worker;\n }\n DocumentFormattingEditProvider.prototype.provideDocumentFormattingEdits = function (model, options, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) {\n return worker.format(resource.toString(), null, fromFormattingOptions(options)).then(function (edits) {\n if (!edits || edits.length === 0) {\n return;\n }\n return edits.map(toTextEdit);\n });\n });\n };\n return DocumentFormattingEditProvider;\n}());\nexport { DocumentFormattingEditProvider };\nvar DocumentRangeFormattingEditProvider = /** @class */ (function () {\n function DocumentRangeFormattingEditProvider(_worker) {\n this._worker = _worker;\n }\n DocumentRangeFormattingEditProvider.prototype.provideDocumentRangeFormattingEdits = function (model, range, options, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) {\n return worker.format(resource.toString(), fromRange(range), fromFormattingOptions(options)).then(function (edits) {\n if (!edits || edits.length === 0) {\n return;\n }\n return edits.map(toTextEdit);\n });\n });\n };\n return DocumentRangeFormattingEditProvider;\n}());\nexport { DocumentRangeFormattingEditProvider };\nvar DocumentColorAdapter = /** @class */ (function () {\n function DocumentColorAdapter(_worker) {\n this._worker = _worker;\n }\n DocumentColorAdapter.prototype.provideDocumentColors = function (model, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) { return worker.findDocumentColors(resource.toString()); }).then(function (infos) {\n if (!infos) {\n return;\n }\n return infos.map(function (item) { return ({\n color: item.color,\n range: toRange(item.range)\n }); });\n });\n };\n DocumentColorAdapter.prototype.provideColorPresentations = function (model, info, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) { return worker.getColorPresentations(resource.toString(), info.color, fromRange(info.range)); }).then(function (presentations) {\n if (!presentations) {\n return;\n }\n return presentations.map(function (presentation) {\n var item = {\n label: presentation.label,\n };\n if (presentation.textEdit) {\n item.textEdit = toTextEdit(presentation.textEdit);\n }\n if (presentation.additionalTextEdits) {\n item.additionalTextEdits = presentation.additionalTextEdits.map(toTextEdit);\n }\n return item;\n });\n });\n };\n return DocumentColorAdapter;\n}());\nexport { DocumentColorAdapter };\nvar FoldingRangeAdapter = /** @class */ (function () {\n function FoldingRangeAdapter(_worker) {\n this._worker = _worker;\n }\n FoldingRangeAdapter.prototype.provideFoldingRanges = function (model, context, token) {\n var resource = model.uri;\n return this._worker(resource).then(function (worker) { return worker.provideFoldingRanges(resource.toString(), context); }).then(function (ranges) {\n if (!ranges) {\n return;\n }\n return ranges.map(function (range) {\n var result = {\n start: range.startLine + 1,\n end: range.endLine + 1\n };\n if (typeof range.kind !== 'undefined') {\n result.kind = toFoldingRangeKind(range.kind);\n }\n return result;\n });\n });\n };\n return FoldingRangeAdapter;\n}());\nexport { FoldingRangeAdapter };\nfunction toFoldingRangeKind(kind) {\n switch (kind) {\n case ls.FoldingRangeKind.Comment: return monaco.languages.FoldingRangeKind.Comment;\n case ls.FoldingRangeKind.Imports: return monaco.languages.FoldingRangeKind.Imports;\n case ls.FoldingRangeKind.Region: return monaco.languages.FoldingRangeKind.Region;\n }\n return void 0;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { createScanner } from './scanner.js';\nvar ParseOptions;\n(function (ParseOptions) {\n ParseOptions.DEFAULT = {\n allowTrailingComma: false\n };\n})(ParseOptions || (ParseOptions = {}));\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nexport function getLocation(text, position) {\n var segments = []; // strings or numbers\n var earlyReturnException = new Object();\n var previousNode = void 0;\n var previousNodeInst = {\n value: {},\n offset: 0,\n length: 0,\n type: 'object',\n parent: void 0\n };\n var isAtPropertyKey = false;\n function setPreviousNode(value, offset, length, type) {\n previousNodeInst.value = value;\n previousNodeInst.offset = offset;\n previousNodeInst.length = length;\n previousNodeInst.type = type;\n previousNodeInst.colonOffset = void 0;\n previousNode = previousNodeInst;\n }\n try {\n visit(text, {\n onObjectBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = void 0;\n isAtPropertyKey = position > offset;\n segments.push(''); // push a placeholder (will be replaced)\n },\n onObjectProperty: function (name, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(name, offset, length, 'property');\n segments[segments.length - 1] = name;\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onObjectEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = void 0;\n segments.pop();\n },\n onArrayBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = void 0;\n segments.push(0);\n },\n onArrayEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = void 0;\n segments.pop();\n },\n onLiteralValue: function (value, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(value, offset, length, getLiteralNodeType(value));\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onSeparator: function (sep, offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n if (sep === ':' && previousNode && previousNode.type === 'property') {\n previousNode.colonOffset = offset;\n isAtPropertyKey = false;\n previousNode = void 0;\n }\n else if (sep === ',') {\n var last = segments[segments.length - 1];\n if (typeof last === 'number') {\n segments[segments.length - 1] = last + 1;\n }\n else {\n isAtPropertyKey = true;\n segments[segments.length - 1] = '';\n }\n previousNode = void 0;\n }\n }\n });\n }\n catch (e) {\n if (e !== earlyReturnException) {\n throw e;\n }\n }\n return {\n path: segments,\n previousNode: previousNode,\n isAtPropertyKey: isAtPropertyKey,\n matches: function (pattern) {\n var k = 0;\n for (var i = 0; k < pattern.length && i < segments.length; i++) {\n if (pattern[k] === segments[i] || pattern[k] === '*') {\n k++;\n }\n else if (pattern[k] !== '**') {\n return false;\n }\n }\n return k === pattern.length;\n }\n };\n}\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore always check the errors list to find out if the input was valid.\n */\nexport function parse(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentProperty = null;\n var currentParent = [];\n var previousParents = [];\n function onValue(value) {\n if (Array.isArray(currentParent)) {\n currentParent.push(value);\n }\n else if (currentProperty) {\n currentParent[currentProperty] = value;\n }\n }\n var visitor = {\n onObjectBegin: function () {\n var object = {};\n onValue(object);\n previousParents.push(currentParent);\n currentParent = object;\n currentProperty = null;\n },\n onObjectProperty: function (name) {\n currentProperty = name;\n },\n onObjectEnd: function () {\n currentParent = previousParents.pop();\n },\n onArrayBegin: function () {\n var array = [];\n onValue(array);\n previousParents.push(currentParent);\n currentParent = array;\n currentProperty = null;\n },\n onArrayEnd: function () {\n currentParent = previousParents.pop();\n },\n onLiteralValue: onValue,\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n return currentParent[0];\n}\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nexport function parseTree(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: void 0 }; // artificial root\n function ensurePropertyComplete(endOffset) {\n if (currentParent.type === 'property') {\n currentParent.length = endOffset - currentParent.offset;\n currentParent = currentParent.parent;\n }\n }\n function onValue(valueNode) {\n currentParent.children.push(valueNode);\n return valueNode;\n }\n var visitor = {\n onObjectBegin: function (offset) {\n currentParent = onValue({ type: 'object', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onObjectProperty: function (name, offset, length) {\n currentParent = onValue({ type: 'property', offset: offset, length: -1, parent: currentParent, children: [] });\n currentParent.children.push({ type: 'string', value: name, offset: offset, length: length, parent: currentParent });\n },\n onObjectEnd: function (offset, length) {\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onArrayBegin: function (offset, length) {\n currentParent = onValue({ type: 'array', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onArrayEnd: function (offset, length) {\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onLiteralValue: function (value, offset, length) {\n onValue({ type: getLiteralNodeType(value), offset: offset, length: length, parent: currentParent, value: value });\n ensurePropertyComplete(offset + length);\n },\n onSeparator: function (sep, offset, length) {\n if (currentParent.type === 'property') {\n if (sep === ':') {\n currentParent.colonOffset = offset;\n }\n else if (sep === ',') {\n ensurePropertyComplete(offset);\n }\n }\n },\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n var result = currentParent.children[0];\n if (result) {\n delete result.parent;\n }\n return result;\n}\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nexport function findNodeAtLocation(root, path) {\n if (!root) {\n return void 0;\n }\n var node = root;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var segment = path_1[_i];\n if (typeof segment === 'string') {\n if (node.type !== 'object' || !Array.isArray(node.children)) {\n return void 0;\n }\n var found = false;\n for (var _a = 0, _b = node.children; _a < _b.length; _a++) {\n var propertyNode = _b[_a];\n if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment) {\n node = propertyNode.children[1];\n found = true;\n break;\n }\n }\n if (!found) {\n return void 0;\n }\n }\n else {\n var index = segment;\n if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {\n return void 0;\n }\n node = node.children[index];\n }\n }\n return node;\n}\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nexport function getNodePath(node) {\n if (!node.parent || !node.parent.children) {\n return [];\n }\n var path = getNodePath(node.parent);\n if (node.parent.type === 'property') {\n var key = node.parent.children[0].value;\n path.push(key);\n }\n else if (node.parent.type === 'array') {\n var index = node.parent.children.indexOf(node);\n if (index !== -1) {\n path.push(index);\n }\n }\n return path;\n}\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nexport function getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return void 0;\n }\n}\nexport function contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length));\n}\n/**\n * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nexport function findNodeAtOffset(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (contains(node, offset, includeRightBound)) {\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && children[i].offset <= offset; i++) {\n var item = findNodeAtOffset(children[i], offset, includeRightBound);\n if (item) {\n return item;\n }\n }\n }\n return node;\n }\n return void 0;\n}\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nexport function visit(text, visitor, options) {\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var _scanner = createScanner(text, false);\n function toNoArgVisit(visitFunction) {\n return visitFunction ? function () { return visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength()); } : function () { return true; };\n }\n function toOneArgVisit(visitFunction) {\n return visitFunction ? function (arg) { return visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength()); } : function () { return true; };\n }\n var onObjectBegin = toNoArgVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisit(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisit(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisit(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);\n var disallowComments = options && options.disallowComments;\n var allowTrailingComma = options && options.allowTrailingComma;\n function scanNext() {\n while (true) {\n var token = _scanner.scan();\n switch (_scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n handleError(14 /* InvalidUnicode */);\n break;\n case 5 /* InvalidEscapeCharacter */:\n handleError(15 /* InvalidEscapeCharacter */);\n break;\n case 3 /* UnexpectedEndOfNumber */:\n handleError(13 /* UnexpectedEndOfNumber */);\n break;\n case 1 /* UnexpectedEndOfComment */:\n if (!disallowComments) {\n handleError(11 /* UnexpectedEndOfComment */);\n }\n break;\n case 2 /* UnexpectedEndOfString */:\n handleError(12 /* UnexpectedEndOfString */);\n break;\n case 6 /* InvalidCharacter */:\n handleError(16 /* InvalidCharacter */);\n break;\n }\n switch (token) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (disallowComments) {\n handleError(10 /* InvalidCommentToken */);\n }\n else {\n onComment();\n }\n break;\n case 16 /* Unknown */:\n handleError(1 /* InvalidSymbol */);\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token;\n }\n }\n }\n function handleError(error, skipUntilAfter, skipUntil) {\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n onError(error);\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token = _scanner.getToken();\n while (token !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token) !== -1) {\n scanNext();\n break;\n }\n else if (skipUntil.indexOf(token) !== -1) {\n break;\n }\n token = scanNext();\n }\n }\n }\n function parseString(isValue) {\n var value = _scanner.getTokenValue();\n if (isValue) {\n onLiteralValue(value);\n }\n else {\n onObjectProperty(value);\n }\n scanNext();\n return true;\n }\n function parseLiteral() {\n switch (_scanner.getToken()) {\n case 11 /* NumericLiteral */:\n var value = 0;\n try {\n value = JSON.parse(_scanner.getTokenValue());\n if (typeof value !== 'number') {\n handleError(2 /* InvalidNumberFormat */);\n value = 0;\n }\n }\n catch (e) {\n handleError(2 /* InvalidNumberFormat */);\n }\n onLiteralValue(value);\n break;\n case 7 /* NullKeyword */:\n onLiteralValue(null);\n break;\n case 8 /* TrueKeyword */:\n onLiteralValue(true);\n break;\n case 9 /* FalseKeyword */:\n onLiteralValue(false);\n break;\n default:\n return false;\n }\n scanNext();\n return true;\n }\n function parseProperty() {\n if (_scanner.getToken() !== 10 /* StringLiteral */) {\n handleError(3 /* PropertyNameExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n return false;\n }\n parseString(false);\n if (_scanner.getToken() === 6 /* ColonToken */) {\n onSeparator(':');\n scanNext(); // consume colon\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n }\n else {\n handleError(5 /* ColonExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n return true;\n }\n function parseObject() {\n onObjectBegin();\n scanNext(); // consume open brace\n var needsComma = false;\n while (_scanner.getToken() !== 2 /* CloseBraceToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 2 /* CloseBraceToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseProperty()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onObjectEnd();\n if (_scanner.getToken() !== 2 /* CloseBraceToken */) {\n handleError(7 /* CloseBraceExpected */, [2 /* CloseBraceToken */], []);\n }\n else {\n scanNext(); // consume close brace\n }\n return true;\n }\n function parseArray() {\n onArrayBegin();\n scanNext(); // consume open bracket\n var needsComma = false;\n while (_scanner.getToken() !== 4 /* CloseBracketToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 4 /* CloseBracketToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onArrayEnd();\n if (_scanner.getToken() !== 4 /* CloseBracketToken */) {\n handleError(8 /* CloseBracketExpected */, [4 /* CloseBracketToken */], []);\n }\n else {\n scanNext(); // consume close bracket\n }\n return true;\n }\n function parseValue() {\n switch (_scanner.getToken()) {\n case 3 /* OpenBracketToken */:\n return parseArray();\n case 1 /* OpenBraceToken */:\n return parseObject();\n case 10 /* StringLiteral */:\n return parseString(true);\n default:\n return parseLiteral();\n }\n }\n scanNext();\n if (_scanner.getToken() === 17 /* EOF */) {\n return true;\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (_scanner.getToken() !== 17 /* EOF */) {\n handleError(9 /* EndOfFileExpected */, [], []);\n }\n return true;\n}\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nexport function stripComments(text, replaceCh) {\n var _scanner = createScanner(text), parts = [], kind, offset = 0, pos;\n do {\n pos = _scanner.getPosition();\n kind = _scanner.scan();\n switch (kind) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n case 17 /* EOF */:\n if (offset !== pos) {\n parts.push(text.substring(offset, pos));\n }\n if (replaceCh !== void 0) {\n parts.push(_scanner.getTokenValue().replace(/[^\\r\\n]/g, replaceCh));\n }\n offset = _scanner.getPosition();\n break;\n }\n } while (kind !== 17 /* EOF */);\n return parts.join('');\n}\nfunction getLiteralNodeType(value) {\n switch (typeof value) {\n case 'boolean': return 'boolean';\n case 'number': return 'number';\n case 'string': return 'string';\n default: return 'null';\n }\n}\n//# sourceMappingURL=parser.js.map","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nexport function createScanner(text, ignoreTrivia) {\n if (ignoreTrivia === void 0) { ignoreTrivia = false; }\n var pos = 0, len = text.length, value = '', tokenOffset = 0, token = 16 /* Unknown */, scanError = 0 /* None */;\n function scanHexDigits(count, exact) {\n var digits = 0;\n var value = 0;\n while (digits < count || !exact) {\n var ch = text.charCodeAt(pos);\n if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) {\n value = value * 16 + ch - 48 /* _0 */;\n }\n else if (ch >= 65 /* A */ && ch <= 70 /* F */) {\n value = value * 16 + ch - 65 /* A */ + 10;\n }\n else if (ch >= 97 /* a */ && ch <= 102 /* f */) {\n value = value * 16 + ch - 97 /* a */ + 10;\n }\n else {\n break;\n }\n pos++;\n digits++;\n }\n if (digits < count) {\n value = -1;\n }\n return value;\n }\n function setPosition(newPosition) {\n pos = newPosition;\n value = '';\n tokenOffset = 0;\n token = 16 /* Unknown */;\n scanError = 0 /* None */;\n }\n function scanNumber() {\n var start = pos;\n if (text.charCodeAt(pos) === 48 /* _0 */) {\n pos++;\n }\n else {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n }\n if (pos < text.length && text.charCodeAt(pos) === 46 /* dot */) {\n pos++;\n if (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n }\n else {\n scanError = 3 /* UnexpectedEndOfNumber */;\n return text.substring(start, pos);\n }\n }\n var end = pos;\n if (pos < text.length && (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */)) {\n pos++;\n if (pos < text.length && text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) {\n pos++;\n }\n if (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n while (pos < text.length && isDigit(text.charCodeAt(pos))) {\n pos++;\n }\n end = pos;\n }\n else {\n scanError = 3 /* UnexpectedEndOfNumber */;\n }\n }\n return text.substring(start, end);\n }\n function scanString() {\n var result = '', start = pos;\n while (true) {\n if (pos >= len) {\n result += text.substring(start, pos);\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n var ch = text.charCodeAt(pos);\n if (ch === 34 /* doubleQuote */) {\n result += text.substring(start, pos);\n pos++;\n break;\n }\n if (ch === 92 /* backslash */) {\n result += text.substring(start, pos);\n pos++;\n if (pos >= len) {\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n ch = text.charCodeAt(pos++);\n switch (ch) {\n case 34 /* doubleQuote */:\n result += '\\\"';\n break;\n case 92 /* backslash */:\n result += '\\\\';\n break;\n case 47 /* slash */:\n result += '/';\n break;\n case 98 /* b */:\n result += '\\b';\n break;\n case 102 /* f */:\n result += '\\f';\n break;\n case 110 /* n */:\n result += '\\n';\n break;\n case 114 /* r */:\n result += '\\r';\n break;\n case 116 /* t */:\n result += '\\t';\n break;\n case 117 /* u */:\n var ch_1 = scanHexDigits(4, true);\n if (ch_1 >= 0) {\n result += String.fromCharCode(ch_1);\n }\n else {\n scanError = 4 /* InvalidUnicode */;\n }\n break;\n default:\n scanError = 5 /* InvalidEscapeCharacter */;\n }\n start = pos;\n continue;\n }\n if (ch >= 0 && ch <= 0x1f) {\n if (isLineBreak(ch)) {\n result += text.substring(start, pos);\n scanError = 2 /* UnexpectedEndOfString */;\n break;\n }\n else {\n scanError = 6 /* InvalidCharacter */;\n // mark as error but continue with string\n }\n }\n pos++;\n }\n return result;\n }\n function scanNext() {\n value = '';\n scanError = 0 /* None */;\n tokenOffset = pos;\n if (pos >= len) {\n // at the end\n tokenOffset = len;\n return token = 17 /* EOF */;\n }\n var code = text.charCodeAt(pos);\n // trivia: whitespace\n if (isWhiteSpace(code)) {\n do {\n pos++;\n value += String.fromCharCode(code);\n code = text.charCodeAt(pos);\n } while (isWhiteSpace(code));\n return token = 15 /* Trivia */;\n }\n // trivia: newlines\n if (isLineBreak(code)) {\n pos++;\n value += String.fromCharCode(code);\n if (code === 13 /* carriageReturn */ && text.charCodeAt(pos) === 10 /* lineFeed */) {\n pos++;\n value += '\\n';\n }\n return token = 14 /* LineBreakTrivia */;\n }\n switch (code) {\n // tokens: []{}:,\n case 123 /* openBrace */:\n pos++;\n return token = 1 /* OpenBraceToken */;\n case 125 /* closeBrace */:\n pos++;\n return token = 2 /* CloseBraceToken */;\n case 91 /* openBracket */:\n pos++;\n return token = 3 /* OpenBracketToken */;\n case 93 /* closeBracket */:\n pos++;\n return token = 4 /* CloseBracketToken */;\n case 58 /* colon */:\n pos++;\n return token = 6 /* ColonToken */;\n case 44 /* comma */:\n pos++;\n return token = 5 /* CommaToken */;\n // strings\n case 34 /* doubleQuote */:\n pos++;\n value = scanString();\n return token = 10 /* StringLiteral */;\n // comments\n case 47 /* slash */:\n var start = pos - 1;\n // Single-line comment\n if (text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n while (pos < len) {\n if (isLineBreak(text.charCodeAt(pos))) {\n break;\n }\n pos++;\n }\n value = text.substring(start, pos);\n return token = 12 /* LineCommentTrivia */;\n }\n // Multi-line comment\n if (text.charCodeAt(pos + 1) === 42 /* asterisk */) {\n pos += 2;\n var safeLength = len - 1; // For lookahead.\n var commentClosed = false;\n while (pos < safeLength) {\n var ch = text.charCodeAt(pos);\n if (ch === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) {\n pos += 2;\n commentClosed = true;\n break;\n }\n pos++;\n }\n if (!commentClosed) {\n pos++;\n scanError = 1 /* UnexpectedEndOfComment */;\n }\n value = text.substring(start, pos);\n return token = 13 /* BlockCommentTrivia */;\n }\n // just a single slash\n value += String.fromCharCode(code);\n pos++;\n return token = 16 /* Unknown */;\n // numbers\n case 45 /* minus */:\n value += String.fromCharCode(code);\n pos++;\n if (pos === len || !isDigit(text.charCodeAt(pos))) {\n return token = 16 /* Unknown */;\n }\n // found a minus, followed by a number so\n // we fall through to proceed with scanning\n // numbers\n case 48 /* _0 */:\n case 49 /* _1 */:\n case 50 /* _2 */:\n case 51 /* _3 */:\n case 52 /* _4 */:\n case 53 /* _5 */:\n case 54 /* _6 */:\n case 55 /* _7 */:\n case 56 /* _8 */:\n case 57 /* _9 */:\n value += scanNumber();\n return token = 11 /* NumericLiteral */;\n // literals and unknown symbols\n default:\n // is a literal? Read the full word.\n while (pos < len && isUnknownContentCharacter(code)) {\n pos++;\n code = text.charCodeAt(pos);\n }\n if (tokenOffset !== pos) {\n value = text.substring(tokenOffset, pos);\n // keywords: true, false, null\n switch (value) {\n case 'true': return token = 8 /* TrueKeyword */;\n case 'false': return token = 9 /* FalseKeyword */;\n case 'null': return token = 7 /* NullKeyword */;\n }\n return token = 16 /* Unknown */;\n }\n // some\n value += String.fromCharCode(code);\n pos++;\n return token = 16 /* Unknown */;\n }\n }\n function isUnknownContentCharacter(code) {\n if (isWhiteSpace(code) || isLineBreak(code)) {\n return false;\n }\n switch (code) {\n case 125 /* closeBrace */:\n case 93 /* closeBracket */:\n case 123 /* openBrace */:\n case 91 /* openBracket */:\n case 34 /* doubleQuote */:\n case 58 /* colon */:\n case 44 /* comma */:\n case 47 /* slash */:\n return false;\n }\n return true;\n }\n function scanNextNonTrivia() {\n var result;\n do {\n result = scanNext();\n } while (result >= 12 /* LineCommentTrivia */ && result <= 15 /* Trivia */);\n return result;\n }\n return {\n setPosition: setPosition,\n getPosition: function () { return pos; },\n scan: ignoreTrivia ? scanNextNonTrivia : scanNext,\n getToken: function () { return token; },\n getTokenValue: function () { return value; },\n getTokenOffset: function () { return tokenOffset; },\n getTokenLength: function () { return pos - tokenOffset; },\n getTokenError: function () { return scanError; }\n };\n}\nfunction isWhiteSpace(ch) {\n return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ ||\n ch === 160 /* nonBreakingSpace */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ ||\n ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */;\n}\nfunction isLineBreak(ch) {\n return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */;\n}\nfunction isDigit(ch) {\n return ch >= 48 /* _0 */ && ch <= 57 /* _9 */;\n}\n//# sourceMappingURL=scanner.js.map","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as formatter from './impl/format.js';\nimport * as edit from './impl/edit.js';\nimport * as scanner from './impl/scanner.js';\nimport * as parser from './impl/parser.js';\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nexport var createScanner = scanner.createScanner;\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nexport var getLocation = parser.getLocation;\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore always check the errors list to find out if the input was valid.\n */\nexport var parse = parser.parse;\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nexport var parseTree = parser.parseTree;\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nexport var findNodeAtLocation = parser.findNodeAtLocation;\n/**\n * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nexport var findNodeAtOffset = parser.findNodeAtOffset;\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nexport var getNodePath = parser.getNodePath;\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nexport var getNodeValue = parser.getNodeValue;\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nexport var visit = parser.visit;\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nexport var stripComments = parser.stripComments;\nexport function printParseErrorCode(code) {\n switch (code) {\n case 1 /* InvalidSymbol */: return 'InvalidSymbol';\n case 2 /* InvalidNumberFormat */: return 'InvalidNumberFormat';\n case 3 /* PropertyNameExpected */: return 'PropertyNameExpected';\n case 4 /* ValueExpected */: return 'ValueExpected';\n case 5 /* ColonExpected */: return 'ColonExpected';\n case 6 /* CommaExpected */: return 'CommaExpected';\n case 7 /* CloseBraceExpected */: return 'CloseBraceExpected';\n case 8 /* CloseBracketExpected */: return 'CloseBracketExpected';\n case 9 /* EndOfFileExpected */: return 'EndOfFileExpected';\n case 10 /* InvalidCommentToken */: return 'InvalidCommentToken';\n case 11 /* UnexpectedEndOfComment */: return 'UnexpectedEndOfComment';\n case 12 /* UnexpectedEndOfString */: return 'UnexpectedEndOfString';\n case 13 /* UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber';\n case 14 /* InvalidUnicode */: return 'InvalidUnicode';\n case 15 /* InvalidEscapeCharacter */: return 'InvalidEscapeCharacter';\n case 16 /* InvalidCharacter */: return 'InvalidCharacter';\n }\n return '';\n}\n/**\n * Computes the edits needed to format a JSON document.\n *\n * @param documentText The input text\n * @param range The range to format or `undefined` to format the full content\n * @param options The formatting options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`\n */\nexport function format(documentText, range, options) {\n return formatter.format(documentText, range, options);\n}\n/**\n * Computes the edits needed to modify a value in the JSON document.\n *\n * @param documentText The input text\n * @param path The path of the value to change. The path represents either to the document root, a property or an array item.\n * If the path points to an non-existing property or item, it will be created.\n * @param value The new value for the specified property or item. If the value is undefined,\n * the property or item will be removed.\n * @param options Options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`\n */\nexport function modify(text, path, value, options) {\n return edit.setProperty(text, path, value, options.formattingOptions, options.getInsertionIndex);\n}\n/**\n * Applies edits to a input string.\n */\nexport function applyEdits(text, edits) {\n for (var i = edits.length - 1; i >= 0; i--) {\n text = edit.applyEdit(text, edits[i]);\n }\n return text;\n}\n//# sourceMappingURL=main.js.map","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport * as json from './_deps/jsonc-parser/main.js';\nexport function createTokenizationSupport(supportComments) {\n return {\n getInitialState: function () { return new JSONState(null, null, false); },\n tokenize: function (line, state, offsetDelta, stopAtOffset) { return tokenize(supportComments, line, state, offsetDelta, stopAtOffset); }\n };\n}\nexport var TOKEN_DELIM_OBJECT = 'delimiter.bracket.json';\nexport var TOKEN_DELIM_ARRAY = 'delimiter.array.json';\nexport var TOKEN_DELIM_COLON = 'delimiter.colon.json';\nexport var TOKEN_DELIM_COMMA = 'delimiter.comma.json';\nexport var TOKEN_VALUE_BOOLEAN = 'keyword.json';\nexport var TOKEN_VALUE_NULL = 'keyword.json';\nexport var TOKEN_VALUE_STRING = 'string.value.json';\nexport var TOKEN_VALUE_NUMBER = 'number.json';\nexport var TOKEN_PROPERTY_NAME = 'string.key.json';\nexport var TOKEN_COMMENT_BLOCK = 'comment.block.json';\nexport var TOKEN_COMMENT_LINE = 'comment.line.json';\nvar JSONState = /** @class */ (function () {\n function JSONState(state, scanError, lastWasColon) {\n this._state = state;\n this.scanError = scanError;\n this.lastWasColon = lastWasColon;\n }\n JSONState.prototype.clone = function () {\n return new JSONState(this._state, this.scanError, this.lastWasColon);\n };\n JSONState.prototype.equals = function (other) {\n if (other === this) {\n return true;\n }\n if (!other || !(other instanceof JSONState)) {\n return false;\n }\n return this.scanError === other.scanError &&\n this.lastWasColon === other.lastWasColon;\n };\n JSONState.prototype.getStateData = function () {\n return this._state;\n };\n JSONState.prototype.setStateData = function (state) {\n this._state = state;\n };\n return JSONState;\n}());\nfunction tokenize(comments, line, state, offsetDelta, stopAtOffset) {\n if (offsetDelta === void 0) { offsetDelta = 0; }\n // handle multiline strings and block comments\n var numberOfInsertedCharacters = 0, adjustOffset = false;\n switch (state.scanError) {\n case 2 /* UnexpectedEndOfString */:\n line = '\"' + line;\n numberOfInsertedCharacters = 1;\n break;\n case 1 /* UnexpectedEndOfComment */:\n line = '/*' + line;\n numberOfInsertedCharacters = 2;\n break;\n }\n var scanner = json.createScanner(line), kind, ret, lastWasColon = state.lastWasColon;\n ret = {\n tokens: [],\n endState: state.clone()\n };\n while (true) {\n var offset = offsetDelta + scanner.getPosition(), type = '';\n kind = scanner.scan();\n if (kind === 17 /* EOF */) {\n break;\n }\n // Check that the scanner has advanced\n if (offset === offsetDelta + scanner.getPosition()) {\n throw new Error('Scanner did not advance, next 3 characters are: ' + line.substr(scanner.getPosition(), 3));\n }\n // In case we inserted /* or \" character, we need to\n // adjust the offset of all tokens (except the first)\n if (adjustOffset) {\n offset -= numberOfInsertedCharacters;\n }\n adjustOffset = numberOfInsertedCharacters > 0;\n // brackets and type\n switch (kind) {\n case 1 /* OpenBraceToken */:\n type = TOKEN_DELIM_OBJECT;\n lastWasColon = false;\n break;\n case 2 /* CloseBraceToken */:\n type = TOKEN_DELIM_OBJECT;\n lastWasColon = false;\n break;\n case 3 /* OpenBracketToken */:\n type = TOKEN_DELIM_ARRAY;\n lastWasColon = false;\n break;\n case 4 /* CloseBracketToken */:\n type = TOKEN_DELIM_ARRAY;\n lastWasColon = false;\n break;\n case 6 /* ColonToken */:\n type = TOKEN_DELIM_COLON;\n lastWasColon = true;\n break;\n case 5 /* CommaToken */:\n type = TOKEN_DELIM_COMMA;\n lastWasColon = false;\n break;\n case 8 /* TrueKeyword */:\n case 9 /* FalseKeyword */:\n type = TOKEN_VALUE_BOOLEAN;\n lastWasColon = false;\n break;\n case 7 /* NullKeyword */:\n type = TOKEN_VALUE_NULL;\n lastWasColon = false;\n break;\n case 10 /* StringLiteral */:\n type = lastWasColon ? TOKEN_VALUE_STRING : TOKEN_PROPERTY_NAME;\n lastWasColon = false;\n break;\n case 11 /* NumericLiteral */:\n type = TOKEN_VALUE_NUMBER;\n lastWasColon = false;\n break;\n }\n // comments, iff enabled\n if (comments) {\n switch (kind) {\n case 12 /* LineCommentTrivia */:\n type = TOKEN_COMMENT_LINE;\n break;\n case 13 /* BlockCommentTrivia */:\n type = TOKEN_COMMENT_BLOCK;\n break;\n }\n }\n ret.endState = new JSONState(state.getStateData(), scanner.getTokenError(), lastWasColon);\n ret.tokens.push({\n startIndex: offset,\n scopes: type\n });\n }\n return ret;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n'use strict';\nimport { WorkerManager } from './workerManager.js';\nimport * as languageFeatures from './languageFeatures.js';\nimport { createTokenizationSupport } from './tokenization.js';\nexport function setupMode(defaults) {\n var disposables = [];\n var client = new WorkerManager(defaults);\n disposables.push(client);\n var worker = function () {\n var uris = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uris[_i] = arguments[_i];\n }\n return client.getLanguageServiceWorker.apply(client, uris);\n };\n var languageId = defaults.languageId;\n disposables.push(monaco.languages.registerCompletionItemProvider(languageId, new languageFeatures.CompletionAdapter(worker)));\n disposables.push(monaco.languages.registerHoverProvider(languageId, new languageFeatures.HoverAdapter(worker)));\n disposables.push(monaco.languages.registerDocumentSymbolProvider(languageId, new languageFeatures.DocumentSymbolAdapter(worker)));\n disposables.push(monaco.languages.registerDocumentFormattingEditProvider(languageId, new languageFeatures.DocumentFormattingEditProvider(worker)));\n disposables.push(monaco.languages.registerDocumentRangeFormattingEditProvider(languageId, new languageFeatures.DocumentRangeFormattingEditProvider(worker)));\n disposables.push(new languageFeatures.DiagnosticsAdapter(languageId, worker, defaults));\n disposables.push(monaco.languages.setTokensProvider(languageId, createTokenizationSupport(true)));\n disposables.push(monaco.languages.setLanguageConfiguration(languageId, richEditConfiguration));\n disposables.push(monaco.languages.registerColorProvider(languageId, new languageFeatures.DocumentColorAdapter(worker)));\n disposables.push(monaco.languages.registerFoldingRangeProvider(languageId, new languageFeatures.FoldingRangeAdapter(worker)));\n}\nvar richEditConfiguration = {\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^\\[\\{\\]\\}\\:\\\"\\,\\s]+)/g,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/']\n },\n brackets: [\n ['{', '}'],\n ['[', ']']\n ],\n autoClosingPairs: [\n { open: '{', close: '}', notIn: ['string'] },\n { open: '[', close: ']', notIn: ['string'] },\n { open: '\"', close: '\"', notIn: ['string'] }\n ]\n};\n"],"sourceRoot":""}