/*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * monaco-json version: 0.30.1(5a7ba61be909ae9e4889768a3453ebb0dec392e2) * Released under the MIT license * https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md *-----------------------------------------------------------------------------*/ define("vs/language/json/workerManager",["require","exports","./fillers/monaco-editor-core"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0;var r=function(){function e(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval((function(){return t._checkIfIdle()}),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange((function(){return t._stopWorker()}))}return e.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},e.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},e.prototype._checkIfIdle=function(){this._worker&&(Date.now()-this._lastUsedTime>12e4&&this._stopWorker())},e.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=n.editor.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},e.prototype.getLanguageServiceWorker=function(){for(var e,t=this,n=[],r=0;r0&&(i.arguments=n),i},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.title)&&I.string(t.command)}}(u=t.Command||(t.Command={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return I.objectLiteral(t)&&I.string(t.newText)&&i.is(t.range)}}(d=t.TextEdit||(t.TextEdit={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return void 0!==t&&I.objectLiteral(t)&&I.string(t.label)&&(I.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(I.string(t.description)||void 0===t.description)}}(f=t.ChangeAnnotation||(t.ChangeAnnotation={})),function(e){e.is=function(e){return"string"==typeof e}}(l=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return d.is(t)&&(f.is(t.annotationId)||l.is(t.annotationId))}}(g=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return I.defined(t)&&b.is(t.textDocument)&&Array.isArray(t.edits)}}(h=t.TextDocumentEdit||(t.TextDocumentEdit={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&I.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||I.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||I.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||l.is(t.annotationId))}}(p=t.CreateFile||(t.CreateFile={})),function(e){e.create=function(e,t,n,r){var i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&I.string(t.oldUri)&&I.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||I.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||I.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||l.is(t.annotationId))}}(m=t.RenameFile||(t.RenameFile={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&I.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||I.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||I.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||l.is(t.annotationId))}}(v=t.DeleteFile||(t.DeleteFile={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return I.string(e.kind)?p.is(e)||m.is(e)||v.is(e):h.is(e)})))}}(y=t.WorkspaceEdit||(t.WorkspaceEdit={}));var b,C,E,k,_=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,i;if(void 0===n?r=d.insert(e,t):l.is(n)?(i=n,r=g.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=g.insert(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.replace=function(e,t,n){var r,i;if(void 0===n?r=d.replace(e,t):l.is(n)?(i=n,r=g.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=g.replace(e,t,i)),this.edits.push(r),void 0!==i)return i},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=d.del(e):l.is(t)?(r=t,n=g.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=g.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),A=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(l.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),T=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new A(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(h.is(e)){var n=new _(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new _(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(b.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new _(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new _(i),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new A,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(f.is(t)||l.is(t)?r=t:n=t,void 0===r?i=p.create(e,n):(o=l.is(r)?r:this._changeAnnotations.manage(r),i=p.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,o,a;if(f.is(n)||l.is(n)?i=n:r=n,void 0===i?o=m.create(e,t,r):(a=l.is(i)?i:this._changeAnnotations.manage(i),o=m.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(o),void 0!==a)return a},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,i,o;if(f.is(t)||l.is(t)?r=t:n=t,void 0===r?i=v.create(e,n):(o=l.is(r)?r:this._changeAnnotations.manage(r),i=v.create(e,n,o)),this._workspaceEdit.documentChanges.push(i),void 0!==o)return o},e}();t.WorkspaceChange=T,function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.uri)}}(t.TextDocumentIdentifier||(t.TextDocumentIdentifier={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.uri)&&I.integer(t.version)}}(t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.uri)&&(null===t.version||I.integer(t.version))}}(b=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return I.defined(t)&&I.string(t.uri)&&I.string(t.languageId)&&I.integer(t.version)&&I.string(t.text)}}(t.TextDocumentItem||(t.TextDocumentItem={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(C=t.MarkupKind||(t.MarkupKind={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(C=t.MarkupKind||(t.MarkupKind={})),function(e){e.is=function(e){var t=e;return I.objectLiteral(e)&&C.is(t.kind)&&I.string(t.value)}}(E=t.MarkupContent||(t.MarkupContent={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(t.CompletionItemKind||(t.CompletionItemKind={})),function(e){e.PlainText=1,e.Snippet=2}(t.InsertTextFormat||(t.InsertTextFormat={})),function(e){e.Deprecated=1}(t.CompletionItemTag||(t.CompletionItemTag={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&I.string(t.newText)&&i.is(t.insert)&&i.is(t.replace)}}(t.InsertReplaceEdit||(t.InsertReplaceEdit={})),function(e){e.asIs=1,e.adjustIndentation=2}(t.InsertTextMode||(t.InsertTextMode={})),function(e){e.create=function(e){return{label:e}}}(t.CompletionItem||(t.CompletionItem={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(t.CompletionList||(t.CompletionList={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return I.string(t)||I.objectLiteral(t)&&I.string(t.language)&&I.string(t.value)}}(k=t.MarkedString||(t.MarkedString={})),function(e){e.is=function(e){var t=e;return!!t&&I.objectLiteral(t)&&(E.is(t.contents)||k.is(t.contents)||I.typedArray(t.contents,k.is))&&(void 0===e.range||i.is(e.range))}}(t.Hover||(t.Hover={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(t.ParameterInformation||(t.ParameterInformation={})),function(e){e.create=function(e,t){for(var n=[],r=2;r=0;a--){var s=i[a],c=e.offsetAt(s.range.start),u=e.offsetAt(s.range.end);if(!(u<=o))throw new Error("Overlapping edit");r=r.substring(0,c)+s.newText+r.substring(u,r.length),o=c}return r}}(t.TextDocument||(t.TextDocument={}));var I,w=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;ne?i=o:n=o+1}var a=n-1;return r.create(a,e-t[a])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function i(e){return e>=48&&e<=57}Object.defineProperty(t,"__esModule",{value:!0}),t.createScanner=void 0,t.createScanner=function(e,t){void 0===t&&(t=!1);var o=e.length,a=0,s="",c=0,u=16,d=0,f=0,l=0,g=0,h=0;function p(t,n){for(var r=0,i=0;r=48&&o<=57)i=16*i+o-48;else if(o>=65&&o<=70)i=16*i+o-65+10;else{if(!(o>=97&&o<=102))break;i=16*i+o-97+10}a++,r++}return r=o)return c=o,u=17;var t=e.charCodeAt(a);if(n(t)){do{a++,s+=String.fromCharCode(t),t=e.charCodeAt(a)}while(n(t));return u=15}if(r(t))return a++,s+=String.fromCharCode(t),13===t&&10===e.charCodeAt(a)&&(a++,s+="\n"),d++,l=a,u=14;switch(t){case 123:return a++,u=1;case 125:return a++,u=2;case 91:return a++,u=3;case 93:return a++,u=4;case 58:return a++,u=6;case 44:return a++,u=5;case 34:return a++,s=function(){for(var t="",n=a;;){if(a>=o){t+=e.substring(n,a),h=2;break}var i=e.charCodeAt(a);if(34===i){t+=e.substring(n,a),a++;break}if(92!==i){if(i>=0&&i<=31){if(r(i)){t+=e.substring(n,a),h=2;break}h=6}a++}else{if(t+=e.substring(n,a),++a>=o){h=2;break}switch(e.charCodeAt(a++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=p(4,!0);s>=0?t+=String.fromCharCode(s):h=4;break;default:h=5}n=a}}return t}(),u=10;case 47:var m=a-1;if(47===e.charCodeAt(a+1)){for(a+=2;a=12&&e<=15);return e}:m,getToken:function(){return u},getTokenValue:function(){return s},getTokenOffset:function(){return c},getTokenLength:function(){return a-c},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return c-g},getTokenError:function(){return h}}}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("jsonc-parser/impl/format",["require","exports","./scanner"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEOL=t.format=void 0;var n=e("./scanner");function r(e,t){for(var n="",r=0;r0&&!i(e,c-1);)c--;for(var f=d;fu)||e.substring(r,i)===n||C.push({offset:r,length:i-r,content:n})}var k=b();if(17!==k){var _=m.getTokenOffset()+c;E(r(l,a),c,_)}for(;17!==k;){for(var A=m.getTokenOffset()+m.getTokenLength()+c,T=b(),I="",w=!1;!h&&(12===T||13===T);){E(" ",A,m.getTokenOffset()+c),A=m.getTokenOffset()+m.getTokenLength()+c,I=(w=12===T)?y():"",T=b()}if(2===T)1!==k&&(p--,I=y());else if(4===T)3!==k&&(p--,I=y());else{switch(k){case 3:case 1:p++,I=y();break;case 5:case 12:I=y();break;case 13:h?I=y():w||(I=" ");break;case 6:w||(I=" ");break;case 10:if(6===T){w||(I="");break}case 7:case 8:case 9:case 11:case 2:case 4:12===T||13===T?w||(I=" "):5!==T&&17!==T&&(v=!0);break;case 16:v=!0}!h||12!==T&&13!==T||(I=y())}17===T&&(I=o.insertFinalNewline?g:""),E(I,A,m.getTokenOffset()+c),k=T}return C},t.isEOL=i})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("jsonc-parser/impl/parser",["require","exports","./scanner"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeType=t.stripComments=t.visit=t.findNodeAtOffset=t.contains=t.getNodeValue=t.getNodePath=t.findNodeAtLocation=t.parseTree=t.parse=t.getLocation=void 0;var n,r=e("./scanner");function i(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t0)for(var r=o.getToken();17!==r;){if(-1!==t.indexOf(r)){b();break}if(-1!==n.indexOf(r))break;r=b()}}function E(e){var t=o.getTokenValue();return e?g(t):u(t),b(),!0}function k(){switch(o.getToken()){case 3:return function(){f(),b();for(var e=!1;4!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||C(4,[],[]),h(","),b(),4===o.getToken()&&y)break}else e&&C(6,[],[]);k()||C(4,[],[4,5]),e=!0}return l(),4!==o.getToken()?C(8,[4],[]):b(),!0}();case 1:return function(){c(),b();for(var e=!1;2!==o.getToken()&&17!==o.getToken();){if(5===o.getToken()){if(e||C(4,[],[]),h(","),b(),2===o.getToken()&&y)break}else e&&C(6,[],[]);(10!==o.getToken()?(C(3,[],[2,5]),0):(E(!1),6===o.getToken()?(h(":"),b(),k()||C(4,[],[2,5])):C(5,[],[2,5]),1))||C(4,[],[2,5]),e=!0}return d(),2!==o.getToken()?C(7,[2],[]):b(),!0}();case 10:return E(!0);default:return function(){switch(o.getToken()){case 11:var e=o.getTokenValue(),t=Number(e);isNaN(t)&&(C(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return b(),!0}()}}return b(),17===o.getToken()?!!i.allowEmptyContent||(C(4,[],[]),!1):k()?(17!==o.getToken()&&C(9,[],[]),!0):(C(4,[],[]),!1)}function a(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":return e?Array.isArray(e)?"array":"object":"null";default:return"null"}}!function(e){e.DEFAULT={allowTrailingComma:!1}}(n||(n={})),t.getLocation=function(e,t){var n=[],r=new Object,i=void 0,s={value:{},offset:0,length:0,type:"object",parent:void 0},c=!1;function u(e,t,n,r){s.value=e,s.offset=t,s.length=n,s.type=r,s.colonOffset=void 0,i=s}try{o(e,{onObjectBegin:function(e,o){if(t<=e)throw r;i=void 0,c=t>e,n.push("")},onObjectProperty:function(e,i,o){if(t=n.children.length)return;n=n.children[d]}}return n}},t.getNodePath=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var i=t.parent.children.indexOf(t);-1!==i&&n.push(i)}return n},t.getNodeValue=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,i=t.children;r0&&(d=s.pop(),void 0===(u=r.findNodeAtLocation(c,s))&&void 0!==n);)"string"==typeof d?((a={})[d]=n,n=a):n=[n];if(u){if("object"===u.type&&"string"==typeof d&&Array.isArray(u.children)){var f=r.findNodeAtLocation(u,[d]);if(void 0!==f){if(void 0===n){if(!f.parent)throw new Error("Malformed AST");var l=u.children.indexOf(f.parent),g=void 0,h=f.parent.offset+f.parent.length;if(l>0)g=(k=u.children[l-1]).offset+k.length;else if(g=u.offset+1,u.children.length>1)h=u.children[1].offset;return o(e,{offset:g,length:h-g,content:""},i)}return o(e,{offset:f.offset,length:f.length,content:JSON.stringify(n)},i)}if(void 0===n)return[];var p=JSON.stringify(d)+": "+JSON.stringify(n),m=void 0;return o(e,m=(_=i.getInsertionIndex?i.getInsertionIndex(u.children.map((function(e){return e.children[0].value}))):u.children.length)>0?{offset:(k=u.children[_-1]).offset+k.length,length:0,content:","+p}:0===u.children.length?{offset:u.offset+1,length:0,content:p}:{offset:u.offset+1,length:0,content:p+","},i)}if("array"===u.type&&"number"==typeof d&&Array.isArray(u.children)){var v=d;if(-1===v){p=""+JSON.stringify(n),m=void 0;if(0===u.children.length)m={offset:u.offset+1,length:0,content:p};else m={offset:(k=u.children[u.children.length-1]).offset+k.length,length:0,content:","+p};return o(e,m,i)}if(void 0===n&&u.children.length>=0){var y=d,b=u.children[y];m=void 0;if(1===u.children.length)m={offset:u.offset+1,length:u.length-2,content:""};else if(u.children.length-1===y){var C=(k=u.children[y-1]).offset+k.length;m={offset:C,length:u.offset+u.length-2-C,content:""}}else m={offset:b.offset,length:u.children[y+1].offset-b.offset,content:""};return o(e,m,i)}if(void 0!==n){m=void 0,p=""+JSON.stringify(n);if(!i.isArrayInsertion&&u.children.length>d){var E=u.children[d];m={offset:E.offset,length:E.length,content:p}}else if(0===u.children.length||0===d)m={offset:u.offset+1,length:0,content:0===u.children.length?p:p+","};else{var k,_=d>u.children.length?u.children.length:d;m={offset:(k=u.children[_-1]).offset+k.length,length:0,content:","+p}}return o(e,m,i)}throw new Error("Can not "+(void 0===n?"remove":i.isArrayInsertion?"insert":"modify")+" Array index "+v+" as length is not sufficient")}throw new Error("Can not add "+("number"!=typeof d?"index":"property")+" to parent of type "+u.type)}if(void 0===n)throw new Error("Can not delete in empty document");return o(e,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(n)},i)}function o(e,t,r){if(!r.formattingOptions)return[t];var i=a(e,t),o=t.offset,s=t.offset+t.content.length;if(0===t.length||0===t.content.length){for(;o>0&&!n.isEOL(i,o-1);)o--;for(;s=0;u--){var d=c[u];i=a(i,d),o=Math.min(o,d.offset),s=Math.max(s,d.offset+d.length),s+=d.content.length-d.length}return[{offset:o,length:e.length-(i.length-s)-o,content:i.substring(o,s)}]}function a(e,t){return e.substring(0,t.offset)+t.content+e.substring(t.offset+t.length)}t.removeProperty=function(e,t,n){return i(e,t,void 0,n)},t.setProperty=i,t.applyEdit=a,t.isWS=function(e,t){return-1!=="\r\n \t".indexOf(e.charAt(t))}})),function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("jsonc-parser/main",["require","exports","./impl/format","./impl/edit","./impl/scanner","./impl/parser"],e)}((function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.applyEdits=t.modify=t.format=t.printParseErrorCode=t.stripComments=t.visit=t.getNodeValue=t.getNodePath=t.findNodeAtOffset=t.findNodeAtLocation=t.parseTree=t.parse=t.getLocation=t.createScanner=void 0;var n=e("./impl/format"),r=e("./impl/edit"),i=e("./impl/scanner"),o=e("./impl/parser");t.createScanner=i.createScanner,t.getLocation=o.getLocation,t.parse=o.parse,t.parseTree=o.parseTree,t.findNodeAtLocation=o.findNodeAtLocation,t.findNodeAtOffset=o.findNodeAtOffset,t.getNodePath=o.getNodePath,t.getNodeValue=o.getNodeValue,t.visit=o.visit,t.stripComments=o.stripComments,t.printParseErrorCode=function(e){switch(e){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return""},t.format=function(e,t,r){return n.format(e,t,r)},t.modify=function(e,t,n,i){return r.setProperty(e,t,n,i)},t.applyEdits=function(e,t){for(var n=t.length-1;n>=0;n--)e=r.applyEdit(e,t[n]);return e}})),define("jsonc-parser",["jsonc-parser/main"],(function(e){return e})),define("vs/language/json/tokenization",["require","exports","jsonc-parser"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOKEN_COMMENT_LINE=t.TOKEN_COMMENT_BLOCK=t.TOKEN_PROPERTY_NAME=t.TOKEN_VALUE_NUMBER=t.TOKEN_VALUE_STRING=t.TOKEN_VALUE_NULL=t.TOKEN_VALUE_BOOLEAN=t.TOKEN_DELIM_COMMA=t.TOKEN_DELIM_COLON=t.TOKEN_DELIM_ARRAY=t.TOKEN_DELIM_OBJECT=t.createTokenizationSupport=void 0,t.createTokenizationSupport=function(e){return{getInitialState:function(){return new i(null,null,!1,null)},tokenize:function(o,a,s,c){return function(e,o,a,s,c){void 0===s&&(s=0);var u=0,d=!1;switch(a.scanError){case 2:o='"'+o,u=1;break;case 1:o="/*"+o,u=2}var f=n.createScanner(o),l=a.lastWasColon,g=a.parents,h={tokens:[],endState:a.clone()};for(;;){var p=s+f.getPosition(),m="",v=f.scan();if(17===v)break;if(p===s+f.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+o.substr(f.getPosition(),3));switch(d&&(p-=u),d=u>0,v){case 1:g=r.push(g,0),m=t.TOKEN_DELIM_OBJECT,l=!1;break;case 2:g=r.pop(g),m=t.TOKEN_DELIM_OBJECT,l=!1;break;case 3:g=r.push(g,1),m=t.TOKEN_DELIM_ARRAY,l=!1;break;case 4:g=r.pop(g),m=t.TOKEN_DELIM_ARRAY,l=!1;break;case 6:m=t.TOKEN_DELIM_COLON,l=!0;break;case 5:m=t.TOKEN_DELIM_COMMA,l=!1;break;case 8:case 9:m=t.TOKEN_VALUE_BOOLEAN,l=!1;break;case 7:m=t.TOKEN_VALUE_NULL,l=!1;break;case 10:var y=g?g.type:0;m=l||1===y?t.TOKEN_VALUE_STRING:t.TOKEN_PROPERTY_NAME,l=!1;break;case 11:m=t.TOKEN_VALUE_NUMBER,l=!1}if(e)switch(v){case 12:m=t.TOKEN_COMMENT_LINE;break;case 13:m=t.TOKEN_COMMENT_BLOCK}h.endState=new i(a.getStateData(),f.getTokenError(),l,g),h.tokens.push({startIndex:p,scopes:m})}return h}(e,o,a,s)}}},t.TOKEN_DELIM_OBJECT="delimiter.bracket.json",t.TOKEN_DELIM_ARRAY="delimiter.array.json",t.TOKEN_DELIM_COLON="delimiter.colon.json",t.TOKEN_DELIM_COMMA="delimiter.comma.json",t.TOKEN_VALUE_BOOLEAN="keyword.json",t.TOKEN_VALUE_NULL="keyword.json",t.TOKEN_VALUE_STRING="string.value.json",t.TOKEN_VALUE_NUMBER="number.json",t.TOKEN_PROPERTY_NAME="string.key.json",t.TOKEN_COMMENT_BLOCK="comment.block.json",t.TOKEN_COMMENT_LINE="comment.line.json";var r=function(){function e(e,t){this.parent=e,this.type=t}return e.pop=function(e){return e?e.parent:null},e.push=function(t,n){return new e(t,n)},e.equals=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0},e}(),i=function(){function e(e,t,n,r){this._state=e,this.scanError=t,this.lastWasColon=n,this.parents=r}return e.prototype.clone=function(){return new e(this._state,this.scanError,this.lastWasColon,this.parents)},e.prototype.equals=function(t){return t===this||!!(t&&t instanceof e)&&(this.scanError===t.scanError&&this.lastWasColon===t.lastWasColon&&r.equals(this.parents,t.parents))},e.prototype.getStateData=function(){return this._state},e.prototype.setStateData=function(e){this._state=e},e}()})),define("vs/language/json/jsonMode",["require","exports","./workerManager","./languageFeatures","./tokenization","./fillers/monaco-editor-core"],(function(e,t,n,r,i,o){"use strict";function a(e){return{dispose:function(){return s(e)}}}function s(e){for(;e.length;)e.pop().dispose()}Object.defineProperty(t,"__esModule",{value:!0}),t.setupMode=void 0,t.setupMode=function(e){var t=[],u=[],d=new n.WorkerManager(e);t.push(d);var f=function(){for(var e=[],t=0;t