From f1d71429587552afad6f78c8e74d05c33bbba5ae Mon Sep 17 00:00:00 2001 From: TheodoreChu <22967798+TheodoreChu@users.noreply.github.com> Date: Sun, 6 Dec 2020 23:25:15 -0800 Subject: [PATCH] feat: menu with copy text, copy HTMl, uncheck boxes --- build/asset-manifest.json | 20 +-- build/icons/ic-menu-variant.svg | 3 + build/index.html | 2 +- build/static/css/main.1852c0ce.chunk.css | 2 + build/static/css/main.1852c0ce.chunk.css.map | 1 + build/static/css/main.52f19b8d.chunk.css | 2 - build/static/css/main.52f19b8d.chunk.css.map | 1 - build/static/js/4.b613b891.chunk.js | 3 - build/static/js/4.ea980b31.chunk.js | 3 + ...SE.txt => 4.ea980b31.chunk.js.LICENSE.txt} | 0 ...1.chunk.js.map => 4.ea980b31.chunk.js.map} | 2 +- build/static/js/main.02a84f27.chunk.js | 2 + build/static/js/main.02a84f27.chunk.js.map | 1 + build/static/js/main.a922e0bb.chunk.js | 2 - build/static/js/main.a922e0bb.chunk.js.map | 1 - public/icons/ic-menu-variant.svg | 3 + src/components/AppendEditor.tsx | 57 +++++++-- src/components/Menu.tsx | 116 ++++++++++++++++++ src/components/ViewNote.tsx | 1 + src/stylesheets/main.scss | 63 ++++++++-- src/stylesheets/print.scss | 3 +- 21 files changed, 243 insertions(+), 45 deletions(-) create mode 100644 build/icons/ic-menu-variant.svg create mode 100644 build/static/css/main.1852c0ce.chunk.css create mode 100644 build/static/css/main.1852c0ce.chunk.css.map delete mode 100644 build/static/css/main.52f19b8d.chunk.css delete mode 100644 build/static/css/main.52f19b8d.chunk.css.map delete mode 100644 build/static/js/4.b613b891.chunk.js create mode 100644 build/static/js/4.ea980b31.chunk.js rename build/static/js/{4.b613b891.chunk.js.LICENSE.txt => 4.ea980b31.chunk.js.LICENSE.txt} (100%) rename build/static/js/{4.b613b891.chunk.js.map => 4.ea980b31.chunk.js.map} (66%) create mode 100644 build/static/js/main.02a84f27.chunk.js create mode 100644 build/static/js/main.02a84f27.chunk.js.map delete mode 100644 build/static/js/main.a922e0bb.chunk.js delete mode 100644 build/static/js/main.a922e0bb.chunk.js.map create mode 100644 public/icons/ic-menu-variant.svg create mode 100644 src/components/Menu.tsx diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 1fab3cc7..d0250f98 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -4,14 +4,14 @@ "static/js/0.96650d91.chunk.js.map": "./static/js/0.96650d91.chunk.js.map", "static/js/1.78ca9d6c.chunk.js": "./static/js/1.78ca9d6c.chunk.js", "static/js/1.78ca9d6c.chunk.js.map": "./static/js/1.78ca9d6c.chunk.js.map", - "main.css": "./static/css/main.52f19b8d.chunk.css", - "main.js": "./static/js/main.a922e0bb.chunk.js", - "main.js.map": "./static/js/main.a922e0bb.chunk.js.map", + "main.css": "./static/css/main.1852c0ce.chunk.css", + "main.js": "./static/js/main.02a84f27.chunk.js", + "main.js.map": "./static/js/main.02a84f27.chunk.js.map", "runtime-main.js": "./static/js/runtime-main.25e89614.js", "runtime-main.js.map": "./static/js/runtime-main.25e89614.js.map", "static/css/4.7c0a8645.chunk.css": "./static/css/4.7c0a8645.chunk.css", - "static/js/4.b613b891.chunk.js": "./static/js/4.b613b891.chunk.js", - "static/js/4.b613b891.chunk.js.map": "./static/js/4.b613b891.chunk.js.map", + "static/js/4.ea980b31.chunk.js": "./static/js/4.ea980b31.chunk.js", + "static/js/4.ea980b31.chunk.js.map": "./static/js/4.ea980b31.chunk.js.map", "static/js/5.09338a01.chunk.js": "./static/js/5.09338a01.chunk.js", "static/js/5.09338a01.chunk.js.map": "./static/js/5.09338a01.chunk.js.map", "static/js/6.ca7d77f3.chunk.js": "./static/js/6.ca7d77f3.chunk.js", @@ -152,16 +152,16 @@ "static/js/73.cbdec997.chunk.js.map": "./static/js/73.cbdec997.chunk.js.map", "index.html": "./index.html", "static/css/4.7c0a8645.chunk.css.map": "./static/css/4.7c0a8645.chunk.css.map", - "static/css/main.52f19b8d.chunk.css.map": "./static/css/main.52f19b8d.chunk.css.map", - "static/js/4.b613b891.chunk.js.LICENSE.txt": "./static/js/4.b613b891.chunk.js.LICENSE.txt", + "static/css/main.1852c0ce.chunk.css.map": "./static/css/main.1852c0ce.chunk.css.map", + "static/js/4.ea980b31.chunk.js.LICENSE.txt": "./static/js/4.ea980b31.chunk.js.LICENSE.txt", "static/js/65.393e0ac1.chunk.js.LICENSE.txt": "./static/js/65.393e0ac1.chunk.js.LICENSE.txt", "static/media/codicon.css": "./static/media/codicon.b3726f01.ttf" }, "entrypoints": [ "static/js/runtime-main.25e89614.js", "static/css/4.7c0a8645.chunk.css", - "static/js/4.b613b891.chunk.js", - "static/css/main.52f19b8d.chunk.css", - "static/js/main.a922e0bb.chunk.js" + "static/js/4.ea980b31.chunk.js", + "static/css/main.1852c0ce.chunk.css", + "static/js/main.02a84f27.chunk.js" ] } \ No newline at end of file diff --git a/build/icons/ic-menu-variant.svg b/build/icons/ic-menu-variant.svg new file mode 100644 index 00000000..36a0e40a --- /dev/null +++ b/build/icons/ic-menu-variant.svg @@ -0,0 +1,3 @@ + diff --git a/build/index.html b/build/index.html index 16d6a9cb..caa170a0 100644 --- a/build/index.html +++ b/build/index.html @@ -1 +1 @@ -
0&&D[G-1].lineNumber===K)){var Y=D[G].oldContent,$=this.getLineContent(K);0!==$.length&&$!==Y&&-1===p.w($)&&W.push(K)}}}return this._onDidChangeContent.fire(),new y.a(P,V,W)}},{key:"_reduceOperations",value:function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}},{key:"_toSingleEditOperation",value:function(e){for(var t=!1,n=e[0].range,i=e[e.length-1].range,o=new _.a(n.startLineNumber,n.startColumn,i.endLineNumber,i.endColumn),a=n.startLineNumber,s=n.startColumn,l=[],c=0,u=e.length;c0&&l.push(d.text),a=h.endLineNumber,s=h.endColumn}var f=l.join(""),p=Object(be.f)(f),g=Object(r.a)(p,3),m=g[0],v=g[1],b=g[2];return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:f,eolCount:m,firstLineLength:v,lastLineLength:b,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}},{key:"_doApplyEdits",value:function(t){t.sort(e._sortOpsDescending);for(var n=[],r=0;r0){var d=s.eolCount+1;u=1===d?new _.a(l,c,l,c+s.firstLineLength):new _.a(l,c,l+d-1,s.lastLineLength+1)}else u=new _.a(l,c,l,c);n=u.endLineNumber,r=u.endColumn,t.push(u),i=s}return t}},{key:"_sortOpsAscending",value:function(e,t){var n=_.a.compareRangesUsingEnds(e.range,t.range);return 0===n?e.sortIndex-t.sortIndex:n}},{key:"_sortOpsDescending",value:function(e,t){var n=_.a.compareRangesUsingEnds(e.range,t.range);return 0===n?t.sortIndex-e.sortIndex:-n}}]),e}(),Ce=function(){function e(t,n,r,i,o,a,s,l,u){Object(c.a)(this,e),this._chunks=t,this._bom=n,this._cr=r,this._lf=i,this._crlf=o,this._containsRTL=a,this._containsUnusualLineTerminators=s,this._isBasicASCII=l,this._normalizeEOL=u}return Object(u.a)(e,[{key:"_getEOL",value:function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":n>t/2?"\r\n":"\n"}},{key:"create",value:function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var r=0,i=n.length;r=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}}},{key:"_acceptChunk1",value:function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}},{key:"_acceptChunk2",value:function(e){var t=function(e,t){e.length=0,e[0]=0;for(var n=1,r=0,i=0,o=0,a=!0,s=0,l=t.length;s 126)&&(a=!1)}var u=new he(de(e),r,i,o,a);return e.length=0,u}(this._tmpLineStarts,e);this.chunks.push(new ge(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=p.m(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=p.n(e))}},{key:"finish",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._finish(),new Ce(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}},{key:"_finish",value:function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=fe(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}]),e}(),Ee=function e(){Object(c.a)(this,e),this.changeType=1},we=function e(t,n){Object(c.a)(this,e),this.changeType=2,this.lineNumber=t,this.detail=n},Oe=function e(t,n){Object(c.a)(this,e),this.changeType=3,this.fromLineNumber=t,this.toLineNumber=n},Te=function e(t,n,r){Object(c.a)(this,e),this.changeType=4,this.fromLineNumber=t,this.toLineNumber=n,this.detail=r},xe=function e(){Object(c.a)(this,e),this.changeType=5},Ne=function(){function e(t,n,r,i){Object(c.a)(this,e),this.changes=t,this.versionId=n,this.isUndoing=r,this.isRedoing=i,this.resultingSelection=null}return Object(u.a)(e,[{key:"containsEvent",value:function(e){for(var t=0,n=this.changes.length;t =this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}},{key:"_deleteLines",value:function(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}},{key:"_insertLines",value:function(e,t){if(0!==t){for(var n=[],r=[],i=0;i =0;i--)this._invalidateLine(e.startLineNumber+i-1);this._acceptDeleteRange(e),this._acceptInsertText(new v.a(e.startLineNumber,e.startColumn),t)}},{key:"_acceptDeleteRange",value:function(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}},{key:"_acceptInsertText",value:function(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}},{key:"invalidLineStartIndex",get:function(){return this._invalidLineStartIndex}}]),e}(),Fe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var i;return Object(c.a)(this,n),(i=t.call(this))._isDisposed=!1,i._textModel=e,i._tokenizationStateStore=new je,i._tokenizationSupport=null,i._register(Ie.C.onDidChange((function(e){var t=i._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(i._resetTokenizationState(),i._textModel.clearTokens())}))),i._register(i._textModel.onDidChangeRawContentFast((function(e){e.containsEvent(1)&&i._resetTokenizationState()}))),i._register(i._textModel.onDidChangeContentFast((function(e){for(var t=0,n=e.changes.length;t 0&&void 0!==arguments[0]?arguments[0]:this._textModel.getLineCount(),t=1,n=new be.b,r=Me.a.create(!1);this._hasLinesToTokenize()&&!(r.elapsed()>t);){var i=this._tokenizeOneInvalidLine(n);if(i>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(n.tokens)}},{key:"tokenizeViewport",value:function(e,t){var n=new be.b;this._tokenizeViewport(n,e,t),this._textModel.setTokens(n.tokens)}},{key:"reset",value:function(){this._resetTokenizationState(),this._textModel.clearTokens()}},{key:"forceTokenization",value:function(e){var t=new be.b;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}},{key:"isCheapToTokenize",value:function(e){if(!this._tokenizationSupport)return!0;var t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e 0&&a>=1;a--){var s=this._textModel.getLineFirstNonWhitespaceColumn(a);if(0!==s&&s =0;u--){c=Be(l,this._tokenizationSupport,i[u],c).endState}for(var d=t;d<=n;d++){var h=this._textModel.getLineContent(d),f=Be(l,this._tokenizationSupport,h,c);e.add(d,f.tokens),this._tokenizationStateStore.setFakeTokens(d-1),c=f.endState}}}}]),n}(f.a);function Be(e,t,n,r){var i=null;if(t)try{i=t.tokenize2(n,r.clone(),0)}catch(o){Object(d.e)(o)}return i||(i=Object(Re.e)(e.id,n,r,0)),Ae.a.convertToEndOffset(i.tokens,n.length),i}var Ue=n(154),He=n(48),ze=n(120),Ve=n(125),We=n(23);function Ge(e){var t=new ke;return t.acceptChunk(e),t.finish()}function qe(e,t){return("string"===typeof e?Ge(e):e).create(t)}var Ke=0,Ye=function(){function e(t){Object(c.a)(this,e),this._source=t,this._eos=!1}return Object(u.a)(e,[{key:"read",value:function(){if(this._eos)return null;for(var e=[],t=0,n=0;;){var r=this._source.read();if(null===r)return this._eos=!0,0===t?null:e.join("");if(r.length>0&&(e[t++]=r,n+=r.length),n>=65536)return e.join("")}}}]),e}(),$e=function(){throw new Error("Invalid change accessor")},Qe=function e(){Object(c.a)(this,e),this._searchCanceledBrand=void 0};function Ze(e){return e instanceof Qe?null:e}Qe.INSTANCE=new Qe;var Xe=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,o){var a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,l=arguments.length>4?arguments[4]:void 0;Object(c.a)(this,n),(a=t.call(this))._onWillDispose=a._register(new h.a),a.onWillDispose=a._onWillDispose.event,a._onDidChangeDecorations=a._register(new st),a.onDidChangeDecorations=a._onDidChangeDecorations.event,a._onDidChangeLanguage=a._register(new h.a),a.onDidChangeLanguage=a._onDidChangeLanguage.event,a._onDidChangeLanguageConfiguration=a._register(new h.a),a.onDidChangeLanguageConfiguration=a._onDidChangeLanguageConfiguration.event,a._onDidChangeTokens=a._register(new h.a),a.onDidChangeTokens=a._onDidChangeTokens.event,a._onDidChangeOptions=a._register(new h.a),a.onDidChangeOptions=a._onDidChangeOptions.event,a._onDidChangeAttached=a._register(new h.a),a.onDidChangeAttached=a._onDidChangeAttached.event,a._eventEmitter=a._register(new lt),Ke++,a.id="$model"+Ke,a.isForSimpleWidget=r.isForSimpleWidget,a._associatedResource="undefined"===typeof s||null===s?g.a.parse("inmemory://model/"+Ke):s,a._undoRedoService=l,a._attachedEditorCount=0,a._buffer=qe(e,r.defaultEOL),a._options=n.resolveOptions(a._buffer,r);var u=a._buffer.getLineCount(),d=a._buffer.getValueLengthInRange(new _.a(1,1,u,a._buffer.getLineLength(u)+1),0);return r.largeFileOptimizations?a._isTooLargeForTokenization=d>n.LARGE_FILE_SIZE_THRESHOLD||u>n.LARGE_FILE_LINE_COUNT_THRESHOLD:a._isTooLargeForTokenization=!1,a._isTooLargeForSyncing=d>n.MODEL_SYNC_LIMIT,a._versionId=1,a._alternativeVersionId=1,a._initialUndoRedoSnapshot=null,a._isDisposed=!1,a._isDisposing=!1,a._languageIdentifier=o||Re.a,a._languageRegistryListener=He.a.onDidChange((function(e){e.languageIdentifier.id===a._languageIdentifier.id&&a._onDidChangeLanguageConfiguration.fire({})})),a._instanceId=p.R(Ke),a._lastDecorationId=0,a._decorations=Object.create(null),a._decorationsTree=new Je,a._commandManager=new S.a(Object(i.a)(a),l),a._isUndoing=!1,a._isRedoing=!1,a._trimAutoWhitespaceLines=null,a._tokens=new be.d,a._tokens2=new be.e,a._tokenization=new Fe(Object(i.a)(a)),a}return Object(u.a)(n,[{key:"onDidChangeRawContentFast",value:function(e){return this._eventEmitter.fastEvent((function(t){return e(t.rawContentChangedEvent)}))}},{key:"onDidChangeContentFast",value:function(e){return this._eventEmitter.fastEvent((function(t){return e(t.contentChangedEvent)}))}},{key:"onDidChangeContent",value:function(e){return this._eventEmitter.slowEvent((function(t){return e(t.contentChangedEvent)}))}},{key:"dispose",value:function(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,Object(o.a)(Object(a.a)(n.prototype),"dispose",this).call(this),this._isDisposing=!1}},{key:"_assertNotDisposed",value:function(){if(this._isDisposed)throw new Error("Model is disposed!")}},{key:"_emitContentChangedEvent",value:function(e,t){this._isDisposing||this._eventEmitter.fire(new De(e,t))}},{key:"setValue",value:function(e){if(this._assertNotDisposed(),null!==e){var t=qe(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}}},{key:"_createContentChanged2",value:function(e,t,n,r,i,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:r}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:i,isRedoing:o,isFlush:a}}},{key:"setValueFromTextBuffer",value:function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),r=this.getLineCount(),i=this.getLineMaxColumn(r);this._buffer=e,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Je,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Ne([new Ee],this._versionId,!1,!1),this._createContentChanged2(new _.a(1,1,r,i),0,n,this.getValue(),!1,!1,!0))}}},{key:"setEOL",value:function(e){this._assertNotDisposed();var t=1===e?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),r=this.getValueLengthInRange(n),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Ne([new xe],this._versionId,!1,!1),this._createContentChanged2(new _.a(1,1,i,o),0,r,this.getValue(),!1,!1,!1))}}},{key:"_onBeforeEOLChange",value:function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}},{key:"_onAfterEOLChange",value:function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,r=t.length;n 0}},{key:"getAttachedEditorCount",value:function(){return this._attachedEditorCount}},{key:"isTooLargeForSyncing",value:function(){return this._isTooLargeForSyncing}},{key:"isTooLargeForTokenization",value:function(){return this._isTooLargeForTokenization}},{key:"isDisposed",value:function(){return this._isDisposed}},{key:"isDominatedByLongLines",value:function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,t=0,n=this._buffer.getLineCount(),r=1;r<=n;r++){var i=this._buffer.getLineLength(r);i>=1e4?t+=i:e+=i}return t>e}},{key:"getOptions",value:function(){return this._assertNotDisposed(),this._options}},{key:"getFormattingOptions",value:function(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}},{key:"updateOptions",value:function(e){this._assertNotDisposed();var t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!==typeof e.indentSize?e.indentSize:this._options.indentSize,r="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new y.e({tabSize:t,indentSize:n,insertSpaces:r,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var a=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(a)}}},{key:"detectIndentation",value:function(e,t){this._assertNotDisposed();var n=E(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize,indentSize:n.tabSize})}},{key:"normalizeIndentation",value:function(e){return this._assertNotDisposed(),n.normalizeIndentation(e,this._options.indentSize,this._options.insertSpaces)}},{key:"getVersionId",value:function(){return this._assertNotDisposed(),this._versionId}},{key:"mightContainRTL",value:function(){return this._buffer.mightContainRTL()}},{key:"mightContainUnusualLineTerminators",value:function(){return this._buffer.mightContainUnusualLineTerminators()}},{key:"removeUnusualLineTerminators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.findMatches(p.a.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((function(e){return{range:e.range,text:null}})),(function(){return null}))}},{key:"mightContainNonBasicASCII",value:function(){return this._buffer.mightContainNonBasicASCII()}},{key:"getAlternativeVersionId",value:function(){return this._assertNotDisposed(),this._alternativeVersionId}},{key:"getOffsetAt",value:function(e){this._assertNotDisposed();var t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}},{key:"getPositionAt",value:function(e){this._assertNotDisposed();var t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}},{key:"_increaseVersionId",value:function(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}},{key:"_overwriteVersionId",value:function(e){this._versionId=e}},{key:"_overwriteAlternativeVersionId",value:function(e){this._alternativeVersionId=e}},{key:"_overwriteInitialUndoRedoSnapshot",value:function(e){this._initialUndoRedoSnapshot=e}},{key:"getValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._assertNotDisposed();var n=this.getFullModelRange(),r=this.getValueInRange(n,e);return t?this._buffer.getBOM()+r:r}},{key:"createSnapshot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Ye(this._buffer.createSnapshot(e))}},{key:"getValueLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._assertNotDisposed();var n=this.getFullModelRange(),r=this.getValueLengthInRange(n,e);return t?this._buffer.getBOM().length+r:r}},{key:"getValueInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}},{key:"getValueLengthInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}},{key:"getCharacterCountInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}},{key:"getLineCount",value:function(){return this._assertNotDisposed(),this._buffer.getLineCount()}},{key:"getLineContent",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}},{key:"getLineLength",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}},{key:"getLinesContent",value:function(){return this._assertNotDisposed(),this._buffer.getLinesContent()}},{key:"getEOL",value:function(){return this._assertNotDisposed(),this._buffer.getEOL()}},{key:"getLineMinColumn",value:function(e){return this._assertNotDisposed(),1}},{key:"getLineMaxColumn",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}},{key:"getLineFirstNonWhitespaceColumn",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}},{key:"getLineLastNonWhitespaceColumn",value:function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}},{key:"_validateRangeRelaxedNoAllocations",value:function(e){var t,n,r=this._buffer.getLineCount(),i=e.startLineNumber,o=e.startColumn;if(i<1)t=1,n=1;else if(i>r)t=r,n=this.getLineMaxColumn(t);else if(t=0|i,o<=1)n=1;else{var a=this.getLineMaxColumn(t);n=o>=a?a:0|o}var s,l,c=e.endLineNumber,u=e.endColumn;if(c<1)s=1,l=1;else if(c>r)s=r,l=this.getLineMaxColumn(s);else if(s=0|c,u<=1)l=1;else{var d=this.getLineMaxColumn(s);l=u>=d?d:0|u}return i===t&&o===n&&c===s&&u===l&&e instanceof _.a&&!(e instanceof b.a)?e:new _.a(t,n,s,l)}},{key:"_isValidPosition",value:function(e,t,n){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===n){var r=this._buffer.getLineCharCode(e,t-2);if(p.F(r))return!1}return!0}},{key:"_validatePosition",value:function(e,t,n){var r=Math.floor("number"!==typeof e||isNaN(e)?1:e),i=Math.floor("number"!==typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(r<1)return new v.a(1,1);if(r>o)return new v.a(o,this.getLineMaxColumn(o));if(i<=1)return new v.a(r,1);var a=this.getLineMaxColumn(r);if(i>=a)return new v.a(r,a);if(1===n){var s=this._buffer.getLineCharCode(r,i-2);if(p.F(s))return new v.a(r,i-1)}return new v.a(r,i)}},{key:"validatePosition",value:function(e){return this._assertNotDisposed(),e instanceof v.a&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}},{key:"_isValidRange",value:function(e,t){var n=e.startLineNumber,r=e.startColumn,i=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(n,r,0))return!1;if(!this._isValidPosition(i,o,0))return!1;if(1===t){var a=r>1?this._buffer.getLineCharCode(n,r-2):0,s=o>1&&o<=this._buffer.getLineLength(i)?this._buffer.getLineCharCode(i,o-2):0,l=p.F(a),c=p.F(s);return!l&&!c}return!0}},{key:"validateRange",value:function(e){if(this._assertNotDisposed(),e instanceof _.a&&!(e instanceof b.a)&&this._isValidRange(e,1))return e;var t=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),r=t.lineNumber,i=t.column,o=n.lineNumber,a=n.column,s=i>1?this._buffer.getLineCharCode(r,i-2):0,l=a>1&&a<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,a-2):0,c=p.F(s),u=p.F(l);return c||u?r===o&&i===a?new _.a(r,i-1,o,a-1):c&&u?new _.a(r,i-1,o,a+1):c?new _.a(r,i-1,o,a):new _.a(r,i,o,a+1):new _.a(r,i,o,a)}},{key:"modifyPosition",value:function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))}},{key:"getFullModelRange",value:function(){this._assertNotDisposed();var e=this.getLineCount();return new _.a(1,1,e,this.getLineMaxColumn(e))}},{key:"findMatchesLineByLine",value:function(e,t,n,r){return this._buffer.findMatchesLineByLine(e,t,n,r)}},{key:"findMatches",value:function(e,t,n,r,i,o){var a=this,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:999;this._assertNotDisposed();var l=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((function(e){return _.a.isIRange(e)}))&&(l=t.map((function(e){return a.validateRange(e)})))),null===l&&(l=[this.getFullModelRange()]),l=l.sort((function(e,t){return e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn}));var c,u=[];if(u.push(l.reduce((function(e,t){return _.a.areIntersecting(e,t)?e.plusRange(t):(u.push(e),t)}))),!n&&e.indexOf("\n")<0){var d=new ce.a(e,n,r,i),h=d.parseSearchRequest();if(!h)return[];c=function(e){return a.findMatchesLineByLine(e,h,o,s)}}else c=function(t){return ce.c.findMatches(a,new ce.a(e,n,r,i),t,o,s)};return u.map(c).reduce((function(e,t){return e.concat(t)}),[])}},{key:"findNextMatch",value:function(e,t,n,r,i,o){this._assertNotDisposed();var a=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var s=new ce.a(e,n,r,i).parseSearchRequest();if(!s)return null;var l=this.getLineCount(),c=new _.a(a.lineNumber,a.column,l,this.getLineMaxColumn(l)),u=this.findMatchesLineByLine(c,s,o,1);return ce.c.findNextMatch(this,new ce.a(e,n,r,i),a,o),u.length>0?u[0]:(c=new _.a(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),(u=this.findMatchesLineByLine(c,s,o,1)).length>0?u[0]:null)}return ce.c.findNextMatch(this,new ce.a(e,n,r,i),a,o)}},{key:"findPreviousMatch",value:function(e,t,n,r,i,o){this._assertNotDisposed();var a=this.validatePosition(t);return ce.c.findPreviousMatch(this,new ce.a(e,n,r,i),a,o)}},{key:"pushStackElement",value:function(){this._commandManager.pushStackElement()}},{key:"pushEOL",value:function(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_validateEditOperation",value:function(e){return e instanceof y.f?e:new y.f(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}},{key:"_validateEditOperations",value:function(e){for(var t=[],n=0,r=e.length;n l.endLineNumber,p=l.startLineNumber>h.endLineNumber;if(!f&&!p){c=!0;break}}if(!c){o=!1;break}}if(o)for(var g=0,m=this._trimAutoWhitespaceLines.length;g E.endLineNumber)&&(!(v===E.startLineNumber&&E.startColumn===b&&E.isEmpty()&&w&&w.length>0&&"\n"===w.charAt(0))&&!(v===E.startLineNumber&&1===E.startColumn&&E.isEmpty()&&w&&w.length>0&&"\n"===w.charAt(w.length-1)))){S=!1;break}}if(S){var O=new _.a(v,1,v,b);t.push(new y.f(null,O,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,n)}},{key:"_applyUndo",value:function(e,t,n,r){var i=this,o=e.map((function(e){var t=i.getPositionAt(e.newPosition),n=i.getPositionAt(e.newEnd);return{range:new _.a(t.lineNumber,t.column,n.lineNumber,n.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,n,r)}},{key:"_applyRedo",value:function(e,t,n,r){var i=this,o=e.map((function(e){var t=i.getPositionAt(e.oldPosition),n=i.getPositionAt(e.oldEnd);return{range:new _.a(t.lineNumber,t.column,n.lineNumber,n.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,n,r)}},{key:"_applyUndoRedoEdits",value:function(e,t,n,r,i,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=n,this._isRedoing=r,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(i)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}},{key:"applyEdits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();var n=this._validateEditOperations(e);return this._doApplyEdits(n,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_doApplyEdits",value:function(e,t){var n=this._buffer.getLineCount(),i=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),a=i.changes;if(this._trimAutoWhitespaceLines=i.trimAutoWhitespaceLineNumbers,0!==a.length){for(var s=[],l=n,c=0,u=a.length;c0?d.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(d.rangeOffset,d.rangeLength,d.text.length,d.forceMoveMarkers);for(var v=d.range.startLineNumber,_=d.range.endLineNumber,b=_-v,y=p,S=Math.min(b,y),C=y-b,k=S;k>=0;k--){var E=v+k,w=o-l-C+E;s.push(new we(E,this.getLineContent(w)))}if(S1&&void 0!==arguments[1]?arguments[1]:0;this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_changeDecorations",value:function(e,t){var n=this,r={addDecoration:function(t,r){return n._deltaDecorationsImpl(e,[],[{range:t,options:r}])[0]},changeDecoration:function(e,t){n._changeDecorationImpl(e,t)},changeDecorationOptions:function(e,t){n._changeDecorationOptionsImpl(e,at(t))},removeDecoration:function(t){n._deltaDecorationsImpl(e,[t],[])},deltaDecorations:function(t,r){return 0===t.length&&0===r.length?[]:n._deltaDecorationsImpl(e,t,r)}},i=null;try{i=t(r)}catch(o){Object(d.e)(o)}return r.addDecoration=$e,r.changeDecoration=$e,r.changeDecorationOptions=$e,r.removeDecoration=$e,r.deltaDecorations=$e,i}},{key:"deltaDecorations",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(n,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}},{key:"_getTrackedRange",value:function(e){return this.getDecorationRange(e)}},{key:"_setTrackedRange",value:function(e,t,n){var r=e?this._decorations[e]:null;if(!r)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:ot[n]}])[0]:null;if(!t)return this._decorationsTree.delete(r),delete this._decorations[r.id],null;var i=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(i.startLineNumber,i.startColumn),a=this._buffer.getOffsetAt(i.endLineNumber,i.endColumn);return this._decorationsTree.delete(r),r.reset(this.getVersionId(),o,a,i),r.setOptions(ot[n]),this._decorationsTree.insert(r),r.id}},{key:"removeAllDecorationsWithOwnerId",value:function(e){if(!this._isDisposed)for(var t=this._decorationsTree.collectNodesFromOwner(e),n=0,r=t.length;n 1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)}},{key:"getLinesDecorations",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.getLineCount(),o=Math.min(i,Math.max(1,e)),a=Math.min(i,Math.max(1,t)),s=this.getLineMaxColumn(a);return this._getDecorationsInRange(new _.a(o,1,a,s),n,r)}},{key:"getDecorationsInRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.validateRange(e);return this._getDecorationsInRange(r,t,n)}},{key:"getOverviewRulerDecorations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getVersionId(),r=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(r)}},{key:"getAllDecorations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getVersionId(),r=this._decorationsTree.search(e,t,!1,n);return this._ensureNodesHaveRanges(r)}},{key:"_getDecorationsInRange",value:function(e,t,n){var r=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),i=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),o=this.getVersionId(),a=this._decorationsTree.intervalSearch(r,i,t,n,o);return this._ensureNodesHaveRanges(a)}},{key:"_ensureNodesHaveRanges",value:function(e){for(var t=0,n=e.length;t 0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}}},{key:"setSemanticTokens",value:function(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}},{key:"hasSemanticTokens",value:function(){return this._tokens2.isComplete()}},{key:"setPartialSemanticTokens",value:function(e,t){if(!this.hasSemanticTokens()){var n=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:n.startLineNumber,toLineNumber:n.endLineNumber}]})}}},{key:"tokenizeViewport",value:function(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}},{key:"clearTokens",value:function(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}},{key:"_emitModelTokensChangedEvent",value:function(e){this._isDisposing||this._onDidChangeTokens.fire(e)}},{key:"resetTokenization",value:function(){this._tokenization.reset()}},{key:"forceTokenization",value:function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}},{key:"isCheapToTokenize",value:function(e){return this._tokenization.isCheapToTokenize(e)}},{key:"tokenizeIfCheap",value:function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}},{key:"getLineTokens",value:function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}},{key:"_getLineTokens",value:function(e){var t=this.getLineContent(e),n=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,n)}},{key:"getLanguageIdentifier",value:function(){return this._languageIdentifier}},{key:"getModeId",value:function(){return this._languageIdentifier.language}},{key:"setMode",value:function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}}},{key:"getLanguageIdAtPosition",value:function(e,t){var n=this.validatePosition(new v.a(e,t)),r=this.getLineTokens(n.lineNumber);return r.getLanguageId(r.findTokenIndexAtOffset(n.column-1))}},{key:"getWordAtPosition",value:function(e){this._assertNotDisposed();var t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),o=this._getLineTokens(t.lineNumber),a=o.findTokenIndexAtOffset(t.column-1),s=n._findLanguageBoundaries(o,a),l=Object(r.a)(s,2),c=l[0],u=l[1],d=Object(Ue.d)(t.column,He.a.getWordDefinition(o.getLanguageId(a)),i.substring(c,u),c);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn)return d;if(a>0&&c===t.column-1){var h=n._findLanguageBoundaries(o,a-1),f=Object(r.a)(h,2),p=f[0],g=f[1],m=Object(Ue.d)(t.column,He.a.getWordDefinition(o.getLanguageId(a-1)),i.substring(p,g),p);if(m&&m.startColumn<=e.column&&e.column<=m.endColumn)return m}return null}},{key:"getWordUntilPosition",value:function(e){var t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}},{key:"findMatchingBracketUp",value:function(e,t){var n=e.toLowerCase(),r=this.validatePosition(t),i=this._getLineTokens(r.lineNumber),o=i.getLanguageId(i.findTokenIndexAtOffset(r.column-1)),a=He.a.getBracketsSupport(o);if(!a)return null;var s=a.textIsBracket[n];return s?Ze(this._findMatchingBracketUp(s,r,null)):null}},{key:"matchBracket",value:function(e){return this._matchBracket(this.validatePosition(e))}},{key:"_matchBracket",value:function(e){var t=e.lineNumber,n=this._getLineTokens(t),r=n.getCount(),i=this._buffer.getLineContent(t),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;var a=He.a.getBracketsSupport(n.getLanguageId(o));if(a&&!Object(ze.b)(n.getStandardTokenType(o))){for(var s=Math.max(0,e.column-1-a.maxBracketLength),l=o-1;l>=0;l--){var c=n.getEndOffset(l);if(c<=s)break;Object(ze.b)(n.getStandardTokenType(l))&&(s=c)}for(var u=Math.min(i.length,e.column-1+a.maxBracketLength),d=null;;){var h=Ve.a.findNextBracketInRange(a.forwardRegex,t,i,s,u);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){var f=i.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),p=this._matchFoundBracket(h,a.textIsBracket[f],a.textIsOpenBracket[f],null);if(p){if(p instanceof Qe)return null;d=p}}s=h.endColumn-1}if(d)return d}if(o>0&&n.getStartOffset(o)===e.column-1){var g=o-1,m=He.a.getBracketsSupport(n.getLanguageId(g));if(m&&!Object(ze.b)(n.getStandardTokenType(g))){for(var v=Math.max(0,e.column-1-m.maxBracketLength),_=Math.min(i.length,e.column-1+m.maxBracketLength),b=g+1;b =_)break;Object(ze.b)(n.getStandardTokenType(b))&&(_=y)}var S=Ve.a.findPrevBracketInRange(m.reversedRegex,t,i,v,_);if(S&&S.startColumn<=e.column&&e.column<=S.endColumn){var C=i.substring(S.startColumn-1,S.endColumn-1).toLowerCase(),k=this._matchFoundBracket(S,m.textIsBracket[C],m.textIsOpenBracket[C],null);if(k)return k instanceof Qe?null:k}}}return null}},{key:"_matchFoundBracket",value:function(e,t,n,r){if(!t)return null;var i=n?this._findMatchingBracketDown(t,e.getEndPosition(),r):this._findMatchingBracketUp(t,e.getStartPosition(),r);return i?i instanceof Qe?i:[e,i]:null}},{key:"_findMatchingBracketUp",value:function(e,t,n){for(var r=e.languageIdentifier.id,i=e.reversedRegex,o=-1,a=0,s=function(t,r,s,l){for(;;){if(n&&++a%100===0&&!n())return Qe.INSTANCE;var c=Ve.a.findPrevBracketInRange(i,t,r,s,l);if(!c)break;var u=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return c;l=c.startColumn-1}return null},l=t.lineNumber;l>=1;l--){var c=this._getLineTokens(l),u=c.getCount(),d=this._buffer.getLineContent(l),h=u-1,f=d.length,p=d.length;l===t.lineNumber&&(h=c.findTokenIndexAtOffset(t.column-1),f=t.column-1,p=t.column-1);for(var g=!0;h>=0;h--){var m=c.getLanguageId(h)===r&&!Object(ze.b)(c.getStandardTokenType(h));if(m)g?f=c.getStartOffset(h):(f=c.getStartOffset(h),p=c.getEndOffset(h));else if(g&&f!==p){var v=s(l,d,f,p);if(v)return v}g=m}if(g&&f!==p){var _=s(l,d,f,p);if(_)return _}}return null}},{key:"_findMatchingBracketDown",value:function(e,t,n){for(var r=e.languageIdentifier.id,i=e.forwardRegex,o=1,a=0,s=function(t,r,s,l){for(;;){if(n&&++a%100===0&&!n())return Qe.INSTANCE;var c=Ve.a.findNextBracketInRange(i,t,r,s,l);if(!c)break;var u=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?o++:e.isClose(u)&&o--,0===o)return c;s=c.endColumn-1}return null},l=this.getLineCount(),c=t.lineNumber;c<=l;c++){var u=this._getLineTokens(c),d=u.getCount(),h=this._buffer.getLineContent(c),f=0,p=0,g=0;c===t.lineNumber&&(f=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,g=t.column-1);for(var m=!0;f =1;i--){var o=this._getLineTokens(i),a=o.getCount(),s=this._buffer.getLineContent(i),l=a-1,c=s.length,u=s.length;if(i===t.lineNumber){l=o.findTokenIndexAtOffset(t.column-1),c=t.column-1,u=t.column-1;var d=o.getLanguageId(l);n!==d&&(n=d,r=He.a.getBracketsSupport(n))}for(var h=!0;l>=0;l--){var f=o.getLanguageId(l);if(n!==f){if(r&&h&&c!==u){var p=Ve.a.findPrevBracketInRange(r.reversedRegex,i,s,c,u);if(p)return this._toFoundBracket(r,p);h=!1}n=f,r=He.a.getBracketsSupport(n)}var g=!!r&&!Object(ze.b)(o.getStandardTokenType(l));if(g)h?c=o.getStartOffset(l):(c=o.getStartOffset(l),u=o.getEndOffset(l));else if(r&&h&&c!==u){var m=Ve.a.findPrevBracketInRange(r.reversedRegex,i,s,c,u);if(m)return this._toFoundBracket(r,m)}h=g}if(r&&h&&c!==u){var v=Ve.a.findPrevBracketInRange(r.reversedRegex,i,s,c,u);if(v)return this._toFoundBracket(r,v)}}return null}},{key:"findNextBracket",value:function(e){for(var t=this.validatePosition(e),n=this.getLineCount(),r=-1,i=null,o=t.lineNumber;o<=n;o++){var a=this._getLineTokens(o),s=a.getCount(),l=this._buffer.getLineContent(o),c=0,u=0,d=0;if(o===t.lineNumber){c=a.findTokenIndexAtOffset(t.column-1),u=t.column-1,d=t.column-1;var h=a.getLanguageId(c);r!==h&&(r=h,i=He.a.getBracketsSupport(r))}for(var f=!0;c i)throw new Error("Illegal value for lineNumber");for(var o=He.a.getFoldingRules(this._languageIdentifier.id),a=Boolean(o&&o.offSide),s=-2,l=-1,c=-2,u=-1,d=function(e){if(-1!==s&&(-2===s||s>e-1)){s=-1,l=-1;for(var t=e-2;t>=0;t--){var n=r._computeIndentLevel(t);if(n>=0){s=t,l=n;break}}}if(-2===c){c=-1,u=-1;for(var o=e;o=0){c=o,u=a;break}}}},h=-2,f=-1,p=-2,g=-1,m=function(e){if(-2===h){h=-1,f=-1;for(var t=e-2;t>=0;t--){var n=r._computeIndentLevel(t);if(n>=0){h=t,f=n;break}}}if(-1!==p&&(-2===p||p=0){p=o,g=a;break}}}},v=0,_=!0,b=0,y=!0,S=0,C=0,k=0;_||y;k++){var E=e-k,w=e+k;k>1&&(E<1||E 1&&(w>i||w>n)&&(y=!1),k>5e4&&(_=!1,y=!1);var O=-1;if(_){var T=this._computeIndentLevel(E-1);T>=0?(c=E-1,u=T,O=Math.ceil(T/this._options.indentSize)):(d(E),O=this._getIndentLevelForWhitespaceLine(a,l,u))}var x=-1;if(y){var N=this._computeIndentLevel(w-1);N>=0?(h=w-1,f=N,x=Math.ceil(N/this._options.indentSize)):(m(w),x=this._getIndentLevelForWhitespaceLine(a,f,g))}if(0!==k){if(1===k){if(w<=i&&x>=0&&C+1===x){_=!1,v=w,b=w,S=x;continue}if(E>=1&&O>=0&&O-1===C){y=!1,v=E,b=E,S=O;continue}if(v=e,b=e,0===(S=C))return{startLineNumber:v,endLineNumber:b,indent:S}}_&&(O>=S?v=E:_=!1),y&&(x>=S?b=w:y=!1)}else C=O}return{startLineNumber:v,endLineNumber:b,indent:S}}},{key:"getLinesIndentGuides",value:function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var r=He.a.getFoldingRules(this._languageIdentifier.id),i=Boolean(r&&r.offSide),o=new Array(t-e+1),a=-2,s=-1,l=-2,c=-1,u=e;u<=t;u++){var d=u-e,h=this._computeIndentLevel(u-1);if(h>=0)a=u-1,s=h,o[d]=Math.ceil(h/this._options.indentSize);else{if(-2===a){a=-1,s=-1;for(var f=u-2;f>=0;f--){var p=this._computeIndentLevel(f);if(p>=0){a=f,s=p;break}}}if(-1!==l&&(-2===l||l =0){l=g,c=m;break}}}o[d]=this._getIndentLevelForWhitespaceLine(i,s,c)}}return o}},{key:"_getIndentLevelForWhitespaceLine",value:function(e,t,n){return-1===t||-1===n?0:t =0&&e.getLanguageId(i)===n;i--)r=e.getStartOffset(i);for(var o=e.getLineContent().length,a=t,s=e.getCount();a 0&&void 0!==arguments[0]?arguments[0]:null;if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;var t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}},{key:"fire",value:function(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}]),n}(f.a)},function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"n",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"l",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return v})),n.d(t,"m",(function(){return _})),n.d(t,"i",(function(){return b})),n.d(t,"g",(function(){return y})),n.d(t,"k",(function(){return S}));var r=n(0),i=n(1),o=n(12),a=function(){function e(){Object(r.a)(this,e),this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new o.a,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}return Object(i.a)(e,[{key:"getZoomLevel",value:function(){return this._zoomLevel}},{key:"getTimeSinceLastZoomLevelChanged",value:function(){return Date.now()-this._lastZoomLevelChangeTime}},{key:"getZoomFactor",value:function(){return this._zoomFactor}},{key:"getPixelRatio",value:function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}]),e}();function s(){return a.INSTANCE.getZoomLevel()}function l(){return a.INSTANCE.getTimeSinceLastZoomLevelChanged()}function c(e){return a.INSTANCE.onDidChangeZoomLevel(e)}function u(){return a.INSTANCE.getZoomFactor()}function d(){return a.INSTANCE.getPixelRatio()}a.INSTANCE=new a;var h=navigator.userAgent,f=h.indexOf("Edge/")>=0,p=h.indexOf("Firefox")>=0,g=h.indexOf("AppleWebKit")>=0,m=h.indexOf("Chrome")>=0,v=!m&&h.indexOf("Safari")>=0,_=!m&&!v&&g,b=h.indexOf("iPad")>=0||v&&navigator.maxTouchPoints>0,y=f&&h.indexOf("WebView/")>=0,S=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(1),o=n(3),a=function(){function e(t){Object(r.a)(this,e),this.domNode=t,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}return Object(i.a)(e,[{key:"setMaxWidth",value:function(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}},{key:"setWidth",value:function(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}},{key:"setHeight",value:function(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}},{key:"setTop",value:function(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}},{key:"unsetTop",value:function(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}},{key:"setLeft",value:function(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}},{key:"setBottom",value:function(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}},{key:"setRight",value:function(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}},{key:"setFontFamily",value:function(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}},{key:"setFontWeight",value:function(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}},{key:"setFontSize",value:function(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}},{key:"setFontFeatureSettings",value:function(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}},{key:"setLineHeight",value:function(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}},{key:"setLetterSpacing",value:function(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}},{key:"setClassName",value:function(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}},{key:"toggleClassName",value:function(e,t){o.toggleClass(this.domNode,e,t),this._className=this.domNode.className}},{key:"setDisplay",value:function(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}},{key:"setPosition",value:function(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}},{key:"setVisibility",value:function(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}},{key:"setBackgroundColor",value:function(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}},{key:"setLayerHinting",value:function(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}},{key:"setBoxShadow",value:function(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}},{key:"setContain",value:function(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}},{key:"setAttribute",value:function(e,t){this.domNode.setAttribute(e,t)}},{key:"removeAttribute",value:function(e){this.domNode.removeAttribute(e)}},{key:"appendChild",value:function(e){this.domNode.appendChild(e.domNode)}},{key:"removeChild",value:function(e){this.domNode.removeChild(e.domNode)}}]),e}();function s(e){return new a(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(22),i=n(0),o=n(1),a=n(12),s=n(7),l=n(15),c=n(154),u=n(82),d=n(120),h=function(){function e(t){if(Object(i.a)(this,e),t.autoClosingPairs?this._autoClosingPairs=t.autoClosingPairs.map((function(e){return new u.b(e)})):t.brackets?this._autoClosingPairs=t.brackets.map((function(e){return new u.b({open:e[0],close:e[1]})})):this._autoClosingPairs=[],t.__electricCharacterSupport&&t.__electricCharacterSupport.docComment){var n=t.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new u.b({open:n.open,close:n.close||""}))}this._autoCloseBefore="string"===typeof t.autoCloseBefore?t.autoCloseBefore:e.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=t.surroundingPairs||this._autoClosingPairs}return Object(o.a)(e,[{key:"getAutoClosingPairs",value:function(){return this._autoClosingPairs}},{key:"getAutoCloseBeforeSet",value:function(){return this._autoCloseBefore}},{key:"getSurroundingPairs",value:function(){return this._surroundingPairs}}],[{key:"shouldAutoClosePair",value:function(e,t,n){if(0===t.getTokenCount())return!0;var r=t.findTokenIndexAtOffset(n-2),i=t.getStandardTokenType(r);return e.isOK(i)}}]),e}();h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var f=n(6),p=n(125),g=function(){function e(t){Object(i.a)(this,e),this._richEditBrackets=t}return Object(o.a)(e,[{key:"getElectricCharacters",value:function(){var e=[];if(this._richEditBrackets){var t,n=Object(f.a)(this._richEditBrackets.brackets);try{for(n.s();!(t=n.n()).done;){var r,i=t.value,o=Object(f.a)(i.close);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=a.charAt(a.length-1);e.push(s)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){n.e(l)}finally{n.f()}}return e=e.filter((function(e,t,n){return n.indexOf(e)===t}))}},{key:"onElectricCharacter",value:function(e,t,n){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;var r=t.findTokenIndexAtOffset(n-1);if(Object(d.b)(t.getStandardTokenType(r)))return null;var i=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,n-1)+e,a=p.a.findPrevBracketInRange(i,1,o,0,o.length);if(!a)return null;var s=o.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[s])return null;var l=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:s}:null}}]),e}(),m=function(){function e(t){Object(i.a)(this,e),this._indentationRules=t}return Object(o.a)(e,[{key:"shouldIncrease",value:function(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(e))}},{key:"shouldDecrease",value:function(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(e))}},{key:"shouldIndentNextLine",value:function(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e))}},{key:"shouldIgnore",value:function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))}},{key:"getIndentMetadata",value:function(e){var t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}]),e}(),v=n(25),_=function(){function e(t){var n=this;Object(i.a)(this,e),(t=t||{}).brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],t.brackets.forEach((function(t){var r=e._createOpenBracketRegExp(t[0]),i=e._createCloseBracketRegExp(t[1]);r&&i&&n._brackets.push({open:t[0],openRegExp:r,close:t[1],closeRegExp:i})})),this._regExpRules=t.onEnterRules||[]}return Object(o.a)(e,[{key:"onEnter",value:function(e,t,n,r){if(e>=3)for(var i=0,o=this._regExpRules.length;i=2&&n.length>0&&r.length>0)for(var s=0,l=this._brackets.length;s =2&&n.length>0)for(var d=0,h=this._brackets.length;d 1){var i,o=-1;for(i=t-1;i>=1;i--){if(e.getLanguageIdAtPosition(i,0)!==r)return o;var a=e.getLineContent(i);if(!n.shouldIgnore(a)&&!/^\s+$/.test(a)&&""!==a)return i;o=i}}return-1}},{key:"getInheritIndentForLine",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(e<4)return null;var i=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!i)return null;if(n<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(t,n,i);if(o<0)return null;if(o<1)return{indentation:"",action:null};var a=t.getLineContent(o);if(i.shouldIncrease(a)||i.shouldIndentNextLine(a))return{indentation:l.z(a),action:u.a.Indent,line:o};if(i.shouldDecrease(a))return{indentation:l.z(a),action:null,line:o};if(1===o)return{indentation:l.z(t.getLineContent(o)),action:null,line:o};var s=o-1,c=i.getIndentMetadata(t.getLineContent(s));if(!(3&c)&&4&c){for(var d=0,h=s-1;h>0;h--)if(!i.shouldIndentNextLine(t.getLineContent(h))){d=h;break}return{indentation:l.z(t.getLineContent(d+1)),action:null,line:d+1}}if(r)return{indentation:l.z(t.getLineContent(o)),action:null,line:o};for(var f=o;f>0;f--){var p=t.getLineContent(f);if(i.shouldIncrease(p))return{indentation:l.z(p),action:u.a.Indent,line:f};if(i.shouldIndentNextLine(p)){for(var g=0,m=f-1;m>0;m--)if(!i.shouldIndentNextLine(t.getLineContent(f))){g=m;break}return{indentation:l.z(t.getLineContent(g+1)),action:null,line:g+1}}if(i.shouldDecrease(p))return{indentation:l.z(p),action:null,line:f}}return{indentation:l.z(t.getLineContent(1)),action:null,line:1}}},{key:"getGoodIndentForLine",value:function(e,t,n,r,i){if(e<4)return null;var o=this._getRichEditSupport(n);if(!o)return null;var a=this.getIndentRulesSupport(n);if(!a)return null;var s=this.getInheritIndentForLine(e,t,r),c=t.getLineContent(r);if(s){var d=s.line;if(void 0!==d){var h=o.onEnter(e,"",t.getLineContent(d),"");if(h){var f=l.z(t.getLineContent(d));return h.removeText&&(f=f.substring(0,f.length-h.removeText)),h.indentAction===u.a.Indent||h.indentAction===u.a.IndentOutdent?f=i.shiftIndent(f):h.indentAction===u.a.Outdent&&(f=i.unshiftIndent(f)),a.shouldDecrease(c)&&(f=i.unshiftIndent(f)),h.appendText&&(f+=h.appendText),l.z(f)}}return a.shouldDecrease(c)?s.action===u.a.Indent?s.indentation:i.unshiftIndent(s.indentation):s.action===u.a.Indent?i.shiftIndent(s.indentation):s.indentation}return null}},{key:"getIndentForEnter",value:function(e,t,n,r){if(e<4)return null;t.forceTokenization(n.startLineNumber);var i,o,a=t.getLineTokens(n.startLineNumber),s=Object(d.a)(a,n.startColumn-1),c=s.getLineContent(),h=!1;(s.firstCharOffset>0&&a.getLanguageId(0)!==s.languageId?(h=!0,i=c.substr(0,n.startColumn-1-s.firstCharOffset)):i=a.getLineContent().substring(0,n.startColumn-1),n.isEmpty())?o=c.substr(n.startColumn-1-s.firstCharOffset):o=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-s.firstCharOffset);var f=this.getIndentRulesSupport(s.languageId);if(!f)return null;var p=i,g=l.z(i),m={getLineTokens:function(e){return t.getLineTokens(e)},getLanguageIdentifier:function(){return t.getLanguageIdentifier()},getLanguageIdAtPosition:function(e,n){return t.getLanguageIdAtPosition(e,n)},getLineContent:function(e){return e===n.startLineNumber?p:t.getLineContent(e)}},v=l.z(a.getLineContent()),_=this.getInheritIndentForLine(e,m,n.startLineNumber+1);if(!_){var b=h?v:g;return{beforeEnter:b,afterEnter:b}}var y=h?v:_.indentation;return _.action===u.a.Indent&&(y=r.shiftIndent(y)),f.shouldDecrease(o)&&(y=r.unshiftIndent(y)),{beforeEnter:h?v:g,afterEnter:y}}},{key:"getIndentActionForType",value:function(e,t,n,r,i){if(e<4)return null;var o=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),a=this.getIndentRulesSupport(o.languageId);if(!a)return null;var s,l=o.getLineContent(),c=l.substr(0,n.startColumn-1-o.firstCharOffset);n.isEmpty()?s=l.substr(n.startColumn-1-o.firstCharOffset):s=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-o.firstCharOffset);if(!a.shouldDecrease(c+s)&&a.shouldDecrease(c+r+s)){var d=this.getInheritIndentForLine(e,t,n.startLineNumber,!1);if(!d)return null;var h=d.indentation;return d.action!==u.a.Indent&&(h=i.unshiftIndent(h)),h}return null}},{key:"getIndentMetadata",value:function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):null}},{key:"getEnterAction",value:function(e,t,n){var r=this.getScopedLineTokens(t,n.startLineNumber,n.startColumn),i=this._getRichEditSupport(r.languageId);if(!i)return null;var o,a=r.getLineContent(),s=a.substr(0,n.startColumn-1-r.firstCharOffset);n.isEmpty()?o=a.substr(n.startColumn-1-r.firstCharOffset):o=this.getScopedLineTokens(t,n.endLineNumber,n.endColumn).getLineContent().substr(n.endColumn-1-r.firstCharOffset);var l="";if(n.startLineNumber>1&&0===r.firstCharOffset){var c=this.getScopedLineTokens(t,n.startLineNumber-1);c.languageId===r.languageId&&(l=c.getLineContent())}var d=i.onEnter(e,l,s,o);if(!d)return null;var h=d.indentAction,f=d.appendText,p=d.removeText||0;f||(f=h===u.a.Indent||h===u.a.IndentOutdent?"\t":"");var g=this.getIndentationAtPosition(t,n.startLineNumber,n.startColumn);return p&&(g=g.substring(0,g.length-p)),{indentAction:h,appendText:f,removeText:p,indentation:g}}},{key:"getIndentationAtPosition",value:function(e,t,n){var r=e.getLineContent(t),i=l.z(r);return i.length>n-1&&(i=i.substring(0,n-1)),i}},{key:"getScopedLineTokens",value:function(e,t,n){e.forceTokenization(t);var r=e.getLineTokens(t),i="undefined"===typeof n?e.getLineMaxColumn(t)-1:n-1;return Object(d.a)(r,i)}},{key:"getBracketsSupport",value:function(e){var t=this._getRichEditSupport(e);return t&&t.brackets||null}}]),e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("codeEditorService")},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n 0;){var n=t.shift();for(var r in Object.freeze(n),n)if(s.call(n,r)){var i=n[r];"object"!==typeof i||Object.isFrozen(i)||t.push(i)}}return e}var s=Object.prototype.hasOwnProperty;function l(e,t){return c(e,t,new Set)}function c(e,t,n){if(Object(i.l)(e))return e;var o=t(e);if("undefined"!==typeof o)return o;if(Object(i.e)(e)){var a,l=[],u=Object(r.a)(e);try{for(u.s();!(a=u.n()).done;){var d=a.value;l.push(c(d,t,n))}}catch(p){u.e(p)}finally{u.f()}return l}if(Object(i.i)(e)){if(n.has(e))throw new Error("Cannot clone recursive data-structure");n.add(e);var h={};for(var f in e)s.call(e,f)&&(h[f]=c(e[f],t,n));return n.delete(e),h}return e}function u(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return Object(i.i)(e)?(Object(i.i)(t)&&Object.keys(t).forEach((function(r){r in e?n&&(Object(i.i)(e[r])&&Object(i.i)(t[r])?u(e[r],t[r],n):e[r]=t[r]):e[r]=t[r]})),e):t}function d(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r 1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY,r=[];if(0===n)return[r,t];for(var o=t[Symbol.iterator](),a=0;a >>0)>>>0}function h(e,t){if(0===e)return null;var n=(65535&e)>>>0,r=(4294901760&e)>>>16;return new g(0!==r?[f(n,t),f(r,t)]:[f(n,t)])}function f(e,t){var n=!!(2048&e),r=!!(256&e);return new p(2===t?r:n,!!(1024&e),!!(512&e),2===t?n:r,255&e)}!function(){function e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;l.define(e,t),c.define(e,n),u.define(e,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return l.keyCodeToStr(e)},e.fromString=function(e){return l.strToKeyCode(e)},e.toUserSettingsUS=function(e){return c.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return u.keyCodeToStr(e)},e.fromUserSettings=function(e){return c.strToKeyCode(e)||u.strToKeyCode(e)}}(r||(r={}));var p=function(){function e(t,n,r,o,a){Object(i.a)(this,e),this.ctrlKey=t,this.shiftKey=n,this.altKey=r,this.metaKey=o,this.keyCode=a}return Object(o.a)(e,[{key:"equals",value:function(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}},{key:"isModifierKey",value:function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}},{key:"toChord",value:function(){return new g([this])}},{key:"isDuplicateModifierCase",value:function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}]),e}(),g=function e(t){if(Object(i.a)(this,e),0===t.length)throw Object(a.b)("parts");this.parts=t},m=function e(t,n,r,o,a,s){Object(i.a)(this,e),this.ctrlKey=t,this.shiftKey=n,this.altKey=r,this.metaKey=o,this.keyLabel=a,this.keyAriaLabel=s},v=function e(){Object(i.a)(this,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s}));var r=n(0),i=n(76),o=n(29),a=(i.a,Object(o.c)("notificationService")),s=function e(){Object(r.a)(this,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(29),i=Object(r.c)("keybindingService")},function(e,t,n){"use strict";n.d(t,"i",(function(){return h})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return g})),n.d(t,"c",(function(){return m})),n.d(t,"b",(function(){return v})),n.d(t,"d",(function(){return _})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return y})),n.d(t,"j",(function(){return S})),n.d(t,"k",(function(){return C})),n.d(t,"a",(function(){return f}));var r=n(22),i=n(0),o=n(1),a=n(232),s=n(64),l=n(39),c=n(15),u=n(53),d=n(21);function h(e){return Object(l.b)(e,!0)}var f,p=new(function(){function e(t){Object(i.a)(this,e),this._ignorePathCasing=t}return Object(o.a)(e,[{key:"compare",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e===t?0:Object(c.f)(this.getComparisonKey(e,n),this.getComparisonKey(t,n))}},{key:"isEqual",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e===t||!(!e||!t)&&this.getComparisonKey(e,n)===this.getComparisonKey(t,n)}},{key:"getComparisonKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}},{key:"joinPath",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r =65&&e<=90||e>=97&&e<=122}function v(e,t,n,r){for(var i="",o=0,a=-1,s=0,u=0,d=0;d<=e.length;++d){if(d 2){var h=i.lastIndexOf(n);-1===h?(i="",o=0):o=(i=i.slice(0,h)).length-1-i.lastIndexOf(n),a=d,s=0;continue}if(0!==i.length){i="",o=0,a=d,s=0;continue}}t&&(i+=i.length>0?"".concat(n,".."):"..",o=2)}else i.length>0?i+="".concat(n).concat(e.slice(a+1,d)):i=e.slice(a+1,d),o=d-a-1;a=d,s=0}else u===l&&-1!==s?++s:s=-1}return i}function _(e,t){if(null===t||"object"!==typeof t)throw new h("pathObject","Object",t);var n=t.dir||t.root,r=t.base||"".concat(t.name||"").concat(t.ext||"");return n?n===t.root?"".concat(n).concat(r):"".concat(n).concat(e).concat(r):r}var b={resolve:function(){for(var e="",t="",n=!1,r=arguments.length-1;r>=-1;r--){var i=void 0;if(r>=0){if(f(i=r<0||arguments.length<=r?void 0:arguments[r],"path"),0===i.length)continue}else 0===e.length?i=s.a():(void 0===(i=s.b["=".concat(e)]||s.a())||i.slice(0,2).toLowerCase()!==e.toLowerCase()&&i.charCodeAt(2)===u)&&(i="".concat(e,"\\"));var o=i.length,a=0,l="",c=!1,h=i.charCodeAt(0);if(1===o)p(h)&&(a=1,c=!0);else if(p(h))if(c=!0,p(i.charCodeAt(1))){for(var g=2,_=g;g 2&&p(i.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(n){if(e.length>0)break}else if(t="".concat(i.slice(a),"\\").concat(t),n=c,c&&e.length>0)break}return t=v(t,!n,"\\",p),n?"".concat(e,"\\").concat(t):"".concat(e).concat(t)||"."},normalize:function(e){f(e,"path");var t=e.length;if(0===t)return".";var n,r=0,i=!1,o=e.charCodeAt(0);if(1===t)return g(o)?"\\":e;if(p(o))if(i=!0,p(e.charCodeAt(1))){for(var a=2,s=a;a 2&&p(e.charCodeAt(2))&&(i=!0,r=3));var c=r 0&&p(e.charCodeAt(t-1))&&(c+="\\"),void 0===n?i?"\\".concat(c):c:i?"".concat(n,"\\").concat(c):"".concat(n).concat(c)},isAbsolute:function(e){f(e,"path");var t=e.length;if(0===t)return!1;var n=e.charCodeAt(0);return p(n)||t>2&&m(n)&&e.charCodeAt(1)===d&&p(e.charCodeAt(2))},join:function(){if(0===arguments.length)return".";for(var e,t,n=0;n 0&&(void 0===e?e=t=r:e+="\\".concat(r))}if(void 0===e)return".";var i=!0,o=0;if("string"===typeof t&&p(t.charCodeAt(0))){++o;var a=t.length;a>1&&p(t.charCodeAt(1))&&(++o,a>2&&(p(t.charCodeAt(2))?++o:i=!1))}if(i){for(;o =2&&(e="\\".concat(e.slice(o)))}return b.normalize(e)},relative:function(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";var n=b.resolve(e),r=b.resolve(t);if(n===r)return"";if((e=n.toLowerCase())===(t=r.toLowerCase()))return"";for(var i=0;i i&&e.charCodeAt(o-1)===u;)o--;for(var a=o-i,s=0;s s&&t.charCodeAt(l-1)===u;)l--;for(var c=l-s,d=a d){if(t.charCodeAt(s+p)===u)return r.slice(s+p+1);if(2===p)return r.slice(s+p)}a>d&&(e.charCodeAt(i+p)===u?h=p:2===p&&(h=3)),-1===h&&(h=0)}var m="";for(p=i+h+1;p<=o;++p)p!==o&&e.charCodeAt(p)!==u||(m+=0===m.length?"..":"\\..");return s+=h,m.length>0?"".concat(m).concat(r.slice(s,l)):(r.charCodeAt(s)===u&&++s,r.slice(s,l))},toNamespacedPath:function(e){if("string"!==typeof e)return e;if(0===e.length)return"";var t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===u){if(t.charCodeAt(1)===u){var n=t.charCodeAt(2);if(63!==n&&n!==l)return"\\\\?\\UNC\\".concat(t.slice(2))}}else if(m(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===u)return"\\\\?\\".concat(t);return e},dirname:function(e){f(e,"path");var t=e.length;if(0===t)return".";var n=-1,r=0,i=e.charCodeAt(0);if(1===t)return p(i)?e:".";if(p(i)){if(n=r=1,p(e.charCodeAt(1))){for(var o=2,a=o;o 2&&p(e.charCodeAt(2))?3:2);for(var s=-1,l=!0,c=t-1;c>=r;--c)if(p(e.charCodeAt(c))){if(!l){s=c;break}}else l=!1;if(-1===s){if(-1===n)return".";s=n}return e.slice(0,s)},basename:function(e,t){void 0!==t&&f(t,"ext"),f(e,"path");var n,r=0,i=-1,o=!0;if(e.length>=2&&m(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(r=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=r;--n){var l=e.charCodeAt(n);if(p(l)){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=r;--n)if(p(e.charCodeAt(n))){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){f(e,"path");var t=0,n=-1,r=0,i=-1,o=!0,a=0;e.length>=2&&e.charCodeAt(1)===d&&m(e.charCodeAt(0))&&(t=r=2);for(var s=e.length-1;s>=t;--s){var c=e.charCodeAt(s);if(p(c)){if(!o){r=s+1;break}}else-1===i&&(o=!1,i=s+1),c===l?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1)}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:_.bind(null,"\\"),parse:function(e){f(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n=e.length,r=0,i=e.charCodeAt(0);if(1===n)return p(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(p(i)){if(r=1,p(e.charCodeAt(1))){for(var o=2,a=o;o 0&&(t.root=e.slice(0,r));for(var s=-1,c=r,u=-1,h=!0,g=e.length-1,v=0;g>=r;--g)if(p(i=e.charCodeAt(g))){if(!h){c=g+1;break}}else-1===u&&(h=!1,u=g+1),i===l?-1===s?s=g:1!==v&&(v=1):-1!==s&&(v=-1);return-1!==u&&(-1===s||0===v||1===v&&s===u-1&&s===c+1?t.base=t.name=e.slice(c,u):(t.name=e.slice(c,s),t.base=e.slice(c,u),t.ext=e.slice(s,u))),t.dir=c>0&&c!==r?e.slice(0,c-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},y={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?n<0||arguments.length<=n?void 0:arguments[n]:s.a();f(r,"path"),0!==r.length&&(e="".concat(r,"/").concat(e),t=r.charCodeAt(0)===c)}return e=v(e,!t,"/",g),t?"/".concat(e):e.length>0?e:"."},normalize:function(e){if(f(e,"path"),0===e.length)return".";var t=e.charCodeAt(0)===c,n=e.charCodeAt(e.length-1)===c;return 0===(e=v(e,!t,"/",g)).length?t?"/":n?"./":".":(n&&(e+="/"),t?"/".concat(e):e)},isAbsolute:function(e){return f(e,"path"),e.length>0&&e.charCodeAt(0)===c},join:function(){if(0===arguments.length)return".";for(var e,t=0;t 0&&(void 0===e?e=n:e+="/".concat(n))}return void 0===e?".":y.normalize(e)},relative:function(e,t){if(f(e,"from"),f(t,"to"),e===t)return"";if((e=y.resolve(e))===(t=y.resolve(t)))return"";for(var n=e.length,r=n-1,i=t.length-1,o=ro){if(t.charCodeAt(1+s)===c)return t.slice(1+s+1);if(0===s)return t.slice(1+s)}else r>o&&(e.charCodeAt(1+s)===c?a=s:0===s&&(a=0));var u="";for(s=1+a+1;s<=n;++s)s!==n&&e.charCodeAt(s)!==c||(u+=0===u.length?"..":"/..");return"".concat(u).concat(t.slice(1+a))},toNamespacedPath:function(e){return e},dirname:function(e){if(f(e,"path"),0===e.length)return".";for(var t=e.charCodeAt(0)===c,n=-1,r=!0,i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===c){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"//":e.slice(0,n)},basename:function(e,t){void 0!==t&&f(t,"ext"),f(e,"path");var n,r=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(l===c){if(!o){r=n+1;break}}else-1===s&&(o=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(i=n):(a=-1,i=s))}return r===i?i=s:-1===i&&(i=e.length),e.slice(r,i)}for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===c){if(!o){r=n+1;break}}else-1===i&&(o=!1,i=n+1);return-1===i?"":e.slice(r,i)},extname:function(e){f(e,"path");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(s!==c)-1===r&&(i=!1,r=a+1),s===l?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)},format:_.bind(null,"/"),parse:function(e){f(e,"path");var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0)===c;r?(t.root="/",n=1):n=0;for(var i=-1,o=0,a=-1,s=!0,u=e.length-1,d=0;u>=n;--u){var h=e.charCodeAt(u);if(h!==c)-1===a&&(s=!1,a=u+1),h===l?-1===i?i=u:1!==d&&(d=1):-1!==i&&(d=-1);else if(!s){o=u+1;break}}if(-1!==a){var p=0===o&&r?1:o;-1===i||0===d||1===d&&i===a-1&&i===o+1?t.base=t.name=e.slice(p,a):(t.name=e.slice(p,i),t.base=e.slice(p,a),t.ext=e.slice(i,a))}return o>0?t.dir=e.slice(0,o-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};y.win32=b.win32=b,y.posix=b.posix=y;var S="win32"===s.c?b.normalize:y.normalize,C="win32"===s.c?b.resolve:y.resolve,k="win32"===s.c?b.relative:y.relative,E="win32"===s.c?b.dirname:y.dirname,w="win32"===s.c?b.basename:y.basename,O="win32"===s.c?b.extname:y.extname,T="win32"===s.c?b.sep:y.sep},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=n(33),a=n(215),s=new(function(){function e(){Object(r.a)(this,e),this.data=new Map}return Object(i.a)(e,[{key:"add",value:function(e,t){a.a(o.j(e)),a.a(o.i(t)),a.a(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}},{key:"as",value:function(e){return this.data.get(e)||null}}]),e}())},function(e,t,n){"use strict";n.d(t,"i",(function(){return s})),n.d(t,"j",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"f",(function(){return p})),n.d(t,"h",(function(){return m})),n.d(t,"a",(function(){return v})),n.d(t,"k",(function(){return _})),n.d(t,"b",(function(){return y})),n.d(t,"n",(function(){return S})),n.d(t,"e",(function(){return C})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return E})),n.d(t,"m",(function(){return w})),n.d(t,"l",(function(){return O})),n.d(t,"o",(function(){return x})),n.d(t,"p",(function(){return N})),n.d(t,"s",(function(){return L})),n.d(t,"q",(function(){return A})),n.d(t,"t",(function(){return I})),n.d(t,"r",(function(){return R}));var r=n(2),i=n(23),o=n(11),a=n(30),s=Object(o.gc)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},r.a("lineHighlight","Background color for the highlight of line at the cursor position.")),l=Object(o.gc)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},r.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=Object(o.gc)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},r.a("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),u=Object(o.gc)("editor.rangeHighlightBorder",{dark:null,light:null,hc:o.b},r.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),d=Object(o.gc)("editor.symbolHighlightBackground",{dark:o.x,light:o.x,hc:null},r.a("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),h=Object(o.gc)("editor.symbolHighlightBorder",{dark:null,light:null,hc:o.b},r.a("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),f=Object(o.gc)("editorCursor.foreground",{dark:"#AEAFAD",light:i.a.black,hc:i.a.white},r.a("caret","Color of the editor cursor.")),p=Object(o.gc)("editorCursor.background",null,r.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),g=Object(o.gc)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},r.a("editorWhitespaces","Color of whitespace characters in the editor.")),m=Object(o.gc)("editorIndentGuide.background",{dark:g,light:g,hc:g},r.a("editorIndentGuides","Color of the editor indentation guides.")),v=Object(o.gc)("editorIndentGuide.activeBackground",{dark:g,light:g,hc:g},r.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),_=Object(o.gc)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:i.a.white},r.a("editorLineNumbers","Color of editor line numbers.")),b=Object(o.gc)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:o.b},r.a("editorActiveLineNumber","Color of editor active line number"),!1,r.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=Object(o.gc)("editorLineNumber.activeForeground",{dark:b,light:b,hc:b},r.a("editorActiveLineNumber","Color of editor active line number")),S=Object(o.gc)("editorRuler.foreground",{dark:"#5A5A5A",light:i.a.lightgrey,hc:i.a.white},r.a("editorRuler","Color of the editor rulers.")),C=Object(o.gc)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},r.a("editorCodeLensForeground","Foreground color of editor CodeLens")),k=Object(o.gc)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},r.a("editorBracketMatchBackground","Background color behind matching brackets")),E=Object(o.gc)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:o.h},r.a("editorBracketMatchBorder","Color for matching brackets boxes")),w=Object(o.gc)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},r.a("editorOverviewRulerBorder","Color of the overview ruler border.")),O=Object(o.gc)("editorOverviewRuler.background",null,r.a("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),T=Object(o.gc)("editorGutter.background",{dark:o.s,light:o.s,hc:o.s},r.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),x=Object(o.gc)("editorUnnecessaryCode.border",{dark:null,light:null,hc:i.a.fromHex("#fff").transparent(.8)},r.a("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),N=Object(o.gc)("editorUnnecessaryCode.opacity",{dark:i.a.fromHex("#000a"),light:i.a.fromHex("#0007"),hc:null},r.a("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),D=new i.a(new i.c(0,122,204,.6)),L=Object(o.gc)("editorOverviewRuler.rangeHighlightForeground",{dark:D,light:D,hc:D},r.a("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),A=Object(o.gc)("editorOverviewRuler.errorForeground",{dark:new i.a(new i.c(255,18,18,.7)),light:new i.a(new i.c(255,18,18,.7)),hc:new i.a(new i.c(255,50,50,1))},r.a("overviewRuleError","Overview ruler marker color for errors.")),I=Object(o.gc)("editorOverviewRuler.warningForeground",{dark:o.T,light:o.T,hc:o.S},r.a("overviewRuleWarning","Overview ruler marker color for warnings.")),R=Object(o.gc)("editorOverviewRuler.infoForeground",{dark:o.L,light:o.L,hc:o.K},r.a("overviewRuleInfo","Overview ruler marker color for infos."));Object(a.g)((function(e,t){var n=e.getColor(o.s);n&&t.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ".concat(n,"; }"));var r=e.getColor(o.B);r&&t.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: ".concat(r,"; }"));var i=e.getColor(T);i&&t.addRule(".monaco-editor .margin { background-color: ".concat(i,"; }"));var a=e.getColor(c);a&&t.addRule(".monaco-editor .rangeHighlight { background-color: ".concat(a,"; }"));var s=e.getColor(u);s&&t.addRule(".monaco-editor .rangeHighlight { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(s,"; }"));var l=e.getColor(d);l&&t.addRule(".monaco-editor .symbolHighlight { background-color: ".concat(l,"; }"));var f=e.getColor(h);f&&t.addRule(".monaco-editor .symbolHighlight { border: 1px ".concat("hc"===e.type?"dotted":"solid"," ").concat(f,"; }"));var p=e.getColor(g);p&&(t.addRule(".monaco-editor .mtkw { color: ".concat(p," !important; }")),t.addRule(".monaco-editor .mtkz { color: ".concat(p," !important; }")))}))},function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"f",(function(){return c})),n.d(t,"a",(function(){return u}));var r,i,o=n(0),a=n(1);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(r||(r={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(i||(i={}));var s=function(){function e(t){Object(o.a)(this,e),this.tabSize=Math.max(1,0|t.tabSize),this.indentSize=0|t.tabSize,this.insertSpaces=Boolean(t.insertSpaces),this.defaultEOL=0|t.defaultEOL,this.trimAutoWhitespace=Boolean(t.trimAutoWhitespace)}return Object(a.a)(e,[{key:"equals",value:function(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}},{key:"createChangeEvent",value:function(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}]),e}(),l=function e(t,n){Object(o.a)(this,e),this.range=t,this.matches=n},c=function e(t,n,r,i,a,s){Object(o.a)(this,e),this.identifier=t,this.range=n,this.text=r,this.forceMoveMarkers=i,this.isAutoWhitespaceEdit=a,this._isTracked=s},u=function e(t,n,r){Object(o.a)(this,e),this.reverseEdits=t,this.changes=n,this.trimAutoWhitespaceLineNumbers=r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return E})),n.d(t,"f",(function(){return k})),n.d(t,"g",(function(){return T})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return O})),n.d(t,"j",(function(){return y}));var r=n(31),i=Math.pow(2,16);function o(e){return 65535&e}var a=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=null),this.pos=e,this.deleted=t,this.recover=n},s=function(e,t){void 0===t&&(t=!1),this.ranges=e,this.inverted=t};s.prototype.recover=function(e){var t=0,n=o(e);if(!this.inverted)for(var r=0;r e)break;var u=this.ranges[l+o],d=this.ranges[l+s],h=c+u;if(e<=h){var f=c+r+((u?e==c?-1:e==h?1:t:t)<0?0:d);if(n)return f;var p=e==(t<0?c:h)?null:l/3+(e-c)*i;return new a(f,t<0?e!=c:e!=h,p)}r+=d-u}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=o(t),i=this.inverted?2:1,a=this.inverted?1:2,s=0;s e)break;var c=this.ranges[s+i];if(e<=l+c&&s==3*r)return!0;n+=this.ranges[s+a]-c}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,i=0;r =0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},l.prototype.invert=function(){var e=new l;return e.appendMappingInverted(this),e},l.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;n i&&s 0},u.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(u.prototype,d);var f=Object.create(null),p=function(){};p.prototype.apply=function(e){return h()},p.prototype.getMap=function(){return s.empty},p.prototype.invert=function(e){return h()},p.prototype.map=function(e){return h()},p.prototype.merge=function(e){return null},p.prototype.toJSON=function(){return h()},p.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=f[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},p.jsonID=function(e,t){if(e in f)throw new RangeError("Duplicate use of step JSON ID "+e);return f[e]=t,t.prototype.jsonID=e,t};var g=function(e,t){this.doc=e,this.failed=t};g.ok=function(e){return new g(e,null)},g.fail=function(e){return new g(null,e)},g.fromReplace=function(e,t,n,i){try{return g.ok(e.replace(t,n,i))}catch(o){if(o instanceof r.ReplaceError)return g.fail(o.message);throw o}};var m=function(e){function t(t,n,r,i){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!i}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&_(e,this.from,this.to)?g.fail("Structure replace would overwrite content"):g.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var i=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),i,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(p);p.jsonID("replace",m);var v=function(e){function t(t,n,r,i,o,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(_(e,this.from,this.gapFrom)||_(e,this.gapTo,this.to)))return g.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return g.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?g.fromReplace(e,this.from,this.to,n):g.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return n.deleted&&r.deleted||i r.pos?null:new t(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(p);function _(e,t,n){for(var r=e.resolve(t),i=n-t,o=r.depth;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0)for(var a=r.node(o).maybeChild(r.indexAfter(o));i>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,i--}return!1}function b(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function y(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n o;s--,l--){var c=i.node(s),u=i.index(s);if(c.type.spec.isolating)return!1;var d=c.content.cutByIndex(u,c.childCount),h=r&&r[l]||c;if(h!=c&&(d=d.replaceChild(0,h.type.create(h.attrs))),!c.canReplace(u+1,c.childCount)||!h.type.validContent(d))return!1}var f=i.indexAfter(o),p=r&&r[0];return i.node(o).canReplaceWith(f,f,p?p.type:i.node(o+1).type)}function E(e,t){var n=e.resolve(t),r=n.index();return w(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function w(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function O(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),i=r.depth;;i--){var o=void 0,a=void 0,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&w(o,a)&&r.node(i).canReplace(s,s+1))return t;if(0==i)break;t=n<0?r.before(i):r.after(i)}}function T(e,t,n){var r=e.resolve(t);if(!n.content.size)return t;for(var i=n.content,o=0;o =0;s--){var l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0);if(1==a?r.node(s).canReplace(c,c,i):r.node(s).contentMatchAt(c).findWrapping(i.firstChild.type))return 0==l?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function x(e,t,n){for(var i=[],o=0;o t;h--)f||n.index(h)>0?(f=!0,u=r.Fragment.from(n.node(h).copy(u)),d++):l--;for(var p=r.Fragment.empty,g=0,m=o,_=!1;m>t;m--)_||i.after(m+1) =0;i--)n=r.Fragment.from(t[i].type.create(t[i].attrs,n));var o=e.start,a=e.end;return this.step(new v(o,a,o,a,new r.Slice(n,0,0),t.length,!0))},u.prototype.setBlockType=function(e,t,n,i){var o=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,i)&&function(e,t,n){var r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}(o.doc,o.mapping.slice(a).map(t),n)){o.clearIncompatible(o.mapping.slice(a).map(t,1),n);var s=o.mapping.slice(a),l=s.map(t,1),c=s.map(t+e.nodeSize,1);return o.step(new v(l,c,l+1,c-1,new r.Slice(r.Fragment.from(n.create(i,null,e.marks)),0,0),1,!0)),!1}})),this},u.prototype.setNodeMarkup=function(e,t,n,i){var o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);var a=t.create(n,null,i||o.marks);if(o.isLeaf)return this.replaceWith(e,e+o.nodeSize,a);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new v(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},u.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var i=this.doc.resolve(e),o=r.Fragment.empty,a=r.Fragment.empty,s=i.depth,l=i.depth-t,c=t-1;s>l;s--,c--){o=r.Fragment.from(i.node(s).copy(o));var u=n&&n[c];a=r.Fragment.from(u?u.type.create(u.attrs,a):i.node(s).copy(a))}return this.step(new m(e,e,new r.Slice(o.append(a),t,t),!0))},u.prototype.join=function(e,t){void 0===t&&(t=1);var n=new m(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var N=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),i=e.resolve(this.from),o=i.node(i.sharedDepth(this.to)),a=new r.Slice(x(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),o),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new D(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(p);p.jsonID("addMark",N);var D=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),i=new r.Slice(x(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return g.fromReplace(e,this.from,this.to,i)},t.prototype.invert=function(){return new N(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(p);function L(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}p.jsonID("removeMark",D),u.prototype.addMark=function(e,t,n){var r=this,i=[],o=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,l,c){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&c.type.allowsMarkType(n.type)){for(var d=Math.max(l,e),h=Math.min(l+r.nodeSize,t),f=n.addToSet(u),p=0;p =0;f--)this.step(o[f]);return this},u.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var i=function(e,t,n,i){if(void 0===n&&(n=t),void 0===i&&(i=r.Slice.empty),t==n&&!i.size)return null;var o=e.resolve(t),a=e.resolve(n);return L(o,a,i)?new m(t,n,i):new A(o,a,i).fit()}(this.doc,e,t,n);return i&&this.step(i),this},u.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},u.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},u.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var A=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var i=0;i<=e.depth;i++){var o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},I={depth:{configurable:!0}};function R(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(R(e.firstChild.content,t-1,n)))}function M(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(M(e.lastChild.content,t-1,n)))}function P(e,t){for(var n=0;n 1&&(i=i.replaceChild(0,j(i.firstChild,t-1,1==i.childCount?n-1:0))),t>0&&(i=e.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(e.type.contentMatch.matchFragment(i).fillBefore(r.Fragment.empty,!0)))),e.copy(i)}function F(e,t,n,r,i){var o=e.node(t),a=i?e.indexAfter(t):e.index(t);if(a==o.childCount&&!n.compatibleContent(o.type))return null;var s=r.fillBefore(o.content,!0,a);return s&&!function(e,t,n){for(var r=n;r i){var s=o.contentMatchAt(0),l=s.fillBefore(e).append(e);e=l.append(s.matchFragment(l).fillBefore(r.Fragment.empty,!0))}return e}function U(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var i=e.start(r);if(i t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;i==t.start(r)&&n.push(r)}return n}I.depth.get=function(){return this.frontier.length-1},A.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,o=this.close(t<0?this.$to:i.doc.resolve(t));if(!o)return null;for(var a=this.placed,s=i.depth,l=o.depth;s&&l&&1==a.childCount;)a=a.firstChild.content,s--,l--;var c=new r.Slice(a,s,l);return t>-1?new v(i.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||i.pos!=this.$to.pos?new m(i.pos,o.pos,c):void 0},A.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,i=(t?(n=P(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,o=this.depth;o>=0;o--){var a=this.frontier[o],s=a.type,l=a.match,c=void 0,u=void 0;if(1==e&&(i?l.matchType(i.type)||(u=l.fillBefore(r.Fragment.from(i),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:o,parent:n,inject:u};if(2==e&&i&&(c=l.findWrapping(i.type)))return{sliceDepth:t,frontierDepth:o,parent:n,wrap:c};if(n&&l.matchType(n.type))break}},A.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,i=e.openEnd,o=P(t,n);return!(!o.childCount||o.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(i,o.size+n>=t.size-i?n+1:0)),!0)},A.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,i=e.openEnd,o=P(t,n);if(o.childCount<=1&&n>0){var a=t.size-n<=n+o.size;this.unplaced=new r.Slice(R(t,n-1,1),n-1,a?n-1:i)}else this.unplaced=new r.Slice(R(t,n,1),n,i)},A.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,i=e.parent,o=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s 1||0==u||_.content.size)&&(p=b,h.push(j(_.mark(g.allowedMarks(_.marks)),1==d?u:0,d==c.childCount?v:-1)))}var y=d==c.childCount;y||(v=-1),this.placed=M(this.placed,n,r.Fragment.from(h)),this.frontier[n].match=p,y&&v<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var S=0,C=c;S 1&&r==this.$to.end(--n);)++r;return r},A.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,i=n.type,o=t =0;s--){var l=this.frontier[s],c=l.match,u=F(e,s,l.type,c,!0);if(!u||u.childCount)continue e}return{depth:t,fit:a,move:o?e.doc.resolve(e.after(t+1)):e}}}},A.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=M(this.placed,t.depth,t.fit)),e=t.move;for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),i=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,i)}return e},A.prototype.openFrontierNode=function(e,t,n){var i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=M(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},A.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=M(this.placed,this.frontier.length,e))},Object.defineProperties(A.prototype,I),u.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var i=this.doc.resolve(e),o=this.doc.resolve(t);if(L(i,o,n))return this.step(new m(e,t,n));var a=U(i,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(i.depth+1);a.unshift(s);for(var l=i.depth,c=i.pos-1;l>0;l--,c--){var u=i.node(l).type.spec;if(u.defining||u.isolating)break;a.indexOf(l)>-1?s=l:i.before(l)==c&&a.splice(1,0,-l)}for(var d=a.indexOf(s),h=[],f=n.openStart,p=n.content,g=0;;g++){var v=p.firstChild;if(h.push(v),g==n.openStart)break;p=v.content}f>0&&h[f-1].type.spec.defining&&i.node(d).type!=h[f-1].type?f-=1:f>=2&&h[f-1].isTextblock&&h[f-2].type.spec.defining&&i.node(d).type!=h[f-2].type&&(f-=2);for(var _=n.openStart;_>=0;_--){var b=(_+f+1)%(n.openStart+1),y=h[b];if(y)for(var S=0;S =0&&(this.replace(e,t,n),!(this.steps.length>O));T--){var x=a[T];T<0||(e=i.before(x),t=o.after(x))}return this},u.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var i=function(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var i=r.depth-1;i>=0;i--){var o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s 0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var l=1;l<=n.depth&&l<=r.depth;l++)if(e-n.start(l)==n.depth-l&&t>n.end(l)&&r.end(l)-t!=r.depth-l)return this.delete(n.before(l),t);return this.delete(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return g}));var r=n(14),i=n.n(r),o=n(0),a=n(1),s=n(4),l=n(5),c=n(7),u=n(12),d=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},h=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4?arguments[4]:void 0;return Object(o.a)(this,n),(r=t.call(this))._onDidChange=r._register(new u.a),r.onDidChange=r._onDidChange.event,r._enabled=!0,r._checked=!1,r._id=e,r._label=i,r._cssClass=a,r._enabled=s,r._actionCallback=l,r}return Object(a.a)(n,[{key:"_setLabel",value:function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}},{key:"_setTooltip",value:function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}},{key:"_setClass",value:function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}},{key:"_setEnabled",value:function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}},{key:"_setChecked",value:function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}},{key:"run",value:function(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)}},{key:"id",get:function(){return this._id}},{key:"label",get:function(){return this._label},set:function(e){this._setLabel(e)}},{key:"tooltip",get:function(){return this._tooltip||""},set:function(e){this._setTooltip(e)}},{key:"class",get:function(){return this._cssClass},set:function(e){this._setClass(e)}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._setEnabled(e)}},{key:"checked",get:function(){return this._checked},set:function(e){this._setChecked(e)}}]),n}(c.a),f=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments))._onDidBeforeRun=e._register(new u.a),e.onDidBeforeRun=e._onDidBeforeRun.event,e._onDidRun=e._register(new u.a),e.onDidRun=e._onDidRun.event,e}return Object(a.a)(n,[{key:"run",value:function(e,t){return d(this,void 0,void 0,i.a.mark((function n(){var r;return i.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e.enabled){n.next=2;break}return n.abrupt("return",Promise.resolve(null));case 2:return this._onDidBeforeRun.fire({action:e}),n.prev=3,n.next=6,this.runAction(e,t);case 6:r=n.sent,this._onDidRun.fire({action:e,result:r}),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(3),this._onDidRun.fire({action:e,error:n.t0});case 13:case"end":return n.stop()}}),n,this,[[3,10]])})))}},{key:"runAction",value:function(e,t){var n=t?e.run(t):e.run();return Promise.resolve(n)}}]),n}(c.a),p=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,n.ID,e,e?"separator text":"separator")).checked=!1,r.enabled=!1,r}return n}(h);p.ID="vs.actions.separator";var g=function(e){Object(s.a)(n,e);var t=Object(l.a)(n);function n(e,r,i,a){var s;return Object(o.a)(this,n),(s=t.call(this,e,r,a,!0))._actions=i,s}return Object(a.a)(n,[{key:"actions",get:function(){return Array.isArray(this._actions)?this._actions:this._actions()}}]),n}(h)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return g}));var r,i=n(0),o=n(1),a=n(17),s=n(16),l=n(4),c=n(5),u=n(24),d=n(7),h=n(3),f=n(104),p=function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(r||(r={}));var g=function(e){Object(l.a)(n,e);var t=Object(c.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.call(this)).dispatched=!1,e.activeTouches={},e.handle=null,e.targets=[],e.ignoreTargets=[],e._lastSetTapCountTime=0,e._register(h.addDisposableListener(document,"touchstart",(function(t){return e.onTouchStart(t)}),{passive:!1})),e._register(h.addDisposableListener(document,"touchend",(function(t){return e.onTouchEnd(t)}))),e._register(h.addDisposableListener(document,"touchmove",(function(t){return e.onTouchMove(t)}),{passive:!1})),e}return Object(o.a)(n,[{key:"dispose",value:function(){this.handle&&(this.handle.dispose(),this.handle=null),Object(a.a)(Object(s.a)(n.prototype),"dispose",this).call(this)}},{key:"onTouchStart",value:function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=n.HOLD_DELAY&&Math.abs(c.initialPageX-u.t(c.rollingPageX))<30&&Math.abs(c.initialPageY-u.t(c.rollingPageY))<30){var f=t.newGestureEvent(r.Contextmenu,c.initialTarget);f.pageX=u.t(c.rollingPageX),f.pageY=u.t(c.rollingPageY),t.dispatchEvent(f)}else if(1===o){var p=u.t(c.rollingPageX),g=u.t(c.rollingPageY),m=u.t(c.rollingTimestamps)-c.rollingTimestamps[0],v=p-c.rollingPageX[0],_=g-c.rollingPageY[0],b=t.targets.filter((function(e){return c.initialTarget instanceof Node&&e.contains(c.initialTarget)}));t.inertia(b,i,Math.abs(v)/m,v>0?1:-1,p,Math.abs(_)/m,_>0?1:-1,g)}t.dispatchEvent(t.newGestureEvent(r.End,c.initialTarget)),delete t.activeTouches[l.identifier]},s=0,l=e.changedTouches.length;s n.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=i,e.tapCount=o}else e.type!==r.Change&&e.type!==r.Contextmenu||(this._lastSetTapCountTime=0);for(var a=0;a 0&&(g=!1,f=o*i*h),s>0&&(g=!1,p=l*s*h);var m=u.newGestureEvent(r.Change);m.translationX=f,m.translationY=p,e.forEach((function(e){return e.dispatchEvent(m)})),g||u.inertia(e,d,i,o,a+f,s,l,c+p)}))}},{key:"onTouchMove",value:function(e){for(var t=Date.now(),n=0,i=e.changedTouches.length;n3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(o.pageX),a.rollingPageY.push(o.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}],[{key:"addTarget",value:function(e){return n.isTouchDevice()?(n.INSTANCE||(n.INSTANCE=new n),n.INSTANCE.targets.push(e),{dispose:function(){n.INSTANCE.targets=n.INSTANCE.targets.filter((function(t){return t!==e}))}}):d.a.None}},{key:"ignoreTarget",value:function(e){return n.isTouchDevice()?(n.INSTANCE||(n.INSTANCE=new n),n.INSTANCE.ignoreTargets.push(e),{dispose:function(){n.INSTANCE.ignoreTargets=n.INSTANCE.ignoreTargets.filter((function(t){return t!==e}))}}):d.a.None}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}}]),n}(d.a);g.SCROLL_FRICTION=-.005,g.HOLD_DELAY=700,g.CLEAR_TAP_COUNT_TIME=400,p([f.a],g,"isTouchDevice",null)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u}));var r=n(0),i=n(1),o=n(34),a=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this._range=t,this._text=n,this.insertsAutoWhitespace=i}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}]),e}(),s=function(){function e(t,n){Object(r.a)(this,e),this._range=t,this._text=n}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}}]),e}(),l=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this._range=t,this._text=n,this.insertsAutoWhitespace=i}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}]),e}(),c=function(){function e(t,n,i,o){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Object(r.a)(this,e),this._range=t,this._text=n,this._columnDeltaOffset=o,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=a}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text)}},{key:"computeCursorState",value:function(e,t){var n=t.getInverseEditOperations()[0].range;return new o.a(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}]),e}(),u=function(){function e(t,n,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Object(r.a)(this,e),this._range=t,this._text=n,this._initialSelection=i,this._forceMoveMarkers=o,this._selectionId=null}return Object(i.a)(e,[{key:"getEditOperations",value:function(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}},{key:"computeCursorState",value:function(e,t){return t.getTrackedSelection(this._selectionId)}}]),e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l}));var r,i,o=n(29),a=n(2),s=n(76);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(r||(r={})),function(e){e.compare=function(e,t){return t-e};var t=Object.create(null);t[e.Error]=Object(a.a)("sev.error","Error"),t[e.Warning]=Object(a.a)("sev.warning","Warning"),t[e.Info]=Object(a.a)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case s.a.Error:return e.Error;case s.a.Warning:return e.Warning;case s.a.Info:return e.Info;case s.a.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return s.a.Error;case e.Warning:return s.a.Warning;case e.Info:return s.a.Info;case e.Hint:return s.a.Ignore}}}(r||(r={})),function(e){var t="";function n(e,n){var i=[t];return e.source?i.push(e.source.replace("\xa6","\\\xa6")):i.push(t),e.code?"string"===typeof e.code?i.push(e.code.replace("\xa6","\\\xa6")):i.push(e.code.value.replace("\xa6","\\\xa6")):i.push(t),void 0!==e.severity&&null!==e.severity?i.push(r.toString(e.severity)):i.push(t),e.message&&n?i.push(e.message.replace("\xa6","\\\xa6")):i.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?i.push(e.startLineNumber.toString()):i.push(t),void 0!==e.startColumn&&null!==e.startColumn?i.push(e.startColumn.toString()):i.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?i.push(e.endLineNumber.toString()):i.push(t),void 0!==e.endColumn&&null!==e.endColumn?i.push(e.endColumn.toString()):i.push(t),i.push(t),i.join("\xa6")}e.makeKey=function(e){return n(e,!0)},e.makeKeyOptionalMessage=n}(i||(i={}));var l=Object(o.c)("markerService")},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(29),i=Object(r.c)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return h}));n(450);var r,i,o,a,s,l=n(21),c=n(3);function u(e){(r=document.createElement("div")).className="monaco-aria-container";var t=function(){var e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};i=t(),o=t();var n=function(){var e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};a=n(),s=n(),e.appendChild(r)}function d(e){r&&(i.textContent!==e?(c.clearNode(o),f(i,e)):(c.clearNode(i),f(o,e)))}function h(e){r&&(l.f?d(e):a.textContent!==e?(c.clearNode(s),f(a,e)):(c.clearNode(a),f(s,e)))}function f(e,t){c.clearNode(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n(1),o=n(46),a=n(58),s=n(21),l=new Array(230),c=new Array(112);!function(){for(var e=0;e 1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(Object(r.a)(this,e),this.browserEvent=t||null,this.target=t?t.target||t.targetNode||t.srcElement:null,this.deltaY=i,this.deltaX=n,t){var a=t,l=t;if("undefined"!==typeof a.wheelDeltaY)this.deltaY=a.wheelDeltaY/120;else if("undefined"!==typeof l.VERTICAL_AXIS&&l.axis===l.VERTICAL_AXIS)this.deltaY=-l.detail/3;else if("wheel"===t.type){var c=t;c.deltaMode===c.DOM_DELTA_LINE?o.h&&!s.f?this.deltaY=-t.deltaY/3:this.deltaY=-t.deltaY:this.deltaY=-t.deltaY/40}if("undefined"!==typeof a.wheelDeltaX)o.j&&s.i?this.deltaX=-a.wheelDeltaX/120:this.deltaX=a.wheelDeltaX/120;else if("undefined"!==typeof l.HORIZONTAL_AXIS&&l.axis===l.HORIZONTAL_AXIS)this.deltaX=-t.detail/3;else if("wheel"===t.type){var u=t;u.deltaMode===u.DOM_DELTA_LINE?o.h&&!s.f?this.deltaX=-t.deltaX/3:this.deltaX=-t.deltaX:this.deltaX=-t.deltaX/40}0===this.deltaY&&0===this.deltaX&&t.wheelDelta&&(this.deltaY=t.wheelDelta/120)}}return Object(i.a)(e,[{key:"preventDefault",value:function(){this.browserEvent&&this.browserEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.browserEvent&&this.browserEvent.stopPropagation()}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(1),o=n(8),a=function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,null,[{key:"insert",value:function(e,t){return{range:new o.a(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}},{key:"delete",value:function(e){return{range:e,text:null}}},{key:"replace",value:function(e,t){return{range:e,text:t}}},{key:"replaceMove",value:function(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}]),e}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"h",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"i",(function(){return y})),n.d(t,"g",(function(){return O})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return x})),n.d(t,"a",(function(){return L})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return G}));var r=n(84),i=n(15);function o(){for(var e=arguments.length,t=new Array(e),n=0;n 0?[{start:0,end:t.length}]:[]}.bind(void 0,!0);function s(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return-1===n?null:[{start:n,end:n+e.length}]}function l(e,t,n,r){if(n===e.length)return[];if(r===t.length)return null;if(e[n]===t[r]){var i;return(i=l(e,t,n+1,r+1))?m({start:r,end:r+1},i):null}return l(e,t,n,r+1)}function c(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function d(e){return 48<=e&&e<=57}function h(e){return 32===e||9===e||10===e||13===e}var f=new Set;function p(e){return h(e)||f.has(e)}function g(e){return c(e)||u(e)||d(e)}function m(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function v(e,t){for(var n=t;n 0&&!g(e.charCodeAt(n-1)))return n}return e.length}function _(e,t,n,r){if(n===e.length)return[];if(r===t.length)return null;if(e[n]!==t[r].toLowerCase())return null;var i=null,o=r+1;for(i=_(e,t,n+1,r+1);!i&&(o=v(t,o)) 60)return null;var n=function(e){for(var t=0,n=0,r=0,i=0,o=0,a=0;a .2&&t<.8&&r>.6&&i<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var r=null,i=0;for(e=e.toLowerCase();i 2&&void 0!==arguments[2]&&arguments[2];if(!t||0===t.length)return null;var r=null,i=0;for(e=e.toLowerCase(),t=t.toLowerCase();i 0&&p(e.charCodeAt(n-1)))return n;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((function(e){return f.add(e.charCodeAt(0))}));var k=o(a,b,s),E=o(a,b,(function(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)})),w=new r.a(1e4);function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!==typeof e||"string"!==typeof t)return null;var r=w.get(e);r||(r=new RegExp(i.p(e),"i"),w.set(e,r));var o=r.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:n?E(e,t):k(e,t)}function T(e,t,n,r,i,o){var a=j(e,t,0,r,i,0,!0);if(a)return a;for(var s=0,l=0,c=o,u=0;u =0)l+=1,s+=Math.pow(2,d),c=d+1;else if(0!==s)break}return[l,s,o]}function x(e){if("undefined"===typeof e)return[];for(var t=e[1].toString(2),n=[],r=e[2];r =e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:return!0;default:return!1}}function P(e,t,n){return t[e]!==n[e]}function j(e,t,n,r,i,o,a){var s=e.length>N?N:e.length,l=r.length>N?N:r.length;if(!(n>=s||o>=l||s-n>l-o)&&function(e,t,n,r,i,o){for(;t 1&&(f=!0),I[c][u]=p;var g=A[c-1][u-1]+(p>1?1:p),m=A[c-1][u]+-1,v=A[c][u-1]+-1;v>=m?v>g?(A[c][u]=v,R[c][u]=4):v===g?(A[c][u]=v,R[c][u]=6):(A[c][u]=g,R[c][u]=2):m>g?(A[c][u]=m,R[c][u]=1):m===g?(A[c][u]=m,R[c][u]=3):(A[c][u]=g,R[c][u]=2)}if((f||a)&&(B=0,H=-100,z=o,V=a,W(c-1,u-1,s===l?1:0,0,!1),0!==B))return[H,U,o]}}function F(e,t,n,r,i,o,a){return t[n]!==o[a]?-1:a===n-r?e[n]===i[a]?7:5:!P(a,i,o)||0!==a&&P(a-1,i,o)?!M(o,a)||0!==a&&M(o,a-1)?M(o,a-1)||function(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}(o,a-1)?5:1:5:e[n]===i[a]?7:5}!function(e){e.Default=Object.freeze([-100,0,0]),e.isDefault=function(e){return!e||-100===e[0]&&0===e[1]&&0===e[2]}}(L||(L={}));var B=0,U=0,H=0,z=0,V=!1;function W(e,t,n,r,i){if(!(B>=10||n<-25)){for(var o=0;e>0&&t>0;){var a=I[e][t],s=R[e][t];if(4===s)t-=1,i?n-=5:0!==r&&(n-=1),i=!1,o=0;else{if(!(2&s))return;if(4&s&&W(e,t-1,0!==r?n-1:n,r,i),n+=a,e-=1,t-=1,i=!0,r+=Math.pow(2,t+z),1===a){if(o+=1,0===e&&!V)return}else n+=1+o*(a-1),o=0}}B+=1,(n-=t>=3?9:3*t)>H&&(H=n,U=r)}}function G(e,t,n,r,i,o,a){return function(e,t,n,r,i,o,a,s){var l=j(e,t,n,r,i,o,s);if(l&&!a)return l;if(e.length>=3)for(var c=Math.min(7,e.length-1),u=n+1;u l[0])&&(l=h))}}return l}(e,t,n,r,i,o,!0,a)}function q(e,t){if(!(t+1>=e.length)){var n=e[t],r=e[t+1];if(n!==r)return e.slice(0,t)+r+n+e.slice(t+2)}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"g",(function(){return g}));var r,i=n(0),o=n(1),a=n(15),s="undefined"!==typeof e,l="undefined"!==typeof TextDecoder,c=function(){function e(t){Object(i.a)(this,e),this.buffer=t,this.byteLength=this.buffer.byteLength}return Object(o.a)(e,[{key:"toString",value:function(){return s?this.buffer.toString():l?(r||(r=new TextDecoder),r.decode(this.buffer)):a.r(this.buffer)}}]),e}();function u(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function d(e,t,n){e[n+0]=255&t,t>>>=8,e[n+1]=255&t}function h(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function f(e,t,n){e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t}function p(e,t){return e[t]}function g(e,t,n){e[n]=t}}).call(this,n(446).Buffer)},function(e,t,n){"use strict";n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"e",(function(){return d}));var r=n(1),i=n(0),o=n(15),a=function e(t,n,r,o){Object(i.a)(this,e),this.top=0|t,this.left=0|n,this.width=0|r,this.height=0|o},s=function e(t,n){Object(i.a)(this,e),this.tabSize=t,this.data=n},l=function e(t,n,r,o,a,s){Object(i.a)(this,e),this.content=t,this.continuesWithWrappedLine=n,this.minColumn=r,this.maxColumn=o,this.startVisibleColumn=a,this.tokens=s},c=function(){function e(t,n,r,o,a,s,l,c,u,d){Object(i.a)(this,e),this.minColumn=t,this.maxColumn=n,this.content=r,this.continuesWithWrappedLine=o,this.isBasicASCII=e.isBasicASCII(r,s),this.containsRTL=e.containsRTL(r,this.isBasicASCII,a),this.tokens=l,this.inlineDecorations=c,this.tabSize=u,this.startVisibleColumn=d}return Object(r.a)(e,null,[{key:"isBasicASCII",value:function(e,t){return!t||o.B(e)}},{key:"containsRTL",value:function(e,t,n){return!(t||!n)&&o.m(e)}}]),e}(),u=function e(t,n,r){Object(i.a)(this,e),this.range=t,this.inlineClassName=n,this.type=r},d=function e(t,n){Object(i.a)(this,e),this.range=t,this.options=n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r,i=n(0),o=n(1);!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(r||(r={}));var a=function(){function e(t){if(Object(i.a)(this,e),this.open=t.open,this.close=t.close,this._standardTokenMask=0,Array.isArray(t.notIn))for(var n=0,r=t.notIn.length;n =55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(336);var d=/[&<>"]/,h=/[&<>"]/g,f={"&":"&","<":"<",">":">",'"':"""};function p(e){return f[e]}var g=/[.?*+^$[\]\\(){}|-]/g;var m=n(284);t.lib={},t.lib.mdurl=n(337),t.lib.ucmicro=n(681),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!==typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return i(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(h,p):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(e=e.replace(/\u1e9e/g,"\xdf")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";n.d(t,"c",(function(){return C})),n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return E}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(38),l=n(14),c=n.n(l),u=n(22),d=n(6),h=n(0),f=n(1),p=n(39),g=n(15),m=n(53),v=n(21),_=function(){function e(){Object(h.a)(this,e),this._value="",this._pos=0}return Object(f.a)(e,[{key:"reset",value:function(e){return this._value=e,this._pos=0,this}},{key:"next",value:function(){return this._pos+=1,this}},{key:"hasNext",value:function(){return this._pos 0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Object(h.a)(this,e),this._splitOnBackslash=t,this._caseSensitive=n}return Object(f.a)(e,[{key:"reset",value:function(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}},{key:"hasNext",value:function(){return this._to 0)n.left||(n.left=new S,n.left.segment=r.value()),n=n.left;else if(i<0)n.right||(n.right=new S,n.right.segment=r.value()),n=n.right;else{if(!r.hasNext())break;r.next(),n.mid||(n.mid=new S,n.mid.segment=r.value()),n=n.mid}}var o=n.value;return n.value=t,n.key=e,o}},{key:"get",value:function(e){for(var t=this._iter.reset(e),n=this._root;n;){var r=t.cmp(n.segment);if(r>0)n=n.left;else if(r<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0}},{key:"findSubstr",value:function(e){for(var t=this._iter.reset(e),n=this._root,r=void 0;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),r=n.value||r,n=n.mid}}return n&&n.value||r}},{key:"forEach",value:function(e){this._forEach(this._root,e)}},{key:"_forEach",value:function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))}}],[{key:"forUris",value:function(){return new e(new y)}},{key:"forStrings",value:function(){return new e(new _)}}]),e}(),k=function(){function e(t,n){Object(h.a)(this,e),this[Symbol.toStringTag]="ResourceMap",t instanceof e?(this.map=new Map(t.map),this.toKey=null!==n&&void 0!==n?n:e.defaultToKey):(this.map=new Map,this.toKey=null!==t&&void 0!==t?t:e.defaultToKey)}return Object(f.a)(e,[{key:"set",value:function(e,t){return this.map.set(this.toKey(e),t),this}},{key:"get",value:function(e){return this.map.get(this.toKey(e))}},{key:"has",value:function(e){return this.map.has(this.toKey(e))}},{key:"clear",value:function(){this.map.clear()}},{key:"delete",value:function(e){return this.map.delete(this.toKey(e))}},{key:"forEach",value:function(e,t){"undefined"!==typeof t&&(e=e.bind(t));var n,r=Object(d.a)(this.map);try{for(r.s();!(n=r.n()).done;){var i=Object(u.a)(n.value,2),o=i[0];e(i[1],p.a.parse(o),this)}}catch(a){r.e(a)}finally{r.f()}}},{key:"values",value:function(){return this.map.values()}},{key:"keys",value:c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(d.a)(this.map.keys()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,p.a.parse(r);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"entries",value:c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(d.a)(this.map.entries()),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,[p.a.parse(r[0]),r[1]];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:Symbol.iterator,value:c.a.mark((function e(){var t,n,r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Object(d.a)(this.map),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=n.value,e.next=7,[p.a.parse(r[0]),r[1]];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"size",get:function(){return this.map.size}}]),e}();k.defaultToKey=function(e){return e.toString()};var E=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Object(h.a)(this,n),(r=t.call(this))._limit=e,r._ratio=Math.min(Math.max(0,i),1),r}return Object(f.a)(n,[{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Object(r.a)(Object(i.a)(n.prototype),"get",this).call(this,e,t)}},{key:"peek",value:function(e){return Object(r.a)(Object(i.a)(n.prototype),"get",this).call(this,e,0)}},{key:"set",value:function(e,t){return Object(r.a)(Object(i.a)(n.prototype),"set",this).call(this,e,t,2),this.checkTrim(),this}},{key:"checkTrim",value:function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},{key:"limit",get:function(){return this._limit},set:function(e){this._limit=e,this.checkTrim()}}]),n}(function(){function e(){Object(h.a)(this,e),this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}return Object(f.a)(e,[{key:"clear",value:function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}},{key:"isEmpty",value:function(){return!this._head&&!this._tail}},{key:"has",value:function(e){return this._map.has(e)}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._map.get(e);if(n)return 0!==t&&this.touch(n,t),n.value}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this._map.get(e);if(r)r.value=t,0!==n&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}},{key:"delete",value:function(e){return!!this.remove(e)}},{key:"remove",value:function(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}},{key:"shift",value:function(){if(this._head||this._tail){if(!this._head||!this._tail)throw new Error("Invalid list");var e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}}},{key:"forEach",value:function(e,t){for(var n=this._state,r=this._head;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}},{key:"keys",value:function(){var e,t=this,n=this._state,r=this._head,i=(e={},Object(s.a)(e,Symbol.iterator,(function(){return i})),Object(s.a)(e,"next",(function(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){var e={value:r.key,done:!1};return r=r.next,e}return{value:void 0,done:!0}})),e);return i}},{key:"values",value:function(){var e,t=this,n=this._state,r=this._head,i=(e={},Object(s.a)(e,Symbol.iterator,(function(){return i})),Object(s.a)(e,"next",(function(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){var e={value:r.value,done:!1};return r=r.next,e}return{value:void 0,done:!0}})),e);return i}},{key:"entries",value:function(){var e,t=this,n=this._state,r=this._head,i=(e={},Object(s.a)(e,Symbol.iterator,(function(){return i})),Object(s.a)(e,"next",(function(){if(t._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){var e={value:[r.key,r.value],done:!1};return r=r.next,e}return{value:void 0,done:!0}})),e);return i}},{key:Symbol.iterator,value:function(){return this.entries()}},{key:"trimOld",value:function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}else this.clear()}},{key:"addItemFirst",value:function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}},{key:"addItemLast",value:function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}},{key:"removeItem",value:function(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{var t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}},{key:"touch",value:function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;var n=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(n.previous=r,r.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;var i=e.next,o=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=o,o.next=i),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}},{key:"toJSON",value:function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),e}},{key:"fromJSON",value:function(e){this.clear();var t,n=Object(d.a)(e);try{for(n.s();!(t=n.n()).done;){var r=Object(u.a)(t.value,2),i=r[0],o=r[1];this.set(i,o)}}catch(a){n.e(a)}finally{n.f()}}},{key:"size",get:function(){return this._size}},{key:"first",get:function(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}},{key:"last",get:function(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}}]),e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return h}));var r=n(14),i=n.n(r),o=n(39),a=n(29),s=n(7),l=n(15),c=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},u=Object(a.c)("openerService"),d=Object.freeze({_serviceBrand:void 0,registerOpener:function(){return s.a.None},registerValidator:function(){return s.a.None},registerExternalUriResolver:function(){return s.a.None},setExternalOpener:function(){},open:function(){return c(this,void 0,void 0,i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)})))},resolveExternalUri:function(e){return c(this,void 0,void 0,i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{resolved:e,dispose:function(){}});case 1:case"end":return t.stop()}}),t)})))}});function h(e,t){return o.a.isUri(e)?Object(l.t)(e.scheme,t):Object(l.T)(e,t+":")}},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(29),i=n(18),o=Object(r.c)("accessibilityService"),a=new i.c("accessibilityModeEnabled",!1)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(0),o=n(35),a=n(19),s=n(8),l=n(15),c=function e(t,n,r){Object(i.a)(this,e),this.lineNumber=t,this.column=n,this.leftoverVisibleColumns=r},u=function(){function e(){Object(i.a)(this,e)}return Object(r.a)(e,null,[{key:"leftPosition",value:function(e,t,n){return n>e.getLineMinColumn(t)?n-=l.N(e.getLineContent(t),n-1):t>1&&(t-=1,n=e.getLineMaxColumn(t)),new a.a(t,n)}},{key:"left",value:function(t,n,r,i){var o=e.leftPosition(n,r,i);return new c(o.lineNumber,o.column,0)}},{key:"moveLeft",value:function(t,n,r,i,o){var a,s;if(r.hasSelection()&&!i)a=r.selection.startLineNumber,s=r.selection.startColumn;else{var l=e.left(t,n,r.position.lineNumber,r.position.column-(o-1));a=l.lineNumber,s=l.column}return r.move(i,a,s,0)}},{key:"rightPosition",value:function(e,t,n){return n u?(n=u,r=s?t.getLineMaxColumn(n):Math.min(t.getLineMaxColumn(n),r)):r=o.a.columnFromVisibleColumn2(e,t,n,l),i=d?0:l-o.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),new c(n,r,i)}},{key:"moveDown",value:function(t,n,r,i,o){var a,s;r.hasSelection()&&!i?(a=r.selection.endLineNumber,s=r.selection.endColumn):(a=r.position.lineNumber,s=r.position.column);var l=e.down(t,n,a,s,r.leftoverVisibleColumns,o,!0);return r.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)}},{key:"translateDown",value:function(t,n,r){var i=r.selection,l=e.down(t,n,i.selectionStartLineNumber,i.selectionStartColumn,r.selectionStartLeftoverVisibleColumns,1,!1),c=e.down(t,n,i.positionLineNumber,i.positionColumn,r.leftoverVisibleColumns,1,!1);return new o.f(new s.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new a.a(c.lineNumber,c.column),c.leftoverVisibleColumns)}},{key:"up",value:function(e,t,n,r,i,a,s){var l=o.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize)+i,u=1===n&&1===r;return(n-=a)<1?(n=1,r=s?t.getLineMinColumn(n):Math.min(t.getLineMaxColumn(n),r)):r=o.a.columnFromVisibleColumn2(e,t,n,l),i=u?0:l-o.a.visibleColumnFromColumn(t.getLineContent(n),r,e.tabSize),new c(n,r,i)}},{key:"moveUp",value:function(t,n,r,i,o){var a,s;r.hasSelection()&&!i?(a=r.selection.startLineNumber,s=r.selection.startColumn):(a=r.position.lineNumber,s=r.position.column);var l=e.up(t,n,a,s,r.leftoverVisibleColumns,o,!0);return r.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns)}},{key:"translateUp",value:function(t,n,r){var i=r.selection,l=e.up(t,n,i.selectionStartLineNumber,i.selectionStartColumn,r.selectionStartLeftoverVisibleColumns,1,!1),c=e.up(t,n,i.positionLineNumber,i.positionColumn,r.leftoverVisibleColumns,1,!1);return new o.f(new s.a(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new a.a(c.lineNumber,c.column),c.leftoverVisibleColumns)}},{key:"moveToBeginningOfLine",value:function(e,t,n,r){var i,o=n.position.lineNumber,a=t.getLineMinColumn(o),s=t.getLineFirstNonWhitespaceColumn(o)||a;return i=n.position.column===s?a:s,n.move(r,o,i,0)}},{key:"moveToEndOfLine",value:function(e,t,n,r,i){var o=n.position.lineNumber,a=t.getLineMaxColumn(o);return n.move(r,o,a,i?1073741824-a:0)}},{key:"moveToBeginningOfBuffer",value:function(e,t,n,r){return n.move(r,1,1,0)}},{key:"moveToEndOfBuffer",value:function(e,t,n,r){var i=t.getLineCount(),o=t.getLineMaxColumn(i);return n.move(r,i,o,0)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),i=n(1),o=n(4),a=n(5),s=n(3),l=n(75),c=n(77),u=n(7),d=n(70),h=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"onclick",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.CLICK,(function(e){return t(new c.a(e))})))}},{key:"onmousedown",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.MOUSE_DOWN,(function(e){return t(new c.a(e))})))}},{key:"onmouseover",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.MOUSE_OVER,(function(e){return t(new c.a(e))})))}},{key:"onnonbubblingmouseout",value:function(e,t){this._register(s.addDisposableNonBubblingMouseOutListener(e,(function(e){return t(new c.a(e))})))}},{key:"onkeydown",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.KEY_DOWN,(function(e){return t(new l.a(e))})))}},{key:"onkeyup",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.KEY_UP,(function(e){return t(new l.a(e))})))}},{key:"oninput",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.INPUT,t))}},{key:"onblur",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.BLUR,t))}},{key:"onfocus",value:function(e,t){this._register(s.addDisposableListener(e,s.EventType.FOCUS,t))}},{key:"ignoreGesture",value:function(e){d.b.ignoreTarget(e)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(0),i=n(1),o=n(29),a=function(){function e(t){Object(r.a)(this,e),this.callback=t}return Object(i.a)(e,[{key:"report",value:function(e){this._value=e,this.callback(this._value)}}]),e}();a.None=Object.freeze({report:function(){}});var s=Object(o.c)("editorProgressService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(29),i=Object(r.c)("contextViewService"),o=Object(r.c)("contextMenuService")},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return r}));var r,i=n(0),o=n(1),a=n(33),s=n(35),l=n(87),c=n(142),u=n(19),d=n(8),h=function(){function e(){Object(i.a)(this,e)}return Object(o.a)(e,null,[{key:"addCursorDown",value:function(e,t,n){for(var r=[],i=0,o=0,a=t.length;ol&&(c=l,h=e.model.getLineMaxColumn(c)),s.d.fromModelState(new s.f(new d.a(o.lineNumber,1,c,h),0,new u.a(c,h),0))}var f=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumber f){var p=e.getLineCount(),g=a.lineNumber+1,m=1;return g>p&&(g=p,m=e.getLineMaxColumn(g)),s.d.fromViewState(t.viewState.move(t.modelState.hasSelection(),g,m,0))}var v=t.modelState.selectionStart.getEndPosition();return s.d.fromModelState(t.modelState.move(t.modelState.hasSelection(),v.lineNumber,v.column,0))}},{key:"word",value:function(e,t,n,r){var i=e.model.validatePosition(r);return s.d.fromModelState(c.a.word(e.cursorConfig,e.model,t.modelState,n,i))}},{key:"cancelSelection",value:function(e,t){if(!t.modelState.hasSelection())return new s.d(t.modelState,t.viewState);var n=t.viewState.position.lineNumber,r=t.viewState.position.column;return s.d.fromViewState(new s.f(new d.a(n,r,n,r),0,new u.a(n,r),0))}},{key:"moveTo",value:function(e,t,n,r,i){var o=e.model.validatePosition(r),a=i?e.coordinatesConverter.validateViewPosition(new u.a(i.lineNumber,i.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return s.d.fromViewState(t.viewState.move(n,a.lineNumber,a.column,0))}},{key:"simpleMove",value:function(e,t,n,r,i,o){switch(n){case 0:return 4===o?this._moveHalfLineLeft(e,t,r):this._moveLeft(e,t,r,i);case 1:return 4===o?this._moveHalfLineRight(e,t,r):this._moveRight(e,t,r,i);case 2:return 2===o?this._moveUpByViewLines(e,t,r,i):this._moveUpByModelLines(e,t,r,i);case 3:return 2===o?this._moveDownByViewLines(e,t,r,i):this._moveDownByModelLines(e,t,r,i);case 4:return this._moveToViewMinColumn(e,t,r);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,r);case 6:return this._moveToViewCenterColumn(e,t,r);case 7:return this._moveToViewMaxColumn(e,t,r);case 8:return this._moveToViewLastNonWhitespaceColumn(e,t,r);default:return null}}},{key:"viewportMove",value:function(e,t,n,r,i){var o=e.getCompletelyVisibleViewRange(),a=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(n){case 9:var s=this._firstLineNumberInRange(e.model,a,i),l=e.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(e,t[0],r,s,l)];case 11:var c=this._lastLineNumberInRange(e.model,a,i),u=e.model.getLineFirstNonWhitespaceColumn(c);return[this._moveToModelPosition(e,t[0],r,c,u)];case 10:var d=Math.round((a.startLineNumber+a.endLineNumber)/2),h=e.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(e,t[0],r,d,h)];case 12:for(var f=[],p=0,g=t.length;p n.endLineNumber-1&&(i=n.endLineNumber-1),i 1,o=[],a=0,c=t.length;a 1,o=[],a=0,c=t.length;a .001){w=!1;break}}var D=!0;w&&S.width!==O&&(D=!1),S.width>y.width&&(D=!1);var L=c.b()>2e3;return new b.b({zoomLevel:c.d(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:w,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:i.width,canUseHalfwidthRightwardsArrow:D,spaceWidth:o.width,middotWidth:C.width,wsmiddotWidth:k.width,maxDigitWidth:E},L)}}]),n}(d.a);C.INSTANCE=new C;var k=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3?arguments[3]:void 0;return Object(s.a)(this,n),(i=t.call(this,e,r)).accessibilityService=a,i._elementSizeObserver=i._register(new m.a(o,r.dimension,(function(){return i._onReferenceDomElementSizeChanged()}))),i._register(C.INSTANCE.onDidChange((function(){return i._onCSSBasedConfigurationChanged()}))),i._validatedOptions.get(9)&&i._elementSizeObserver.startObserving(),i._register(c.n((function(e){return i._recomputeOptions()}))),i._register(i.accessibilityService.onDidChangeScreenReaderOptimized((function(){return i._recomputeOptions()}))),i._recomputeOptions(),i}return Object(l.a)(n,[{key:"_onReferenceDomElementSizeChanged",value:function(){this._recomputeOptions()}},{key:"_onCSSBasedConfigurationChanged",value:function(){this._recomputeOptions()}},{key:"observeReferenceElement",value:function(e){this._elementSizeObserver.observe(e)}},{key:"dispose",value:function(){Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}},{key:"_getExtraEditorClassName",value:function(){var e="";return c.j||c.m||(e+="no-user-select "),h.f&&(e+="mac "),e}},{key:"_getEnvConfiguration",value:function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:c.l||c.h,pixelRatio:c.a(),zoomLevel:c.d(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}},{key:"readConfiguration",value:function(e){return C.INSTANCE.readConfiguration(e)}}],[{key:"applyFontInfoSlow",value:function(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}},{key:"applyFontInfo",value:function(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}}]),n}(v.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return E})),n.d(t,"c",(function(){return w}));var r=n(17),i=n(16),o=n(4),a=n(5),s=n(0),l=n(1),c=n(15),u=n(8),d=n(41),h=n(7),f=n(36),p=n(9),g=n(18),m=n(99),v=n(29),_=n(121),b=Object(v.c)("IEditorCancelService"),y=new g.c("cancellableOperation",!1);Object(_.b)(b,function(){function e(){Object(s.a)(this,e),this._tokens=new WeakMap}return Object(l.a)(e,[{key:"add",value:function(e,t){var n,r=this._tokens.get(e);return r||(r=e.invokeWithinContext((function(e){return{key:y.bindTo(e.get(g.b)),tokens:new m.a}})),this._tokens.set(e,r)),r.key.set(!0),n=r.tokens.push(t),function(){n&&(n(),r.key.set(!r.tokens.isEmpty()),n=void 0)}}},{key:"cancel",value:function(e){var t=this._tokens.get(e);if(t){var n=t.tokens.pop();n&&(n.cancel(),t.key.set(!t.tokens.isEmpty()))}}}]),e}(),!0);var S=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this,r)).editor=e,i._unregister=e.invokeWithinContext((function(t){return t.get(b).add(e,Object(f.a)(i))})),i}return Object(l.a)(n,[{key:"dispose",value:function(){this._unregister(),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}}]),n}(d.b);Object(p.l)(new(function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(){return Object(s.a)(this,n),t.call(this,{id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:y})}return Object(l.a)(n,[{key:"runEditorCommand",value:function(e,t){e.get(b).cancel(t)}}]),n}(p.c)));var C=function(){function e(t,n){if(Object(s.a)(this,e),this.flags=n,0!==(1&this.flags)){var r=t.getModel();this.modelVersionId=r?c.x("{0}#{1}",r.uri.toString(),r.getVersionId()):null}else this.modelVersionId=null;0!==(4&this.flags)?this.position=t.getPosition():this.position=null,0!==(2&this.flags)?this.selection=t.getSelection():this.selection=null,0!==(8&this.flags)?(this.scrollLeft=t.getScrollLeft(),this.scrollTop=t.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}return Object(l.a)(e,[{key:"_equals",value:function(t){if(!(t instanceof e))return!1;var n=t;return this.modelVersionId===n.modelVersionId&&(this.scrollLeft===n.scrollLeft&&this.scrollTop===n.scrollTop&&(!(!this.position&&n.position||this.position&&!n.position||this.position&&n.position&&!this.position.equals(n.position))&&!(!this.selection&&n.selection||this.selection&&!n.selection||this.selection&&n.selection&&!this.selection.equalsRange(n.selection))))}},{key:"validate",value:function(t){return this._equals(new e(t,this.flags))}}]),e}(),k=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r,i,o){var a;return Object(s.a)(this,n),(a=t.call(this,e,o)).editor=e,a._listener=new h.b,4&r&&a._listener.add(e.onDidChangeCursorPosition((function(e){i&&u.a.containsPosition(i,e.position)||a.cancel()}))),2&r&&a._listener.add(e.onDidChangeCursorSelection((function(e){i&&u.a.containsRange(i,e.selection)||a.cancel()}))),8&r&&a._listener.add(e.onDidScrollChange((function(e){return a.cancel()}))),1&r&&(a._listener.add(e.onDidChangeModel((function(e){return a.cancel()}))),a._listener.add(e.onDidChangeModelContent((function(e){return a.cancel()})))),a}return Object(l.a)(n,[{key:"dispose",value:function(){this._listener.dispose(),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}}]),n}(S),E=function(e){Object(o.a)(n,e);var t=Object(a.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this,r))._listener=e.onDidChangeContent((function(){return i.cancel()})),i}return Object(l.a)(n,[{key:"dispose",value:function(){this._listener.dispose(),Object(r.a)(Object(i.a)(n.prototype),"dispose",this).call(this)}}]),n}(d.b),w=function(){function e(t,n,r){Object(s.a)(this,e),this._visiblePosition=t,this._visiblePositionScrollDelta=n,this._cursorPosition=r}return Object(l.a)(e,[{key:"restore",value:function(e){if(this._visiblePosition){var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}},{key:"restoreRelativeVerticalPositionOfCursor",value:function(e){var t=e.getPosition();if(this._cursorPosition&&t){var n=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+n)}}}],[{key:"capture",value:function(t){var n=null,r=0;if(0!==t.getScrollTop()){var i=t.getVisibleRanges();if(i.length>0){n=i[0].getStartPosition();var o=t.getTopForPosition(n.lineNumber,n.column);r=t.getScrollTop()-o}}return new e(n,r,t.getPosition())}}]),e}()},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return d}));var r=n(0),i=n(1),o=n(133),a=n(20),s=new(function(){function e(){Object(r.a)(this,e)}return Object(i.a)(e,[{key:"clone",value:function(){return this}},{key:"equals",value:function(e){return this===e}}]),e}()),l="vs.editor.nullMode",c=new a.r(l,0);function u(e,t,n,r){return new o.b([new o.a(r,"",e)],n)}function d(e,t,n,r){var i=new Uint32Array(2);return i[0]=r,i[1]=(16384|e<<0|2<<23)>>>0,new o.c(i,null===n?s:n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return g}));var r=n(0),i=n(1),o=n(15),a=n(144),s=n(177),l=function(){function e(t,n,i){Object(r.a)(this,e),this.endIndex=t,this.type=n,this.metadata=i}return Object(i.a)(e,[{key:"isWhitespace",value:function(){return!!(1&this.metadata)}}]),e}(),c=function(){function e(t,n){Object(r.a)(this,e),this.startOffset=t,this.endOffset=n}return Object(i.a)(e,[{key:"equals",value:function(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}]),e}(),u=function(){function e(t,n,i,o,a,s,l,c,u,d,h,f,p,g,m,v,_,b,y){Object(r.a)(this,e),this.useMonospaceOptimizations=t,this.canUseHalfwidthRightwardsArrow=n,this.lineContent=i,this.continuesWithWrappedLine=o,this.isBasicASCII=a,this.containsRTL=s,this.fauxIndentLength=l,this.lineTokens=c,this.lineDecorations=u,this.tabSize=d,this.startVisibleColumn=h,this.spaceWidth=f,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===v?4:"boundary"===v?1:"selection"===v?2:"trailing"===v?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=y&&y.sort((function(e,t){return e.startOffset >>0;this._data[e]=i,this._absoluteOffsets[e]=r+n}},{key:"getAbsoluteOffsets",value:function(){return this._absoluteOffsets}},{key:"charOffsetToPartData",value:function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}},{key:"partDataToCharOffset",value:function(t,n,r){if(0===this.length)return 0;for(var i=(t<<16|r<<0)>>>0,o=0,a=this.length-1;o+1>>1,l=this._data[s];if(l===i)return s;l>i?a=s:o=s}if(o===a)return o;var c=this._data[o],u=this._data[a];if(c===i)return o;if(u===i)return a;var d=e.getPartIndex(c);return r-e.getCharIndex(c)<=(d!==e.getPartIndex(u)?n:e.getCharIndex(u))-r?o:a}}],[{key:"getPartIndex",value:function(e){return(4294901760&e)>>>16}},{key:"getCharIndex",value:function(e){return(65535&e)>>>0}}]),e}(),h=function e(t,n,i){Object(r.a)(this,e),this.characterMapping=t,this.containsRTL=n,this.containsForeignElements=i};function f(e,t){if(0===e.lineContent.length){var n=0,r="";if(e.lineDecorations.length>0){for(var i=[],a=[],c=0,u=e.lineDecorations.length;c0?''):"",g=a.length>0?''):"";r="".concat(p).concat(g,"")}}return t.appendASCIIString(r),new h(new d(0,0),!1,n)}return function(e,t){var n=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,i=e.containsForeignElements,a=e.lineContent,s=e.len,l=e.isOverflowing,c=e.parts,u=e.fauxIndentLength,f=e.tabSize,p=e.startVisibleColumn,g=e.containsRTL,m=e.spaceWidth,v=e.renderSpaceCharCode,_=e.renderWhitespace,b=e.renderControlCharacters,y=new d(s+1,c.length),S=0,C=p,k=0,E=0,w=0,O=0;g?t.appendASCIIString(''):t.appendASCIIString("");for(var T=0,x=c.length;T =u&&(j+=F)}for(I&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(m*M)),t.appendASCIIString('px"')),t.appendASCII(62);S ")}y.setPartData(s,c.length-1,k,O),l&&t.appendASCIIString("…");return t.appendASCIIString(""),new h(y,g,i)}(function(e){var t,n,r=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter1?t.write1(8594):t.write1(65515);for(var U=2;U<=B;U++)t.write1(160)}else B=1,t.write1(v);k+=B,S>=u&&(C+=B)}w=M}else{var H=0;for(t.appendASCII(62);S =u&&(C+=W)}w=H}R?E++:E=0,t.appendASCIIString(" 0&&(r[i++]=new l(t,"",0));for(var o=0,a=e.getCount();o=n){r[i++]=new l(n,c,0);break}r[i++]=new l(s,c,0)}}return r}(e.lineTokens,e.fauxIndentLength,n);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(i=function(e,t,n,r){var i,a=e.continuesWithWrappedLine,s=e.fauxIndentLength,c=e.tabSize,u=e.startVisibleColumn,d=e.useMonospaceOptimizations,h=e.selectionsOnLine,f=1===e.renderWhitespace,p=3===e.renderWhitespace,g=e.renderSpaceWidth!==e.spaceWidth,m=[],v=0,_=0,b=r[_].type,y=r[_].endIndex,S=r.length,C=!1,k=o.w(t);-1===k?(C=!0,k=n,i=n):i=o.J(t);for(var E=!1,w=0,O=h&&h[w],T=u%c,x=s;x =O.endOffset&&(w++,O=h&&h[w]);var D=void 0;if(x i)D=!0;else if(9===N)D=!0;else if(32===N)if(f)if(E)D=!0;else{var L=x+1 x),D&&p&&(D=C||x>i),E){if(!D||!d&&T>=c){if(g)for(var A=(v>0?m[v-1].endIndex:s)+1;A<=x;A++)m[v++]=new l(A,"mtkw",1);else m[v++]=new l(x,"mtkw",1);T%=c}}else(x===y||D&&x>s)&&(m[v++]=new l(x,b,0),T%=c);for(9===N?T=c:o.E(N)?T+=2:T++,E=D;x===y;)++_ 0?t.charCodeAt(n-1):0,M=n>1?t.charCodeAt(n-2):0;32===R&&32!==M&&9!==M||(I=!0)}else I=!0;if(I)if(g)for(var P=(v>0?m[v-1].endIndex:s)+1;P<=n;P++)m[v++]=new l(P,"mtkw",1);else m[v++]=new l(n,"mtkw",1);else m[v++]=new l(n,b,0);return m}(e,r,n,i));var a=0;if(e.lineDecorations.length>0){for(var c=0,u=e.lineDecorations.length;cd&&(d=_.startOffset,c[u++]=new l(d,m,v)),!(_.endOffset+1<=g)){d=g,c[u++]=new l(d,m+" "+_.className,v|_.metadata);break}d=_.endOffset+1,c[u++]=new l(d,m+" "+_.className,v|_.metadata),a++}g>d&&(d=g,c[u++]=new l(d,m,v))}var b=n[n.length-1].endIndex;if(a=50&&(i[o++]=new l(f+1,d,h),p=f+1,f=-1);p!==u&&(i[o++]=new l(u,d,h))}else i[o++]=c;r=u}else for(var m=0,v=t.length;m 50){for(var S=_.type,C=_.metadata,k=Math.ceil(y/50),E=1;E =21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}}]),e}());function u(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command t.command?1:e.weight2-t.weight2}l.a.add("platform.keybindingsRegistry",c)},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return u}));var r=n(11);function i(e,t){var n=Object.create(null);for(var i in t){var o=t[i];o&&(n[i]=Object(r.hc)(o,e))}return n}function o(e,t,n){function r(r){var o=i(e.getColorTheme(),t);"function"===typeof n?n(o):n.style(o)}return r(e.getColorTheme()),e.onDidColorThemeChange(r)}function a(e,t,n){return o(t,{badgeBackground:n&&n.badgeBackground||r.c,badgeForeground:n&&n.badgeForeground||r.d,badgeBorder:r.h},e)}function s(e,t,n){return o(t,Object.assign(Object.assign({},l),n||{}),e)}var l={listFocusBackground:r.xb,listFocusForeground:r.yb,listActiveSelectionBackground:Object(r.i)(r.rb,.1),listActiveSelectionForeground:r.sb,listFocusAndSelectionBackground:r.rb,listFocusAndSelectionForeground:r.sb,listInactiveSelectionBackground:r.Db,listInactiveSelectionForeground:r.Eb,listInactiveFocusBackground:r.Cb,listHoverBackground:r.Ab,listHoverForeground:r.Bb,listDropBackground:r.tb,listFocusOutline:r.b,listSelectionOutline:r.b,listHoverOutline:r.b,listFilterWidgetBackground:r.ub,listFilterWidgetOutline:r.wb,listFilterWidgetNoMatchesOutline:r.vb,listMatchesShadow:r.uc,treeIndentGuidesStroke:r.tc},c={shadowColor:r.uc,borderColor:r.Gb,foregroundColor:r.Hb,backgroundColor:r.Fb,selectionForegroundColor:r.Kb,selectionBackgroundColor:r.Ib,selectionBorderColor:r.Jb,separatorColor:r.Lb};function u(e,t,n){return o(t,Object.assign(Object.assign({},c),n),e)}},function(e,t){e.exports=function(e){return e<-2}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(14),i=n.n(r),o=n(1),a=n(0),s=function e(t){Object(a.a)(this,e),this.element=t,this.next=e.Undefined,this.prev=e.Undefined};s.Undefined=new s(void 0);var l=function(){function e(){Object(a.a)(this,e),this._first=s.Undefined,this._last=s.Undefined,this._size=0}return Object(o.a)(e,[{key:"isEmpty",value:function(){return this._first===s.Undefined}},{key:"clear",value:function(){this._first=s.Undefined,this._last=s.Undefined,this._size=0}},{key:"unshift",value:function(e){return this._insert(e,!1)}},{key:"push",value:function(e){return this._insert(e,!0)}},{key:"_insert",value:function(e,t){var n=this,r=new s(e);if(this._first===s.Undefined)this._first=r,this._last=r;else if(t){var i=this._last;this._last=r,r.prev=i,i.next=r}else{var o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;var a=!1;return function(){a||(a=!0,n._remove(r))}}},{key:"shift",value:function(){if(this._first!==s.Undefined){var e=this._first.element;return this._remove(this._first),e}}},{key:"pop",value:function(){if(this._last!==s.Undefined){var e=this._last.element;return this._remove(this._last),e}}},{key:"_remove",value:function(e){if(e.prev!==s.Undefined&&e.next!==s.Undefined){var t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===s.Undefined&&e.next===s.Undefined?(this._first=s.Undefined,this._last=s.Undefined):e.next===s.Undefined?(this._last=this._last.prev,this._last.next=s.Undefined):e.prev===s.Undefined&&(this._first=this._first.next,this._first.prev=s.Undefined);this._size-=1}},{key:Symbol.iterator,value:i.a.mark((function e(){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this._first;case 1:if(t===s.Undefined){e.next=7;break}return e.next=4,t.element;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"toArray",value:function(){for(var e=[],t=this._first;t!==s.Undefined;t=t.next)e.push(t.element);return e}},{key:"size",get:function(){return this._size}}]),e}()},function(e,t,n){"use strict";var r=n(50),i=n(51),o=n(56),a=n(57),s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"toMarkdown",value:function(e,t){console.error("toMarkdown not implemented",e,t)}},{key:"parseMarkdown",value:function(){}},{key:"type",get:function(){return"node"}},{key:"markdownToken",get:function(){return""}}]),n}(s(n(162)).default);t.default=l},function(e,t,n){e.exports=function(e,t,n,i){var o,a=i?i-1:1/0;return function(i){if(r(i))return e.enter(n),o=0,s(i);return t(i)};function s(i){return r(i)&&o++=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return r-n<=0?{start:0,end:0}:{start:n,end:r}}function n(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=n,e.intersects=function(e,r){return!n(t(e,r))},e.relativeComplement=function(e,t){var r=[],i={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return n(i)||r.push(i),n(o)||r.push(o),r}}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return f}));var r,i=n(0),o=n(1),a=n(4),s=n(5),l=n(29),c=n(7),u=n(12),d=Object(l.c)("logService");!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(r||(r={}));var h=r.Info,f=function(e){Object(a.a)(n,e);var t=Object(s.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;return Object(i.a)(this,n),(e=t.call(this)).setLevel(r),e}return Object(o.a)(n,[{key:"trace",value:function(e){if(this.getLevel()<=r.Trace){for(var t,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o 1?n-1:0),o=1;o 1?n-1:0),o=1;o =15&&(d=!1,l=!0);var C=_&&(c||d&&(null==S||S<12.11)),k=n||a&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var w,O=function(e,t){var n=e.className,r=E(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function x(e,t){return T(e).appendChild(t)}function N(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o =t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(t){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function U(e,t){for(var n=0;n =t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function Y(e){for(;K.length<=e;)K.push($(K)+" ");return K[e]}function $(e){return e[e.length-1]}function Q(e,t){for(var n=[],r=0;r "\x80"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){for(;(n<0?t>0:t n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ce=null;function ue(e,t,n){var r;ce=null;for(var i=0;i t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=ge(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i 0}function Se(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ee(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){Ce(e),ke(e)}function Oe(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),_&&e.ctrlKey&&1==t&&(t=3),t}var xe,Ne,De=function(){if(a&&s<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function Le(e){if(null==xe){var t=N("span","\u200b");x(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(xe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=xe?N("span","\u200b"):N("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ae(e){if(null!=Ne)return Ne;var t=x(e,document.createTextNode("A\u062eA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Ne=r.right-n.right<3)}var Ie=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Re=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me=function(){var e=N("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Pe=null;function je(e){if(null!=Pe)return Pe;var t=x(e,N("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return Pe=Math.abs(n.left-r.left)>1}var Fe={},Be={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function He(e,t){Be[e]=t}function ze(e){if("string"==typeof e&&Be.hasOwnProperty(e))e=Be[e];else if(e&&"string"==typeof e.name&&Be.hasOwnProperty(e.name)){var t=Be[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=ze(t);var n=Fe[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var i=We[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var We={};function Ge(e,t){j(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ke(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Qe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t =e.first&&t n?it(n,Qe(e,n).text.length):ht(t,Qe(e,t.line).text.length)}function ht(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function ft(e,t){for(var n=[],r=0;r =this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.pos