Files
urbackup-podman/wwwfolder/www/js/vs/editor/editor.main.js
T
2023-03-14 01:45:28 -04:00

117 lines
1.5 MiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.8.2(59c417515cc4385a81ab1755611263b94d0071e2)
* Released under the MIT license
* https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
*-----------------------------------------------------------*/
(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||l.defaults,this.rules=v.normal,this.options.gfm&&(this.options.tables?this.rules=v.tables:this.rules=v.gfm)}function t(e,t){if(this.options=t||l.defaults,this.links=e,this.rules=_.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=_.breaks:this.rules=_.gfm:this.options.pedantic&&(this.rules=_.pedantic)}function n(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||l.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function r(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(i,o){return i?(o=o.source||o,o=o.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,o),n):new RegExp(e,t)}}function a(){}function u(e){for(var t,n,i=1;i<arguments.length;i++){t=arguments[i];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function l(t,n,r){if(r||"function"==typeof n){r||(r=n,n=null),n=u({},l.defaults,n||{});var s,a,c=n.highlight,d=0;try{s=e.lex(t,n)}catch(e){return r(e)}a=s.length;var h=function(e){if(e)return n.highlight=c,r(e);var t;try{t=i.parse(s,n)}catch(t){e=t}return n.highlight=c,e?r(e):r(null,t)};if(!c||c.length<3)return h();if(delete n.highlight,!a)return h();for(;d<s.length;d++)!function(e){return"code"!==e.type?--a||h():c(e.text,e.lang,function(t,n){return t?h(t):null==n||n===e.text?--a||h():(e.text=n,e.escaped=!0,void(--a||h()))})}(s[d])}else try{return n&&(n=u({},l.defaults,n)),i.parse(e.lex(t,n),n)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(n||l.defaults).silent)return"<p>An error occured:</p><pre>"+o(e.message+"",!0)+"</pre>";throw e}}var c,d=["require","exports","vs/editor/common/editorCommon","vs/editor/common/core/range","vs/base/common/lifecycle","vs/css!vs/editor/editor.main","vs/base/common/winjs.base","vs/nls!vs/editor/editor.main","vs/nls","vs/base/common/strings","vs/base/common/errors","vs/base/browser/dom","vs/base/common/event","vs/editor/common/editorCommonExtensions","vs/platform/instantiation/common/instantiation","vs/editor/common/core/position","vs/editor/common/modes","vs/base/common/async","vs/base/common/platform","vs/platform/contextkey/common/contextkey","vs/editor/common/core/selection","vs/editor/browser/editorBrowser","vs/base/common/types","vs/platform/commands/common/commands","vs/base/browser/browser","vs/base/common/eventEmitter","vs/base/common/arrays","vs/base/common/uri","vs/base/browser/styleMutator","vs/editor/browser/editorBrowserExtensions","vs/base/common/severity","vs/base/common/keyCodes","vs/editor/browser/view/viewPart","vs/platform/platform","vs/base/browser/builder","vs/base/common/objects","vs/base/browser/mouseEvent","vs/base/browser/ui/widget","vs/editor/common/modes/languageConfigurationRegistry","vs/base/common/paths","vs/base/common/scrollable","vs/editor/common/controller/cursorCommon","vs/editor/common/config/defaultConfig","vs/platform/keybinding/common/keybinding","vs/editor/common/services/modelService","vs/editor/common/services/codeEditorService","vs/editor/common/core/editOperation","vs/platform/telemetry/common/telemetry","vs/editor/common/services/editorWorkerService","vs/base/common/actions","vs/editor/browser/view/dynamicViewOverlay","vs/editor/common/viewModel/viewEventHandler","vs/platform/message/common/message","vs/base/browser/keyboardEvent","vs/editor/common/commands/replaceCommand","vs/base/common/assert","vs/platform/configuration/common/configuration","vs/platform/actions/common/actions","vs/editor/browser/config/configuration","vs/base/browser/touch","vs/base/browser/ui/scrollbar/scrollableElement","vs/platform/contextview/browser/contextView","vs/platform/editor/common/editor","vs/editor/common/modes/nullMode","vs/base/common/network","vs/editor/common/modes/languageConfiguration","vs/platform/opener/common/opener","vs/base/common/events","vs/editor/common/services/resolverService","vs/editor/common/core/characterClassifier","vs/platform/keybinding/common/keybindingsRegistry","vs/base/browser/ui/actionbar/actionbar","vs/editor/common/model/modelLine","vs/editor/common/model/wordHelper","vs/editor/common/modes/supports/richEditBrackets","vs/base/parts/tree/browser/treeDefaults","vs/base/parts/quickopen/common/quickOpen","vs/base/common/iterator","vs/editor/common/modes/supports","vs/platform/instantiation/common/serviceCollection","vs/editor/common/services/modeService","vs/platform/markers/common/markers","vs/editor/common/core/token","vs/editor/common/core/uint","vs/editor/common/services/standaloneColorService","vs/editor/common/view/renderingContext","vs/editor/common/viewModel/prefixSumComputer","vs/base/common/filters","vs/editor/common/core/viewLineToken","vs/editor/common/core/lineTokens","vs/editor/contrib/zoneWidget/browser/peekViewWidget","vs/base/common/collections","vs/editor/contrib/referenceSearch/browser/referencesModel","vs/editor/contrib/snippet/common/snippet","vs/editor/common/model/textModel","vs/base/common/diff/diff","vs/editor/common/controller/cursorMoveOperations","vs/platform/workspace/common/workspace","vs/base/browser/ui/sash/sash","vs/base/browser/ui/aria/aria","vs/base/browser/ui/inputbox/inputBox","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/contrib/find/common/findModel","vs/base/browser/globalMouseMoveMonitor","vs/base/browser/htmlContentRenderer","vs/editor/browser/editorDom","vs/base/parts/quickopen/browser/quickOpenModel","vs/platform/keybinding/common/keybindingResolver","vs/editor/common/config/editorZoom","vs/editor/common/config/fontInfo","vs/base/common/map","vs/base/common/htmlContent","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/editor/common/modes/modesRegistry","vs/platform/configuration/common/configurationRegistry","vs/editor/common/config/commonEditorConfig","vs/base/common/idGenerator","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/editor/browser/standalone/simpleServices","vs/editor/common/viewLayout/viewLineParts","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/contrib/quickOpen/browser/editorQuickOpen","vs/editor/contrib/suggest/common/suggest","vs/editor/browser/codeEditor","vs/base/browser/event","vs/editor/contrib/diffNavigator/common/diffNavigator","vs/editor/common/controller/oneCursor","vs/editor/common/model/model","vs/base/browser/ui/contextview/contextview","vs/editor/common/services/editorWorkerServiceImpl","vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl","vs/editor/common/viewModel/splitLinesCollection","vs/base/browser/ui/findinput/findInputCheckboxes","vs/base/browser/ui/iconLabel/iconLabel","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/editor/browser/controller/mouseTarget","vs/editor/browser/view/viewLayer","vs/base/common/keybinding","vs/base/browser/ui/scrollbar/scrollbarState","vs/editor/common/modes/textToHtmlTokenizer","vs/editor/common/standalone/standaloneBase","vs/base/parts/tree/browser/treeImpl","vs/base/common/cancellation","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/platform/instantiation/common/descriptors","vs/editor/common/editorAction","vs/editor/browser/standalone/colorizer","vs/editor/common/model/tokensBinaryEncoding","vs/editor/common/viewModel/viewModel","vs/editor/contrib/comment/common/blockCommentCommand","vs/editor/common/modes/snippetsRegistry","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/extensions/common/extensionsRegistry","vs/base/common/marshalling","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/hover/browser/hoverWidgets","vs/base/common/worker/simpleWorker","vs/base/browser/iframe","vs/editor/common/config/config","vs/platform/progress/common/progress","vs/platform/storage/common/storage","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/editor/common/controller/textAreaState","vs/editor/contrib/find/common/findController","vs/editor/contrib/parameterHints/common/parameterHints","vs/base/common/labels","vs/editor/contrib/snippet/common/snippetController","vs/base/common/glob","vs/editor/browser/widget/codeEditorWidget","vs/editor/common/modes/monarch/monarchCommon","vs/editor/browser/widget/diffEditorWidget","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/common/controller/cursorDeleteOperations","vs/editor/common/controller/cursorWordOperations","vs/editor/browser/standalone/standaloneServices","vs/editor/contrib/referenceSearch/browser/referencesController","vs/base/common/comparers","vs/base/parts/quickopen/browser/quickOpenViewer","vs/base/common/json","vs/base/parts/tree/browser/tree","vs/editor/common/modes/abstractMode","vs/base/parts/tree/browser/treeDnd","vs/editor/common/modes/languageSelector","vs/editor/common/modes/languageFeatureRegistry","vs/base/parts/tree/browser/treeModel","vs/editor/common/modes/linkComputer","vs/base/parts/tree/browser/treeViewModel","vs/editor/common/modes/monarch/monarchCompile","vs/base/worker/defaultWorkerFactory","vs/editor/common/modes/monarch/monarchLexer","vs/css!vs/base/browser/builder","vs/editor/common/modes/supports/characterPair","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/modes/supports/onEnter","vs/base/browser/ui/list/rangeMap","vs/editor/common/modes/supports/electricCharacter","vs/base/common/functional","vs/editor/common/modes/supports/tokenization","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/editor/common/services/abstractCodeEditorService","vs/css!vs/base/browser/ui/aria/aria","vs/editor/common/standalone/themes","vs/editor/browser/services/standaloneColorServiceImpl","vs/css!vs/base/browser/ui/checkbox/checkbox","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/common/view/viewContext","vs/base/browser/ui/checkbox/checkbox","vs/css!vs/base/browser/ui/contextview/contextview","vs/base/common/hash","vs/editor/browser/viewParts/lines/viewLine","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewLayout/whitespaceComputer","vs/editor/common/viewLayout/verticalObjects","vs/editor/common/viewLayout/linesLayout","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/editor/common/model/mirrorModel2","vs/editor/common/services/editorSimpleWorker","vs/base/browser/ui/countBadge/countBadge","vs/editor/contrib/caretOperations/common/moveCaretCommand","vs/css!vs/base/browser/ui/findinput/findInput","vs/editor/contrib/comment/common/lineCommentCommand","vs/css!vs/base/browser/ui/findinput/findInputCheckboxes","vs/editor/contrib/find/common/findState","vs/editor/contrib/find/common/replaceAllCommand","vs/editor/contrib/find/common/replacePattern","vs/editor/contrib/folding/common/folding","vs/editor/contrib/folding/common/indentFoldStrategy","vs/editor/contrib/format/common/formatCommand","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/editor/contrib/referenceSearch/browser/referenceSearch","vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/common/copyLinesCommand","vs/editor/contrib/linesOperations/common/deleteLinesCommand","vs/editor/contrib/linesOperations/common/moveLinesCommand","vs/editor/contrib/linesOperations/common/sortLinesCommand","vs/editor/contrib/quickFix/browser/quickFixWidget","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/editor/contrib/smartSelect/common/tokenTree","vs/editor/contrib/snippet/browser/snippet","vs/editor/contrib/snippet/common/snippetParser","vs/css!vs/base/browser/ui/leftRightWidget/leftRightWidget","vs/editor/contrib/snippet/common/snippetVariables","vs/editor/contrib/suggest/common/completionModel","vs/base/browser/ui/leftRightWidget/leftRightWidget","vs/nls!vs/base/browser/ui/actionbar/actionbar","vs/css!vs/base/browser/ui/list/list","vs/css!vs/base/browser/ui/menu/menu","vs/base/common/marked/marked","vs/base/browser/ui/menu/menu","vs/nls!vs/base/browser/ui/aria/aria","vs/base/browser/ui/progressbar/progressbar","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/css!vs/base/browser/ui/sash/sash","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/base/common/callbackList","vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/common/json","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/nls!vs/base/common/keybinding","vs/editor/browser/editor.all","vs/nls!vs/base/common/severity","vs/base/browser/ui/list/listView","vs/editor/contrib/quickFix/browser/lightBulbWidget","vs/nls!vs/base/parts/quickopen/browser/quickOpenModel","vs/nls!vs/base/parts/quickopen/browser/quickOpenWidget","vs/nls!vs/base/parts/tree/browser/treeDefaults","vs/base/browser/ui/list/listWidget","vs/base/parts/tree/browser/treeView","vs/css!vs/base/browser/ui/selectBox/selectBox","vs/base/parts/quickopen/browser/quickOpenWidget","vs/editor/contrib/quickOpen/browser/quickOpenEditorWidget","vs/nls!vs/editor/common/config/commonEditorConfig","vs/nls!vs/editor/common/config/defaultConfig","vs/base/browser/ui/selectBox/selectBox","vs/css!vs/base/parts/quickopen/browser/quickopen","vs/nls!vs/editor/common/controller/cursor","vs/nls!vs/editor/common/model/textModelWithTokens","vs/nls!vs/editor/common/modes/modesRegistry","vs/nls!vs/editor/common/modes/snippetsRegistry","vs/nls!vs/editor/common/services/bulkEdit","vs/editor/common/services/bulkEdit","vs/nls!vs/editor/common/services/modeServiceImpl","vs/nls!vs/editor/common/services/modelServiceImpl","vs/nls!vs/editor/contrib/bracketMatching/common/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/common/caretOperations","vs/nls!vs/editor/contrib/caretOperations/common/transpose","vs/nls!vs/editor/contrib/clipboard/browser/clipboard","vs/nls!vs/editor/contrib/comment/common/comment","vs/nls!vs/editor/contrib/contextmenu/browser/contextmenu","vs/nls!vs/editor/contrib/find/browser/findWidget","vs/nls!vs/editor/contrib/find/common/findController","vs/nls!vs/editor/contrib/folding/browser/folding","vs/nls!vs/editor/contrib/format/common/formatActions","vs/nls!vs/editor/contrib/goToDeclaration/browser/goToDeclaration","vs/nls!vs/editor/contrib/gotoError/browser/gotoError","vs/nls!vs/editor/contrib/hover/browser/hover","vs/nls!vs/editor/contrib/hover/browser/modesContentHover","vs/nls!vs/editor/contrib/inPlaceReplace/common/inPlaceReplace","vs/nls!vs/editor/contrib/inspectTokens/browser/inspectTokens","vs/nls!vs/editor/contrib/linesOperations/common/linesOperations","vs/nls!vs/editor/contrib/links/browser/links","vs/nls!vs/editor/contrib/multicursor/common/multicursor","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHints","vs/nls!vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/nls!vs/editor/contrib/quickFix/browser/quickFix","vs/nls!vs/editor/contrib/quickOpen/browser/gotoLine","vs/nls!vs/editor/contrib/quickOpen/browser/quickCommand","vs/nls!vs/editor/contrib/quickOpen/browser/quickOutline","vs/nls!vs/editor/contrib/referenceSearch/browser/referenceSearch","vs/nls!vs/editor/contrib/referenceSearch/browser/referencesController","vs/nls!vs/editor/contrib/referenceSearch/browser/referencesWidget","vs/nls!vs/editor/contrib/rename/browser/rename","vs/nls!vs/editor/contrib/rename/browser/renameInputField","vs/editor/contrib/rename/browser/renameInputField","vs/nls!vs/editor/contrib/rename/common/rename","vs/nls!vs/editor/contrib/smartSelect/common/smartSelect","vs/nls!vs/editor/contrib/suggest/browser/suggestController","vs/nls!vs/editor/contrib/suggest/browser/suggestWidget","vs/nls!vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode","vs/nls!vs/editor/contrib/zoneWidget/browser/peekViewWidget","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/extensions/common/extensionsRegistry","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/message/common/message","vs/platform/contextview/browser/contextMenuHandler","vs/platform/contextview/browser/contextMenuService","vs/css!vs/base/parts/tree/browser/tree","vs/css!vs/editor/browser/standalone/media/standalone-tokens","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight","vs/css!vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/css!vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/contrib/smartSelect/common/tokenSelectionSupport","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/contrib/links/common/links","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/services/codeEditorServiceImpl","vs/editor/browser/view/viewController","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/editor/common/controller/textAreaHandler","vs/editor/common/core/editorState","vs/editor/common/model/textModelSearch","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/css!vs/editor/browser/viewParts/selections/selections","vs/editor/common/commands/shiftCommand","vs/editor/common/controller/cursorColumnSelection","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/widget/media/diffEditor","vs/editor/common/controller/cursorTypeOperations","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/browser/widget/media/tokens","vs/editor/common/controller/cursorCollection","vs/editor/common/controller/cursor","vs/editor/common/model/textModelWithTokens","vs/editor/common/model/textModelWithMarkers","vs/editor/common/model/textModelWithDecorations","vs/editor/common/model/editableTextModel","vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching","vs/editor/common/modes/editorModeContext","vs/css!vs/editor/contrib/clipboard/browser/clipboard","vs/css!vs/editor/contrib/codelens/browser/codelens","vs/editor/common/services/webWorker","vs/editor/common/view/overviewZoneManager","vs/css!vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/common/viewLayout/editorLayoutProvider","vs/css!vs/editor/contrib/find/browser/findWidget","vs/editor/common/viewModel/characterHardWrappingLineMapper","vs/css!vs/editor/contrib/folding/browser/folding","vs/css!vs/editor/contrib/goToDeclaration/browser/goToDeclaration","vs/css!vs/editor/contrib/gotoError/browser/gotoError","vs/css!vs/editor/contrib/hover/browser/hover","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/css!vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard","vs/editor/browser/view/viewOutgoingEvents","vs/editor/browser/viewLayout/scrollManager","vs/editor/browser/viewLayout/layoutProvider","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight","vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/editor/browser/viewParts/margin/margin","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/editor/browser/viewParts/viewZones/viewZones","vs/editor/common/viewModel/viewModelCursors","vs/editor/common/viewModel/viewModelDecorations","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/find/common/findDecorations","vs/css!vs/editor/contrib/inspectTokens/browser/inspectTokens","vs/editor/contrib/find/browser/findOptionsWidget","vs/editor/contrib/folding/common/foldingModel","vs/platform/actions/common/menu","vs/css!vs/editor/contrib/links/browser/links","vs/css!vs/editor/contrib/parameterHints/browser/parameterHints","vs/platform/files/common/files","vs/css!vs/editor/contrib/quickFix/browser/lightBulbWidget","vs/editor/common/commonCodeEditor","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/css!vs/editor/contrib/quickOpen/browser/gotoLine","vs/css!vs/editor/contrib/quickOpen/browser/quickOutline","vs/platform/contextkey/browser/contextKeyService","vs/platform/markers/common/markerService","vs/css!vs/editor/contrib/referenceSearch/browser/referencesWidget","vs/css!vs/editor/contrib/rename/browser/renameInputField","vs/platform/opener/browser/openerService","vs/css!vs/editor/contrib/snippet/browser/snippet","vs/editor/contrib/hover/browser/modesGlyphHover","vs/css!vs/editor/contrib/suggest/browser/suggest","vs/css!vs/editor/contrib/wordHighlighter/browser/wordHighlighter","vs/css!vs/editor/contrib/zoneWidget/browser/peekViewWidget","vs/css!vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/editor/common/services/modelServiceImpl","vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard","vs/editor/contrib/multicursor/browser/menuPreventer","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/editor/browser/config/charWidthReader","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/controller/input/textAreaWrapper","vs/base/common/decorators","vs/editor/browser/controller/keyboardHandler","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/common/services/languagesRegistry","vs/editor/common/services/modeServiceImpl","vs/platform/configuration/common/model","vs/base/common/scorer","vs/editor/browser/view/viewEventDispatcher","vs/base/common/set","vs/base/common/history","vs/base/common/stopwatch","vs/base/browser/ui/list/rowCache","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/contrib/bracketMatching/common/bracketMatching","vs/editor/contrib/caretOperations/common/caretOperations","vs/editor/contrib/caretOperations/common/transpose","vs/editor/contrib/clipboard/browser/clipboard","vs/editor/contrib/codelens/common/codelens","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/comment/common/comment","vs/editor/contrib/contextmenu/browser/contextmenu","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/find/browser/find","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/format/common/format","vs/editor/contrib/format/common/formatActions","vs/editor/contrib/goToDeclaration/common/goToDeclaration","vs/editor/contrib/gotoError/browser/gotoError","vs/editor/contrib/hover/common/hover","vs/editor/contrib/hover/browser/modesContentHover","vs/editor/contrib/hover/browser/hover","vs/editor/contrib/inPlaceReplace/common/inPlaceReplace","vs/editor/contrib/inspectTokens/browser/inspectTokens","vs/editor/contrib/linesOperations/common/linesOperations","vs/editor/contrib/links/browser/links","vs/editor/contrib/multicursor/common/multicursor","vs/base/common/diff/diffChange","vs/editor/contrib/parameterHints/browser/parameterHintsWidget","vs/editor/contrib/parameterHints/browser/parameterHints","vs/editor/contrib/quickFix/common/quickFix","vs/editor/contrib/quickFix/common/quickFixModel","vs/editor/contrib/quickFix/browser/quickFix","vs/editor/common/commands/surroundSelectionCommand","vs/editor/contrib/quickOpen/browser/gotoLine","vs/editor/contrib/quickOpen/browser/quickCommand","vs/editor/contrib/quickOpen/common/quickOpen","vs/editor/contrib/quickOpen/browser/quickOutline","vs/editor/contrib/referenceSearch/common/referenceSearch","vs/editor/contrib/rename/common/rename","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/smartSelect/common/smartSelect","vs/base/common/graph","vs/editor/contrib/suggest/browser/tabCompletion","vs/base/browser/ui/octiconLabel/octiconLabel","vs/editor/contrib/suggest/browser/suggestWidget","vs/editor/contrib/suggest/common/suggestModel","vs/editor/contrib/suggest/browser/suggestController","vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode","vs/editor/contrib/wordHighlighter/common/wordHighlighter","vs/platform/contextview/browser/contextViewService","vs/platform/theme/common/themes","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/view/viewImpl","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/editor/common/diff/diffComputer","vs/editor/browser/standalone/standaloneCodeEditor","vs/base/common/mime","vs/editor/common/model/editStack","vs/editor/common/model/indentRanges","vs/editor/common/model/indentationGuesser","vs/editor/browser/standalone/standaloneEditor","vs/editor/browser/standalone/standaloneLanguages","vs/editor/contrib/referenceSearch/browser/referencesWidget","vs/editor/common/model/tokenIterator","vs/editor/contrib/goToDeclaration/browser/goToDeclaration","vs/base/common/winjs.base.raw","vs/base/common/marked/raw.marked","vs/editor/edcore.main"],h=function(e){for(var t=[],n=0,i=e.length;n<i;n++)t[n]=d[e[n]];return t},p=this;!function(e){var t=p||{},n=function(){function e(){this._pendingLoads=0}return e.prototype.attachListeners=function(e,t,n,i){var o=function(){t.removeEventListener("load",r),t.removeEventListener("error",s)},r=function(e){o(),n()},s=function(e){o(),i(e)};t.addEventListener("load",r),t.addEventListener("error",s)},e.prototype._onLoad=function(e,t){this._pendingLoads--,t()},e.prototype._onLoadError=function(e,t,n){this._pendingLoads--,t(n)},e.prototype._insertLinkNode=function(e){this._pendingLoads++;var t=document.head||document.getElementsByTagName("head")[0],n=t.getElementsByTagName("link")||document.head.getElementsByTagName("script");n.length>0?t.insertBefore(e,n[n.length-1]):t.appendChild(e)},e.prototype.createLinkTag=function(e,t,n,i){var o=this,r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("data-name",e);var s=function(){return o._onLoad(e,n)},a=function(t){return o._onLoadError(e,i,t)};return this.attachListeners(e,r,s,a),r.setAttribute("href",t),r},e.prototype._linkTagExists=function(e,t){var n,i,o,r,s=document.getElementsByTagName("link");for(n=0,i=s.length;n<i;n++)if(o=s[n].getAttribute("data-name"),r=s[n].getAttribute("href"),o===e||r===t)return!0;return!1},e.prototype.load=function(e,t,n,i){if(this._linkTagExists(e,t))return void n();var o=this.createLinkTag(e,t,n,i);this._insertLinkNode(o)},e}(),i=function(){function e(){this.fs=require.nodeRequire("fs")}return e.prototype.load=function(t,n,i,o){var r=this.fs.readFileSync(n,"utf8");r.charCodeAt(0)===e.BOM_CHAR_CODE&&(r=r.substring(1)),i(r)},e}();i.BOM_CHAR_CODE=65279;var o=function(){function e(e){this.cssLoader=e}return e.prototype.load=function(n,i,o,r){r=r||{};var s=r["vs/css"]||{};t.inlineResources=s.inlineResources,t.inlineResourcesLimit=s.inlineResourcesLimit||5e3;var a=i.toUrl(n+".css");this.cssLoader.load(n,a,function(t){r.isBuild&&(e.BUILD_MAP[n]=t,e.BUILD_PATH_MAP[n]=a),o({})},function(e){"function"==typeof o.error&&o.error("Could not find "+a+" or it was empty")})},e.prototype.write=function(n,i,o){var r=o.getEntryPoint();t.cssPluginEntryPoints=t.cssPluginEntryPoints||{},t.cssPluginEntryPoints[r]=t.cssPluginEntryPoints[r]||[],t.cssPluginEntryPoints[r].push({moduleName:i,contents:e.BUILD_MAP[i],fsPath:e.BUILD_PATH_MAP[i]}),o.asModule(n+"!"+i,"define(['vs/css!"+r+"'], {});")},e.prototype.writeFile=function(e,n,i,o,s){if(t.cssPluginEntryPoints&&t.cssPluginEntryPoints.hasOwnProperty(n)){for(var a=i.toUrl(n+".css"),u=["/*---------------------------------------------------------"," * Copyright (c) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],l=t.cssPluginEntryPoints[n],c=0;c<l.length;c++)t.inlineResources?u.push(r.rewriteOrInlineUrls(l[c].fsPath,l[c].moduleName,n,l[c].contents,"base64"===t.inlineResources,t.inlineResourcesLimit)):u.push(r.rewriteUrls(l[c].moduleName,n,l[c].contents));o(a,u.join("\r\n"))}},e.prototype.getInlinedResources=function(){return t.cssInlinedResources||[]},e}();o.BUILD_MAP={},o.BUILD_PATH_MAP={},e.CSSPlugin=o;var r=function(){function e(){}return e.startsWith=function(e,t){return e.length>=t.length&&e.substr(0,t.length)===t},e.pathOf=function(e){var t=e.lastIndexOf("/");return t!==-1?e.substr(0,t+1):""},e.joinPaths=function(t,n){function i(t,n){return e.startsWith(t,n)?Math.max(n.length,t.indexOf("/",n.length)):0}function o(e,t){if("./"!==t){if("../"===t){var n=e.length>0?e[e.length-1]:null;if(n&&"/"===n)return;if(n&&"../"!==n)return void e.pop()}e.push(t)}}function r(e,t){for(;t.length>0;){var n=t.indexOf("/"),i=n>=0?t.substring(0,n+1):t;t=n>=0?t.substring(n+1):"",o(e,i)}}var s=0;s=s||i(t,"//"),s=s||i(t,"http://"),s=s||i(t,"https://");var a=[];return r(a,t.substr(s)),n.length>0&&"/"===n.charAt(0)&&(a=[]),r(a,n),t.substring(0,s)+a.join("")},e.commonPrefix=function(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n&&e.charCodeAt(i)===t.charCodeAt(i);i++);return e.substring(0,i)},e.commonFolderPrefix=function(t,n){var i=e.commonPrefix(t,n),o=i.lastIndexOf("/");return o===-1?"":i.substring(0,o+1)},e.relativePath=function(t,n){if(e.startsWith(n,"/")||e.startsWith(n,"http://")||e.startsWith(n,"https://"))return n;var i=e.commonFolderPrefix(t,n);t=t.substr(i.length),n=n.substr(i.length);for(var o=t.split("/").length,r="",s=1;s<o;s++)r+="../";return r+n},e._replaceURL=function(t,n){return t.replace(/url\(\s*([^\)]+)\s*\)?/g,function(t){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var r=i[0];for('"'!==r.charAt(0)&&"'"!==r.charAt(0)||(r=r.substring(1));r.length>0&&(" "===r.charAt(r.length-1)||"\t"===r.charAt(r.length-1));)r=r.substring(0,r.length-1);return'"'!==r.charAt(r.length-1)&&"'"!==r.charAt(r.length-1)||(r=r.substring(0,r.length-1)),e.startsWith(r,"data:")||e.startsWith(r,"http://")||e.startsWith(r,"https://")||(r=n(r)),"url("+r+")"})},e.rewriteUrls=function(t,n,i){return this._replaceURL(i,function(i){var o=e.joinPaths(e.pathOf(t),i);return e.relativePath(n,o)})},e.rewriteOrInlineUrls=function(n,i,o,r,s,a){var u=require.nodeRequire("fs"),l=require.nodeRequire("path");return this._replaceURL(r,function(r){if(/\.(svg|png)$/.test(r)){var c=l.join(l.dirname(n),r),d=u.readFileSync(c);if(d.length<a){t.cssInlinedResources=t.cssInlinedResources||[];var h=c.replace(/\\/g,"/");t.cssInlinedResources.indexOf(h)>=0&&console.warn("CSS INLINING IMAGE AT "+c+" MORE THAN ONCE. CONSIDER CONSOLIDATING CSS RULES"),t.cssInlinedResources.push(h);var p=/\.svg$/.test(r)?"image/svg+xml":"image/png",f=";base64,"+d.toString("base64");if(!s&&/\.svg$/.test(r)){var g=d.toString().replace(/"/g,"'").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\s+/g," "),m=","+g;m.length<f.length&&(f=m)}return'"data:'+p+f+'"'}}var v=e.joinPaths(e.pathOf(i),r);return e.relativePath(o,v)})},e}();e.Utilities=r,function(){var e=null,t="undefined"!=typeof process&&"undefined"!=typeof process.versions&&"undefined"!=typeof process.versions.electron;
e="undefined"!=typeof process&&process.versions&&process.versions.node&&!t?new i:new n,define("vs/css",new o(e))}()}(c||(c={}));var f,g=this;!function(e){function t(e,t){var n;return n=0===t.length?e:e.replace(/\{(\d+)\}/g,function(e,n){var i=n[0];return"undefined"!=typeof t[i]?t[i]:e}),u&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function n(e,t){var n=e[t];return n?n:(n=e["*"],n?n:null)}function i(e,n){for(var i=[],o=0;o<arguments.length-2;o++)i[o]=arguments[o+2];return t(n,i)}function o(e){return function(n,i){var o=l.call(arguments,2);return t(e[n],o)}}var r=g||{},s=r.Plugin&&r.Plugin.Resources?r.Plugin.Resources:void 0,a="i-default",u=r&&r.document&&r.document.location&&r.document.location.hash.indexOf("pseudo=true")>=0,l=Array.prototype.slice,c=function(){function e(){this.localize=i}return e.prototype.setPseudoTranslation=function(e){u=e},e.prototype.create=function(e,t){return{localize:o(t[e])}},e.prototype.load=function(t,r,u,l){if(l=l||{},t&&0!==t.length){var c=void 0;if(s&&s.getString)c=".nls.keys",r([t+c],function(e){u({localize:function(t,n){if(!e[t])return"NLS error: unknown key "+t;var i=e[t].keys;if(n>=i.length)return"NLS error unknow index "+n;var o=i[n],r=[];r[0]=t+"_"+o;for(var a=0;a<arguments.length-2;a++)r[a+1]=arguments[a+2];return s.getString.apply(s,r)}})});else if(l.isBuild)r([t+".nls",t+".nls.keys"],function(n,i){e.BUILD_MAP[t]=n,e.BUILD_MAP_KEYS[t]=i,u(n)});else{var d=l["vs/nls"]||{},h=d.availableLanguages?n(d.availableLanguages,t):null;c=".nls",null!==h&&h!==a&&(c=c+"."+h),r([t+c],function(e){Array.isArray(e)?e.localize=o(e):e.localize=o(e[t]),u(e)})}}else u({localize:i})},e.prototype._getEntryPointsMap=function(){return r.nlsPluginEntryPoints=r.nlsPluginEntryPoints||{},r.nlsPluginEntryPoints},e.prototype.write=function(e,t,n){var i=n.getEntryPoint(),o=this._getEntryPointsMap();o[i]=o[i]||[],o[i].push(t),t!==i&&n.asModule(e+"!"+t,"define(['vs/nls', 'vs/nls!"+i+"'], function(nls, data) { return nls.create(\""+t+'", data); });')},e.prototype.writeFile=function(t,n,i,o,r){var s=this._getEntryPointsMap();if(s.hasOwnProperty(n)){for(var a=i.toUrl(n+".nls.js"),u=["/*---------------------------------------------------------"," * Copyright (c) Microsoft Corporation. All rights reserved."," *--------------------------------------------------------*/"],l=s[n],c={},d=0;d<l.length;d++)c[l[d]]=e.BUILD_MAP[l[d]];u.push('define("'+n+'.nls", '+JSON.stringify(c,null,"\t")+");"),o(a,u.join("\r\n"))}},e.prototype.finishBuild=function(t){t("nls.metadata.json",JSON.stringify({keys:e.BUILD_MAP_KEYS,messages:e.BUILD_MAP,bundles:this._getEntryPointsMap()},null,"\t"))},e}();c.BUILD_MAP={},c.BUILD_MAP_KEYS={},e.NLSPlugin=c,function(){define("vs/nls",new c)}()}(f||(f={})),define(d[157],h([0,1]),function(e,t){"use strict";function n(e){if(!e.parent||e.parent===e)return null;try{var t=e.location,n=e.parent.location;if(t.protocol!==n.protocol||t.hostname!==n.hostname||t.port!==n.port)return o=!0,null}catch(e){return o=!0,null}return e.parent}function i(e,t){for(var n,i=e.document.getElementsByTagName("iframe"),o=0,r=i.length;o<r;o++)if(n=i[o],n.contentWindow===t)return n;return null}var o=!1,r=null,s=function(){function e(){}return e.getSameOriginWindowChain=function(){if(!r){r=[];var e,t=window;do e=n(t),e?r.push({window:t,iframeElement:i(e,t)}):r.push({window:t,iframeElement:null}),t=e;while(t)}return r.slice(0)},e.hasDifferentOriginAncestor=function(){return r||this.getSameOriginWindowChain(),o},e.getPositionOfChildWindowRelativeToAncestorWindow=function(e,t){if(!t||e===t)return{top:0,left:0};for(var n=0,i=0,o=this.getSameOriginWindowChain(),r=0;r<o.length;r++){var s=o[r];if(s.window===t)break;if(!s.iframeElement)break;var a=s.iframeElement.getBoundingClientRect();n+=a.top,i+=a.left}return{top:n,left:i}},e}();t.IframeUtils=s}),define(d[194],h([0,1]),function(e,t){"use strict";function n(e,t){if(e.start>=t.end||t.start>=e.end)return null;var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?null:{start:n,end:i}}function i(e){return e.end-e.start<=0}function o(e,t){var n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}function r(e,t){for(var n=e.start;n<e.end;n++)t(n)}function s(e,t){for(var i=[],o=0,r=t;o<r.length;o++){var s=r[o];if(!(e.start>=s.range.end)){if(e.end<s.range.start)break;var a=n(e,s.range);a&&i.push({range:a,size:s.size})}}return i}function a(e,t){var n=e.start,i=e.end;return{start:n+t,end:i+t}}function u(e){for(var t=[],n=null,i=0,o=e;i<o.length;i++){var r=o[i],s=r.range.start,a=r.range.end,u=r.size;n&&u===n.size?n.range.end=a:(n={range:{start:s,end:a},size:u},t.push(n))}return t}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return u(e.reduce(function(e,t){return e.concat(t)},[]))}t.intersect=n,t.isEmpty=i,t.relativeComplement=o,t.each=r,t.groupIntersect=s,t.consolidate=u;var c=function(){function e(){this.groups=[],this._size=0}return e.prototype.splice=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=n.length-t,r=s({start:0,end:e},this.groups),u=s({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(function(e){return{range:a(e.range,o),size:e.size}}),c=n.map(function(t,n){return{range:{start:e+n,end:e+n+1},size:t.size}});this.groups=l(r,c,u),this._size=this.groups.reduce(function(e,t){return e+t.size*(t.range.end-t.range.start)},0)},Object.defineProperty(e.prototype,"count",{get:function(){var e=this.groups.length;return e?this.groups[e-1].range.end:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.indexAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,o=this.groups;i<o.length;i++){var r=o[i],s=r.range.end-r.range.start,a=n+s*r.size;if(e<a)return t+Math.floor((e-n)/r.size);t+=s,n=a}return t},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.count)},e.prototype.positionAt=function(e){if(e<0)return-1;for(var t=0,n=0,i=0,o=this.groups;i<o.length;i++){var r=o[i],s=r.range.end-r.range.start,a=n+s;if(e<a)return t+(e-n)*r.size;t+=s*r.size,n=a}return-1},e.prototype.dispose=function(){this.groups=null},e}();t.RangeMap=c}),define(d[138],h([0,1]),function(e,t){"use strict";var n=20,i=function(){function e(e,t,n){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(e),this._visibleSize=0,this._scrollSize=0,this._scrollPosition=0,this._computedAvailableSize=0,this._computedRepresentableSize=0,this._computedRatio=.1,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderPosition=0,this._refreshComputedValues()}return e.prototype.setVisibleSize=function(e){var t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollSize=function(e){var t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)},e.prototype.setScrollPosition=function(e){var t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)},e.prototype._refreshComputedValues=function(){var e,t,i=this._oppositeScrollbarSize,o=this._arrowSize,r=this._visibleSize,s=this._scrollSize,a=this._scrollPosition,u=Math.max(0,r-i),l=Math.max(0,u-2*o),c=s>0?l/s:0,d=s>r;if(d){if(e=Math.floor(r*c),t=Math.floor(a*c),e<n){var h=(n-e)/2;e=n,t-=h,t+e>l&&(t=l-e),t<0&&(t=0)}}else e=l,t=0;this._computedAvailableSize=Math.round(u),this._computedRepresentableSize=Math.round(l),this._computedRatio=c,this._computedIsNeeded=d,this._computedSliderSize=Math.round(e),this._computedSliderPosition=Math.round(t)},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getRectangleLargeSize=function(){return this._computedAvailableSize},e.prototype.getRectangleSmallSize=function(){return this._scrollbarSize},e.prototype.isNeeded=function(){return this._computedIsNeeded},e.prototype.getSliderSize=function(){return this._computedSliderSize},e.prototype.getSliderPosition=function(){return this._computedSliderPosition},e.prototype.convertSliderPositionToScrollPosition=function(e){return e/this._computedRatio},e.prototype.validateScrollPosition=function(e){return e=Math.round(e),e=Math.max(e,0),e=Math.min(e,this._scrollSize-this._visibleSize)},e}();t.ScrollbarState=i}),define(d[26],h([0,1]),function(e,t){"use strict";function n(e,t){return void 0===t&&(t=0),e[e.length-(1+t)]}function i(e,t,n){if(void 0===n&&(n=function(e,t){return e===t}),e.length!==t.length)return!1;for(var i=0,o=e.length;i<o;i++)if(!n(e[i],t[i]))return!1;return!0}function o(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=(i+o)/2|0,s=n(e[r],t);if(s<0)i=r+1;else{if(!(s>0))return r;o=r-1}}return-(i+1)}function r(e,t){var n=0,i=e.length;if(0===i)return 0;for(;n<i;){var o=Math.floor((n+i)/2);t(e[o])?i=o:n=o+1}return n}function s(e,t,n){if(0===n)return[];for(var i=e.slice(0,n).sort(t),o=function(o,s){var a=e[o];if(t(a,i[n-1])<0){i.pop();var u=r(i,function(e){return t(a,e)<0});i.splice(u,0,a)}},s=n,a=e.length;s<a;s++)o(s,a);return i}function a(e){return e?e.filter(function(e){return!!e}):e}function u(e,t,n){e.splice(n,0,e.splice(t,1)[0])}function l(e){return!Array.isArray(e)||0===e.length}function c(e,t){if(!t)return e.filter(function(t,n){return e.indexOf(t)===n});var n=Object.create(null);return e.filter(function(e){var i=t(e);return!n[i]&&(n[i]=!0,!0)})}function d(e){var t=Object.create(null);return function(n){var i=e(n);return!t[i]&&(t[i]=!0,!0)}}function h(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(t(i))return n}return-1}function p(e,t,n){void 0===n&&(n=null);var i=h(e,t);return i<0?n:e[i]}function f(e,t,n){void 0===n&&(n=function(e,t){return e===t});for(var i=0,o=0,r=Math.min(e.length,t.length);o<r&&n(e[o],t[o]);o++)i++;return i}function g(e){return e.reduce(function(e,t){return e.concat(t)},[])}function m(e,t){void 0===t&&(t=0);for(var n=[],i=t;i<e;i++)n.push(i);return n}function v(e,t,n){void 0===n&&(n=[]);for(var i=0;i<e;i++)n[i]=t();return n}function _(e,t,n){return void 0===n&&(n=function(e){return e}),e.reduce(function(e,i){var o=t(i);return e[o]=n(i,e[o]),e},Object.create(null))}function y(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}t.tail=n,t.equals=i,t.binarySearch=o,t.findFirst=r,t.top=s,t.coalesce=a,t.move=u,t.isFalsyOrEmpty=l,t.distinct=c,t.uniqueFilter=d,t.firstIndex=h,t.first=p,t.commonPrefixLength=f,t.flatten=g,t.range=m,t.fill=v,t.index=_,t.insert=y}),define(d[55],h([0,1]),function(e,t){"use strict";function n(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}t.ok=n}),define(d[91],h([0,1]),function(e,t){"use strict";function n(e){var t=[];for(var n in e)s.call(e,n)&&t.push(e[n]);return t}function i(e,t){for(var n in e)if(s.call(e,n)){var i=t({key:n,value:e[n]},function(){delete e[n]});if(i===!1)return}}function o(e,t){return!!s.call(e,t)&&(delete e[t],!0)}function r(e,t){for(var n=Object.create(null),i=0,o=e;i<o.length;i++){var r=o[i],s=t(r),a=n[s];a||(a=n[s]=[]),a.push(r)}return n}var s=Object.prototype.hasOwnProperty;t.values=n,t.forEach=i,t.remove=o,t.groupBy=r}),define(d[433],h([0,1]),function(e,t){"use strict";function n(e,t,n){var i=null,o=null;if("function"==typeof n.value?(i="value",o=n.value):"function"==typeof n.get&&(i="get",o=n.get),!o)throw new Error("not supported");var r="$memoize$"+t;n[i]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[r]}}t.memoize=n}),define(d[473],h([0,1]),function(e,t){"use strict";t.DifferenceType={Add:0,Remove:1,Change:2};var n=function(){function e(e,t,n,i){this.originalStart=e,this.originalLength=t,this.modifiedStart=n,this.modifiedLength=i}return e.prototype.getChangeType=function(){return 0===this.originalLength?t.DifferenceType.Add:0===this.modifiedLength?t.DifferenceType.Remove:t.DifferenceType.Change},e.prototype.getOriginalEnd=function(){return this.originalStart+this.originalLength},e.prototype.getModifiedEnd=function(){return this.modifiedStart+this.modifiedLength},e}();t.DiffChange=n}),define(d[95],h([0,1,473]),function(e,t,n){"use strict";function i(e){return{getLength:function(){return e.length},getElementHash:function(t){return e[t]}}}function o(e,t){return new c(i(e),i(t)).ComputeDiff()}t.stringDiff=o;var r=function(){function e(){}return e.Assert=function(e,t){if(!e)throw new Error(t)},e}();t.Debug=r;var s=function(){function e(){}return e.Copy=function(e,t,n,i,o){for(var r=0;r<o;r++)n[i+r]=e[t+r]},e}();t.MyArray=s;var a=1447,u=function(){function e(){this.m_changes=[],this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE,this.m_originalCount=0,this.m_modifiedCount=0}return e.prototype.MarkNextChange=function(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new n.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=Number.MAX_VALUE,this.m_modifiedStart=Number.MAX_VALUE},e.prototype.AddOriginalElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++},e.prototype.AddModifiedElement=function(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++},e.prototype.getChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes},e.prototype.getReverseChanges=function(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes},e}(),l=Object.prototype.hasOwnProperty,c=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_originalIds=[],this.m_modifiedIds=[],this.m_forwardHistory=[],this.m_reverseHistory=[],this.ComputeUniqueIdentifiers()}return e.prototype.ComputeUniqueIdentifiers=function(){var e=this.OriginalSequence.getLength(),t=this.ModifiedSequence.getLength();this.m_originalIds=new Array(e),this.m_modifiedIds=new Array(t);var n,i={},o=1;for(n=0;n<e;n++){var r=this.OriginalSequence.getElementHash(n);l.call(i,r)?this.m_originalIds[n]=i[r]:(this.m_originalIds[n]=o++,i[r]=this.m_originalIds[n])}for(n=0;n<t;n++){var s=this.ModifiedSequence.getElementHash(n);l.call(i,s)?this.m_modifiedIds[n]=i[s]:(this.m_modifiedIds[n]=o++,i[s]=this.m_modifiedIds[n])}},e.prototype.ElementsAreEqual=function(e,t){return this.m_originalIds[e]===this.m_modifiedIds[t]},e.prototype.ComputeDiff=function(){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1)},e.prototype._ComputeDiff=function(e,t,n,i){var o=[!1];return this.ComputeDiffRecursive(e,t,n,i,o)},e.prototype.ComputeDiffRecursive=function(e,t,i,o,s){for(s[0]=!1;e<=t&&i<=o&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){var a=void 0;return i<=o?(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n.DiffChange(e,0,i,o-i+1)]):e<=t?(r.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n.DiffChange(e,t-e+1,i,0)]):(r.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var u=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,u,l,s),d=u[0],h=l[0];if(null!==c)return c;if(!s[0]){var p=this.ComputeDiffRecursive(e,d,i,h,s),f=[];return f=s[0]?[new n.DiffChange(d+1,t-(d+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(d+1,t,h+1,o,s),this.ConcatenateChanges(p,f)}return[new n.DiffChange(e,t-e+1,i,o-i+1)]},e.prototype.WALKTRACE=function(e,t,i,o,r,s,a,l,c,d,h,p,f,g,m,v,_,y){var C,b=null,w=null,S=new u,E=t,L=i,N=f[0]-v[0]-o,T=Number.MIN_VALUE,x=this.m_forwardHistory.length-1;do C=N+e,C===E||C<L&&c[C-1]<c[C+1]?(h=c[C+1],g=h-N-o,h<T&&S.MarkNextChange(),T=h,S.AddModifiedElement(h+1,g),N=C+1-e):(h=c[C-1]+1,g=h-N-o,h<T&&S.MarkNextChange(),T=h-1,S.AddOriginalElement(h,g+1),N=C-1-e),x>=0&&(c=this.m_forwardHistory[x],e=c[0],E=1,L=c.length-1);while(--x>=-1);if(b=S.getReverseChanges(),y[0]){var M=f[0]+1,I=v[0]+1;if(null!==b&&b.length>0){var D=b[b.length-1];M=Math.max(M,D.getOriginalEnd()),I=Math.max(I,D.getModifiedEnd())}w=[new n.DiffChange(M,p-M+1,I,m-I+1)]}else{S=new u,E=s,L=a,N=f[0]-v[0]-l,T=Number.MAX_VALUE,x=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do C=N+r,C===E||C<L&&d[C-1]>=d[C+1]?(h=d[C+1]-1,g=h-N-l,h>T&&S.MarkNextChange(),T=h+1,S.AddOriginalElement(h+1,g+1),N=C+1-r):(h=d[C-1],g=h-N-l,h>T&&S.MarkNextChange(),T=h,S.AddModifiedElement(h+1,g+1),N=C-1-r),x>=0&&(d=this.m_reverseHistory[x],r=d[0],E=1,L=d.length-1);while(--x>=-1);w=S.getChanges()}return this.ConcatenateChanges(b,w)},e.prototype.ComputeRecursionPoint=function(e,t,i,o,r,u,l){var c,d,h,p=0,f=0,g=0,m=0;e--,i--,r[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var v=t-e+(o-i),_=v+1,y=new Array(_),C=new Array(_),b=o-i,w=t-e,S=e-i,E=t-o,L=w-b,N=L%2===0;y[b]=e,C[w]=t,l[0]=!1;var T,x;for(h=1;h<=v/2+1;h++){var M=0,I=0;for(p=this.ClipDiagonalBound(b-h,h,b,_),f=this.ClipDiagonalBound(b+h,h,b,_),T=p;T<=f;T+=2){for(c=T===p||T<f&&y[T-1]<y[T+1]?y[T+1]:y[T-1]+1,d=c-(T-b)-S,x=c;c<t&&d<o&&this.ElementsAreEqual(c+1,d+1);)c++,d++;if(y[T]=c,c+d>M+I&&(M=c,I=d),!N&&Math.abs(T-w)<=h-1&&c>=C[T])return r[0]=c,u[0]=d,x<=C[T]&&a>0&&h<=a+1?this.WALKTRACE(b,p,f,S,w,g,m,E,y,C,c,t,r,d,o,u,N,l):null}var D=(M-e+(I-i)-h)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(M,this.OriginalSequence,D))return l[0]=!0,r[0]=M,u[0]=I,D>0&&a>0&&h<=a+1?this.WALKTRACE(b,p,f,S,w,g,m,E,y,C,c,t,r,d,o,u,N,l):(e++,i++,[new n.DiffChange(e,t-e+1,i,o-i+1)]);for(g=this.ClipDiagonalBound(w-h,h,w,_),m=this.ClipDiagonalBound(w+h,h,w,_),T=g;T<=m;T+=2){for(c=T===g||T<m&&C[T-1]>=C[T+1]?C[T+1]-1:C[T-1],d=c-(T-w)-E,x=c;c>e&&d>i&&this.ElementsAreEqual(c,d);)c--,d--;if(C[T]=c,N&&Math.abs(T-b)<=h&&c<=y[T])return r[0]=c,u[0]=d,x>=y[T]&&a>0&&h<=a+1?this.WALKTRACE(b,p,f,S,w,g,m,E,y,C,c,t,r,d,o,u,N,l):null}if(h<=a){var R=new Array(f-p+2);R[0]=b-p+1,s.Copy(y,p,R,1,f-p+1),this.m_forwardHistory.push(R),R=new Array(m-g+2),R[0]=w-g+1,s.Copy(C,g,R,1,m-g+1),this.m_reverseHistory.push(R)}}return this.WALKTRACE(b,p,f,S,w,g,m,E,y,C,c,t,r,d,o,u,N,l)},e.prototype.ConcatenateChanges=function(e,t){var n=[],i=null;return 0===e.length||0===t.length?t.length>0?t:e:this.ChangesOverlap(e[e.length-1],t[0],n)?(i=new Array(e.length+t.length-1),s.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],s.Copy(t,1,i,e.length,t.length-1),i):(i=new Array(e.length+t.length),s.Copy(e,0,i,0,e.length),s.Copy(t,0,i,e.length,t.length),i)},e.prototype.ChangesOverlap=function(e,t,i){if(r.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),r.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){var o=e.originalStart,s=e.originalLength,a=e.modifiedStart,u=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(u=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n.DiffChange(o,s,a,u),!0}return i[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e<i)return e;var o=n,r=i-n-1,s=t%2===0;if(e<0){var a=o%2===0;return s===a?0:1}var u=r%2===0;return s===u?i-1:i-2},e}();t.LcsDiff=c});var m=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};define(d[67],h([0,1]),function(e,t){"use strict";var n=function(){function e(e){this.time=(new Date).getTime(),this.originalEvent=e,this.source=null}return e}();t.Event=n;var i=function(e){function t(t,n,i,o){var r=e.call(this,o)||this;return r.key=t,r.oldValue=n,r.newValue=i,r}return m(t,e),t}(n);t.PropertyChangeEvent=i;var o=function(e){function t(t,n){var i=e.call(this,n)||this;return i.element=t,i}return m(t,e),t}(n);t.ViewerEvent=o,t.EventType={PROPERTY_CHANGED:"propertyChanged",SELECTION:"selection",FOCUS:"focus",BLUR:"blur",HIGHLIGHT:"highlight",EXPAND:"expand",COLLAPSE:"collapse",TOGGLE:"toggle",BEFORE_RUN:"beforeRun",RUN:"run",EDIT:"edit",SAVE:"save",CANCEL:"cancel",CHANGE:"change",DISPOSE:"dispose"}}),define(d[196],h([0,1]),function(e,t){"use strict";function n(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return!e.apply(void 0,t)}}function i(e){var t,n=this,i=!1;return function(){return i?t:(i=!0,t=e.apply(n,arguments))}}t.not=n,t.once=i}),define(d[208],h([0,1]),function(e,t){"use strict";function n(e,t){switch(void 0===t&&(t=0),typeof e){case"object":return null===e?i(349,t):Array.isArray(e)?s(e,t):a(e,t);case"string":return r(e,t);case"boolean":return o(e,t);case"number":return i(e,t);case"undefined":return i(e,937);default:return i(e,617)}}function i(e,t){return(t<<5)-t+e|0}function o(e,t){return i(e?433:863,t)}function r(e,t){t=i(149417,t);for(var n=0,o=e.length;n<o;n++)t=i(e.charCodeAt(n),t);return t}function s(e,t){return t=i(104579,t),e.reduce(function(e,t){return n(t,e)},t)}function a(e,t){return t=i(181387,t),Object.keys(e).sort().reduce(function(t,i){return t=r(i,t),n(e[i],t)},t)}t.hash=n}),define(d[111],h([0,1]),function(e,t){"use strict";function n(e,t){return!e&&!t||!(!e||!t)&&(Array.isArray(e)?!!Array.isArray(t)&&i(e,t):o(e,t))}function i(e,t){var n=e.length,i=t.length;if(n!==i)return!1;for(var r=0;r<n;r++)if(!o(e[r],t[r]))return!1;return!0}function o(e,t){return!e&&!t||!(!e||!t)&&("string"==typeof e?"string"==typeof t&&e===t:e.language===t.language&&e.value===t.value)}function r(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function s(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function a(e,t){return!e&&!t||!(!e||!t)&&(e.language===t.language&&e.value===t.value)}function u(e,t){return e.formattedText===t.formattedText&&e.text===t.text&&e.className===t.className&&e.style===t.style&&e.customStyle===t.customStyle&&e.tagName===t.tagName&&e.isText===t.isText&&e.role===t.role&&e.markdown===t.markdown&&a(e.code,t.code)&&l(e.children,t.children)}function l(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;var n=e.length,i=t.length;if(n!==i)return!1;for(var o=0;o<n;o++)if(!u(e[o],t[o]))return!1;return!0}t.markedStringsEquals=n,t.textToMarkedString=r,t.removeMarkdownEscapes=s,t.htmlContentElementArrEquals=l}),define(d[116],h([0,1]),function(e,t){"use strict";var n=function(){function e(e){this._prefix=e,this._lastId=0}return e.prototype.nextId=function(){return this._prefix+ ++this._lastId},e}();t.IdGenerator=n,t.defaultGenerator=new n("id#")}),define(d[77],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length),this.items=e,this.start=t,this.end=n,this.index=t-1}return e.prototype.first=function(){return this.index=this.start,this.current()},e.prototype.next=function(){return this.index=Math.min(this.index+1,this.end),this.current()},e.prototype.current=function(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]},e}();t.ArrayIterator=n;var i=function(e){function t(t,n,i){return void 0===n&&(n=0),void 0===i&&(i=t.length),e.call(this,t,n,i)||this}return m(t,e),t.prototype.current=function(){return e.prototype.current.call(this)},t.prototype.previous=function(){return this.index=Math.max(this.index-1,this.start-1),this.current()},t.prototype.first=function(){return this.index=this.start,this.current()},t.prototype.last=function(){return this.index=this.end-1,this.current()},t.prototype.parent=function(){return null},t}(n);t.ArrayNavigator=i;var o=function(){function e(e,t){this.iterator=e,this.fn=t}return e.prototype.next=function(){return this.fn(this.iterator.next())},e}();t.MappedIterator=o;var r=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.navigator=t,i}return m(t,e),t.prototype.current=function(){return this.fn(this.navigator.current())},t.prototype.previous=function(){return this.fn(this.navigator.previous())},t.prototype.parent=function(){return this.fn(this.navigator.parent())},t.prototype.first=function(){return this.fn(this.navigator.first())},t.prototype.last=function(){return this.fn(this.navigator.last())},t.prototype.next=function(){return this.fn(this.navigator.next())},t}(o);t.MappedNavigator=r}),define(d[31],h([0,1]),function(e,t){"use strict";function n(e,t){var n=[];e(n);for(var i={},o=0,s=n.length;o<s;o++)n[o]&&(i[n[o]]=o);t(i);var a={};for(var u in i)i.hasOwnProperty(u)&&(a[u]=i[u],a[u.toLowerCase()]=i[u]);return new r(n,a)}function i(e,t){var n=(65535&t)<<16>>>0;return(e|n)>>>0}var o;!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.MAX_VALUE=109]="MAX_VALUE"}(o=t.KeyCode||(t.KeyCode={}));var r=function(){function e(e,t){this._fromKeyCode=e,this._toKeyCode=t}return e.prototype.fromKeyCode=function(e){return this._fromKeyCode[e]},e.prototype.toKeyCode=function(e){return this._toKeyCode.hasOwnProperty(e)?this._toKeyCode[e]:0},e}();t.Mapping=r;var s=n(function(e){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",e[16]="UpArrow",e[17]="RightArrow",e[18]="DownArrow",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[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]=";",e[81]="=",e[82]=",",e[83]="-",e[84]=".",e[85]="/",e[86]="`",e[87]="[",e[88]="\\",e[89]="]",e[90]="'",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["\r"]=3});t.USER_SETTINGS=n(function(e){for(var t=0,n=s._fromKeyCode.length;t<n;t++)e[t]=s._fromKeyCode[t];e[15]="Left",e[16]="Up",e[17]="Right",e[18]="Down"},function(e){e.OEM_1=80,e.OEM_PLUS=81,e.OEM_COMMA=82,e.OEM_MINUS=83,e.OEM_PERIOD=84,e.OEM_2=85,e.OEM_3=86,e.OEM_4=87,e.OEM_5=88,e.OEM_6=89,e.OEM_7=90,e.OEM_8=91,e.OEM_102=92});var a;!function(e){function t(e){return s.fromKeyCode(e)}function n(e){return s.toKeyCode(e)}e.toString=t,e.fromString=n}(a=t.KeyCodeUtils||(t.KeyCodeUtils={}));var u;!function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl",e[e.KeyCode=255]="KeyCode",e[e.ModifierMask=3840]="ModifierMask"}(u||(u={}));var l;!function(e){e[e.CtrlCmd=2048]="CtrlCmd",e[e.Shift=1024]="Shift",e[e.Alt=512]="Alt",e[e.WinCtrl=256]="WinCtrl"}(l=t.KeyMod||(t.KeyMod={})),t.KeyChord=i;var c=function(){function e(){}return e.extractFirstPart=function(e){return(65535&e)>>>0},e.extractChordPart=function(e){return(4294901760&e)>>>16},e.hasChord=function(e){return 0!==this.extractChordPart(e)},e.hasCtrlCmd=function(e){return!!(2048&e)},e.hasShift=function(e){return!!(1024&e)},e.hasAlt=function(e){return!!(512&e)},e.hasWinCtrl=function(e){return!!(256&e)},e.isModifierKey=function(e){if((3840&e)===e)return!0;var t=this.extractKeyCode(e);return 5===t||57===t||6===t||4===t},e.extractKeyCode=function(e){return 255&e},e}();t.BinaryKeybindings=c;var d=function(){function e(e){this.value=e}return e.prototype.equals=function(e){return this.value===e.value},e.prototype.hasCtrlCmd=function(){return c.hasCtrlCmd(this.value)},e.prototype.hasShift=function(){return c.hasShift(this.value)},e.prototype.hasAlt=function(){return c.hasAlt(this.value)},e.prototype.hasWinCtrl=function(){return c.hasWinCtrl(this.value)},e.prototype.isModifierKey=function(){return c.isModifierKey(this.value)},e.prototype.getKeyCode=function(){return c.extractKeyCode(this.value)},e}();t.Keybinding=d}),define(d[4],h([0,1]),function(e,t){"use strict";function n(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return Array.isArray(e)?(e.forEach(function(e){return e&&e.dispose()}),[]):0!==t.length?(n(e),n(t),[]):e?(e.dispose(),e):void 0}function i(e){return{dispose:function(){return n(e)}}}function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e.map(function(e){return{dispose:e}}))}t.empty=Object.freeze({dispose:function(){}}),t.dispose=n,t.combinedDisposable=i,t.toDisposable=o;var r=function(){function e(){this._toDispose=[];
}return e.prototype.dispose=function(){this._toDispose=n(this._toDispose)},e.prototype._register=function(e){return this._toDispose.push(e),e},e}();t.Disposable=r;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.add=function(e){if(!Array.isArray(e))return this._register(e);for(var t=0,n=e;t<n.length;t++){var i=n[t];return this._register(i)}},t}(r);t.Disposables=s;var a=function(){function e(){}return Object.defineProperty(e.prototype,"value",{set:function(e){this._value&&this._value.dispose(),this._value=e},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.value=null},e}();t.OneDisposable=a;var u=function(){function e(){this.references=Object.create(null)}return e.prototype.acquire=function(e){var t=this,n=this.references[e];n||(n=this.references[e]={counter:0,object:this.createReferencedObject(e)});var i=n.object,o=function(){0===--n.counter&&(t.destroyReferencedObject(n.object),delete t.references[e])};return n.counter++,{object:i,dispose:o}},e}();t.ReferenceCollection=u;var l=function(){function e(e){this.object=e}return e.prototype.dispose=function(){},e}();t.ImmortalReference=l}),define(d[110],h([0,1]),function(e,t){"use strict";var n=function(){function e(){this.map=Object.create(null),this._size=0}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var t=this.peek(e);return t?t:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n?n:(this.set(e,t),t)},e.prototype.keys=function(){var e=[];for(var t in this.map)e.push(this.map[t].key);return e},e.prototype.values=function(){var e=[];for(var t in this.map)e.push(this.map[t].value);return e},e.prototype.entries=function(){var e=[];for(var t in this.map)e.push(this.map[t]);return e},e.prototype.set=function(e,t){return!this.get(e)&&(this.push(e,t),!0)},e.prototype.delete=function(e){var t=this.get(e);return t?(this.pop(e),t):null},e.prototype.has=function(e){return!!this.get(e)},e.prototype.clear=function(){this.map=Object.create(null),this._size=0},e.prototype.push=function(e,t){var n={key:e,value:t};this.map[e.toString()]=n,this._size++},e.prototype.pop=function(e){delete this.map[e.toString()],this._size--},e.prototype.peek=function(e){var t=this.map[e.toString()];return t?t.value:null},e}();t.LinkedMap=n;var i=function(){function e(e,t){void 0===e&&(e=Number.MAX_VALUE),void 0===t&&(t=1),this.limit=e,this.map=Object.create(null),this._size=0,this.ratio=e*t}return Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){if(this.map[e])return!1;var n={key:e,value:t};return this.push(n),this._size>this.limit&&this.trim(),!0},e.prototype.get=function(e){var t=this.map[e];return t?t.value:null},e.prototype.getOrSet=function(e,t){var n=this.get(e);return n?n:(this.set(e,t),t)},e.prototype.delete=function(e){var t=this.map[e];return t?(this.map[e]=void 0,this._size--,t.next?t.next.prev=t.prev:this.head=t.prev,t.prev?t.prev.next=t.next:this.tail=t.next,t.value):null},e.prototype.has=function(e){return!!this.map[e]},e.prototype.clear=function(){this.map=Object.create(null),this._size=0,this.head=null,this.tail=null},e.prototype.push=function(e){this.head&&(e.prev=this.head,this.head.next=e),this.tail||(this.tail=e),this.head=e,this.map[e.key]=e,this._size++},e.prototype.trim=function(){if(this.tail)if(this.ratio<this.limit)for(var e=0,t=this.tail;t.next;){if(this.map[t.key]=void 0,this._size--,e===this.ratio){this.tail=t.next,this.tail.prev=null;break}t=t.next,e++}else this.map[this.tail.key]=void 0,this._size--,this.tail=this.tail.next,this.tail.prev=null},e}();t.BoundedLinkedMap=i;var o=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.prototype.get=function(e){var t=this.map[e];return t?(this.delete(e),this.push(t),t.value):null},t}(i);t.LRUCache=o;var r=function(){function e(){this.children=new Map}return e}(),s=function(){function e(e){this._root=new r,this._splitter=e}return e.prototype.insert=function(e,t){for(var n=this._splitter(e),i=0,o=this._root;i<n.length;i++){var s=o.children[n[i]];{if(!s)break;o=s}}for(var a;i<n.length;i++)a=new r,o.children[n[i]]=a,o=a;o.element=t},e.prototype.lookUp=function(e){for(var t,n=this._splitter(e),i=this._root.children,o=0,r=n;o<r.length;o++){var s=r[o];if(t=i[s],!t)return;i=t.children}return t.element},e.prototype.findSubstr=function(e){for(var t,n=this._splitter(e),i=this._root.children,o=0,r=n;o<r.length;o++){var s=r[o],a=i[s];if(!a)break;a.element&&(t=a),i=a.children}if(t)return t.element},e.prototype.findSuperstr=function(t){for(var n,i=this._splitter(t),o=this._root.children,r=0,s=i;r<s.length;r++){var a=s[r];if(n=o[a],!n)return;o=n.children}var u=new e(this._splitter);return u._root=n,u},e}();s.PathSplitter=function(e){return e.split(/[\\/]/).filter(function(e){return!!e})},t.TrieMap=s});/**
* marked - a markdown parser
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
* https://github.com/chjj/marked
*/
var v={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:a,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:a,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:a,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};v.bullet=/(?:[*+-]|\d+\.)/,v.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,v.item=s(v.item,"gm")(/bull/g,v.bullet)(),v.list=s(v.list)(/bull/g,v.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+v.def.source+")")(),v.blockquote=s(v.blockquote)("def",v.def)(),v._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",v.html=s(v.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,v._tag)(),v.paragraph=s(v.paragraph)("hr",v.hr)("heading",v.heading)("lheading",v.lheading)("blockquote",v.blockquote)("tag","<"+v._tag)("def",v.def)(),v.normal=u({},v),v.gfm=u({},v.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),v.gfm.paragraph=s(v.paragraph)("(?!","(?!"+v.gfm.fences.source.replace("\\1","\\2")+"|"+v.list.source.replace("\\1","\\3")+"|")(),v.tables=u({},v.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=v,e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var i,o,r,s,a,u,l,c,d,e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),r[0].length>1&&this.tokens.push({type:"space"})),r=this.rules.code.exec(e))e=e.substring(r[0].length),r=r[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?r:r.replace(/\n+$/,"")});else if(r=this.rules.fences.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"code",lang:r[2],text:r[3]});else if(r=this.rules.heading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:r[1].length,text:r[2]});else if(t&&(r=this.rules.nptable.exec(e))){for(e=e.substring(r[0].length),u={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/\n$/,"").split("\n")},c=0;c<u.align.length;c++)/^ *-+: *$/.test(u.align[c])?u.align[c]="right":/^ *:-+: *$/.test(u.align[c])?u.align[c]="center":/^ *:-+ *$/.test(u.align[c])?u.align[c]="left":u.align[c]=null;for(c=0;c<u.cells.length;c++)u.cells[c]=u.cells[c].split(/ *\| */);this.tokens.push(u)}else if(r=this.rules.lheading.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"heading",depth:"="===r[2]?1:2,text:r[1]});else if(r=this.rules.hr.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"hr"});else if(r=this.rules.blockquote.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"blockquote_start"}),r=r[0].replace(/^ *> ?/gm,""),this.token(r,t,!0),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),s=r[2],this.tokens.push({type:"list_start",ordered:s.length>1}),r=r[0].match(this.rules.item),i=!1,d=r.length,c=0;c<d;c++)u=r[c],l=u.length,u=u.replace(/^ *([*+-]|\d+\.) +/,""),~u.indexOf("\n ")&&(l-=u.length,u=this.options.pedantic?u.replace(/^ {1,4}/gm,""):u.replace(new RegExp("^ {1,"+l+"}","gm"),"")),this.options.smartLists&&c!==d-1&&(a=v.bullet.exec(r[c+1])[0],s===a||s.length>1&&a.length>1||(e=r.slice(c+1).join("\n")+e,c=d-1)),o=i||/\n\n(?!\s*$)/.test(u),c!==d-1&&(i="\n"===u.charAt(u.length-1),o||(o=i)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(u,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(r=this.rules.html.exec(e))e=e.substring(r[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===r[1]||"script"===r[1]||"style"===r[1],text:r[0]});else if(!n&&t&&(r=this.rules.def.exec(e)))e=e.substring(r[0].length),this.tokens.links[r[1].toLowerCase()]={href:r[2],title:r[3]};else if(t&&(r=this.rules.table.exec(e))){for(e=e.substring(r[0].length),u={type:"table",header:r[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:r[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:r[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c<u.align.length;c++)/^ *-+: *$/.test(u.align[c])?u.align[c]="right":/^ *:-+: *$/.test(u.align[c])?u.align[c]="center":/^ *:-+ *$/.test(u.align[c])?u.align[c]="left":u.align[c]=null;for(c=0;c<u.cells.length;c++)u.cells[c]=u.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(u)}else if(t&&(r=this.rules.paragraph.exec(e)))e=e.substring(r[0].length),this.tokens.push({type:"paragraph",text:"\n"===r[1].charAt(r[1].length-1)?r[1].slice(0,-1):r[1]});else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),this.tokens.push({type:"text",text:r[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var _={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:a,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:a,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};_._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,_._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,_.link=s(_.link)("inside",_._inside)("href",_._href)(),_.reflink=s(_.reflink)("inside",_._inside)(),_.normal=u({},_),_.pedantic=u({},_.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),_.gfm=u({},_.normal,{escape:s(_.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(_.text)("]|","~]|")("|","|https?://|")()}),_.breaks=u({},_.gfm,{br:s(_.br)("{2,}","*")(),text:s(_.gfm.text)("{2,}","*")()}),t.rules=_,t.output=function(e,n,i){var o=new t(n,i);return o.output(e)},t.prototype.output=function(e){for(var t,n,i,r,s="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),s+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):(n=o(r[1]),i=n),s+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(r[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),s+=this.options.sanitize?o(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,s+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){s+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),s+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),s+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),s+=this.renderer.codespan(o(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),s+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),s+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),s+=o(this.smartypants(r[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),n=o(r[1]),i=n,s+=this.renderer.link(i,null,n);return s},t.prototype.outputLink=function(e,t){var n=o(t.href),i=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,o(e[1]))},t.prototype.smartypants=function(e){return e},t.prototype.mangle=function(e){for(var t,n="",i=e.length,o=0;o<i;o++)t=e.charCodeAt(o),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'<pre><code class="'+this.options.langPrefix+o(t,!0)+'">'+(n?e:o(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:o(e,!0))+"\n</code></pre>"},n.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},n.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},n.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},n.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},n.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},n.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return i+e+"</"+n+">\n"},n.prototype.strong=function(e){return"<strong>"+e+"</strong>"},n.prototype.em=function(e){return"<em>"+e+"</em>"},n.prototype.codespan=function(e){return"<code>"+e+"</code>"},n.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.prototype.del=function(e){return"<del>"+e+"</del>"},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(r(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:"))return""}var o='<a href="'+e+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>"},n.prototype.image=function(e,t,n){var i='<img src="'+e+'" alt="'+n+'"';return t&&(i+=' title="'+t+'"'),i+=this.options.xhtml?"/>":">"},i.parse=function(e,t,n){var o=new i(t,n);return o.parse(e)},i.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,o,r="",s="";for(n="",e=0;e<this.token.header.length;e++)i={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(r+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",o=0;o<t.length;o++)n+=this.renderer.tablecell(this.inline.output(t[o]),{header:!1,align:this.token.align[o]});s+=this.renderer.tablerow(n)}return this.renderer.table(r,s);case"blockquote_start":for(var s="";"blockquote_end"!==this.next().type;)s+=this.tok();return this.renderer.blockquote(s);case"list_start":for(var s="",a=this.token.ordered;"list_end"!==this.next().type;)s+=this.tok();return this.renderer.list(s,a);case"list_item_start":for(var s="";"list_item_end"!==this.next().type;)s+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(s);case"loose_item_start":for(var s="";"list_item_end"!==this.next().type;)s+=this.tok();return this.renderer.listitem(s);case"html":var u=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(u);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},a.exec=a,l.options=l.setOptions=function(e){return u(l.defaults,e),l},l.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new n,xhtml:!1},l.Parser=i,l.parser=i.parse,l.Renderer=n,l.Lexer=e,l.lexer=e.lex,l.InlineLexer=t,l.inlineLexer=t.output,l.parse=l,define("vs/base/common/marked/raw.marked",[],function(){return l}),define(d[247],h([514]),function(e){return{marked:e}}),define(d[18],h([0,1]),function(e,t){"use strict";function n(){return"undefined"!=typeof v.Worker}var i=!1,o=!1,r=!1,s=!1,a=!1,u=!1,l=!1,c=void 0,d=void 0;if(t.LANGUAGE_DEFAULT="en","object"==typeof process){i="win32"===process.platform,o="darwin"===process.platform,r="linux"===process.platform,s=!i&&0===process.getuid();var h=process.env.VSCODE_NLS_CONFIG;if(h)try{var p=JSON.parse(h),f=p.availableLanguages["*"];c=p.locale,d=f?f:t.LANGUAGE_DEFAULT}catch(e){}a=!0}else if("object"==typeof navigator){var g=navigator.userAgent;i=g.indexOf("Windows")>=0,o=g.indexOf("Macintosh")>=0,r=g.indexOf("Linux")>=0,u=!0,c=navigator.language,d=c,l=!!self.QUnit}var m;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(m=t.Platform||(t.Platform={})),t._platform=m.Web,a&&(o?t._platform=m.Mac:i?t._platform=m.Windows:r&&(t._platform=m.Linux)),t.isWindows=i,t.isMacintosh=o,t.isLinux=r,t.isRootUser=s,t.isNative=a,t.isWeb=u,t.isQunit=l,t.platform=t._platform,t.language=d,t.locale=c;var v="object"==typeof self?self:global;t.globals=v,t.hasWebWorkerSupport=n,t.setTimeout=v.setTimeout.bind(v),t.clearTimeout=v.clearTimeout.bind(v),t.setInterval=v.setInterval.bind(v),t.clearInterval=v.clearInterval.bind(v)}),define(d[442],h([0,1]),function(e,t){"use strict";function n(e,t,n){if(!e||!t)return 0;var o=e+t,s=n&&n[o];if("number"==typeof s)return s;for(var a=t.length,u=e.toLowerCase(),l=t.toLowerCase(),c=0,d=0,h=0,p=function(){var n=u.indexOf(l[c],d);return n<0?(h=0,"break"):(h+=1,d===n&&(h+=5),e[n]===t[n]&&(h+=1),0===n?h+=8:r.some(function(t){return t===e[n-1]})?h+=7:i(e.charCodeAt(n))&&(h+=1),d=n+1,void c++)};c<a;){var f=p();if("break"===f)break}return n&&(n[o]=h),h}function i(e){return 65<=e&&e<=90}function o(e,t){if(!e||!t)return!1;for(var n=t.length,i=e.toLowerCase(),o=0,r=-1;o<n;){var s=i.indexOf(t[o],r+1);if(s<0)return!1;r=s,o++}return!0}/*!
BEGIN THIRD PARTY
*/
/*!
* string_score.js: String Scoring Algorithm 0.1.22
*
* http://joshaven.com/string_score
* https://github.com/joshaven/string_score
*
* Copyright (C) 2009-2014 Joshaven Potter <yourtech@gmail.com>
* Special thanks to all of the contributors listed here https://github.com/joshaven/string_score
* MIT License: http://opensource.org/licenses/MIT
*
* Date: Tue Mar 1 2011
* Updated: Tue Mar 10 2015
*/
var r=["-","_"," ","/","\\","."];t.score=n,t.matches=o}),/*!
END THIRD PARTY
*/
define(d[444],h([0,1]),function(e,t){"use strict";var n=function(){function e(e){void 0===e&&(e=[]),this._elements=e.slice()}return Object.defineProperty(e.prototype,"size",{get:function(){return this._elements.length},enumerable:!0,configurable:!0}),e.prototype.set=function(e){this.unset(e),this._elements.push(e)},e.prototype.contains=function(e){return this._elements.indexOf(e)>-1},e.prototype.unset=function(e){var t=this._elements.indexOf(e);t>-1&&this._elements.splice(t,1)},Object.defineProperty(e.prototype,"elements",{get:function(){return this._elements.slice()},enumerable:!0,configurable:!0}),e}();t.ArraySet=n}),define(d[445],h([0,1,444,77]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._history=new n.ArraySet(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.set(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()?this._navigator.current():(this.last(),null)},e.prototype.previous=function(){return this._navigator.previous()?this._navigator.current():(this.first(),null)},e.prototype.current=function(){return this._navigator.current()},e.prototype.parent=function(){return null},e.prototype.first=function(){return this._navigator.first()},e.prototype.last=function(){return this._navigator.last()},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new i.ArrayNavigator(this._history.elements),this._navigator.last()},e.prototype._reduceToLimit=function(){var e=this._history.elements;e.length>this._limit&&(this._history=new n.ArraySet(e.slice(e.length-this._limit)))},e}();t.HistoryNavigator=o}),define(d[446],h([0,1,18]),function(e,t,n){"use strict";var i=n.globals.performance&&"function"==typeof n.globals.performance.now,o=function(){function e(e){this._highResolution=i&&e,this._startTime=this._now(),this._stopTime=-1}return e.create=function(t){return void 0===t&&(t=!0),new e(t)},e.prototype.stop=function(){this._stopTime=this._now()},e.prototype.elapsed=function(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime},e.prototype._now=function(){return this._highResolution?n.globals.performance.now():(new Date).getTime()},e}();t.StopWatch=o}),define(d[9],h([0,1,110]),function(e,t,n){"use strict";function i(e){return!e||"string"!=typeof e||0===e.trim().length}function o(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r<t;r++)o.push(n);return o.reverse().join("")}function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return 0===t.length?e:e.replace(B,function(e,n){var i=parseInt(n,10);return isNaN(i)||i<0||i>=t.length?e:t[i]})}function s(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}})}function a(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}function u(e,t){void 0===t&&(t=" ");var n=l(e,t);return c(n,t)}function l(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0,o=-1;(o=e.indexOf(t,i))===i;)i+=n;return e.substring(i)}function c(e,t){if(!e||!t)return e;var n=t.length,i=e.length;if(0===n||0===i)return e;for(var o=i,r=-1;;){if(r=e.lastIndexOf(t,o-1),r===-1||r+n!==o)break;if(0===r)return"";o=r}return e.substring(0,o)}function d(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function h(e){return e.replace(/\*/g,"")}function p(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function f(e,t){var n=e.length-t.length;return n>0?e.indexOf(t,n)===n:0===n&&e===t}function g(e,t,n){void 0===n&&(n=0);var i=e.indexOf(t,n);return i<0&&(n>0&&(e=e.substr(n)),t=a(t),i=e.search(new RegExp(t,"i"))),i}function m(e,t,n){if(void 0===n&&(n={}),""===e)throw new Error("Cannot create regex from empty string");t||(e=e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")),n.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var i="";return n.global&&(i+="g"),n.matchCase||(i+="i"),n.multiline&&(i+="m"),new RegExp(e,i)}function v(e){if("^"===e.source||"^$"===e.source||"$"===e.source)return!1;var t=e.exec("");return t&&0===e.lastIndex}function _(e){if(!t.canNormalize||!e)return e;var n=z.get(e);if(n)return n;var i;return i=U.test(e)?e.normalize("NFC"):e,z.set(e,i),i}function y(e){for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function C(e){for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(32!==i&&9!==i)return e.substring(0,t)}return e}function b(e,t){void 0===t&&(t=e.length-1);for(var n=t;n>=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1}function w(e,t){return e<t?-1:e>t?1:0}function S(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++){var o=e.charCodeAt(i),r=t.charCodeAt(i);if(o!==r){var s=o-r;if(32!==s&&s!==-32||!E(o)||!E(r))return w(e[i].toLowerCase(),t[i].toLowerCase())}}return e.length<t.length?-1:e.length>t.length?1:0}function E(e){return e>=97&&e<=122||e>=65&&e<=90}function L(e,t){var n=e.length,i=t.length;if(n!==i)return!1;for(var o=0;o<n;o++){var r=e.charCodeAt(o),s=t.charCodeAt(o);if(r!==s)if(E(r)&&E(s)){var a=Math.abs(r-s);if(0!==a&&32!==a)return!1}else if(String.fromCharCode(r).toLocaleLowerCase()!==String.fromCharCode(s).toLocaleLowerCase())return!1}return!0}function N(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return n;return i}function T(e,t){var n,i=Math.min(e.length,t.length),o=e.length-1,r=t.length-1;for(n=0;n<i;n++)if(e.charCodeAt(o-n)!==t.charCodeAt(r-n))return n;return i}function x(e){return 55296<=e&&e<=56319}function M(e){return 56320<=e&&e<=57343}function I(e){return K.test(e)}function D(e){return j.test(e)}function R(e){return e=+e,e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function k(e,t,n){void 0===n&&(n=4);var i=Math.abs(e.length-t.length);if(i>n)return 0;var o,r,s=[],a=[];for(o=0;o<t.length+1;++o)a.push(0);for(o=0;o<e.length+1;++o)s.push(a);for(o=1;o<e.length+1;++o)for(r=1;r<t.length+1;++r)e[o-1]===t[r-1]?s[o][r]=s[o-1][r-1]+1:s[o][r]=Math.max(s[o-1][r],s[o][r-1]);return s[e.length][t.length]-Math.sqrt(i)}function O(e){for(var t,n=/\r\n|\r|\n/g,i=[0];t=n.exec(e);)i.push(n.lastIndex);return i}function P(e,n){if(e.length<n)return e;for(var i=e.split(/\b/),o=0,r=i.length-1;r>=0;r--)if(o+=i[r].length,o>n){i.splice(0,r);break}return i.join(t.empty).replace(/^\s/,t.empty)}function A(e){return e&&(e=e.replace(q,""),e=e.replace(G,""),e=e.replace(Y,"")),e}function W(e){return e&&e.length>0&&65279===e.charCodeAt(0)}function F(e,t,n){var i=e.length+t.length;return i>n&&(e="..."+e.substr(i-n)),e+=t.length>n?t.substr(t.length-n):t}function V(e){return btoa(encodeURIComponent(e))}function H(e,t){for(var n="",i=0;i<t;i++)n+=e;return n}t.empty="",t.isFalsyOrWhitespace=i,t.pad=o;var B=/{(\d+)}/g;t.format=r,t.escape=s,t.escapeRegExpCharacters=a,t.trim=u,t.ltrim=l,t.rtrim=c,t.convertSimple2RegExpPattern=d,t.stripWildcards=h,t.startsWith=p,t.endsWith=f,t.indexOfIgnoreCase=g,t.createRegExp=m,t.regExpLeadsToEndlessLoop=v,t.canNormalize="function"==typeof"".normalize;var U=/[^\u0000-\u0080]/,z=new n.BoundedLinkedMap(1e4);t.normalizeNFC=_,t.firstNonWhitespaceIndex=y,t.getLeadingWhitespace=C,t.lastNonWhitespaceIndex=b,t.compare=w,t.compareIgnoreCase=S,t.equalsIgnoreCase=L,t.commonPrefixLength=N,t.commonSuffixLength=T,t.isHighSurrogate=x,t.isLowSurrogate=M;var K=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;t.containsRTL=I;var j=/^[\t\n\r\x20-\x7E]*$/;t.isBasicASCII=D,t.isFullWidthCharacter=R,t.difference=k,t.computeLineStarts=O,t.lcut=P;var q=/\x1B\x5B[12]?K/g,G=/\x1b\[\d+m/g,Y=/\x1b\[0?m/g;t.removeAnsiEscapeCodes=A,t.UTF8_BOM_CHARACTER=String.fromCharCode(65279),t.startsWithUTF8BOM=W,t.appendWithLimit=F,t.safeBtoa=V,t.repeat=H}),define(d[490],h([0,1,9]),function(e,t,n){"use strict";function i(e){return e}var o=function(){function e(e){this._container=e}return Object.defineProperty(e.prototype,"text",{set:function(e){var t=e||"";t=n.escape(t),t=i(t),this._container.innerHTML=t},enumerable:!0,configurable:!0}),e}(),r={expand:i,OcticonLabel:o};return r}),define(d[176],h([0,1,442,9]),function(e,t,n,i){"use strict";function o(e){c=e}function r(e,t){return c?c.compare(e||"",t||""):s(e,t)}function s(e,t){var n=d.exec(e.toLowerCase()),i=d.exec(t.toLowerCase()),o=n[1]||"",r=n[3]||"",s=i[1]||"",a=i[3]||"";return o!==s?o<s?-1:1:r===a?0:r<a?-1:1}function a(e,t,n){var o=e.toLowerCase(),s=t.toLowerCase(),a=u(e,t,n);if(a)return a;var l=i.endsWith(o,n),c=i.endsWith(s,n);if(l!==c)return l?-1:1;var d=r(o,s);return 0!==d?d:o.localeCompare(s)}function u(e,t,n){var o=e.toLowerCase(),r=t.toLowerCase(),s=i.startsWith(o,n),a=i.startsWith(r,n);if(s!==a)return s?-1:1;if(s&&a){if(o.length<r.length)return-1;if(o.length>r.length)return 1}return 0}function l(e,t,i,o,r,s){var l=i.getLabel(e),c=i.getLabel(t),d=u(l,c,o);if(d)return d;var h=n.score(l,o,s),p=n.score(c,o,s);if(h!==p)return h>p?-1:1;var f=i.getResourcePath(e),g=i.getResourcePath(t);if(f&&g){var m=n.score(f,o,s),v=n.score(g,o,s);if(m!==v)return m>v?-1:1}return l.length!==c.length?l.length<c.length?-1:1:f&&g&&f.length!==g.length?f.length<g.length?-1:1:l===c&&f&&g?a(f,g,r):a(l,c,r)}var c;t.setFileNameComparer=o,t.compareFileNames=r;var d=/^([^.]*)(\.(.*))?$/;t.noIntlCompareFileNames=s,t.compareAnything=a,t.compareByPrefix=u,t.compareByScore=l}),define(d[87],h([0,1,9,110]),function(e,t,n,i){"use strict";function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n){for(var i=0,o=e.length;i<o;i++){var r=e[i](t,n);if(r)return r}return null}}function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n){for(var i=[],o=0,r=e.length;o<r;o++){var s=e[o](t,n);if(!s)return null;i=i.concat(s)}return i}}function s(e,t,n){if(!n||0===n.length||n.length<t.length)return null;e&&(t=t.toLowerCase(),n=n.toLowerCase());for(var i=0;i<t.length;i++)if(t[i]!==n[i])return null;return t.length>0?[{start:0,end:t.length}]:[]}function a(e,t){var n=t.toLowerCase().indexOf(e.toLowerCase());return n===-1?null:[{start:n,end:n+e.length}]}function u(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)}function l(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]===t[i]){var o=null;if(o=l(e,t,n+1,i+1))return g({start:i,end:i+1},o)}return l(e,t,n,i+1)}function c(e){return 97<=e&&e<=122}function d(e){return 65<=e&&e<=90}function h(e){return 48<=e&&e<=57}function p(e){return 32===e||9===e||10===e||13===e}function f(e){return c(e)||d(e)||h(e)}function g(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function m(e,t){for(var n=t;n<e.length;n++){var i=e.charCodeAt(n);if(d(i)||h(i)||n>0&&!f(e.charCodeAt(n-1)))return n}return e.length}function v(e,t,n,i){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var o=null,r=i+1;for(o=v(e,t,n+1,i+1);!o&&(r=m(t,r))<t.length;)o=v(e,t,n+1,r),r++;return null===o?null:g({start:i,end:i+1},o)}function _(e){for(var t=0,n=0,i=0,o=0,r=0,s=0;s<e.length;s++)r=e.charCodeAt(s),d(r)&&t++,c(r)&&n++,f(r)&&i++,h(r)&&o++;var a=t/e.length,u=n/e.length,l=i/e.length,p=o/e.length;return{upperPercent:a,lowerPercent:u,alphaPercent:l,numericPercent:p}}function y(e){var t=e.upperPercent,n=e.lowerPercent;return 0===n&&t>.6}function C(e){var t=e.upperPercent,n=e.lowerPercent,i=e.alphaPercent,o=e.numericPercent;return n>.2&&t<.8&&i>.6&&o<.2}function b(e){for(var t=0,n=0,i=0,o=0,r=0;r<e.length;r++)i=e.charCodeAt(r),d(i)&&t++,c(i)&&n++,p(i)&&o++;return 0!==t&&0!==n||0!==o?t<=5:e.length<=30}function w(e,t){if(!t||0===t.length)return null;if(!b(e))return null;if(t.length>60)return null;var n=_(t);if(!C(n)){if(!y(n))return null;t=t.toLowerCase()}for(var i=null,o=0;o<t.length&&null===(i=v(e.toLowerCase(),t,0,o));)o=m(t,o+1);return i}function S(e,t,n){if(void 0===n&&(n=!1),!t||0===t.length)return null;for(var i=null,o=0;o<t.length&&null===(i=E(e.toLowerCase(),t,0,o,n));)o=L(t,o+1);return i}function E(e,t,n,i,o){if(n===e.length)return[];if(i===t.length)return null;if(e[n]!==t[i].toLowerCase())return null;var r=null,s=i+1;if(r=E(e,t,n+1,i+1,o),!o)for(;!r&&(s=L(t,s))<t.length;)r=E(e,t,n+1,s,o),s++;return null===r?null:g({start:i,end:i+1},r)}function L(e,t){for(var n=t;n<e.length;n++){var i=e.charCodeAt(n);if(p(i)||n>0&&p(e.charCodeAt(n-1)))return n}return e.length}function N(e,i,o){if(void 0===o&&(o=!1),"string"!=typeof e||"string"!=typeof i)return null;var r=M.get(e);r||(r=new RegExp(n.convertSimple2RegExpPattern(e),"i"),M.set(e,r));var s=r.exec(i);return s?[{start:s.index,end:s.index+s[0].length}]:o?x(e,i):t.fuzzyContiguousFilter(e,i)}t.or=o,t.and=r,t.matchesStrictPrefix=function(e,t){return s(!1,e,t)},t.matchesPrefix=function(e,t){return s(!0,e,t)},t.matchesContiguousSubString=a,t.matchesSubString=u,t.matchesCamelCase=w,t.matchesWords=S;var T;!function(e){e[e.Contiguous=0]="Contiguous",e[e.Separate=1]="Separate"}(T=t.SubstringMatching||(t.SubstringMatching={})),t.fuzzyContiguousFilter=o(t.matchesPrefix,w,a);var x=o(t.matchesPrefix,w,u),M=new i.BoundedLinkedMap(1e4);t.matchesFuzzy=N}),define(d[39],h([0,1,18,26,9]),function(e,t,n,i,o){"use strict";function r(e,r){for(var s=o.rtrim(c(e),t.sep),a=o.rtrim(c(r),t.sep),u=n.isLinux?s:s.toLowerCase(),l=n.isLinux?a:a.toLowerCase(),d=u.split(t.sep),h=l.split(t.sep),p=0,f=Math.min(d.length,h.length);p<f&&d[p]===h[p];p++);var g=i.fill(d.length-p,function(){return".."}).concat(a.split(t.sep).slice(p));return g.join(t.sep)}function s(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?".":0===~t?e[0]:e.substring(0,~t)}function a(e){var t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?a(e.substring(0,e.length-1)):e.substr(~t+1)}function u(e){e=a(e);var t=~e.lastIndexOf(".");return t?e.substring(~t):""}function l(e,t){return t?!C.test(e):!y.test(e)}function c(e,t){if(null===e||void 0===e)return e;var i=e.length;if(0===i)return".";var o=n.isWindows&&t;if(l(e,o))return e;for(var r=o?"\\":"/",s=h(e,r),a=s.length,u=!1,c="",p=s.length;p<=i;p++)if(p===i||47===e.charCodeAt(p)||92===e.charCodeAt(p)){if(d(e,a,p,"..")){var f=c.lastIndexOf(r),g=c.slice(f+1);(s||g.length>0)&&".."!==g&&(c=f===-1?"":c.slice(0,f),u=!0)}else d(e,a,p,".")&&(s||c||p<i-1)&&(u=!0);if(!u){var m=e.slice(a,p);""!==c&&c[c.length-1]!==r&&(c+=r),c+=m}a=p+1,u=!1}return s+c}function d(e,t,n,i){return t+i.length===n&&e.indexOf(i,t)===t}function h(e,t){if(void 0===t&&(t="/"),!e)return"";var n=e.length,i=e.charCodeAt(0);if(47===i||92===i){if(i=e.charCodeAt(1),(47===i||92===i)&&(i=e.charCodeAt(2),47!==i&&92!==i)){for(var o=3,r=o;o<n&&(i=e.charCodeAt(o),47!==i&&92!==i);o++);if(i=e.charCodeAt(o+1),r!==o&&47!==i&&92!==i)for(o+=1;o<n;o++)if(i=e.charCodeAt(o),47===i||92===i)return e.slice(0,o+1).replace(/[\\/]/g,t)}return t}if((i>=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return i=e.charCodeAt(2),47===i||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://");if(s!==-1)for(s+=3;s<n;s++)if(i=e.charCodeAt(s),47===i||92===i)return e.slice(0,s+1);return""}function p(e){if(!n.isWindows)return!1;if(!e||e.length<5)return!1;var t=e.charCodeAt(0);if(92!==t)return!1;if(t=e.charCodeAt(1),92!==t)return!1;for(var i=2,o=i;i<e.length&&(t=e.charCodeAt(i),92!==t);i++);return o!==i&&(t=e.charCodeAt(i+1),!isNaN(t)&&92!==t)}function f(e){return e&&"/"===e[0]}function g(e){return f(c(e))?e:t.sep+e}function m(e,t){if(e===t)return!0;e=c(e),t=c(t);var i=t.length,o=t.charCodeAt(i-1);if(47===o&&(t=t.substring(0,i-1),i-=1),e===t)return!0;if(n.isLinux||(e=e.toLowerCase(),t=t.toLowerCase()),e===t)return!0;if(0!==e.indexOf(t))return!1;var r=e.charCodeAt(i);return 47===r}function v(e){return!(!e||0===e.length||/^\s+$/.test(e))&&(b.lastIndex=0,!b.test(e)&&((!n.isWindows||!w.test(e))&&("."!==e&&".."!==e&&((!n.isWindows||"."!==e[e.length-1])&&(!n.isWindows||e.length===e.trim().length)))))}function _(e){return t.isAbsoluteRegex.test(e)}t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.relative=r,t.dirname=s,t.basename=a,t.extname=u;var y=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,C=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;t.normalize=c,t.getRoot=h,t.join=function(){for(var e="",n=0;n<arguments.length;n++){var i=arguments[n];if(n>0){var o=e.charCodeAt(e.length-1);if(47!==o&&92!==o){var r=i.charCodeAt(0);47!==r&&92!==r&&(e+=t.sep)}}e+=i}return c(e)},t.isUNC=p,t.makePosixAbsolute=g,t.isEqualOrParent=m;var b=n.isWindows?/[\\/:\*\?"<>\|]/g:/[\\/]/g,w=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])$/i;t.isValidBasename=v,t.isAbsoluteRegex=/^((\/|[a-zA-Z]:\\)[^\(\)<>\\'\"\[\]]+)/,t.isAbsolute=_}),define(d[167],h([0,1,26,9,39,110]),function(e,t,n,i,o,r){"use strict";function s(e){switch(e){case 0:return"";case 1:return S+"*?";default:return"(?:"+w+"|"+S+"+"+w+"|"+w+S+"+)*?"}}function a(e,t){if(!e)return[];for(var n,i=[],o=!1,r=!1,s="",a=0;a<e.length;a++){switch(n=e[a]){case t:if(!o&&!r){i.push(s),s="";continue}break;case"{":o=!0;break;case"}":o=!1;break;case"[":r=!0;break;case"]":r=!1}s+=n}return s&&i.push(s),i}function u(e){if(!e)return"";var t="",n=a(e,"/");if(n.every(function(e){return"**"===e}))t=".*";else{var o=!1;n.forEach(function(e,r){if("**"===e)return void(o||(t+=s(2),o=!0));for(var l,c=!1,d="",h=!1,p="",f=0;f<e.length;f++)if(l=e[f],"}"!==l&&c)d+=l;else if("]"!==l&&h){var g=void 0;switch(l){case"-":g=l;break;case"^":g=l;break;default:g=i.escapeRegExpCharacters(l)}p+=g}else switch(l){case"{":c=!0;continue;case"[":h=!0;continue;case"}":var m=a(d,","),v="(?:"+m.map(function(e){return u(e)}).join("|")+")";t+=v,c=!1,d="";break;case"]":t+="["+p+"]",h=!1,p="";break;case"?":t+=S;continue;case"*":t+=s(1);continue;default:t+=i.escapeRegExpCharacters(l)}r<n.length-1&&"**"!==n[r+1]&&(t+=w),o=!1})}return t}function l(e,t){if(!e)return k;e=e.trim();var n=e+"_"+!!t.trimForExclusions,o=D.get(n);if(o)return o;var r;if(L.test(e)){var s=e.substr(4);o=function(t,n){return t&&i.endsWith(t,s)?e:null}}else o=(r=N.exec(c(e,t)))?d(r[1],e):(t.trimForExclusions?x:T).test(e)?h(e,t):(r=M.exec(c(e,t)))?p(r[1].substr(1),e,!0):(r=I.exec(c(e,t)))?p(r[1],e,!1):f(e);return D.set(n,o),o}function c(e,t){return t.trimForExclusions&&i.endsWith(e,"/**")?e.substr(0,e.length-2):e}function d(e,t){var n="/"+e,o="\\"+e,r=function(r,s){return r?s?s===e?t:null:r===e||i.endsWith(r,n)||i.endsWith(r,o)?t:null:null},s=[e];return r.basenames=s,r.patterns=[t],r.allBasenames=s,r}function h(e,t){var i=b(e.slice(1,-1).split(",").map(function(e){return l(e,t)}).filter(function(e){return e!==k}),e),o=i.length;if(!o)return k;if(1===o)return i[0];var r=function(t,n){for(var o=0,r=i.length;o<r;o++)if(i[o](t,n))return e;return null},s=n.first(i,function(e){return!!e.allBasenames});s&&(r.allBasenames=s.allBasenames);var a=i.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return a.length&&(r.allPaths=a),r}function p(e,t,n){var r=o.nativeSep!==o.sep?e.replace(E,o.nativeSep):e,s=o.nativeSep+r,a=n?function(e,n){return e&&(e===r||i.endsWith(e,s))?t:null}:function(e,n){return e&&e===r?t:null};return a.allPaths=[(n?"*/":"./")+e],a}function f(e){try{var t=new RegExp("^"+u(e)+"$");return function(n,i){return t.lastIndex=0,n&&t.test(n)?e:null}}catch(e){return k}}function g(e,t,n){return!(!e||!t)&&m(e)(t,void 0,n)}function m(e,t){if(void 0===t&&(t={}),!e)return R;if("string"==typeof e){var n=l(e,t);if(n===k)return R;var i=function(e,t){return!!n(e,t)};return n.allBasenames&&(i.allBasenames=n.allBasenames),n.allPaths&&(i.allPaths=n.allPaths),i}return y(e,t)}function v(e){return e.allBasenames||[]}function _(e){return e.allPaths||[]}function y(e,t){var i=b(Object.getOwnPropertyNames(e).map(function(n){return C(n,e[n],t)}).filter(function(e){return e!==k})),r=i.length;if(!r)return k;if(!i.some(function(e){return e.requiresSiblings})){if(1===r)return i[0];var s=function(e,t,n){for(var o=0,r=i.length;o<r;o++){var s=i[o](e,t);if(s)return s}return null},a=n.first(i,function(e){return!!e.allBasenames});a&&(s.allBasenames=a.allBasenames);var u=i.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return u.length&&(s.allPaths=u),s}var l=function(e,t,n){function r(){if(!a){a=!0;var i=n();if(i&&i.length){t||(t=o.basename(e));var r=t.substr(0,t.length-o.extname(e).length);s={siblings:i,name:r}}}return s}for(var s,a=!n,u=0,l=i.length;u<l;u++){var c=i[u](e,t,r);if(c)return c}return null},c=n.first(i,function(e){return!!e.allBasenames});c&&(l.allBasenames=c.allBasenames);var d=i.reduce(function(e,t){return t.allPaths?e.concat(t.allPaths):e},[]);return d.length&&(l.allPaths=d),l}function C(e,t,n){if(t===!1)return k;var i=l(e,n);if(i===k)return k;if("boolean"==typeof t)return i;if(t){var o=t.when;if("string"==typeof o){var r=function(t,n,r){if(!i(t,n))return null;var s=r();if(!s)return null;var a=o.replace("$(basename)",s.name);return s.siblings.indexOf(a)!==-1?e:null};return r.requiresSiblings=!0,r}}return i}function b(e,t){var n=e.filter(function(e){return!!e.basenames});if(n.length<2)return e;var i,o=n.reduce(function(e,t){return e.concat(t.basenames)},[]);if(t){i=[];for(var r=0,s=o.length;r<s;r++)i.push(t)}else i=n.reduce(function(e,t){return e.concat(t.patterns)},[]);var a=function(e,t){if(!e)return null;if(!t){var n=void 0;for(n=e.length;n>0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return s!==-1?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var u=e.filter(function(e){return!e.basenames});return u.push(a),u}var w="[/\\\\]",S="[^/\\\\]",E=/\//g;t.splitGlobAware=a;var L=/^\*\*\/\*\.[\w\.-]+$/,N=/^\*\*\/([\w\.-]+)\/?$/,T=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,x=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,M=/^\*\*((\/[\w\.-]+)+)\/?$/,I=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,D=new r.BoundedLinkedMap(1e4),R=function(){return!1},k=function(){return null};t.match=g,t.parse=m,t.getBasenameTerms=v,t.getPathTerms=_}),define(d[22],h([0,1]),function(e,t){"use strict";function n(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==m.number||e.constructor!==Array)}function i(e){return typeof e===m.string||e instanceof String}function o(e){return n(e)&&e.every(function(e){return i(e)})}function r(e){return!(typeof e!==m.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return(typeof e===m.number||e instanceof Number)&&!isNaN(e)}function a(e){return e===!0||e===!1}function u(e){return typeof e===m.undefined}function l(e){return u(e)||null===e}function c(e){if(!r(e))return!1;for(var t in e)if(v.call(e,t))return!1;return!0}function d(e){return typeof e===m.function}function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e&&e.length>0&&e.every(d)}function p(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++)f(e[i],t[i])}function f(e,t){if(i(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(d(t)){if(e instanceof t)return;if(e&&e.constructor===t)return;if(1===t.length&&t.call(void 0,e)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Object.create(e.prototype);return e.apply(i,t),i}var m={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=n,t.isString=i,t.isStringArray=o,t.isObject=r,t.isNumber=s,t.isBoolean=a,t.isUndefined=u,t.isUndefinedOrNull=l;var v=Object.prototype.hasOwnProperty;t.isEmptyObject=c,t.isFunction=d,t.areFunctions=h,t.validateConstraints=p,t.validateConstraint=f,t.create=g}),define(d[10],h([0,1,18,22]),function(e,t,n,i){"use strict";function o(e){t.errorHandler.setUnexpectedErrorHandler(e)}function r(e){l(e)||t.errorHandler.onUnexpectedError(e)}function s(e){l(e)||t.errorHandler.onUnexpectedExternalError(e)}function a(e){return e.then(null,r)}function u(e){if(e instanceof Error){var t=e.name,n=e.message,i=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:i}}return e}function l(e){return e instanceof Error&&e.name===_&&e.message===_}function c(){var e=new Error(_);return e.name=e.message,e}function d(){return new Error("Not Implemented")}function h(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function p(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}function f(e){return e?new Error("readonly property '"+e+" cannot be changed'"):new Error("readonly property cannot be changed")}function g(e,t){void 0===t&&(t={});var n=new Error(e);return i.isNumber(t.severity)&&(n.severity=t.severity),t.actions&&(n.actions=t.actions),n}function m(e){return e?e.message?e.message:e.stack?e.stack.split("\n")[0]:String(e):"Error"}var v=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){n.setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function(e){var t=this;return this.listeners.push(e),function(){t._removeListener(e)}},e.prototype.emit=function(e){this.listeners.forEach(function(t){t(e)})},e.prototype._removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},e.prototype.setUnexpectedErrorHandler=function(e){this.unexpectedErrorHandler=e},e.prototype.getUnexpectedErrorHandler=function(){return this.unexpectedErrorHandler},e.prototype.onUnexpectedError=function(e){this.unexpectedErrorHandler(e),this.emit(e)},e.prototype.onUnexpectedExternalError=function(e){this.unexpectedErrorHandler(e)},e}();t.ErrorHandler=v,t.errorHandler=new v,t.setUnexpectedErrorHandler=o,t.onUnexpectedError=r,t.onUnexpectedExternalError=s,t.onUnexpectedPromiseError=a,t.transformErrorForSerialization=u;var _="Canceled";t.isPromiseCanceledError=l,t.canceled=c,t.notImplemented=d,t.illegalArgument=h,t.illegalState=p,t.readonly=f,t.create=g,t.getErrorMessage=m}),define(d[255],h([0,1,10]),function(e,t,n){"use strict";var i=function(){function e(){}return e.prototype.add=function(e,t,n){var i=this;void 0===t&&(t=null),this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:function(){return i.remove(e,t)}})},e.prototype.remove=function(e,t){if(void 0===t&&(t=null),this._callbacks){for(var n=!1,i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}},e.prototype.invoke=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this._callbacks){for(var i=[],o=this._callbacks.slice(0),r=this._contexts.slice(0),s=0,a=o.length;s<a;s++)try{i.push(o[s].apply(r[s],e))}catch(e){n.onUnexpectedError(e)}return i}},e.prototype.isEmpty=function(){return!this._callbacks||0===this._callbacks.length},e.prototype.entries=function(){var e=this;return this._callbacks?this._callbacks.map(function(t,n){return[t,e._contexts[n]]}):[]},e.prototype.dispose=function(){this._callbacks=void 0,this._contexts=void 0},e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=i}),define(d[12],h([0,1,4,255,196]),function(e,t,n,i,o){"use strict";function r(e,t){return function(n,i,o){var r=e.addListener2(t,function(){n.apply(i,arguments)});return Array.isArray(o)&&o.push(r),r}}function s(e){var t,n=new _({onFirstListenerAdd:function(){return t=e(function(e){return n.fire(e)})},onLastListenerRemove:function(){return t.dispose()}});return n.event}function a(e){var t=new _,n=!1;return e.then(null,function(){return null}).then(function(){n?t.fire():setTimeout(function(){return t.fire()},0)}),n=!0,t.event}function u(e){var t=null,n=null,i=new _({onFirstListenerAdd:function(){t=e.then(function(e){return n=e(function(e){return i.fire(e)})},function(){return null})},onLastListenerRemove:function(){t&&(t.cancel(),t=null),n&&(n.dispose(),n=null)}});return i.event}function l(e){return function(t,n,i){void 0===n&&(n=null);var o=e(function(e){return o.dispose(),t.call(n,e)},null,i);return o}}function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=[],o=new _({onFirstListenerAdd:function(){i=e.map(function(e){return e(function(e){return o.fire(e)})})},onLastListenerRemove:function(){i=n.dispose(i)}});return o.event}function d(e,t,n){void 0===n&&(n=100);var i,o,r,s=new _({onFirstListenerAdd:function(){i=e(function(e){o=t(o,e),clearTimeout(r),r=setTimeout(function(){var e=o;o=void 0,s.fire(e)},n)})},onLastListenerRemove:function(){i.dispose()}});return s.event}function h(e,t){return function(n,i,o){return void 0===i&&(i=null),e(function(e){return n.call(i,t(e))},null,o)}}function p(e,t){return function(n,i,o){return void 0===i&&(i=null),e(function(e){return t(e)&&n.call(i,e)},null,o)}}function f(e){return new b(e)}function g(e){var t=(new Date).getTime();return h(l(e),function(e){return(new Date).getTime()-t})}function m(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=[]),n=n.slice();var i=e(function(e){n?n.push(e):r.fire(e)}),o=function(){n.forEach(function(e){return r.fire(e)}),n=null},r=new _({onFirstListenerAdd:function(){i||(i=e(function(e){return r.fire(e)}))},onFirstListenerDidAdd:function(){n&&(t?setTimeout(o):o())},onLastListenerRemove:function(){i.dispose(),i=null}});return r.event}var v;!function(e){var t={dispose:function(){}};e.None=function(){return t}}(v||(v={})),Object.defineProperty(t,"__esModule",{value:!0}),t.default=v;var _=function(){function e(e){this._options=e}return Object.defineProperty(e.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(n,o,r){t._callbacks||(t._callbacks=new i.default);var s=t._callbacks.isEmpty();s&&t._options&&t._options.onFirstListenerAdd&&t._options.onFirstListenerAdd(t),t._callbacks.add(n,o),s&&t._options&&t._options.onFirstListenerDidAdd&&t._options.onFirstListenerDidAdd(t);var a;return a={dispose:function(){a.dispose=e._noop,t._disposed||(t._callbacks.remove(n,o),t._options&&t._options.onLastListenerRemove&&t._callbacks.isEmpty()&&t._options.onLastListenerRemove(t))}},Array.isArray(r)&&r.push(a),a}),this._event},enumerable:!0,configurable:!0}),e.prototype.fire=function(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)},e.prototype.dispose=function(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0,this._disposed=!0)},e}();_._noop=function(){},t.Emitter=_;var y=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new _({onFirstListenerAdd:function(){return e.onFirstListenerAdd()},onLastListenerRemove:function(){return e.onLastListenerRemove()}})}return Object.defineProperty(e.prototype,"event",{get:function(){return this.emitter.event},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this,i={event:e,listener:null};this.events.push(i),this.hasListeners&&this.hook(i);var r=function(){t.hasListeners&&t.unhook(i);var e=t.events.indexOf(i);t.events.splice(e,1)};return n.toDisposable(o.once(r))},e.prototype.onFirstListenerAdd=function(){var e=this;this.hasListeners=!0,this.events.forEach(function(t){return e.hook(t)})},e.prototype.onLastListenerRemove=function(){var e=this;this.hasListeners=!1,this.events.forEach(function(t){return e.unhook(t)})},e.prototype.hook=function(e){var t=this;e.listener=e.event(function(e){return t.emitter.fire(e)})},e.prototype.unhook=function(e){e.listener.dispose(),e.listener=null},e.prototype.dispose=function(){this.emitter.dispose();
},e}();t.EventMultiplexer=y,t.fromEventEmitter=r,t.fromCallback=s,t.fromPromise=a,t.delayed=u,t.once=l,t.any=c,t.debounceEvent=d;var C=function(){function e(){this.buffers=[]}return e.prototype.wrapEvent=function(e){var t=this;return function(n,i,o){return e(function(e){var o=t.buffers[t.buffers.length-1];o?o.push(function(){return n.call(i,e)}):n.call(i,e)},void 0,o)}},e.prototype.bufferEvents=function(e){var t=[];this.buffers.push(t),e(),this.buffers.pop(),t.forEach(function(e){return e()})},e}();t.EventBufferer=C,t.mapEvent=h,t.filterEvent=p;var b=function(){function e(e){this._event=e}return Object.defineProperty(e.prototype,"event",{get:function(){return this._event},enumerable:!0,configurable:!0}),e.prototype.map=function(t){return new e(h(this._event,t))},e.prototype.filter=function(t){return new e(p(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=f,t.stopwatch=g,t.buffer=m}),define(d[24],h([0,1,18,12]),function(e,t,n,i){"use strict";function o(){return f.INSTANCE.getZoomLevel()}function r(){return f.INSTANCE.getZoomFactor()}function s(){return f.INSTANCE.getPixelRatio()}function a(e){f.INSTANCE.setZoomLevel(e)}function u(e){f.INSTANCE.setZoomFactor(e)}function l(e){return f.INSTANCE.onDidChangeZoomLevel(e)}function c(e){f.INSTANCE.setFullscreen(e)}function d(){return f.INSTANCE.isFullscreen()}function h(e){return f.INSTANCE.onDidChangeFullscreen(e)}function p(e){return(t.isIE||n.isNative)&&document.queryCommandSupported(e)}var f=function(){function e(){this._zoomLevel=0,this._zoomFactor=0,this._pixelRatioCache=0,this._pixelRatioComputed=!1,this._onDidChangeZoomLevel=new i.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._onDidChangeFullscreen=new i.Emitter,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.setZoomLevel=function(e){this._zoomLevel!==e&&(this._zoomLevel=e,this._pixelRatioComputed=!1,this._onDidChangeZoomLevel.fire(this._zoomLevel))},e.prototype.getZoomFactor=function(){return this._zoomFactor},e.prototype.setZoomFactor=function(e){this._zoomFactor=e},e.prototype.getPixelRatio=function(){return this._pixelRatioComputed||(this._pixelRatioCache=this._computePixelRatio(),this._pixelRatioComputed=!0),this._pixelRatioCache},e.prototype._computePixelRatio=function(){var e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n},e.prototype.setFullscreen=function(e){this._fullscreen!==e&&(this._fullscreen=e,this._onDidChangeFullscreen.fire())},e.prototype.isFullscreen=function(){return this._fullscreen},e}();f.INSTANCE=new f,t.getZoomLevel=o,t.getZoomFactor=r,t.getPixelRatio=s,t.setZoomLevel=a,t.setZoomFactor=u,t.onDidChangeZoomLevel=l,t.setFullscreen=c,t.isFullscreen=d,t.onDidChangeFullscreen=h;var g=navigator.userAgent;t.isIE=g.indexOf("Trident")>=0,t.isEdge=g.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isOpera=g.indexOf("Opera")>=0,t.isFirefox=g.indexOf("Firefox")>=0,t.isWebKit=g.indexOf("AppleWebKit")>=0,t.isChrome=g.indexOf("Chrome")>=0,t.isSafari=g.indexOf("Chrome")===-1&&g.indexOf("Safari")>=0,t.isIPad=g.indexOf("iPad")>=0,t.canUseTranslate3d=!t.isFirefox,t.enableEmptySelectionClipboard=t.isWebKit,t.supportsExecCommand=p}),define(d[124],h([0,1,12]),function(e,t,n){"use strict";function i(e){return n.mapEvent(e,function(e){return e.preventDefault(),e.stopPropagation(),e})}t.domEvent=function(e,t,i){var o=function(e){return r.fire(e)},r=new n.Emitter({onFirstListenerAdd:function(){e.addEventListener(t,o,i)},onLastListenerRemove:function(){e.removeEventListener(t,o,i)}});return r.event},t.stop=i}),define(d[53],h([0,1,31,18,24]),function(e,t,n,i,o){"use strict";function r(e){return a[e.keyCode]||0}function s(e){u=e}var a={};!function(){a[3]=7,a[8]=1,a[9]=2,a[13]=3,a[16]=4,a[17]=5,a[18]=6,a[19]=7,a[20]=8,a[27]=9,a[32]=10,a[33]=11,a[34]=12,a[35]=13,a[36]=14,a[37]=15,a[38]=16,a[39]=17,a[40]=18,a[45]=19,a[46]=20,a[48]=21,a[49]=22,a[50]=23,a[51]=24,a[52]=25,a[53]=26,a[54]=27,a[55]=28,a[56]=29,a[57]=30,a[65]=31,a[66]=32,a[67]=33,a[68]=34,a[69]=35,a[70]=36,a[71]=37,a[72]=38,a[73]=39,a[74]=40,a[75]=41,a[76]=42,a[77]=43,a[78]=44,a[79]=45,a[80]=46,a[81]=47,a[82]=48,a[83]=49,a[84]=50,a[85]=51,a[86]=52,a[87]=53,a[88]=54,a[89]=55,a[90]=56,a[93]=58,a[96]=93,a[97]=94,a[98]=95,a[99]=96,a[100]=97,a[101]=98,a[102]=99,a[103]=100,a[104]=101,a[105]=102,a[106]=103,a[107]=104,a[108]=105,a[109]=106,a[110]=107,a[111]=108,a[112]=59,a[113]=60,a[114]=61,a[115]=62,a[116]=63,a[117]=64,a[118]=65,a[119]=66,a[120]=67,a[121]=68,a[122]=69,a[123]=70,a[124]=71,a[125]=72,a[126]=73,a[127]=74,a[128]=75,a[129]=76,a[130]=77,a[144]=78,a[145]=79,a[186]=80,a[187]=81,a[188]=82,a[189]=83,a[190]=84,a[191]=85,a[192]=86,a[219]=87,a[220]=88,a[221]=89,a[222]=90,a[223]=91,a[226]=92,o.isIE?a[91]=57:o.isFirefox?(a[59]=80,a[107]=81,a[109]=83,i.isMacintosh&&(a[224]=57)):o.isWebKit&&(a[91]=57,i.isMacintosh?a[93]=57:a[92]=57)}(),t.lookupKeyCode=r;var u=function(e){if(e.charCode){var t=String.fromCharCode(e.charCode).toUpperCase();return n.KeyCodeUtils.fromString(t)}return r(e)};t.setExtractKeyCode=s;var l=i.isMacintosh?256:2048,c=512,d=1024,h=i.isMacintosh?2048:256,p=function(){function e(e){var t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=u(t),this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding()}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e.prototype.toKeybinding=function(){return this._asKeybinding},e.prototype.equals=function(e){return this._asKeybinding.value===e},e.prototype._computeKeybinding=function(){var e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);var t=0;return this.ctrlKey&&(t|=l),this.altKey&&(t|=c),this.shiftKey&&(t|=d),this.metaKey&&(t|=h),t|=e,new n.Keybinding(t)},e}();t.StandardKeyboardEvent=p}),define(d[36],h([0,1,18,24,157]),function(e,t,n,i,o){"use strict";var r=function(){function e(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);var t=o.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}return e.prototype.preventDefault=function(){this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}();t.StandardMouseEvent=r;var s=function(e){function t(t){var n=e.call(this,t)||this;return n.dataTransfer=t.dataTransfer,n}return m(t,e),t}(r);t.DragMouseEvent=s;var a=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t}(s);t.DropMouseEvent=a;var u=function(){function e(e,t,o){if(void 0===t&&(t=0),void 0===o&&(o=0),this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=o,this.deltaX=t,e){var r=e,s=e;"undefined"!=typeof r.wheelDeltaY?this.deltaY=r.wheelDeltaY/120:"undefined"!=typeof s.VERTICAL_AXIS&&s.axis===s.VERTICAL_AXIS&&(this.deltaY=-s.detail/3),"undefined"!=typeof r.wheelDeltaX?i.isSafari&&n.isWindows?this.deltaX=-(r.wheelDeltaX/120):this.deltaX=r.wheelDeltaX/120:"undefined"!=typeof s.HORIZONTAL_AXIS&&s.axis===s.HORIZONTAL_AXIS&&(this.deltaX=-e.detail/3),0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}return e.prototype.preventDefault=function(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()},e.prototype.stopPropagation=function(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()},e}();t.StandardMouseWheelEvent=u}),define(d[142],h([0,1,12]),function(e,t,n){"use strict";var i,o=Object.freeze(function(e,t){var n=setTimeout(e.bind(t),0);return{dispose:function(){clearTimeout(n)}}});!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.default.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(i=t.CancellationToken||(t.CancellationToken={}));var r=function(){function e(){this._isCancelled=!1}return e.prototype.cancel=function(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))},Object.defineProperty(e.prototype,"isCancellationRequested",{get:function(){return this._isCancelled},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onCancellationRequested",{get:function(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)},enumerable:!0,configurable:!0}),e}(),s=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return this._token||(this._token=new r),this._token},enumerable:!0,configurable:!0}),e.prototype.cancel=function(){this._token?this._token.cancel():this._token=i.Cancelled},e.prototype.dispose=function(){this.cancel()},e}();t.CancellationTokenSource=s}),define(d[25],h([0,1,10]),function(e,t,n){"use strict";function i(e){try{return e()}catch(e){n.onUnexpectedError(e)}}function o(e,t){try{return e(t)}catch(e){n.onUnexpectedError(e)}}var r=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this._type=e,this._data=t}return e.prototype.getType=function(){return this._type},e.prototype.getData=function(){return this._data},e}();t.EmitterEvent=r;var s=function(){function e(e){if(void 0===e&&(e=null),this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,e){this._allowedEventTypes={};for(var t=0;t<e.length;t++)this._allowedEventTypes[e[t]]=!0}else this._allowedEventTypes=null}return e.prototype.dispose=function(){this._listeners={},this._bulkListeners=[],this._collectedEvents=[],this._deferredCnt=0,this._allowedEventTypes=null},e.prototype.addListener=function(e,t){if("*"===e)throw new Error("Use addBulkListener(listener) to register your listener!");if(this._allowedEventTypes&&!this._allowedEventTypes.hasOwnProperty(e))throw new Error("This object will never emit this event type!");this._listeners.hasOwnProperty(e)?this._listeners[e].push(t):this._listeners[e]=[t];var n=this;return{dispose:function(){n&&(n._removeListener(e,t),n=null,t=null)}}},e.prototype.addListener2=function(e,t){return this.addListener(e,t)},e.prototype.addOneTimeDisposableListener=function(e,t){var n=this.addListener(e,function(e){n.dispose(),t(e)});return n},e.prototype.addBulkListener=function(e){var t=this;return this._bulkListeners.push(e),{dispose:function(){t._removeBulkListener(e)}}},e.prototype.addBulkListener2=function(e){return this.addBulkListener(e)},e.prototype.addEmitter=function(e){var t=this;return e.addBulkListener2(function(e){var n=e;0===t._deferredCnt?t._emitEvents(n):t._collectedEvents.push.apply(t._collectedEvents,n)})},e.prototype.addEmitter2=function(e){return this.addEmitter(e)},e.prototype._removeListener=function(e,t){if(this._listeners.hasOwnProperty(e))for(var n=this._listeners[e],i=0,o=n.length;i<o;i++)if(n[i]===t){n.splice(i,1);break}},e.prototype._removeBulkListener=function(e){for(var t=0,n=this._bulkListeners.length;t<n;t++)if(this._bulkListeners[t]===e){this._bulkListeners.splice(t,1);break}},e.prototype._emitToSpecificTypeListeners=function(e,t){if(this._listeners.hasOwnProperty(e))for(var n=this._listeners[e].slice(0),i=0,r=n.length;i<r;i++)o(n[i],t)},e.prototype._emitToBulkListeners=function(e){for(var t=this._bulkListeners.slice(0),n=0,i=t.length;n<i;n++)o(t[n],e)},e.prototype._emitEvents=function(e){this._bulkListeners.length>0&&this._emitToBulkListeners(e);for(var t=0,n=e.length;t<n;t++){var i=e[t];this._emitToSpecificTypeListeners(i.getType(),i.getData())}},e.prototype.emit=function(e,t){if(void 0===t&&(t={}),this._allowedEventTypes&&!this._allowedEventTypes.hasOwnProperty(e))throw new Error("Cannot emit this event type because it wasn't white-listed!");if(this._listeners.hasOwnProperty(e)||0!==this._bulkListeners.length){var n=new r(e,t);0===this._deferredCnt?this._emitEvents([n]):this._collectedEvents.push(n)}},e.prototype._beginDeferredEmit=function(){this._deferredCnt=this._deferredCnt+1},e.prototype._endDeferredEmit=function(){this._deferredCnt=this._deferredCnt-1,0===this._deferredCnt&&this._emitCollected()},e.prototype.deferredEmit=function(e){this._beginDeferredEmit();var t=i(e);return this._endDeferredEmit(),t},e.prototype._emitCollected=function(){var e=this._collectedEvents;this._collectedEvents=[],e.length>0&&this._emitEvents(e)},e}();t.EventEmitter=s;var a=function(){function e(e,t){this.target=e,this.arg=t}return e}(),u=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return n._emitQueue=[],n}return m(t,e),t.prototype._emitToSpecificTypeListeners=function(e,t){if(this._listeners.hasOwnProperty(e))for(var n=this._listeners[e],i=0,o=n.length;i<o;i++)this._emitQueue.push(new a(n[i],t))},t.prototype._emitToBulkListeners=function(e){for(var t=this._bulkListeners,n=0,i=t.length;n<i;n++)this._emitQueue.push(new a(t[n],e))},t.prototype._emitEvents=function(t){for(e.prototype._emitEvents.call(this,t);this._emitQueue.length>0;){var n=this._emitQueue.shift();o(n.target,n.arg)}},t}(s);t.OrderGuaranteeEventEmitter=u}),define(d[488],h([0,1,22,91]),function(e,t,n,i){"use strict";function o(e){return{data:e,incoming:Object.create(null),outgoing:Object.create(null)}}var r=function(){function e(e){this._hashFn=e,this._nodes=Object.create(null)}return e.prototype.roots=function(){var e=[];return i.forEach(this._nodes,function(t){n.isEmptyObject(t.value.outgoing)&&e.push(t.value)}),e},e.prototype.traverse=function(e,t,n){var i=this.lookup(e);i&&this._traverse(i,t,Object.create(null),n)},e.prototype._traverse=function(e,t,n,o){var r=this,s=this._hashFn(e.data);if(!n[s]){n[s]=!0,o(e.data);var a=t?e.outgoing:e.incoming;i.forEach(a,function(e){return r._traverse(e.value,t,n,o)})}},e.prototype.insertEdge=function(e,t){var n=this.lookupOrInsertNode(e),i=this.lookupOrInsertNode(t);n.outgoing[this._hashFn(t)]=i,i.incoming[this._hashFn(e)]=n},e.prototype.removeNode=function(e){var t=this._hashFn(e);delete this._nodes[t],i.forEach(this._nodes,function(e){delete e.value.outgoing[t],delete e.value.incoming[t]})},e.prototype.lookupOrInsertNode=function(e){var t=this._hashFn(e),n=this._nodes[t];return n||(n=o(e),this._nodes[t]=n),n},e.prototype.lookup=function(e){return this._nodes[this._hashFn(e)]},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this._nodes).length},enumerable:!0,configurable:!0}),e.prototype.toString=function(){var e=[];return i.forEach(this._nodes,function(t){e.push(t.key+", (incoming)["+Object.keys(t.value.incoming).join(", ")+"], (outgoing)["+Object.keys(t.value.outgoing).join(",")+"]")}),e.join("\n")},e}();t.Graph=r}),define(d[165],h([0,1,18,22,39,9]),function(e,t,n,i,o,r){"use strict";function s(e,t){var i=a(e);if(!i)return null;var s=t&&a(t);return s&&o.isEqualOrParent(i,s)?s===i?"":o.normalize(r.ltrim(i.substr(s.length),o.nativeSep),!0):n.isWindows&&i&&":"===i[1]?o.normalize(i.charAt(0).toUpperCase()+i.slice(1),!0):o.normalize(i,!0)}function a(e){if(!e)return null;if("string"==typeof e)return e;if(i.isFunction(e.getWorkspace)){var t=e.getWorkspace();return t?t.resource.fsPath:void 0}return e.fsPath}function u(e){for(var t="…",n=new Array(e.length),i=!1,s=0;s<e.length;s++){var a=e[s];if(i=!0,"string"==typeof a)for(var u=a.split(o.nativeSep),l=1;i&&l<=u.length;l++)for(var c=u.length-l;i&&c>=0;c--){i=!1;for(var d=u.slice(c,c+l).join(o.nativeSep),h=0;!i&&h<e.length;h++)if(h!==s&&e[h]&&e[h].indexOf(d)>-1){var p=c+l===u.length,f=r.endsWith(e[h],d);i=!p||f}if(!i){var g=d;c+l<u.length&&(g=g+o.nativeSep+t),c>0&&(g=t+o.nativeSep+g),n[s]=g}}i&&(n[s]=a)}return n}var l=function(){function e(e){this.root=e&&a(e)}return e.prototype.getLabel=function(e){return s(a(e),this.root)},e}();t.PathLabelProvider=l,t.getPathLabel=s,t.shorten=u}),define(d[504],h([0,1,39,22,9,167]),function(e,t,n,i,o,r){"use strict";function s(e){var t=a(e);g.push(t),t.userConfigured?v.push(t):m.push(t),t.userConfigured||g.forEach(function(e){e.mime===t.mime||e.userConfigured||(t.extension&&e.extension===t.extension&&console.warn("Overwriting extension <<"+t.extension+">> to now point to mime <<"+t.mime+">>"),t.filename&&e.filename===t.filename&&console.warn("Overwriting filename <<"+t.filename+">> to now point to mime <<"+t.mime+">>"),t.filepattern&&e.filepattern===t.filepattern&&console.warn("Overwriting filepattern <<"+t.filepattern+">> to now point to mime <<"+t.mime+">>"),t.firstline&&e.firstline===t.firstline&&console.warn("Overwriting firstline <<"+t.firstline+">> to now point to mime <<"+t.mime+">>"))})}function a(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(n.sep)>=0}}function u(e){e?(g=g.filter(function(e){return!e.userConfigured}),v=[]):(g=[],m=[],v=[])}function l(e,i){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var o=n.basename(e),r=c(e,o,v);if(r)return[r,t.MIME_TEXT];var s=c(e,o,m);if(s)return[s,t.MIME_TEXT];if(i){var a=d(i);if(a)return[a,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function c(e,t,n){for(var i,s,a,u=0;u<n.length;u++){var l=n[u];if(t===l.filenameLowercase){i=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){var c=l.filepatternOnPath?e:t;r.match(l.filepatternLowercase,c)&&(s=l)}l.extension&&(!a||l.extension.length>a.extension.length)&&o.endsWith(t,l.extensionLowercase)&&(a=l)}return i?i.mime:s?s.mime:a?a.mime:null}function d(e){if(o.startsWithUTF8BOM(e)&&(e=e.substr(1)),e.length>0)for(var t=0;t<g.length;++t){var n=g[t];if(n.firstline){var i=e.match(n.firstline);if(i&&i.length>0&&i[0].length===e.length)return n.mime}}return null}function h(e){if(!e)return!1;var n;return n=i.isArray(e)?e:e.split(",").map(function(e){return e.trim()}),n.indexOf(t.MIME_BINARY)>=0}function p(e){return!e||("string"==typeof e?e===t.MIME_BINARY||e===t.MIME_TEXT||e===t.MIME_UNKNOWN:1===e.length&&p(e[0]))}function f(e,t){for(var n=0;n<g.length;n++){var i=g[n];if(!i.userConfigured&&i.id===e&&i.extension)return t+i.extension}return t}t.MIME_TEXT="text/plain",t.MIME_BINARY="application/octet-stream",t.MIME_UNKNOWN="application/unknown";var g=[],m=[],v=[];t.registerTextMime=s,t.clearTextMimes=u,t.guessMimeTypes=l,t.isBinaryMime=h,t.isUnspecific=p,t.suggestFilename=f}),define(d[35],h([0,1,22]),function(e,t,n){"use strict";function i(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=i(e[n]):t[n]=e[n]}),t}function o(e){if(!e||"object"!=typeof e)return e;var t=Array.isArray(e)?[]:{};return Object.getOwnPropertyNames(e).forEach(function(n){e[n]&&"object"==typeof e[n]?t[n]=o(e[n]):t[n]=e[n]}),t}function r(e,t){return s(e,t,[])}function s(e,t,i){if(n.isUndefinedOrNull(e))return e;var o=t(e);if("undefined"!=typeof o)return o;if(n.isArray(e)){for(var r=[],a=0;a<e.length;a++)r.push(s(e[a],t,i));return r}if(n.isObject(e)){if(i.indexOf(e)>=0)throw new Error("Cannot clone recursive data-structure");i.push(e);var u={};for(var l in e)v.call(e,l)&&(u[l]=s(e[l],t,i));return i.pop(),u}return e}function a(e,t,i){return void 0===i&&(i=!0),n.isObject(e)?(n.isObject(t)&&Object.keys(t).forEach(function(o){o in e?i&&(n.isObject(e[o])&&n.isObject(t[o])?a(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]}),e):t}function u(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}function l(e,t,n){return void 0===n&&(n=function(e){return e}),e.reduce(function(e,i){return u(e,(o={},o[t(i)]=n(i),o));var o},Object.create(null))}function c(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,i;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!c(e[n],t[n]))return!1}else{var o=[];for(i in e)o.push(i);o.sort();var r=[];for(i in t)r.push(i);if(r.sort(),!c(o,r))return!1;for(n=0;n<o.length;n++)if(!c(e[o[n]],t[o[n]]))return!1}return!0}function d(e,t,n){"undefined"==typeof e[t]&&(e[t]=n)}function h(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function p(e,t){void 0===t&&(t=!1),t&&(e=e.map(function(e){return e.toLowerCase()}));var n=h(e);return t?function(e){return void 0!==n[e.toLowerCase()]&&n.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==n[e]&&n.hasOwnProperty(e)}}function f(e,t){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t=t||function(){};var i=e.prototype,o=t.prototype;t.prototype=Object.create(i);for(var n in o)o.hasOwnProperty(n)&&Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(o,n));Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,configurable:!0,enumerable:!0})}function g(e){var t=[];return JSON.stringify(e,function(e,i){if(n.isObject(i)||Array.isArray(i)){if(t.indexOf(i)!==-1)return"[Circular]";t.push(i)}return i})}function m(e,t,n){void 0===n&&(n=null);var i=t(e);return"undefined"==typeof i?n:i}t.clone=i,t.deepClone=o;var v=Object.prototype.hasOwnProperty;t.cloneAndChange=r,t.mixin=a,t.assign=u,t.toObject=l,t.equals=c,t.ensureProperty=d,t.arrayToHash=h,t.createKeywordMatcher=p,t.derive=f,t.safeStringify=g,t.getOrDefault=m}),define(d[40],h([0,1,4,12]),function(e,t,n,i){"use strict";var o;!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(o=t.ScrollbarVisibility||(t.ScrollbarVisibility={}));var r=function(e){function t(){var t=e.call(this)||this;return t._onScroll=t._register(new i.Emitter),t.onScroll=t._onScroll.event,t._width=0,t._scrollWidth=0,t._scrollLeft=0,t._height=0,t._scrollHeight=0,t._scrollTop=0,t}return m(t,e),t.prototype.getWidth=function(){return this._width},t.prototype.getScrollWidth=function(){return this._scrollWidth},t.prototype.getScrollLeft=function(){return this._scrollLeft},t.prototype.getHeight=function(){return this._height},t.prototype.getScrollHeight=function(){return this._scrollHeight},t.prototype.getScrollTop=function(){return this._scrollTop},t.prototype.updateState=function(e){var t="undefined"!=typeof e.width?0|e.width:this._width,n="undefined"!=typeof e.scrollWidth?0|e.scrollWidth:this._scrollWidth,i="undefined"!=typeof e.scrollLeft?0|e.scrollLeft:this._scrollLeft,o="undefined"!=typeof e.height?0|e.height:this._height,r="undefined"!=typeof e.scrollHeight?0|e.scrollHeight:this._scrollHeight,s="undefined"!=typeof e.scrollTop?0|e.scrollTop:this._scrollTop;t<0&&(t=0),i+t>n&&(i=n-t),i<0&&(i=0),o<0&&(o=0),s+o>r&&(s=r-o),s<0&&(s=0);var a=this._width!==t,u=this._scrollWidth!==n,l=this._scrollLeft!==i,c=this._height!==o,d=this._scrollHeight!==r,h=this._scrollTop!==s;(a||u||l||c||d||h)&&(this._width=t,this._scrollWidth=n,this._scrollLeft=i,this._height=o,this._scrollHeight=r,this._scrollTop=s,this._onScroll.fire({width:this._width,scrollWidth:this._scrollWidth,scrollLeft:this._scrollLeft,height:this._height,scrollHeight:this._scrollHeight,scrollTop:this._scrollTop,widthChanged:a,scrollWidthChanged:u,scrollLeftChanged:l,heightChanged:c,scrollHeightChanged:d,scrollTopChanged:h}))},t}(n.Disposable);t.Scrollable=r}),define(d[27],h([0,1,18]),function(e,t,n){"use strict";function i(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return encodeURIComponent(e).replace(/[!'()*]/g,i)}function r(e){return e}var s=function(){function e(){this._scheme=e._empty,this._authority=e._empty,this._path=e._empty,this._query=e._empty,this._fragment=e._empty,this._formatted=null,this._fsPath=null}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme)},Object.defineProperty(e.prototype,"scheme",{get:function(){return this._scheme},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{get:function(){return this._authority},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._path},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fragment",{get:function(){return this._fragment},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fsPath",{get:function(){if(!this._fsPath){var t;t=this._authority&&this._path&&"file"===this.scheme?"//"+this._authority+this._path:e._driveLetterPath.test(this._path)?this._path[1].toLowerCase()+this._path.substr(2):this._path,n.isWindows&&(t=t.replace(/\//g,"\\")),this._fsPath=t}return this._fsPath},enumerable:!0,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var n=t.scheme,i=t.authority,o=t.path,r=t.query,s=t.fragment;if(void 0===n?n=this.scheme:null===n&&(n=""),void 0===i?i=this.authority:null===i&&(i=""),void 0===o?o=this.path:null===o&&(o=""),void 0===r?r=this.query:null===r&&(r=""),void 0===s?s=this.fragment:null===s&&(s=""),n===this.scheme&&i===this.authority&&o===this.path&&r===this.query&&s===this.fragment)return this;var a=new e;return a._scheme=n,a._authority=i,a._path=o,a._query=r,a._fragment=s,e._validate(a),a},e.parse=function(t){var n=new e,i=e._parseComponents(t);return n._scheme=i.scheme,n._authority=decodeURIComponent(i.authority),n._path=decodeURIComponent(i.path),n._query=decodeURIComponent(i.query),n._fragment=decodeURIComponent(i.fragment),e._validate(n),n},e.file=function(t){var n=new e;if(n._scheme="file",t=t.replace(/\\/g,e._slash),t[0]===e._slash&&t[0]===t[1]){var i=t.indexOf(e._slash,2);i===-1?n._authority=t.substring(2):(n._authority=t.substring(2,i),n._path=t.substring(i))}else n._path=t;return n._path[0]!==e._slash&&(n._path=e._slash+n._path),e._validate(n),n},e._parseComponents=function(t){var n={scheme:e._empty,authority:e._empty,path:e._empty,query:e._empty,fragment:e._empty},i=e._regexp.exec(t);return i&&(n.scheme=i[2]||n.scheme,n.authority=i[4]||n.authority,n.path=i[5]||n.path,n.query=i[7]||n.query,n.fragment=i[9]||n.fragment),n},e.from=function(t){return(new e).with(t)},e._validate=function(t){if(t.scheme&&!e._schemePattern.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!e._singleSlashStart.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(e._doubleSlashStart.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')},e.prototype.toString=function(t){return void 0===t&&(t=!1),t?e._asFormatted(this,!0):(this._formatted||(this._formatted=e._asFormatted(this,!1)),this._formatted)},e._asFormatted=function(t,n){var s=n?r:o,a=[],u=t.scheme,l=t.authority,c=t.path,d=t.query,h=t.fragment;if(u&&a.push(u,":"),(l||"file"===u)&&a.push("//"),l){l=l.toLowerCase();var p=l.indexOf(":");p===-1?a.push(s(l)):a.push(s(l.substr(0,p)),l.substr(p))}if(c){var f=e._upperCaseDrive.exec(c);f&&(c=f[1]?"/"+f[2].toLowerCase()+c.substr(3):f[2].toLowerCase()+c.substr(2));for(var g=0;;){var p=c.indexOf(e._slash,g);if(p===-1){a.push(s(c.substring(g)).replace(/[#?]/,i));break}a.push(s(c.substring(g,p)).replace(/[#?]/,i),e._slash),g=p+1}}return d&&a.push("?",s(d)),h&&a.push("#",s(h)),a.join(e._empty)},e.prototype.toJSON=function(){var e={fsPath:this.fsPath,external:this.toString(),$mid:1};return this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},e.revive=function(t){var n=new e;return n._scheme=t.scheme||e._empty,n._authority=t.authority||e._empty,n._path=t.path||e._empty,n._query=t.query||e._empty,n._fragment=t.fragment||e._empty,n._fsPath=t.fsPath,n._formatted=t.external,e._validate(n),n},e}();s._empty="",s._slash="/",s._regexp=/^(([^:\/?#]+?):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,s._driveLetterPath=/^\/[a-zA-z]:/,s._upperCaseDrive=/^(\/)?([A-Z]:)/,s._schemePattern=/^\w[\w\d+.-]*$/,s._singleSlashStart=/^\//,s._doubleSlashStart=/^\/\//,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}),define(d[153],h([0,1,27]),function(e,t,n){"use strict";function i(e){return JSON.stringify(e,r)}function o(e){return JSON.parse(e,s)}function r(e,t){return t instanceof RegExp?{$mid:2,source:t.source,flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")}:t}function s(e,t){var i;return void 0!==t&&null!==t&&(i=t.$mid),1===i?n.default.revive(t):2===i?new RegExp(t.source,t.flags):t}t.stringify=i,t.parse=o}),function(){var e={};e["WinJS/Core/_WinJS"]={};var t=function(t,n,i){var o={},r=!1,s=n.map(function(t){return"exports"===t?(r=!0,o):e[t]}),a=i.apply({},s);e[t]=r?o:a};t("WinJS/Core/_Global",[],function(){"use strict";var e="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};return e}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e.supportedForProcessing=!0,e}var n=!!e.Windows;return{hasWinRT:n,markSupportedForProcessing:t,_setImmediate:e.setImmediate?e.setImmediate.bind(e):function(t){e.setTimeout(t,0)}}}),t("WinJS/Core/_WriteProfilerMark",["WinJS/Core/_Global"],function(e){"use strict";return e.msWriteProfilerMark||function(){}}),t("WinJS/Core/_Base",["WinJS/Core/_WinJS","WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_WriteProfilerMark"],function(e,t,n,i){"use strict";function o(e,t,n){var i,o,r,s=Object.keys(t),a=Array.isArray(e);for(o=0,r=s.length;o<r;o++){var u=s[o],l=95!==u.charCodeAt(0),c=t[u];!c||"object"!=typeof c||void 0===c.value&&"function"!=typeof c.get&&"function"!=typeof c.set?l?a?e.forEach(function(e){e[u]=c}):e[u]=c:(i=i||{},i[u]={value:c,enumerable:l,configurable:!0,writable:!0}):(void 0===c.enumerable&&(c.enumerable=l),n&&c.setName&&"function"==typeof c.setName&&c.setName(n+"."+u),i=i||{},i[u]=c)}i&&(a?e.forEach(function(e){Object.defineProperties(e,i)}):Object.defineProperties(e,i))}return function(){function n(n,i){var o=n||{};if(i){var r=i.split(".");o===t&&"WinJS"===r[0]&&(o=e,r.splice(0,1));for(var s=0,a=r.length;s<a;s++){var u=r[s];o[u]||Object.defineProperty(o,u,{value:{},writable:!1,enumerable:!0,configurable:!0}),o=o[u]}}return o}function r(e,t,i){var r=n(e,t);return i&&o(r,i,t||"<ANONYMOUS>"),r}function s(e,n){return r(t,e,n)}function a(e){var t,n,o=c.uninitialized;return{setName:function(e){t=e},get:function(){switch(o){case c.initialized:return n;case c.uninitialized:o=c.working;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e()}finally{
i("WinJS.Namespace._lazy:"+t+",StopTM"),o=c.uninitialized}return e=null,o=c.initialized,n;case c.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(o){case c.working:throw"Illegal: reentrancy on initialization";default:o=c.initialized,n=e}},enumerable:!0,configurable:!0}}function u(e,i,r){var s=[e],a=null;return i&&(a=n(t,i),s.push(a)),o(s,r,i||"<ANONYMOUS>"),a}var l=e;l.Namespace||(l.Namespace=Object.create(Object.prototype));var c={uninitialized:1,working:2,initialized:3};Object.defineProperties(l.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:s,writable:!0,enumerable:!0,configurable:!0},_lazy:{value:a,writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:u,writable:!0,enumerable:!0,configurable:!0}})}(),function(){function t(e,t,i){return e=e||function(){},n.markSupportedForProcessing(e),t&&o(e.prototype,t),i&&o(e,i),e}function i(e,i,r,s){if(e){i=i||function(){};var a=e.prototype;return i.prototype=Object.create(a),n.markSupportedForProcessing(i),Object.defineProperty(i.prototype,"constructor",{value:i,writable:!0,configurable:!0,enumerable:!0}),r&&o(i.prototype,r),s&&o(i,s),i}return t(i,r,s)}function r(e){e=e||function(){};var t,n;for(t=1,n=arguments.length;t<n;t++)o(e.prototype,arguments[t]);return e}e.Namespace.define("WinJS.Class",{define:t,derive:i,mix:r})}(),{Namespace:e.Namespace,Class:e.Class}}),t("WinJS/Core/_ErrorFromName",["WinJS/Core/_Base"],function(e){"use strict";var t=e.Class.derive(Error,function(e,t){this.name=e,this.message=t||e},{},{supportedForProcessing:!1});return e.Namespace.define("WinJS",{ErrorFromName:t}),t}),t("WinJS/Core/_Events",["exports","WinJS/Core/_Base"],function(e,t){"use strict";function n(e){var t="_on"+e+"state";return{get:function(){var e=this[t];return e&&e.userHandler},set:function(n){var i=this[t];n?(i||(i={wrapper:function(e){return i.userHandler(e)},userHandler:n},Object.defineProperty(this,t,{value:i,enumerable:!1,writable:!0,configurable:!0}),this.addEventListener(e,i.wrapper,!1)),i.userHandler=n):i&&(this.removeEventListener(e,i.wrapper,!1),this[t]=null)},enumerable:!0}}function i(){for(var e={},t=0,i=arguments.length;t<i;t++){var o=arguments[t];e["on"+o]=n(o)}return e}var o=t.Class.define(function(e,t,n){this.detail=t,this.target=n,this.timeStamp=Date.now(),this.type=e},{bubbles:{value:!1,writable:!1},cancelable:{value:!1,writable:!1},currentTarget:{get:function(){return this.target}},defaultPrevented:{get:function(){return this._preventDefaultCalled}},trusted:{value:!1,writable:!1},eventPhase:{value:0,writable:!1},target:null,timeStamp:null,type:null,preventDefault:function(){this._preventDefaultCalled=!0},stopImmediatePropagation:function(){this._stopImmediatePropagationCalled=!0},stopPropagation:function(){}},{supportedForProcessing:!1}),r={_listeners:null,addEventListener:function(e,t,n){n=n||!1,this._listeners=this._listeners||{};for(var i=this._listeners[e]=this._listeners[e]||[],o=0,r=i.length;o<r;o++){var s=i[o];if(s.useCapture===n&&s.listener===t)return}i.push({listener:t,useCapture:n})},dispatchEvent:function(e,t){var n=this._listeners&&this._listeners[e];if(n){var i=new o(e,t,this);n=n.slice(0,n.length);for(var r=0,s=n.length;r<s&&!i._stopImmediatePropagationCalled;r++)n[r].listener(i);return i.defaultPrevented||!1}return!1},removeEventListener:function(e,t,n){n=n||!1;var i=this._listeners&&this._listeners[e];if(i)for(var o=0,r=i.length;o<r;o++){var s=i[o];if(s.listener===t&&s.useCapture===n){i.splice(o,1),0===i.length&&delete this._listeners[e];break}}}};t.Namespace._moduleDefine(e,"WinJS.Utilities",{_createEventProperty:n,createEventProperties:i,eventMixin:r})}),t("WinJS/Core/_Trace",["WinJS/Core/_Global"],function(e){"use strict";function t(e){return e}return{_traceAsyncOperationStarting:e.Debug&&e.Debug.msTraceAsyncOperationStarting&&e.Debug.msTraceAsyncOperationStarting.bind(e.Debug)||t,_traceAsyncOperationCompleted:e.Debug&&e.Debug.msTraceAsyncOperationCompleted&&e.Debug.msTraceAsyncOperationCompleted.bind(e.Debug)||t,_traceAsyncCallbackStarting:e.Debug&&e.Debug.msTraceAsyncCallbackStarting&&e.Debug.msTraceAsyncCallbackStarting.bind(e.Debug)||t,_traceAsyncCallbackCompleted:e.Debug&&e.Debug.msTraceAsyncCallbackCompleted&&e.Debug.msTraceAsyncCallbackCompleted.bind(e.Debug)||t}}),t("WinJS/Promise/_StateMachine",["WinJS/Core/_Global","WinJS/Core/_BaseCoreUtils","WinJS/Core/_Base","WinJS/Core/_ErrorFromName","WinJS/Core/_Events","WinJS/Core/_Trace"],function(e,t,n,i,o,r){"use strict";function s(){}function a(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?O:F,e._value=t,e._setState(n)}function u(e,t,n,i,o,r){return{exception:e,error:t,promise:n,handler:r,id:i,parent:o}}function l(e,t,n,i){var o=n._isException,r=n._errorId;return u(o?t:null,o?null:t,e,r,n,i)}function c(e,t,n){var i=n._isException,o=n._errorId;return C(e,o,i),u(i?t:null,i?null:t,e,o,n)}function d(e,t){var n=++U;return C(e,n),u(null,t,e,n)}function h(e,t){var n=++U;return C(e,n,!0),u(t,null,e,n)}function p(e,t,n,i){var o=r._traceAsyncOperationStarting("WinJS.Promise.done");y(e,{c:t,e:n,p:i,asyncOpID:o})}function f(e,t,n,i){e._value=t,v(e,t,n,i),e._setState(H)}function g(t,n){var i=t._value,o=t._listeners;if(o){t._listeners=null;var s,a;for(s=0,a=Array.isArray(o)?o.length:1;s<a;s++){var u=1===a?o:o[s],l=u.c,c=u.promise;if(r._traceAsyncOperationCompleted(u.asyncOpID,e.Debug&&e.Debug.MS_ASYNC_OP_STATUS_SUCCESS),c){r._traceAsyncCallbackStarting(u.asyncOpID);try{c._setCompleteValue(l?l(i):i)}catch(e){c._setExceptionValue(e)}finally{r._traceAsyncCallbackCompleted()}c._state!==O&&c._listeners&&n.push(c)}else Y.prototype.done.call(t,l)}}}function m(t,n){var i=t._value,o=t._listeners;if(o){t._listeners=null;var s,a;for(s=0,a=Array.isArray(o)?o.length:1;s<a;s++){var u=1===a?o:o[s],c=u.e,d=u.promise,h=e.Debug&&(i&&i.name===M?e.Debug.MS_ASYNC_OP_STATUS_CANCELED:e.Debug.MS_ASYNC_OP_STATUS_ERROR);if(r._traceAsyncOperationCompleted(u.asyncOpID,h),d){var p=!1;try{c?(r._traceAsyncCallbackStarting(u.asyncOpID),p=!0,c.handlesOnError||v(d,i,l,t,c),d._setCompleteValue(c(i))):d._setChainedErrorValue(i,t)}catch(e){d._setExceptionValue(e)}finally{p&&r._traceAsyncCallbackCompleted()}d._state!==O&&d._listeners&&n.push(d)}else q.prototype.done.call(t,null,c)}}}function v(e,t,n,i,o){if(T._listeners[x]){if(t instanceof Error&&t.message===M)return;T.dispatchEvent(x,n(e,t,i,o))}}function _(e,t){var n=e._listeners;if(n){var i,o;for(i=0,o=Array.isArray(n)?n.length:1;i<o;i++){var r=1===o?n:n[i],s=r.p;if(s)try{s(t)}catch(e){}r.c||r.e||!r.promise||r.promise._progress(t)}}}function y(e,t){var n=e._listeners;n?(n=Array.isArray(n)?n:[n],n.push(t)):n=t,e._listeners=n}function C(e,t,n){e._isException=n||!1,e._errorId=t}function b(e,t,n,i){e._value=t,v(e,t,n,i),e._setState(B)}function w(e,t){var n;n=t&&"object"==typeof t&&"function"==typeof t.then?O:V,e._value=t,e._setState(n)}function S(e,t,n,i){var o=new j(e),s=r._traceAsyncOperationStarting("WinJS.Promise.then");return y(e,{promise:o,c:t,e:n,p:i,asyncOpID:s}),o}function E(n){var i;return new Z(function(o){n?i=e.setTimeout(o,n):t._setImmediate(o)},function(){i&&e.clearTimeout(i)})}function L(e,t){var n=function(){t.cancel()},i=function(){e.cancel()};return e.then(n),t.then(i,i),t}e.Debug&&(e.Debug.setNonUserCodeExceptions=!0);var N=n.Class.mix(n.Class.define(null,{},{supportedForProcessing:!1}),o.eventMixin),T=new N;T._listeners={};var x="error",M="Canceled",I=!1,D={promise:1,thenPromise:2,errorPromise:4,exceptionPromise:8,completePromise:16};D.all=D.promise|D.thenPromise|D.errorPromise|D.exceptionPromise|D.completePromise;var R,k,O,P,A,W,F,V,H,B,U=1;R={name:"created",enter:function(e){e._setState(k)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},k={name:"working",enter:s,cancel:function(e){e._setState(A)},done:p,then:S,_completed:a,_error:f,_notify:s,_progress:_,_setCompleteValue:w,_setErrorValue:b},O={name:"waiting",enter:function(e){var t=e._value;if(t instanceof j&&t._state!==B&&t._state!==V)y(t,{promise:e});else{var n=function(i){t._errorId?e._chainedError(i,t):(v(e,i,l,t,n),e._error(i))};n.handlesOnError=!0,t.then(e._completed.bind(e),n,e._progress.bind(e))}},cancel:function(e){e._setState(P)},done:p,then:S,_completed:a,_error:f,_notify:s,_progress:_,_setCompleteValue:w,_setErrorValue:b},P={name:"waiting_canceled",enter:function(e){e._setState(W);var t=e._value;t.cancel&&t.cancel()},cancel:s,done:p,then:S,_completed:a,_error:f,_notify:s,_progress:_,_setCompleteValue:w,_setErrorValue:b},A={name:"canceled",enter:function(e){e._setState(W),e._cancelAction()},cancel:s,done:p,then:S,_completed:a,_error:f,_notify:s,_progress:_,_setCompleteValue:w,_setErrorValue:b},W={name:"canceling",enter:function(e){var t=new Error(M);t.name=t.message,e._value=t,e._setState(H)},cancel:s,done:s,then:s,_completed:s,_error:s,_notify:s,_progress:s,_setCompleteValue:s,_setErrorValue:s},F={name:"complete_notify",enter:function(e){if(e.done=Y.prototype.done,e.then=Y.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.shift(),t._state._notify(t,n);e._setState(V)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s},V={name:"success",enter:function(e){e.done=Y.prototype.done,e.then=Y.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:g,_progress:s,_setCompleteValue:s,_setErrorValue:s},H={name:"error_notify",enter:function(e){if(e.done=q.prototype.done,e.then=q.prototype.then,e._listeners)for(var t,n=[e];n.length;)t=n.shift(),t._state._notify(t,n);e._setState(B)},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:m,_progress:s,_setCompleteValue:s,_setErrorValue:s},B={name:"error",enter:function(e){e.done=q.prototype.done,e.then=q.prototype.then,e._cleanupAction()},cancel:s,done:null,then:null,_completed:s,_error:s,_notify:m,_progress:s,_setCompleteValue:s,_setErrorValue:s};var z,K=n.Class.define(null,{_listeners:null,_nextState:null,_state:null,_value:null,cancel:function(){this._state.cancel(this),this._run()},done:function(e,t,n){this._state.done(this,e,t,n)},then:function(e,t,n){return this._state.then(this,e,t,n)},_chainedError:function(e,t){var n=this._state._error(this,e,c,t);return this._run(),n},_completed:function(e){var t=this._state._completed(this,e);return this._run(),t},_error:function(e){var t=this._state._error(this,e,d);return this._run(),t},_progress:function(e){this._state._progress(this,e)},_setState:function(e){this._nextState=e},_setCompleteValue:function(e){this._state._setCompleteValue(this,e),this._run()},_setChainedErrorValue:function(e,t){var n=this._state._setErrorValue(this,e,c,t);return this._run(),n},_setExceptionValue:function(e){var t=this._state._setErrorValue(this,e,h);return this._run(),t},_run:function(){for(;this._nextState;)this._state=this._nextState,this._nextState=null,this._state.enter(this)}},{supportedForProcessing:!1}),j=n.Class.derive(K,function(e){I&&(I===!0||I&D.thenPromise)&&(this._stack=Z._getStack()),this._creator=e,this._setState(R),this._run()},{_creator:null,_cancelAction:function(){this._creator&&this._creator.cancel()},_cleanupAction:function(){this._creator=null}},{supportedForProcessing:!1}),q=n.Class.define(function(e){I&&(I===!0||I&D.errorPromise)&&(this._stack=Z._getStack()),this._value=e,v(this,e,d)},{cancel:function(){},done:function(e,t){var n=this._value;if(t)try{t.handlesOnError||v(null,n,l,this,t);var i=t(n);return void(i&&"object"==typeof i&&"function"==typeof i.done&&i.done())}catch(e){n=e}n instanceof Error&&n.message===M||Z._doneHandler(n)},then:function(e,t){if(!t)return this;var n,i=this._value;try{t.handlesOnError||v(null,i,l,this,t),n=new Y(t(i))}catch(e){n=e===i?this:new G(e)}return n}},{supportedForProcessing:!1}),G=n.Class.derive(q,function(e){I&&(I===!0||I&D.exceptionPromise)&&(this._stack=Z._getStack()),this._value=e,v(this,e,h)},{},{supportedForProcessing:!1}),Y=n.Class.define(function(e){if(I&&(I===!0||I&D.completePromise)&&(this._stack=Z._getStack()),e&&"object"==typeof e&&"function"==typeof e.then){var t=new j(null);return t._setCompleteValue(e),t}this._value=e},{cancel:function(){},done:function(e){if(e)try{var t=e(this._value);t&&"object"==typeof t&&"function"==typeof t.done&&t.done()}catch(e){Z._doneHandler(e)}},then:function(e){try{var t=e?e(this._value):this._value;return t===this._value?this:new Y(t)}catch(e){return new G(e)}}},{supportedForProcessing:!1}),Z=n.Class.derive(K,function(e,t){I&&(I===!0||I&D.promise)&&(this._stack=Z._getStack()),this._oncancel=t,this._setState(R),this._run();try{var n=this._completed.bind(this),i=this._error.bind(this),o=this._progress.bind(this);e(n,i,o)}catch(e){this._setExceptionValue(e)}},{_oncancel:null,_cancelAction:function(){try{if(!this._oncancel)throw new Error("Promise did not implement oncancel");this._oncancel()}catch(e){e.message,e.stack;T.dispatchEvent("error",e)}},_cleanupAction:function(){this._oncancel=null}},{addEventListener:function(e,t,n){T.addEventListener(e,t,n)},any:function(e){return new Z(function(t,n){var i=Object.keys(e);0===i.length&&t();var o=0;i.forEach(function(r){Z.as(e[r]).then(function(){t({key:r,value:e[r]})},function(s){return s instanceof Error&&s.name===M?void(++o===i.length&&t(Z.cancel)):void n({key:r,value:e[r]})})})},function(){var t=Object.keys(e);t.forEach(function(t){var n=Z.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},as:function(e){return e&&"object"==typeof e&&"function"==typeof e.then?e:new Y(e)},cancel:{get:function(){return z=z||new q(new i(M))}},dispatchEvent:function(e,t){return T.dispatchEvent(e,t)},is:function(e){return e&&"object"==typeof e&&"function"==typeof e.then},join:function(e){return new Z(function(t,n,i){var o=Object.keys(e),r=Array.isArray(e)?[]:{},s=Array.isArray(e)?[]:{},a=0,u=o.length,l=function(e){if(0===--u){var a=Object.keys(r).length;if(0===a)t(s);else{var l=0;o.forEach(function(e){var t=r[e];t instanceof Error&&t.name===M&&l++}),l===a?t(Z.cancel):n(r)}}else i({Key:e,Done:!0})};if(o.forEach(function(t){var n=e[t];void 0===n?a++:Z.then(n,function(e){s[t]=e,l(t)},function(e){r[t]=e,l(t)})}),u-=a,0===u)return void t(s)},function(){Object.keys(e).forEach(function(t){var n=Z.as(e[t]);"function"==typeof n.cancel&&n.cancel()})})},removeEventListener:function(e,t,n){T.removeEventListener(e,t,n)},supportedForProcessing:!1,then:function(e,t,n,i){return Z.as(e).then(t,n,i)},thenEach:function(e,t,n,i){var o=Array.isArray(e)?[]:{};return Object.keys(e).forEach(function(r){o[r]=Z.as(e[r]).then(t,n,i)}),Z.join(o)},timeout:function(e,t){var n=E(e);return t?L(n,t):n},wrap:function(e){return new Y(e)},wrapError:function(e){return new q(e)},_veryExpensiveTagWithStack:{get:function(){return I},set:function(e){I=e}},_veryExpensiveTagWithStack_tag:D,_getStack:function(){if(e.Debug&&e.Debug.debuggerEnabled)try{throw new Error}catch(e){return e.stack}},_cancelBlocker:function(e,t){if(!Z.is(e))return Z.wrap(e);var n,i,o=new Z(function(e,t){n=e,i=t},function(){n=null,i=null,t&&t()});return e.then(function(e){n&&n(e)},function(e){i&&i(e)}),o}});return Object.defineProperties(Z,o.createEventProperties(x)),Z._doneHandler=function(e){t._setImmediate(function(){throw e})},{PromiseStateMachine:K,Promise:Z,state_created:R}}),t("WinJS/Promise",["WinJS/Core/_Base","WinJS/Promise/_StateMachine"],function(e,t){"use strict";return e.Namespace.define("WinJS",{Promise:t.Promise}),t.Promise});var n=e["WinJS/Core/_WinJS"];"undefined"==typeof exports&&"function"==typeof define&&define.amd?define("vs/base/common/winjs.base.raw",n):module.exports=n,"undefined"!=typeof process&&"function"==typeof process.nextTick&&(e["WinJS/Core/_BaseCoreUtils"]._setImmediate=function(e){return process.nextTick(e)})}(),define(d[6],h([513,10]),function(e,t){"use strict";function n(e){var n=e.detail,o=n.id;return n.parent?void(n.handler&&i&&delete i[o]):(i[o]=n,void(1===Object.keys(i).length&&setTimeout(function(){var e=i;i={},Object.keys(e).forEach(function(n){var i=e[n];i.exception?t.onUnexpectedError(i.exception):i.error&&t.onUnexpectedError(i.error),console.log("WARNING: Promise with no error callback:"+i.id),console.log(i),i.exception&&console.log(i.exception.stack)})},0)))}var i={};return e.Promise.addEventListener("error",n),{Promise:e.Promise,TPromise:e.Promise,PPromise:e.Promise}}),define(d[49],h([0,1,6,25,67,12]),function(e,t,n,i,o,r){"use strict";function s(e){return!!e&&(e instanceof a||"string"==typeof e.id&&("string"==typeof e.label&&("string"==typeof e.class&&("boolean"==typeof e.enabled&&("boolean"==typeof e.checked&&"function"==typeof e.run)))))}t.isAction=s;var a=function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=""),void 0===i&&(i=!0),this._onDidChange=new r.Emitter,this._id=e,this._label=t,this._cssClass=n,this._enabled=i,this._actionCallback=o}return e.prototype.dispose=function(){this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(e){this._setLabel(e)},enumerable:!0,configurable:!0}),e.prototype._setLabel=function(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))},Object.defineProperty(e.prototype,"tooltip",{get:function(){return this._tooltip},set:function(e){this._setTooltip(e)},enumerable:!0,configurable:!0}),e.prototype._setTooltip=function(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))},Object.defineProperty(e.prototype,"class",{get:function(){return this._cssClass},set:function(e){this._setClass(e)},enumerable:!0,configurable:!0}),e.prototype._setClass=function(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._setEnabled(e)},enumerable:!0,configurable:!0}),e.prototype._setEnabled=function(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))},Object.defineProperty(e.prototype,"checked",{get:function(){return this._checked},set:function(e){this._setChecked(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radio",{get:function(){return this._radio},set:function(e){this._setRadio(e)},enumerable:!0,configurable:!0}),e.prototype._setChecked=function(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))},e.prototype._setRadio=function(e){this._radio!==e&&(this._radio=e,this._onDidChange.fire({radio:e}))},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!0,configurable:!0}),e.prototype.run=function(e){return void 0!==this._actionCallback?this._actionCallback(e):n.TPromise.as(!0)},e}();t.Action=a;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){var i=this;return e.enabled?(this.emit(o.EventType.BEFORE_RUN,{action:e}),n.TPromise.as(e.run(t)).then(function(t){i.emit(o.EventType.RUN,{action:e,result:t})},function(t){i.emit(o.EventType.RUN,{action:e,error:t})})):n.TPromise.as(null)},t}(i.EventEmitter);t.ActionRunner=u}),define(d[17],h([0,1,10,18,6,142,4,12]),function(e,t,n,i,o,r,s,a){"use strict";function u(e){return e&&"function"==typeof e.then}function l(e){return u(e)?e:o.TPromise.as(e)}function c(e){var t=new r.CancellationTokenSource;return new o.TPromise(function(n,i,r){var s=e(t.token);s instanceof o.TPromise?s.then(n,i,r):u(s)?s.then(n,i):n(s)},function(){t.cancel()})}function d(e,t,i){var r=e.onCancellationRequested(function(){return t.cancel()});return i&&(t=t.then(void 0,function(e){if(!n.isPromiseCanceledError(e))return o.TPromise.wrapError(e)})),h(t,function(){return r.dispose()})}function h(e,t){return new o.TPromise(function(i,o,r){e.done(function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}i(e)},function(e){try{t(e)}catch(e){n.onUnexpectedError(e)}o(e)},function(e){r(e)})},function(){e.cancel()})}function p(e){function t(){return e.length?e.pop()():null}function n(e){void 0!==e&&null!==e&&i.push(e);var r=t();return r?r.then(n):o.TPromise.as(i)}var i=[];return e=e.reverse(),o.TPromise.as(null).then(n)}function f(e,t){void 0===t&&(t=function(e){return!!e}),e=e.reverse().slice();var n=function(){if(0===e.length)return o.TPromise.as(null);var i=e.pop(),r=i();return r.then(function(e){return t(e)?o.TPromise.as(e):n()})};return n()}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new o.Promise(function(n,i){return e.apply(void 0,t.concat([function(e,t){return e?i(e):n(t)}]))})}function v(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return new o.Promise(function(i,o){return t.call.apply(t,[e].concat(n,[function(e,t){return e?o(e):i(t)}]))})}t.toThenable=l,t.asWinJsPromise=c,t.wireCancellationToken=d;var _=function(){function e(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}return e.prototype.queue=function(e){var t=this;if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){var n=function(){t.queuedPromise=null;var e=t.queue(t.queuedPromiseFactory);return t.queuedPromiseFactory=null,e};this.queuedPromise=new o.Promise(function(e,i,o){t.activePromise.then(n,n,o).done(e)},function(){t.activePromise.cancel()})}return new o.Promise(function(e,n,i){t.queuedPromise.then(e,n,i)},function(){})}return this.activePromise=e(),new o.Promise(function(e,n,i){t.activePromise.done(function(n){t.activePromise=null,e(n)},function(e){t.activePromise=null,n(e)},i)},function(){t.activePromise.cancel()})},e}();t.Throttler=_;var y=function(){function e(){this.current=o.TPromise.as(null)}return e.prototype.queue=function(e){return this.current=this.current.then(function(){return e()})},e}();t.SimpleThrottler=y;var C=function(){function e(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.onSuccess=null,this.task=null}return e.prototype.trigger=function(e,t){var n=this;return void 0===t&&(t=this.defaultDelay),this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new o.Promise(function(e){n.onSuccess=e},function(){}).then(function(){n.completionPromise=null,n.onSuccess=null;var e=n.task;return n.task=null,e()})),this.timeout=setTimeout(function(){n.timeout=null,n.onSuccess(null)},t),this.completionPromise},e.prototype.isTriggered=function(){return null!==this.timeout},e.prototype.cancel=function(){this.cancelTimeout(),this.completionPromise&&(this.completionPromise.cancel(),this.completionPromise=null)},e.prototype.cancelTimeout=function(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},e}();t.Delayer=C;var b=function(e){function t(t){var n=e.call(this,t)||this;return n.throttler=new _,n}return m(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.throttler.queue(t)},n)},t}(C);t.ThrottledDelayer=b;var w=function(e){function t(t,n){void 0===n&&(n=0);var i=e.call(this,t)||this;return i.minimumPeriod=n,i.periodThrottler=new _,i}return m(t,e),t.prototype.trigger=function(t,n){var i=this;return e.prototype.trigger.call(this,function(){return i.periodThrottler.queue(function(){return o.Promise.join([o.TPromise.timeout(i.minimumPeriod),t()]).then(function(e){return e[1]})})},n)},t}(b);t.PeriodThrottledDelayer=w;var S=function(){function e(){var e=this;this._value=new o.TPromise(function(t,n){e._completeCallback=t,e._errorCallback=n})}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.complete=function(e){this._completeCallback(e)},e.prototype.error=function(e){this._errorCallback(e)},e}();t.PromiseSource=S;var E=function(e){function t(t){var i,o,r,s=this;return s=e.call(this,function(e,t,n){i=e,o=t,r=n},function(){o(n.canceled())})||this,t.then(i,o,r),s}return m(t,e),t}(o.TPromise);t.ShallowCancelThenPromise=E,t.always=h,t.sequence=p,t.first=f;var L=function(){function e(e){this.maxDegreeOfParalellism=e,this.outstandingPromises=[],this.runningPromises=0,this._onFinished=new a.Emitter}return Object.defineProperty(e.prototype,"onFinished",{get:function(){return this._onFinished.event},enumerable:!0,configurable:!0}),e.prototype.queue=function(e){var t=this;return new o.TPromise(function(n,i,o){t.outstandingPromises.push({factory:e,c:n,e:i,p:o}),t.consume()})},e.prototype.consume=function(){for(var e=this;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){var t=this.outstandingPromises.shift();this.runningPromises++;var n=t.factory();n.done(t.c,t.e,t.p),n.done(function(){return e.consumed()},function(){return e.consumed()})}},e.prototype.consumed=function(){this.runningPromises--,this.outstandingPromises.length>0?this.consume():this._onFinished.fire()},e.prototype.dispose=function(){this._onFinished.dispose()},e}();t.Limiter=L;var N=function(e){function t(){return e.call(this,1)||this}return m(t,e),t}(L);t.Queue=N;var T=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return m(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){this._token!==-1&&(i.clearTimeout(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){var n=this;this.cancel(),this._token=i.setTimeout(function(){n._token=-1,e()},t)},t.prototype.setIfNotSet=function(e,t){var n=this;this._token===-1&&(this._token=i.setTimeout(function(){n._token=-1,e()},t))},t}(s.Disposable);t.TimeoutTimer=T;var x=function(e){function t(){var t=e.call(this)||this;return t._token=-1,t}return m(t,e),t.prototype.dispose=function(){this.cancel(),e.prototype.dispose.call(this)},t.prototype.cancel=function(){this._token!==-1&&(i.clearInterval(this._token),this._token=-1)},t.prototype.cancelAndSet=function(e,t){this.cancel(),this._token=i.setInterval(function(){e()},t)},t}(s.Disposable);t.IntervalTimer=x;var M=function(){function e(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}return e.prototype.dispose=function(){this.cancel(),this.runner=null},e.prototype.cancel=function(){this.isScheduled()&&(i.clearTimeout(this.timeoutToken),this.timeoutToken=-1)},e.prototype.setRunner=function(e){this.runner=e},e.prototype.schedule=function(e){void 0===e&&(e=this.timeout),this.cancel(),this.timeoutToken=i.setTimeout(this.timeoutHandler,e)},e.prototype.isScheduled=function(){return this.timeoutToken!==-1},e.prototype.onTimeout=function(){this.timeoutToken=-1,this.runner&&this.runner()},e}();t.RunOnceScheduler=M,t.nfcall=g,t.ninvoke=v}),define(d[11],h([0,1,6,17,10,25,4,22,24,53,36]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function h(e){var t=[];return JSON.stringify(e,function(e,n){if(n instanceof Element)return"[Element]";if(a.isObject(n)||Array.isArray(n)){if(t.indexOf(n)!==-1)return"[Circular]";t.push(n)}return n})}function p(e){for(;e;){if(e===document.body)return!0;e=e.parentNode}return!1}function f(e,t){var n=e.className;if(!n)return void(oe=-1);t=t.trim();var i=n.length,o=t.length;if(0===o)return void(oe=-1);if(i<o)return void(oe=-1);if(n===t)return oe=0,void(re=i);for(var r,s=-1;(s=n.indexOf(t,s+1))>=0;){if(r=s+o,(0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return oe=s,void(re=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return oe=s-1,void(re=r);if(0===s&&r===i)return oe=0,void(re=r)}oe=-1}function g(e,t){return f(e,t),oe!==-1}function v(e,t){e.className?(f(e,t),oe===-1&&(e.className=e.className+" "+t)):e.className=t}function _(e,t){f(e,t),oe!==-1&&(e.className=e.className.substring(0,oe)+e.className.substring(re))}function y(e,t,n){f(e,t),oe===-1||void 0!==n&&n||_(e,t),oe!==-1||void 0!==n&&!n||v(e,t)}function C(e,t,n,i){return new se(e,t,n,i)}function b(e){return function(t){return e(new c.StandardMouseEvent(t))}}function w(e){return function(t){return e(new l.StandardKeyboardEvent(t))}}function S(e,t){return C(e,"mouseout",function(n){for(var i=n.relatedTarget||n.toElement;i&&i!==e;)i=i.parentNode;i!==e&&t(n)})}function E(e,t,n,i,o){return new de(e,t,n,i,o)}function L(e){return document.defaultView.getComputedStyle(e,null)}function N(e,t,n){var i=L(e),o="0";return i&&(o=i.getPropertyValue?i.getPropertyValue(t):i.getAttribute(n)),he(e,o)}function T(e){for(var t=e.offsetParent,n=e.offsetTop,i=e.offsetLeft;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){n-=e.scrollTop;var o=L(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=pe.getBorderLeftWidth(e),n+=pe.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}}function x(e){var n=e.getBoundingClientRect();return{left:n.left+t.StandardWindow.scrollX,top:n.top+t.StandardWindow.scrollY,width:n.width,height:n.height}}function M(e){var t=pe.getBorderLeftWidth(e)+pe.getBorderRightWidth(e),n=pe.getPaddingLeft(e)+pe.getPaddingRight(e);return e.offsetWidth-t-n}function I(e){var t=pe.getMarginLeft(e)+pe.getMarginRight(e);return e.offsetWidth+t}function D(e){var t=pe.getMarginLeft(e)+pe.getMarginRight(e);return e.scrollWidth+t}function R(e){var t=pe.getBorderTopWidth(e)+pe.getBorderBottomWidth(e),n=pe.getPaddingTop(e)+pe.getPaddingBottom(e);return e.offsetHeight-t-n}function k(e){var t=pe.getMarginTop(e)+pe.getMarginBottom(e);return e.offsetHeight+t}function O(e,t){if(null===e)return 0;var n=T(e),i=T(t);return n.left-i.left}function P(e,t){var n=t.map(function(t){return Math.max(D(t),I(t))+O(t,e)||0}),i=Math.max.apply(Math,n);return i}function A(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function W(e,t,n){for(;e;){if(g(e,t))return e;if(n&&g(e,n))return null;e=e.parentNode}return null}function F(){var e=document.createElement("style");return e.type="text/css",e.media="screen",document.getElementsByTagName("head")[0].appendChild(e),e}function V(e){return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}function H(e,t,n){void 0===n&&(n=fe),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)}function B(e,t){if(void 0===t&&(t=fe),!t)return null;for(var n=V(t),i=0;i<n.length;i++){var o=n[i],r=o.selectorText.replace(/::/gi,":");if(r===e)return o}return null}function U(e,t){if(void 0===t&&(t=fe),t){for(var n=V(t),i=[],o=0;o<n.length;o++){var r=n[o],s=r.selectorText.replace(/::/gi,":");s.indexOf(e)!==-1&&i.push(o)}for(var o=i.length-1;o>=0;o--)t.sheet.deleteRule(i[o])}}function z(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}function K(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t}function j(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode}function q(e){return new ge(e)}function G(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach(function(t){return e.appendChild(t)}),t[t.length-1]}function Y(e,t){return e.insertBefore(t,e.firstChild),t}function Z(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=me.exec(e);if(!o)throw new Error("Bad use of emmet");var r=document.createElement(o[1]||"div");return o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(t||{}).forEach(function(e){if(/^on\w+$/.test(e))r[e]=t[e];else if("selected"===e){var n=t[e];n&&r.setAttribute(e,"true")}else r.setAttribute(e,t[e])}),n.filter(function(e){return!!e}).forEach(function(e){e instanceof Node?r.appendChild(e):r.appendChild(document.createTextNode(e))}),r}function $(e,t){var n=[];return e.forEach(function(e,i){i>0&&(t instanceof Node?n.push(t.cloneNode()):n.push(document.createTextNode(t))),n.push(e)}),n}function X(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){
var o=i[n];o.style.display=""}}function J(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e;n<i.length;n++){var o=i[n];o.style.display="none"}}function Q(e,t){for(;e;){if(e instanceof HTMLElement&&e.hasAttribute(t))return e;e=e.parentNode}return null}function ee(e){if(e&&e.hasAttribute("tabIndex")){if(document.activeElement===e){var t=Q(e.parentElement,"tabIndex");t&&t.focus()}e.removeAttribute("tabindex")}}function te(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function ne(e){return function(t){t.preventDefault(),t.stopPropagation(),e(t)}}function ie(){return new n.TPromise(function(e,t){var n=document.readyState;"complete"===n||document&&null!==document.body?window.setImmediate(e):window.addEventListener("DOMContentLoaded",e,!1)})}t.clearNode=d,t.safeStringifyDOMAware=h,t.isInDOM=p;var oe,re;t.hasClass=g,t.addClass=v,t.removeClass=_,t.toggleClass=y;var se=function(){function e(e,t,n,i){this._node=e,this._type=t,this._handler=n,this._useCapture=i||!1,this._node.addEventListener(this._type,this._handler,this._useCapture)}return e.prototype.dispose=function(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._useCapture),this._node=null,this._handler=null)},e}();t.addDisposableListener=C,t.addStandardDisposableListener=function(e,t,n,i){var o=n;return"click"===t?o=b(n):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=w(n)),C(e,t,o,i)},t.addDisposableNonBubblingMouseOutListener=S;var ae=function(){var e=function(e){return setTimeout(function(){return e((new Date).getTime())},0)},t=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame,n=function(e){},i=self.cancelAnimationFrame||self.cancelRequestAnimationFrame||self.msCancelAnimationFrame||self.msCancelRequestAnimationFrame||self.webkitCancelAnimationFrame||self.webkitCancelRequestAnimationFrame||self.mozCancelAnimationFrame||self.mozCancelRequestAnimationFrame||self.oCancelAnimationFrame||self.oCancelRequestAnimationFrame,o=!!t,r=t||e,s=i||n;return{isNative:o,request:function(e){return r(e)},cancel:function(e){return s(e)}}}(),ue=function(){function e(e,t){this._runner=e,this.priority=t,this._canceled=!1}return e.prototype.dispose=function(){this._canceled=!0},e.prototype.execute=function(){if(!this._canceled)try{this._runner()}catch(e){o.onUnexpectedError(e)}},e.sort=function(e,t){return t.priority-e.priority},e}();!function(){var e=[],n=null,i=!1,o=!1,r=function(){for(i=!1,n=e,e=[],o=!0;n.length>0;){n.sort(ue.sort);var t=n.shift();t.execute()}o=!1};t.scheduleAtNextAnimationFrame=function(t,n){void 0===n&&(n=0);var o=new ue(t,n);if(e.push(o),!i)if(i=!0,u.isChrome){var s;ae.request(function(){clearTimeout(s),r()}),s=setTimeout(r,1e3)}else ae.request(r);return o},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,i){if(o){var r=new ue(e,i);return n.push(r),r}return t.scheduleAtNextAnimationFrame(e,i)}}();var le=16,ce=function(e,t){return t},de=function(e){function t(t,n,o,r,s){void 0===r&&(r=ce),void 0===s&&(s=le);var a=e.call(this)||this,u=null,l=0,c=a._register(new i.TimeoutTimer),d=function(){l=(new Date).getTime(),o(u),u=null};return a._register(C(t,n,function(e){u=r(u,e);var t=(new Date).getTime()-l;t>=s?(c.cancel(),d()):c.setIfNotSet(d,s-t)})),a}return m(t,e),t}(s.Disposable);t.addDisposableThrottledListener=E,t.getComputedStyle=L;var he=function(){return function(e,t){return parseFloat(t)||0}}(),pe={getBorderLeftWidth:function(e){return N(e,"border-left-width","borderLeftWidth")},getBorderTopWidth:function(e){return N(e,"border-top-width","borderTopWidth")},getBorderRightWidth:function(e){return N(e,"border-right-width","borderRightWidth")},getBorderBottomWidth:function(e){return N(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return N(e,"padding-left","paddingLeft")},getPaddingTop:function(e){return N(e,"padding-top","paddingTop")},getPaddingRight:function(e){return N(e,"padding-right","paddingRight")},getPaddingBottom:function(e){return N(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return N(e,"margin-left","marginLeft")},getMarginTop:function(e){return N(e,"margin-top","marginTop")},getMarginRight:function(e){return N(e,"margin-right","marginRight")},getMarginBottom:function(e){return N(e,"margin-bottom","marginBottom")},__commaSentinel:!1};t.getTopLeftOffset=T,t.getDomNodePagePosition=x,t.StandardWindow=new(function(){function e(){}return Object.defineProperty(e.prototype,"scrollX",{get:function(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollY",{get:function(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop},enumerable:!0,configurable:!0}),e}()),t.getContentWidth=M,t.getTotalWidth=I,t.getTotalScrollWidth=D,t.getContentHeight=R,t.getTotalHeight=k,t.getLargestChildWidth=P,t.isAncestor=A,t.findParentWithClass=W,t.createStyleSheet=F;var fe=F();t.createCSSRule=H,t.getCSSRule=B,t.removeCSSRulesContainingSelector=U,t.isHTMLElement=z,t.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:u.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:u.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:u.isWebKit?"webkitAnimationIteration":"animationiteration"},t.EventHelper={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}},t.saveParentsScrollTop=K,t.restoreParentsScrollTop=j;var ge=function(e){function n(n){var i=e.call(this)||this,o=!1,s=!1;i._eventEmitter=i._register(new r.EventEmitter);var a=function(e){s=!1,o||(o=!0,i._eventEmitter.emit("focus",{}))},u=function(e){o&&(s=!0,window.setTimeout(function(){s&&(s=!1,o=!1,i._eventEmitter.emit("blur",{}))},0))};return i._register(C(n,t.EventType.FOCUS,a,!0)),i._register(C(n,t.EventType.BLUR,u,!0)),i}return m(n,e),n.prototype.addFocusListener=function(e){return this._eventEmitter.addListener2("focus",e)},n.prototype.addBlurListener=function(e){return this._eventEmitter.addListener2("blur",e)},n}(s.Disposable);t.trackFocus=q,t.append=G,t.prepend=Y;var me=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;t.$=Z,t.join=$,t.show=X,t.hide=J,t.removeTabIndexAndUpdateFocus=ee,t.getElementsByTagName=te,t.finalHandler=ne,t.domContentLoaded=ie}),define(d[103],h([0,1,4,11,157,36]),function(e,t,n,i,o,r){"use strict";function s(e,t){var n=new r.StandardMouseEvent(t);return n.preventDefault(),{leftButton:n.leftButton,posx:n.posx,posy:n.posy}}t.standardMouseMoveMerger=s;var a=function(e){function t(){var t=e.call(this)||this;return t.hooks=[],t.mouseMoveEventMerger=null,t.mouseMoveCallback=null,t.onStopCallback=null,t}return m(t,e),t.prototype.dispose=function(){this.stopMonitoring(!1),e.prototype.dispose.call(this)},t.prototype.stopMonitoring=function(e){if(this.isMonitoring()){this.hooks=n.dispose(this.hooks),this.mouseMoveEventMerger=null,this.mouseMoveCallback=null;var t=this.onStopCallback;this.onStopCallback=null,e&&t()}},t.prototype.isMonitoring=function(){return this.hooks.length>0},t.prototype.startMonitoring=function(e,t,n){var s=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var a=o.IframeUtils.getSameOriginWindowChain(),u=0;u<a.length;u++)this.hooks.push(i.addDisposableThrottledListener(a[u].window.document,"mousemove",function(e){return s.mouseMoveCallback(e)},function(e,t){return s.mouseMoveEventMerger(e,t)})),this.hooks.push(i.addDisposableListener(a[u].window.document,"mouseup",function(e){return s.stopMonitoring(!0)}));if(o.IframeUtils.hasDifferentOriginAncestor()){var l=a[a.length-1];this.hooks.push(i.addDisposableListener(l.window.document,"mouseout",function(e){var t=new r.StandardMouseEvent(e);"html"===t.target.tagName.toLowerCase()&&s.stopMonitoring(!0)})),this.hooks.push(i.addDisposableListener(l.window.document,"mouseover",function(e){var t=new r.StandardMouseEvent(e);"html"===t.target.tagName.toLowerCase()&&s.stopMonitoring(!0)})),this.hooks.push(i.addDisposableListener(l.window.document.body,"mouseleave",function(e){s.stopMonitoring(!0)}))}}},t}(n.Disposable);t.GlobalMouseMoveMonitor=a}),define(d[104],h([0,1,11,116,9,6,111,247]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t){void 0===t&&(t={});var n="string"==typeof e?{markdown:e}:{code:e};return l(n,t)}function l(e,t){return void 0===t&&(t={}),"string"==typeof e?c({isText:!0,text:e},t):Array.isArray(e)?c({children:e},t):e?c(e,t):void 0}function c(e,t){void 0===t&&(t={});var u=t.codeBlockRenderer,c=t.actionCallback;if(e.isText)return document.createTextNode(e.text);var f=d(e.tagName)||"div",g=document.createElement(f);if(e.className&&(g.className=e.className),e.text&&(g.textContent=e.text),e.style&&g.setAttribute("style",e.style),e.customStyle&&Object.keys(e.customStyle).forEach(function(t){g.style[t]=e.customStyle[t]}),e.children&&e.children.forEach(function(e){g.appendChild(l(e,t))}),e.formattedText&&h(g,p(e.formattedText),c),e.code&&u){var m=e.code,v=m.language,_=m.value;e.markdown="```"+v+"\n"+_+"\n```"}if(e.markdown){var y,C=new r.TPromise(function(e){return y=e}),b=new a.marked.Renderer;b.image=function(e,t,n){var i=[];if(e){var o=e.split("|").map(function(e){return e.trim()});e=o[0];var r=o[1];if(r){var s=/height=(\d+)/.exec(r),a=/width=(\d+)/.exec(r),u=s&&s[1],l=a&&a[1],c=isFinite(parseInt(l)),d=isFinite(parseInt(u));c&&i.push('width="'+l+'"'),d&&i.push('height="'+u+'"')}}var h=[];return e&&h.push('src="'+e+'"'),n&&h.push('alt="'+n+'"'),t&&h.push('title="'+t+'"'),i.length&&(h=h.concat(i)),"<img "+h.join(" ")+">"},b.link=function(e,t,n){return e===n&&(n=s.removeMarkdownEscapes(n)),t=s.removeMarkdownEscapes(t),e=s.removeMarkdownEscapes(e),'<a href="#" data-href="'+e+'" title="'+(t||n)+'">'+n+"</a>"},b.paragraph=function(e){return"<p>"+e+"</p>"},t.codeBlockRenderer&&(b.code=function(e,n){var s=t.codeBlockRenderer(n,e);if("string"==typeof s)return s;if(r.TPromise.is(s)){var a=i.defaultGenerator.nextId();return r.TPromise.join([s,C]).done(function(e){var t=e[0],n=g.querySelector('span[data-code="'+a+'"]');n&&(n.innerHTML=t)},function(e){}),'<span data-code="'+a+'">'+o.escape(e)+"</span>"}return e}),t.actionCallback&&n.addStandardDisposableListener(g,"click",function(e){if("A"===e.target.tagName){var n=e.target.dataset.href;n&&t.actionCallback(n,e)}}),g.innerHTML=a.marked(e.markdown,{sanitize:!0,renderer:b}),y()}return g}function d(e){return e&&v.hasOwnProperty(e)?e:null}function h(e,t,i){var o;if(2===t.type)o=document.createTextNode(t.content);else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(5===t.type){var r=document.createElement("a");r.href="#",n.addStandardDisposableListener(r,"click",function(e){i(String(t.index),e)}),o=r}else 7===t.type?o=document.createElement("br"):1===t.type&&(o=e);e!==o&&e.appendChild(o),Array.isArray(t.children)&&t.children.forEach(function(e){h(o,e,i)})}function p(e){for(var t={type:1,children:[]},n=0,i=t,o=[],r=new _(e);!r.eos();){var s=r.next(),a="\\"===s&&0!==g(r.peek());if(a&&(s=r.next()),!a&&f(s)&&s===r.peek()){r.advance(),2===i.type&&(i=o.pop());var u=g(s);if(i.type===u||5===i.type&&6===u)i=o.pop();else{var l={type:u,children:[]};5===u&&(l.index=n,n++),i.children.push(l),o.push(i),i=l}}else if("\n"===s)2===i.type&&(i=o.pop()),i.children.push({type:7});else if(2!==i.type){var c={type:2,content:s};i.children.push(c),o.push(i),i=c}else i.content+=s}return 2===i.type&&(i=o.pop()),o.length,t}function f(e){return 0!==g(e)}function g(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}t.renderMarkedString=u,t.renderHtml=l;var m,v={a:!0,b:!0,blockquote:!0,code:!0,del:!0,dd:!0,div:!0,dl:!0,dt:!0,em:!0,h1h2h3i:!0,img:!0,kbd:!0,li:!0,ol:!0,p:!0,pre:!0,s:!0,span:!0,sup:!0,sub:!0,strong:!0,strike:!0,ul:!0,br:!0,hr:!0},_=function(){function e(e){this.source=e,this.index=0}return e.prototype.eos=function(){return this.index>=this.source.length},e.prototype.next=function(){var e=this.peek();return this.advance(),e},e.prototype.peek=function(){return this.source[this.index]},e.prototype.advance=function(){this.index++},e}();!function(e){e[e.Invalid=0]="Invalid",e[e.Root=1]="Root",e[e.Text=2]="Text",e[e.Bold=3]="Bold",e[e.Italics=4]="Italics",e[e.Action=5]="Action",e[e.ActionClose=6]="ActionClose",e[e.NewLine=7]="NewLine"}(m||(m={}))}),define(d[28],h([0,1,11]),function(e,t,n){"use strict";function i(e){return l?new a(e):new u(e)}function o(e,t){return e.getAttribute("data-transform")!==t&&(e.setAttribute("data-transform",t),e.style.webkitTransform=t,!0)}function r(e,t){return e.getAttribute("data-transform")!==t&&(e.setAttribute("data-transform",t),e.style.transform=t,!0)}var s=function(){function e(e){this._domNode=e,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._lineHeight=-1,this._className="",this._display="",this._position="",this._visibility="",this._transform="",this._lineNumber=""}return Object.defineProperty(e.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),e.prototype.setMaxWidth=function(e){this._maxWidth!==e&&(this._maxWidth=e,this._domNode.style.maxWidth=this._maxWidth+"px")},e.prototype.setWidth=function(e){this._width!==e&&(this._width=e,this._domNode.style.width=this._width+"px")},e.prototype.setHeight=function(e){this._height!==e&&(this._height=e,this._domNode.style.height=this._height+"px")},e.prototype.setTop=function(e){this._top!==e&&(this._top=e,this._domNode.style.top=this._top+"px")},e.prototype.setLeft=function(e){this._left!==e&&(this._left=e,this._domNode.style.left=this._left+"px")},e.prototype.setBottom=function(e){this._bottom!==e&&(this._bottom=e,this._domNode.style.bottom=this._bottom+"px")},e.prototype.setRight=function(e){this._right!==e&&(this._right=e,this._domNode.style.right=this._right+"px")},e.prototype.setFontFamily=function(e){this._fontFamily!==e&&(this._fontFamily=e,this._domNode.style.fontFamily=this._fontFamily)},e.prototype.setFontWeight=function(e){this._fontWeight!==e&&(this._fontWeight=e,this._domNode.style.fontWeight=this._fontWeight)},e.prototype.setFontSize=function(e){this._fontSize!==e&&(this._fontSize=e,this._domNode.style.fontSize=this._fontSize+"px")},e.prototype.setLineHeight=function(e){this._lineHeight!==e&&(this._lineHeight=e,this._domNode.style.lineHeight=this._lineHeight+"px")},e.prototype.setClassName=function(e){this._className!==e&&(this._className=e,this._domNode.className=this._className)},e.prototype.toggleClassName=function(e,t){n.toggleClass(this._domNode,e,t),this._className=this._domNode.className},e.prototype.setDisplay=function(e){this._display!==e&&(this._display=e,this._domNode.style.display=this._display)},e.prototype.setPosition=function(e){this._position!==e&&(this._position=e,this._domNode.style.position=this._position)},e.prototype.setVisibility=function(e){this._visibility!==e&&(this._visibility=e,this._domNode.style.visibility=this._visibility)},e.prototype.setTransform=function(e){this._transform!==e&&(this._transform=e,this._setTransform(this._domNode,this._transform))},e.prototype.setLineNumber=function(e){this._lineNumber!==e&&(this._lineNumber=e,this._domNode.setAttribute("lineNumber",this._lineNumber))},e.prototype.setAttribute=function(e,t){this._domNode.setAttribute(e,t)},e}();t.FastDomNode=s;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._setTransform=function(e,t){e.style.webkitTransform=t},t}(s),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._setTransform=function(e,t){e.style.transform=t},t}(s),l=!1;!function(){var e=document.createElement("div");"undefined"!=typeof e.style.webkitTransform&&(l=!0)}(),t.createFastDomNode=i,t.StyleMutator={setMaxWidth:function(e,t){var n=t+"px";e.style.maxWidth!==n&&(e.style.maxWidth=n)},setWidth:function(e,t){var n=t+"px";e.style.width!==n&&(e.style.width=n)},setHeight:function(e,t){var n=t+"px";e.style.height!==n&&(e.style.height=n)},setTop:function(e,t){var n=t+"px";return e.style.top!==n&&(e.style.top=n,!0)},setLeft:function(e,t){var n=t+"px";return e.style.left!==n&&(e.style.left=n,!0)},setBottom:function(e,t){var n=t+"px";e.style.bottom!==n&&(e.style.bottom=n)},setRight:function(e,t){var n=t+"px";e.style.right!==n&&(e.style.right=n)},setFontSize:function(e,t){var n=t+"px";e.style.fontSize!==n&&(e.style.fontSize=n)},setLineHeight:function(e,t){var n=t+"px";e.style.lineHeight!==n&&(e.style.lineHeight=n)},setTransform:null,setDisplay:function(e,t){e.style.display!==t&&(e.style.display=t)},setVisibility:function(e,t){e.style.visibility!==t&&(e.style.visibility=t)}},function(){var e=document.createElement("div");"undefined"!=typeof e.style.webkitTransform?t.StyleMutator.setTransform=o:t.StyleMutator.setTransform=r}()}),define(d[59],h([0,1,26,4,11]),function(e,t,n,i,o){"use strict";var r;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(r=t.EventType||(t.EventType={}));var s=function(){function e(e){this.callOnTarget=[],this.activeTouches={},this.target=e,this.handle=null}return e.prototype.dispose=function(){this.target=null,this.handle&&(this.handle.dispose(),this.handle=null)},Object.defineProperty(e.prototype,"target",{set:function(e){var t=this;this.callOnTarget=i.dispose(this.callOnTarget),this.activeTouches={},this.targetElement=e,this.targetElement&&(this.callOnTarget.push(o.addDisposableListener(this.targetElement,"touchstart",function(e){return t.onTouchStart(e)})),this.callOnTarget.push(o.addDisposableListener(this.targetElement,"touchend",function(e){return t.onTouchEnd(e)})),this.callOnTarget.push(o.addDisposableListener(this.targetElement,"touchmove",function(e){return t.onTouchMove(e)})))},enumerable:!0,configurable:!0}),e.newGestureEvent=function(e){var t=document.createEvent("CustomEvent");return t.initEvent(e,!1,!0),t},e.prototype.onTouchStart=function(t){var n=Date.now();t.preventDefault(),t.stopPropagation(),this.handle&&(this.handle.dispose(),this.handle=null);for(var i=0,o=t.targetTouches.length;i<o;i++){var s=t.targetTouches.item(i);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:n,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[n],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};var a=e.newGestureEvent(r.Start);a.pageX=s.pageX,a.pageY=s.pageY,this.targetElement.dispatchEvent(a)}},e.prototype.onTouchEnd=function(t){var i=Date.now();t.preventDefault(),t.stopPropagation();for(var o=Object.keys(this.activeTouches).length,s=0,a=t.changedTouches.length;s<a;s++){var u=t.changedTouches.item(s);if(this.activeTouches.hasOwnProperty(String(u.identifier))){var l=this.activeTouches[u.identifier],c=Date.now()-l.initialTimeStamp;if(c<e.HOLD_DELAY&&Math.abs(l.initialPageX-n.tail(l.rollingPageX))<30&&Math.abs(l.initialPageY-n.tail(l.rollingPageY))<30){var d=e.newGestureEvent(r.Tap);d.initialTarget=l.initialTarget,d.pageX=n.tail(l.rollingPageX),d.pageY=n.tail(l.rollingPageY),this.targetElement.dispatchEvent(d)}else if(c>=e.HOLD_DELAY&&Math.abs(l.initialPageX-n.tail(l.rollingPageX))<30&&Math.abs(l.initialPageY-n.tail(l.rollingPageY))<30){var d=e.newGestureEvent(r.Contextmenu);d.initialTarget=l.initialTarget,d.pageX=n.tail(l.rollingPageX),d.pageY=n.tail(l.rollingPageY),this.targetElement.dispatchEvent(d)}else if(1===o){var h=n.tail(l.rollingPageX),p=n.tail(l.rollingPageY),f=n.tail(l.rollingTimestamps)-l.rollingTimestamps[0],g=h-l.rollingPageX[0],m=p-l.rollingPageY[0];this.inertia(i,Math.abs(g)/f,g>0?1:-1,h,Math.abs(m)/f,m>0?1:-1,p)}delete this.activeTouches[u.identifier]}else console.warn("move of an UNKNOWN touch",u)}},e.prototype.inertia=function(t,n,i,s,a,u,l){var c=this;this.handle=o.scheduleAtNextAnimationFrame(function(){var o=Date.now(),d=o-t,h=0,p=0,f=!0;n+=e.SCROLL_FRICTION*d,a+=e.SCROLL_FRICTION*d,n>0&&(f=!1,h=i*n*d),a>0&&(f=!1,p=u*a*d);var g=e.newGestureEvent(r.Change);g.translationX=h,g.translationY=p,c.targetElement.dispatchEvent(g),f||c.inertia(o,n,i,s+h,a,u,l+p)})},e.prototype.onTouchMove=function(t){var i=Date.now();t.preventDefault(),t.stopPropagation();for(var o=0,s=t.changedTouches.length;o<s;o++){var a=t.changedTouches.item(o);if(this.activeTouches.hasOwnProperty(String(a.identifier))){var u=this.activeTouches[a.identifier],l=e.newGestureEvent(r.Change);l.translationX=a.pageX-n.tail(u.rollingPageX),l.translationY=a.pageY-n.tail(u.rollingPageY),l.pageX=a.pageX,l.pageY=a.pageY,this.targetElement.dispatchEvent(l),u.rollingPageX.length>3&&(u.rollingPageX.shift(),u.rollingPageY.shift(),u.rollingTimestamps.shift()),u.rollingPageX.push(a.pageX),u.rollingPageY.push(a.pageY),u.rollingTimestamps.push(i)}else console.warn("end of an UNKNOWN touch",a)}},e}();s.HOLD_DELAY=700,s.SCROLL_FRICTION=-.005,t.Gesture=s}),define(d[112],h([0,1,9,11,35,490]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e){this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",this.didEverRender=!1,e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),e.prototype.set=function(e,t){void 0===t&&(t=[]),e||(e=""),this.didEverRender&&this.text===e&&o.equals(this.highlights,t)||(Array.isArray(t)||(t=[]),this.text=e,this.highlights=t,this.render())},e.prototype.render=function(){i.clearNode(this.domNode);for(var e,t=[],o=0,s=0;s<this.highlights.length;s++)e=this.highlights[s],e.end!==e.start&&(o<e.start&&(t.push("<span>"),t.push(r.expand(n.escape(this.text.substring(o,e.start)))),t.push("</span>"),o=e.end),t.push('<span class="highlight">'),t.push(r.expand(n.escape(this.text.substring(e.start,e.end)))),t.push("</span>"),o=e.end);o<this.text.length&&(t.push("<span>"),t.push(r.expand(n.escape(this.text.substring(o)))),t.push("</span>")),this.domNode.innerHTML=t.join(""),this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e}();t.HighlightedLabel=s}),define(d[447],h([0,1,11]),function(e,t,n){"use strict";function i(e){var t=e.getAttribute("last-scroll-time");return t?parseInt(t,10):0}function o(e){try{e.parentElement.removeChild(e)}catch(e){}}var r=function(){function e(e){this.renderers=e,this.cache=Object.create(null),this.scrollingRow=null}return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var i=n.$(".monaco-list-row"),o=this.renderers[e],r=o.renderTemplate(i);t={domNode:i,templateId:e,templateData:r}}return t},e.prototype.release=function(e){if(e){var t=i(e.domNode);if(!t)return void this.releaseRow(e);if(this.scrollingRow){var o=i(this.scrollingRow.domNode);if(o>t)return void this.releaseRow(e);this.scrollingRow.domNode.parentElement&&this.releaseRow(this.scrollingRow)}this.scrollingRow=e,n.addClass(this.scrollingRow.domNode,"scrolling")}},e.prototype.releaseRow=function(e){var t=e.domNode,i=e.templateId;n.removeClass(t,"scrolling"),o(t);var r=this.getTemplateCache(i);r.push(e)},e.prototype.getTemplateCache=function(e){return this.cache[e]||(this.cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;if(this.cache&&Object.keys(this.cache).forEach(function(t){e.cache[t].forEach(function(n){var i=e.renderers[t];i.disposeTemplate(n.templateData),n.domNode=null,n.templateData=null}),delete e.cache[t]}),this.scrollingRow){var t=this.renderers[this.scrollingRow.templateId];t.disposeTemplate(this.scrollingRow.templateData),this.scrollingRow=null}},e.prototype.dispose=function(){this.garbageCollect(),this.cache=null,this.renderers=null},e}();t.RowCache=r}),define(d[457],h([0,1,4,17,40]),function(e,t,n,i,o){"use strict";var r=function(e){function t(t,n,o){var r=e.call(this)||this;return r._visibility=t,r._visibleClassName=n,r._invisibleClassName=o,r._domNode=null,r._isVisible=!1,r._isNeeded=!1,r._shouldBeVisible=!1,r._revealTimer=r._register(new i.TimeoutTimer),r}return m(t,e),t.prototype.applyVisibilitySetting=function(e){return this._visibility!==o.ScrollbarVisibility.Hidden&&(this._visibility===o.ScrollbarVisibility.Visible||e)},t.prototype.setShouldBeVisible=function(e){var t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())},t.prototype.setIsNeeded=function(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())},t.prototype.setDomNode=function(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)},t.prototype.ensureVisibility=function(){return this._isNeeded?void(this._shouldBeVisible?this._reveal():this._hide(!0)):void this._hide(!1)},t.prototype._reveal=function(){var e=this;this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(function(){e._domNode.setClassName(e._visibleClassName)},0))},t.prototype._hide=function(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))},t}(n.Disposable);t.ScrollbarVisibilityController=r}),define(d[37],h([0,1,4,36,53,11]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.onclick=function(e,t){this._register(r.addDisposableListener(e,r.EventType.CLICK,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onmousedown=function(e,t){this._register(r.addDisposableListener(e,r.EventType.MOUSE_DOWN,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onmouseover=function(e,t){this._register(r.addDisposableListener(e,r.EventType.MOUSE_OVER,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onnonbubblingmouseout=function(e,t){this._register(r.addDisposableNonBubblingMouseOutListener(e,function(e){return t(new i.StandardMouseEvent(e))}))},t.prototype.onkeydown=function(e,t){this._register(r.addDisposableListener(e,r.EventType.KEY_DOWN,function(e){return t(new o.StandardKeyboardEvent(e))}))},t.prototype.onkeyup=function(e,t){this._register(r.addDisposableListener(e,r.EventType.KEY_UP,function(e){return t(new o.StandardKeyboardEvent(e))}))},t.prototype.oninput=function(e,t){this._register(r.addDisposableListener(e,r.EventType.INPUT,t))},t.prototype.onblur=function(e,t){this._register(r.addDisposableListener(e,r.EventType.BLUR,t))},t.prototype.onfocus=function(e,t){this._register(r.addDisposableListener(e,r.EventType.FOCUS,t))},t.prototype.onchange=function(e,t){this._register(r.addDisposableListener(e,r.EventType.CHANGE,t))},t}(n.Disposable);t.Widget=s}),define(d[117],h([0,1,103,37,17]),function(e,t,n,i,o){"use strict";t.ARROW_IMG_SIZE=11;var r=function(e){function i(i){var r=e.call(this)||this;return r._onActivate=i.onActivate,r.bgDomNode=document.createElement("div"),r.bgDomNode.className="arrow-background",r.bgDomNode.style.position="absolute",r.bgDomNode.style.width=i.bgWidth+"px",r.bgDomNode.style.height=i.bgHeight+"px","undefined"!=typeof i.top&&(r.bgDomNode.style.top="0px"),"undefined"!=typeof i.left&&(r.bgDomNode.style.left="0px"),"undefined"!=typeof i.bottom&&(r.bgDomNode.style.bottom="0px"),"undefined"!=typeof i.right&&(r.bgDomNode.style.right="0px"),r.domNode=document.createElement("div"),r.domNode.className=i.className,r.domNode.style.position="absolute",r.domNode.style.width=t.ARROW_IMG_SIZE+"px",r.domNode.style.height=t.ARROW_IMG_SIZE+"px","undefined"!=typeof i.top&&(r.domNode.style.top=i.top+"px"),"undefined"!=typeof i.left&&(r.domNode.style.left=i.left+"px"),"undefined"!=typeof i.bottom&&(r.domNode.style.bottom=i.bottom+"px"),"undefined"!=typeof i.right&&(r.domNode.style.right=i.right+"px"),r._mouseMoveMonitor=r._register(new n.GlobalMouseMoveMonitor),r.onmousedown(r.bgDomNode,function(e){return r._arrowMouseDown(e)}),r.onmousedown(r.domNode,function(e){return r._arrowMouseDown(e)}),r._mousedownRepeatTimer=r._register(new o.IntervalTimer),r._mousedownScheduleRepeatTimer=r._register(new o.TimeoutTimer),r}return m(i,e),i.prototype._arrowMouseDown=function(e){var t=this,i=function(){t._mousedownRepeatTimer.cancelAndSet(function(){return t._onActivate()},1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(i,200),this._mouseMoveMonitor.startMonitoring(n.standardMouseMoveMerger,function(e){},function(){t._mousedownRepeatTimer.cancel(),t._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()},i}(i.Widget);t.ScrollbarArrow=r}),define(d[143],h([0,1,18,11,36,103,37,28,117,457]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=140,d=function(e){function t(t){var n=e.call(this)||this;return n._canUseTranslate3d=t.canUseTranslate3d,n._lazyRender=t.lazyRender,n._host=t.host,n._scrollable=t.scrollable,n._scrollbarState=t.scrollbarState,n._visibilityController=n._register(new l.ScrollbarVisibilityController(t.visibility,"visible scrollbar "+t.extraScrollbarClassName,"invisible scrollbar "+t.extraScrollbarClassName)),n._mouseMoveMonitor=n._register(new r.GlobalMouseMoveMonitor),n._shouldRender=!0,n.domNode=a.createFastDomNode(document.createElement("div")),n._visibilityController.setDomNode(n.domNode),n.domNode.setPosition("absolute"),n.onmousedown(n.domNode.domNode,function(e){return n._domNodeMouseDown(e)}),n}return m(t,e),t.prototype._createArrow=function(e){var t=this._register(new u.ScrollbarArrow(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)},t.prototype._createSlider=function(e,t,n,i){var o=this;this.slider=a.createFastDomNode(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),this.slider.setWidth(n),this.slider.setHeight(i),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,function(e){return o._sliderMouseDown(e)})},t.prototype.setCanUseTranslate3d=function(e){return this._canUseTranslate3d=e,!0},t.prototype._onElementSize=function(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollSize=function(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype._onElementScrollPosition=function(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender},t.prototype.beginReveal=function(){this._visibilityController.setShouldBeVisible(!0)},t.prototype.beginHide=function(){this._visibilityController.setShouldBeVisible(!1)},t.prototype.render=function(){this._shouldRender&&(this._shouldRender=!1,this._canUseTranslate3d?this.domNode.setTransform("translate3d(0px, 0px, 0px)"):this.domNode.setTransform(""),this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()));
},t.prototype._domNodeMouseDown=function(e){e.target===this.domNode.domNode&&this._onMouseDown(e)},t.prototype.delegateMouseDown=function(e){var t=new o.StandardMouseEvent(e),n=this.domNode.domNode.getClientRects()[0].top,i=n+this._scrollbarState.getSliderPosition(),r=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(t);i<=s&&s<=r?this._sliderMouseDown(t):this._onMouseDown(t)},t.prototype._onMouseDown=function(e){var t=i.getDomNodePagePosition(this.domNode.domNode),n=this._mouseDownRelativePosition(e,t)-this._scrollbarState.getArrowSize()-this._scrollbarState.getSliderSize()/2;this.setDesiredScrollPosition(this._scrollbarState.convertSliderPositionToScrollPosition(n)),this._sliderMouseDown(e)},t.prototype._sliderMouseDown=function(e){var t=this;if(e.leftButton){var i=this._sliderOrthogonalMousePosition(e),o=this._getScrollPosition(),s=this._sliderMousePosition(e)-this._scrollbarState.getSliderPosition();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(r.standardMouseMoveMerger,function(e){var r=t._sliderOrthogonalMousePosition(e),a=Math.abs(r-i);if(n.isWindows&&a>c)t.setDesiredScrollPosition(o);else{var u=t._sliderMousePosition(e)-s;t.setDesiredScrollPosition(t._scrollbarState.convertSliderPositionToScrollPosition(u))}},function(){t.slider.toggleClassName("active",!1),t._host.onDragEnd()}),e.preventDefault(),this._host.onDragStart()}},t.prototype.validateScrollPosition=function(e){return this._scrollbarState.validateScrollPosition(e)},t.prototype.setDesiredScrollPosition=function(e){e=this.validateScrollPosition(e);var t=this._getScrollPosition();this._setScrollPosition(e);var n=this._getScrollPosition();return t!==n&&(this._onElementScrollPosition(this._getScrollPosition()),!0)},t}(s.Widget);t.AbstractScrollbar=d}),define(d[500],h([0,1,143,36,40,138,117]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n,a){var u=e.call(this,{canUseTranslate3d:n.canUseTranslate3d,lazyRender:n.lazyRender,host:a,scrollbarState:new r.ScrollbarState(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===o.ScrollbarVisibility.Hidden?0:n.horizontalScrollbarSize,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var l=(n.arrowSize-s.ARROW_IMG_SIZE)/2,c=(n.horizontalScrollbarSize-s.ARROW_IMG_SIZE)/2;u._createArrow({className:"left-arrow",top:c,left:l,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,1,0))}}),u._createArrow({className:"right-arrow",top:c,left:void 0,bottom:void 0,right:l,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,-1,0))}})}return u._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),u}return m(t,e),t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),this._canUseTranslate3d?(this.slider.setTransform("translate3d("+t+"px, 0px, 0px)"),this.slider.setLeft(0)):(this.slider.setTransform(""),this.slider.setLeft(t))},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e.posx-t.left},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype._getScrollPosition=function(){return this._scrollable.getScrollLeft()},t.prototype._setScrollPosition=function(e){this._scrollable.updateState({scrollLeft:e})},t}(n.AbstractScrollbar);t.HorizontalScrollbar=a}),define(d[501],h([0,1,143,36,40,138,117]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n,a){var u=e.call(this,{canUseTranslate3d:n.canUseTranslate3d,lazyRender:n.lazyRender,host:a,scrollbarState:new r.ScrollbarState(n.verticalHasArrows?n.arrowSize:0,n.vertical===o.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var l=(n.arrowSize-s.ARROW_IMG_SIZE)/2,c=(n.verticalScrollbarSize-s.ARROW_IMG_SIZE)/2;u._createArrow({className:"up-arrow",top:l,left:c,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,1))}}),u._createArrow({className:"down-arrow",top:void 0,left:c,bottom:l,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return u._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,-1))}})}return u._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,null),u}return m(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e),this._canUseTranslate3d?(this.slider.setTransform("translate3d(0px, "+t+"px, 0px)"),this.slider.setTop(0)):(this.slider.setTransform(""),this.slider.setTop(t))},t.prototype._renderDomNode=function(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)},t.prototype.onDidScroll=function(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender},t.prototype._mouseDownRelativePosition=function(e,t){return e.posy-t.top},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype._getScrollPosition=function(){return this._scrollable.getScrollTop()},t.prototype._setScrollPosition=function(e){this._scrollable.updateState({scrollTop:e})},t}(n.AbstractScrollbar);t.VerticalScrollbar=a}),define(d[64],h([0,1,6]),function(e,t,n){"use strict";function i(e){var t=null,i=!1;return new n.TPromise(function(n,o,r){t=new XMLHttpRequest,t.onreadystatechange=function(){i||(4===t.readyState?(t.status>=200&&t.status<300||1223===t.status?n(t):o(t),t.onreadystatechange=function(){}):r(t))},t.open(e.type||"GET",e.url,!0,e.user,e.password),t.responseType=e.responseType||"",Object.keys(e.headers||{}).forEach(function(n){t.setRequestHeader(n,e.headers[n])}),e.customRequestInitializer&&e.customRequestInitializer(t),t.send(e.data)},function(){i=!0,t.abort()})}var o;!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file"}(o=t.Schemas||(t.Schemas={})),t.xhr=i}),define(d[156],h([0,1,10,4,6,17,18]),function(e,t,n,i,o,r,s){"use strict";function a(e){s.isWeb&&(c||(c=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq")),console.warn(e.message))}function u(e){return new p(e)}var l="$initialize",c=!1;t.logOnceWebWorkerWarning=a;var d=function(){function e(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}return e.prototype.setWorkerId=function(e){this._workerId=e},e.prototype.sendMessage=function(e,t){var n=String(++this._lastSentReq),i={c:null,e:null},r=new o.TPromise(function(e,t,n){i.c=e,i.e=t},function(){});return this._pendingReplies[n]=i,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),r},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}t.vsWorker&&(this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t))},e.prototype._handleMessage=function(e){var t=this;if(e.seq){var i=e;if(!this._pendingReplies[i.seq])return void console.warn("Got reply to unknown seq");var o=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){var r=i.err;return i.err.$isError&&(r=new Error,r.name=i.err.name,r.message=i.err.message,r.stack=i.err.stack),void o.e(r)}return void o.c(i.res)}var s=e,a=s.req,u=this._handler.handleMessage(s.method,s.args);u.then(function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})},function(e){t._send({vsWorker:t._workerId,seq:a,res:void 0,err:n.transformErrorForSerialization(e)})})},e.prototype._send=function(e){var t=JSON.stringify(e);this._handler.sendMessage(t)},e}(),h=function(e){function t(t,n){var i=e.call(this)||this;i._lastRequestTimestamp=-1;var r=null,s=null;i._worker=i._register(t.create("vs/base/common/worker/simpleWorker",function(e){i._protocol.handleMessage(e)},function(e){s(e)})),i._protocol=new d({sendMessage:function(e){i._worker.postMessage(e)},handleMessage:function(e,t){return o.TPromise.as(null)}}),i._protocol.setWorkerId(i._worker.getId());var a=null,u=self.require;"function"==typeof u.getConfig?a=u.getConfig():"undefined"!=typeof self.requirejs&&(a=self.requirejs.s.contexts._.config),i._lazyProxy=new o.TPromise(function(e,t,n){r=e,s=t},function(){}),i._onModuleLoaded=i._protocol.sendMessage(l,[i._worker.getId(),n,a]),i._onModuleLoaded.then(function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=h(e[n],c);r(t)},function(e){s(e),i._onError("Worker failed to load "+n,e)});var c=function(e,t){return i._request(e,t)},h=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}};return i}return m(t,e),t.prototype.getProxyObject=function(){return new r.ShallowCancelThenPromise(this._lazyProxy)},t.prototype.getLastRequestTimestamp=function(){return this._lastRequestTimestamp},t.prototype._request=function(e,t){var n=this;return new o.TPromise(function(i,o,r){n._onModuleLoaded.then(function(){n._lastRequestTimestamp=Date.now(),n._protocol.sendMessage(e,t).then(i,o)},o)},function(){})},t.prototype._onError=function(e,t){console.error(e),console.info(t)},t}(i.Disposable);t.SimpleWorkerClient=h;var p=function(){function t(e){var t=this;this._protocol=new d({sendMessage:function(t){e(t)},handleMessage:function(e,n){return t._handleMessage(e,n)}})}return t.prototype.onmessage=function(e){this._protocol.handleMessage(e)},t.prototype._handleMessage=function(e,t){if(e===l)return this.initialize(t[0],t[1],t[2]);if(!this._requestHandler||"function"!=typeof this._requestHandler[e])return o.TPromise.wrapError(new Error("Missing requestHandler or method: "+e));try{return o.TPromise.as(this._requestHandler[e].apply(this._requestHandler,t))}catch(e){return o.TPromise.wrapError(e)}},t.prototype.initialize=function(t,n,i){var r=this;if(this._protocol.setWorkerId(t),i){"undefined"!=typeof i.baseUrl&&delete i.baseUrl,"undefined"!=typeof i.paths&&"undefined"!=typeof i.paths.vs&&delete i.paths.vs;var s=i["vs/nls"];s&&s.pseudo&&e(["vs/nls"],function(e){e.setPseudoTranslation(s.pseudo)}),i.catchError=!0,self.require.config(i)}var a,u,l=new o.TPromise(function(e,t,n){a=e,u=t});return self.require([n],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0];r._requestHandler=n.create();var i=[];for(var o in r._requestHandler)"function"==typeof r._requestHandler[o]&&i.push(o);a(i)},u),l},t}();t.SimpleWorkerServer=p,t.create=u}),define(d[177],h([0,1,6,22]),function(e,t,n,i){"use strict";var o=function(){function e(e){this.modelProvider=i.isFunction(e.getModel)?e:{getModel:function(){return e}}}return e.prototype.getId=function(e,t){if(!t)return null;var n=this.modelProvider.getModel();return n===t?"__root__":n.dataSource.getId(t)},e.prototype.hasChildren=function(e,t){var n=this.modelProvider.getModel();return n&&n===t&&n.entries.length>0},e.prototype.getChildren=function(e,t){var i=this.modelProvider.getModel();return n.TPromise.as(i===t?i.entries:[])},e.prototype.getParent=function(e,t){return n.TPromise.as(null)},e}();t.DataSource=o;var r=function(){function e(e){this.modelProvider=e}return e.prototype.getAriaLabel=function(e,t){var n=this.modelProvider.getModel();return n.accessibilityProvider&&n.accessibilityProvider.getAriaLabel(t)},e}();t.AccessibilityProvider=r;var s=function(){function e(e){this.modelProvider=e}return e.prototype.isVisible=function(e,t){var n=this.modelProvider.getModel();return!n.filter||n.filter.isVisible(t)},e}();t.Filter=s;var a=function(){function e(e){this.modelProvider=e}return e.prototype.getHeight=function(e,t){var n=this.modelProvider.getModel();return n.renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){var n=this.modelProvider.getModel();return n.renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,n){var i=this.modelProvider.getModel();return i.renderer.renderTemplate(t,n)},e.prototype.renderElement=function(e,t,n,i){var o=this.modelProvider.getModel();o.renderer.renderElement(t,n,i)},e.prototype.disposeTemplate=function(e,t,n){var i=this.modelProvider.getModel();i.renderer.disposeTemplate(t,n)},e}();t.Renderer=a}),define(d[76],h([0,1]),function(e,t){"use strict";var n;!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(n=t.Mode||(t.Mode={}))}),define(d[179],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n){this._posx=e,this._posy=t,this._target=n}return e.prototype.preventDefault=function(){},e.prototype.stopPropagation=function(){},Object.defineProperty(e.prototype,"posx",{get:function(){return this._posx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"posy",{get:function(){return this._posy},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),e}();t.ContextMenuEvent=n;var i=function(e){function t(t){var n=e.call(this,t.posx,t.posy,t.target)||this;return n.originalEvent=t,n}return m(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.MouseContextMenuEvent=i;var o=function(e){function t(t,n,i){var o=e.call(this,t,n,i.target)||this;return o.originalEvent=i,o}return m(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.KeyboardContextMenuEvent=o;var r;!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(r=t.DragOverEffect||(t.DragOverEffect={}));var s;!function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(s=t.DragOverBubble||(t.DragOverBubble={})),t.DRAG_OVER_REJECT={accept:!1},t.DRAG_OVER_ACCEPT={accept:!0},t.DRAG_OVER_ACCEPT_BUBBLE_UP={accept:!0,bubble:s.BUBBLE_UP},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN=function(e){return void 0===e&&(e=!1),{accept:!0,bubble:s.BUBBLE_DOWN,autoExpand:e}},t.DRAG_OVER_ACCEPT_BUBBLE_UP_COPY={accept:!0,bubble:s.BUBBLE_UP,effect:r.COPY},t.DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY=function(e){return void 0===e&&(e=!1),{accept:!0,bubble:s.BUBBLE_DOWN,effect:r.COPY}}}),define(d[181],h([0,1]),function(e,t){"use strict";var n=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ElementsDragAndDropData=n;var i=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e.prototype.getData=function(){return this.elements},e}();t.ExternalElementsDragAndDropData=i;var o=function(){function e(){this.types=[],this.files=[]}return e.prototype.update=function(e){e.dataTransfer.types&&(this.types=[],Array.prototype.push.apply(this.types,e.dataTransfer.types)),e.dataTransfer.files&&(this.files=[],Array.prototype.push.apply(this.files,e.dataTransfer.files),this.files=this.files.filter(function(e){return e.size||e.type}))},e.prototype.getData=function(){return{types:this.types,files:this.files}},e}();t.DesktopDragAndDropData=o}),define(d[184],h([0,1,55,10,4,26,25,6]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t){for(var n=e.getHierarchy(),i=t.getHierarchy(),o=r.commonPrefixLength(n,i),s=n[o-1],a=s.getNavigator(),u=null,l=null,c=0,d=[];s&&(null===u||null===l);)d.push(s),s===e&&(u=c),s===t&&(l=c),c++,s=a.next();if(null===u||null===l)return[];var h=Math.min(u,l),p=Math.max(u,l);return d.slice(h,p+1)}var l=function(e){function t(t){var n=e.call(this)||this;return n._item=t,n}return m(t,e),Object.defineProperty(t.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.emit("unlock"),e.prototype.dispose.call(this)},t}(s.EventEmitter);t.LockData=l;var c=function(){function e(){this.locks=Object.create({})}return e.prototype.isLocked=function(e){return!!this.locks[e.id]},e.prototype.run=function(e,t){var n=this,i=this.getLock(e);if(i){var o;return new a.Promise(function(r,s){o=i.addOneTimeDisposableListener("unlock",function(){return n.run(e,t).then(r,s)})},function(){o.dispose()})}var r;return new a.Promise(function(i,o){if(e.isDisposed())return o(new Error("Item is disposed."));var s=n.locks[e.id]=new l(e);return r=t().then(function(t){return delete n.locks[e.id],s.dispose(),t}).then(i,o)},function(){return r.cancel()})},e.prototype.getLock=function(e){var t;for(t in this.locks){var n=this.locks[t];if(e.intersects(n.item))return n}return null},e}();t.Lock=c;var d=function(e){function t(){var t=e.call(this)||this;return t._isDisposed=!1,t.items={},t}return m(t,e),t.prototype.register=function(e){n.ok(!this.isRegistered(e.id),"item already registered: "+e.id),this.items[e.id]={item:e,disposable:this.addEmitter2(e)}},t.prototype.deregister=function(e){n.ok(this.isRegistered(e.id),"item not registered: "+e.id),this.items[e.id].disposable.dispose(),delete this.items[e.id]},t.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},t.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.items=null,this._isDisposed=!0},t.prototype.isDisposed=function(){return this._isDisposed},t}(s.EventEmitter);t.ItemRegistry=d;var h=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s.registry=n,s.context=i,s.lock=o,s.element=r,s.id=t,s.registry.register(s),s.doesHaveChildren=s.context.dataSource.hasChildren(s.context.tree,s.element),s.needsChildrenRefresh=!0,s.parent=null,s.previous=null,s.next=null,s.firstChild=null,s.lastChild=null,s.userContent=null,s.traits={},s.depth=0,s.expanded=!1,s.emit("item:create",{item:s}),s.visible=s._isVisible(),s.height=s._getHeight(),s._isDisposed=!1,s}return m(t,e),t.prototype.getElement=function(){return this.element},t.prototype.hasChildren=function(){return this.doesHaveChildren},t.prototype.getDepth=function(){return this.depth},t.prototype.isVisible=function(){return this.visible},t.prototype.setVisible=function(e){this.visible=e},t.prototype.isExpanded=function(){return this.expanded},t.prototype._setExpanded=function(e){this.expanded=e},t.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this.emit("item:reveal",t)},t.prototype.expand=function(){var e=this;if(this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this))return a.TPromise.as(!1);var t=this.lock.run(this,function(){var t,n={item:e};return e.emit("item:expanding",n),t=e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):a.TPromise.as(null),t.then(function(){return e._setExpanded(!0),e.emit("item:expanded",n),!0})});return t.then(function(t){return!e.isDisposed()&&(e.context.options.autoExpandSingleChildren&&t&&null!==e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.isVisible()?e.firstChild.expand().then(function(){return!0}):t)})},t.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=a.TPromise.as(null);return this.forEachChild(function(e){n=n.then(function(){return e.collapse(!0)})}),n.then(function(){return t.collapse(!1)})}return!this.isExpanded()||this.lock.isLocked(this)?a.TPromise.as(!1):this.lock.run(this,function(){var e={item:t};return t.emit("item:collapsing",e),t._setExpanded(!1),t.emit("item:collapsed",e),a.TPromise.as(!0)})},t.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this.emit("item:addTrait",t)},t.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this.emit("item:removeTrait",t)},t.prototype.hasTrait=function(e){return this.traits[e]||!1},t.prototype.getAllTraits=function(){var e,t=[];for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},t.prototype.getHeight=function(){return this.height},t.prototype.refreshChildren=function(e,n,o){var r=this;if(void 0===n&&(n=!1),void 0===o&&(o=!1),!o&&!this.isExpanded())return this.needsChildrenRefresh=!0,a.TPromise.as(this);this.needsChildrenRefresh=!1;var s=function(){var o={item:r,isNested:n};r.emit("item:childrenRefreshing",o);var s;s=r.doesHaveChildren?r.context.dataSource.getChildren(r.context.tree,r.element):a.TPromise.as([]);var u=s.then(function(n){if(r.isDisposed()||r.registry.isDisposed())return a.TPromise.as(null);n=n?n.slice(0):[],n=r.sort(n);for(var i={};null!==r.firstChild;)i[r.firstChild.id]=r.firstChild,r.removeChild(r.firstChild);for(var o=0,s=n.length;o<s;o++){var u=n[o],l=r.context.dataSource.getId(r.context.tree,u),c=i[l]||new t(l,r.registry,r.context,r.lock,u);c.element=u,e&&(c.needsChildrenRefresh=e),delete i[l],r.addChild(c)}for(var d in i)i.hasOwnProperty(d)&&i[d].dispose();return e?a.Promise.join(r.mapEachChild(function(t){return t.doRefresh(e,!0)})):a.TPromise.as(null)});return u.then(null,i.onUnexpectedError).then(function(){return r.emit("item:childrenRefreshed",o)})};return n?s():this.lock.run(this,s)},t.prototype.doRefresh=function(e,t){void 0===t&&(t=!1);var n={item:this};return this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.height=this._getHeight(),this.setVisible(this._isVisible()),this.emit("item:refresh",n),this.refreshChildren(e,t)},t.prototype.refresh=function(e){return this.doRefresh(e)},t.prototype.getNavigator=function(){return new f(this)},t.prototype.intersects=function(e){return this.isAncestorOf(e)||e.isAncestorOf(this)},t.prototype.getHierarchy=function(){var e=[],t=this;do e.push(t),t=t.parent;while(t);return e.reverse(),e},t.prototype.isAncestorOf=function(e){for(;e;){if(e.id===this.id)return!0;e=e.parent}return!1},t.prototype.addChild=function(e,t){void 0===t&&(t=this.lastChild);var n=null===this.firstChild,i=null===t,o=t===this.lastChild;n?(this.firstChild=this.lastChild=e,e.next=e.previous=null):i?(this.firstChild.previous=e,e.next=this.firstChild,e.previous=null,this.firstChild=e):o?(this.lastChild.next=e,e.next=null,e.previous=this.lastChild,this.lastChild=e):(e.previous=t,e.next=t.next,t.next.previous=e,t.next=e),e.parent=this,e.depth=this.depth+1},t.prototype.removeChild=function(e){var t=this.firstChild===e,n=this.lastChild===e;t&&n?this.firstChild=this.lastChild=null:t?(e.next.previous=null,this.firstChild=e.next):n?(e.previous.next=null,this.lastChild=e.previous):(e.next.previous=e.previous,e.previous.next=e.next),e.parent=null,e.depth=null},t.prototype.forEachChild=function(e){for(var t,n=this.firstChild;n;)t=n.next,e(n),n=t},t.prototype.mapEachChild=function(e){var t=[];return this.forEachChild(function(n){t.push(e(n))}),t},t.prototype.sort=function(e){var t=this;return this.context.sorter?e.sort(function(e,n){return t.context.sorter.compare(t.context.tree,e,n)}):e},t.prototype._getHeight=function(){return this.context.renderer.getHeight(this.context.tree,this.element)},t.prototype._isVisible=function(){return this.context.filter.isVisible(this.context.tree,this.element)},t.prototype.isDisposed=function(){return this._isDisposed},t.prototype.dispose=function(){this.forEachChild(function(e){return e.dispose()}),this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null;var t={item:this};this.emit("item:dispose",t),this.registry.deregister(this),e.prototype.dispose.call(this),this._isDisposed=!0},t}(s.EventEmitter);t.Item=h;var p=function(e){function t(t,n,i,o,r){return e.call(this,t,n,i,o,r)||this}return m(t,e),t.prototype.isVisible=function(){return!1},t.prototype.setVisible=function(e){},t.prototype.isExpanded=function(){return!0},t.prototype._setExpanded=function(e){},t.prototype.render=function(){},t.prototype._getHeight=function(){return 0},t.prototype._isVisible=function(){return!1},t}(h),f=function(){function e(e,t){void 0===t&&(t=!0),this.item=e,this.start=t?e:null}return e.lastDescendantOf=function(t){return t?t.isVisible()&&t.isExpanded()&&null!==t.lastChild?e.lastDescendantOf(t.lastChild):t:null},e.prototype.current=function(){return this.item||null},e.prototype.next=function(){if(this.item)do if((this.item instanceof p||this.item.isVisible()&&this.item.isExpanded())&&this.item.firstChild)this.item=this.item.firstChild;else if(this.item===this.start)this.item=null;else{for(;this.item&&this.item!==this.start&&!this.item.next;)this.item=this.item.parent;this.item===this.start&&(this.item=null),this.item=this.item?this.item.next:null}while(this.item&&!this.item.isVisible());return this.item||null},e.prototype.previous=function(){if(this.item)do{var t=e.lastDescendantOf(this.item.previous);t?this.item=t:this.item.parent&&this.item.parent!==this.start&&this.item.parent.isVisible()?this.item=this.item.parent:this.item=null}while(this.item&&!this.item.isVisible());return this.item||null},e.prototype.parent=function(){if(this.item){var e=this.item.parent;e&&e!==this.start&&e.isVisible()?this.item=e:this.item=null}return this.item||null},e.prototype.first=function(){return this.item=this.start,this.next(),this.item||null},e.prototype.last=function(){return this.start&&this.start.isExpanded()&&(this.item=this.start.lastChild,this.item&&!this.item.isVisible()&&this.previous()),this.item||null},e}();t.TreeNavigator=f;var g=function(e){function t(t){var n=e.call(this)||this;return n.context=t,n.input=null,n.traitsToItems={},n}return m(t,e),t.prototype.setInput=function(e){var t=this,n={item:this.input};this.emit("clearingInput",n),this.setSelection([]),this.setFocus(),this.setHighlight(),this.lock=new c,this.input&&this.input.dispose(),this.registry&&(this.registry.dispose(),this.registryDisposable.dispose()),this.registry=new d,this.registryDisposable=o.combinedDisposable([this.addEmitter2(this.registry),this.registry.addListener2("item:dispose",function(e){e.item.getAllTraits().forEach(function(n){return delete t.traitsToItems[n][e.item.id]})})]);var i=this.context.dataSource.getId(this.context.tree,e);return this.input=new p(i,this.registry,this.context,this.lock,e),n={item:this.input},this.emit("setInput",n),this.refresh(this.input)},t.prototype.getInput=function(){return this.input?this.input.getElement():null},t.prototype.refresh=function(e,t){var n=this;void 0===e&&(e=null),void 0===t&&(t=!0);var i=this.getItem(e);if(!i)return a.TPromise.as(null);var o={item:i,recursive:t};return this.emit("refreshing",o),i.refresh(t).then(function(){n.emit("refreshed",o)})},t.prototype.refreshAll=function(e,t){void 0===t&&(t=!0);try{return this._beginDeferredEmit(),this._refreshAll(e,t)}finally{this._endDeferredEmit()}},t.prototype._refreshAll=function(e,t){for(var n=[],i=0,o=e.length;i<o;i++)n.push(this.refresh(e[i],t));return a.Promise.join(n)},t.prototype.expand=function(e){var t=this.getItem(e);return t?t.expand():a.TPromise.as(!1)},t.prototype.expandAll=function(e){if(!e){e=[];for(var t,n=this.getNavigator();t=n.next();)e.push(t)}for(var i=[],o=0,r=e.length;o<r;o++)i.push(this.expand(e[o]));return a.Promise.join(i)},t.prototype.collapse=function(e,t){void 0===t&&(t=!1);var n=this.getItem(e);return n?n.collapse(t):a.TPromise.as(!1)},t.prototype.collapseAll=function(e,t){void 0===e&&(e=null),void 0===t&&(t=!1),e||(e=[this.input],t=!0);for(var n=[],i=0,o=e.length;i<o;i++)n.push(this.collapse(e[i],t));return a.Promise.join(n)},t.prototype.toggleExpansion=function(e){return this.isExpanded(e)?this.collapse(e):this.expand(e)},t.prototype.toggleExpansionAll=function(e){for(var t=[],n=0,i=e.length;n<i;n++)t.push(this.toggleExpansion(e[n]));return a.Promise.join(t)},t.prototype.isExpanded=function(e){var t=this.getItem(e);return!!t&&t.isExpanded()},t.prototype.getExpandedElements=function(){for(var e,t=[],n=this.getNavigator();e=n.next();)e.isExpanded()&&t.push(e.getElement());return t},t.prototype.reveal=function(e,t){var n=this;return void 0===t&&(t=null),this.resolveUnknownParentChain(e).then(function(e){var t=a.TPromise.as(null);return e.forEach(function(e){t=t.then(function(){return n.expand(e)})}),t}).then(function(){var i=n.getItem(e);if(i)return i.reveal(t)})},t.prototype.resolveUnknownParentChain=function(e){var t=this;return this.context.dataSource.getParent(this.context.tree,e).then(function(e){return e?t.resolveUnknownParentChain(e).then(function(t){return t.push(e),t}):a.TPromise.as([])})},t.prototype.setHighlight=function(e,t){this.setTraits("highlighted",e?[e]:[]);var n={highlight:this.getHighlight(),payload:t};this.emit("highlight",n)},t.prototype.getHighlight=function(e){var t=this.getElementsWithTrait("highlighted",e);return 0===t.length?null:t[0]},t.prototype.isHighlighted=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("highlighted")},t.prototype.select=function(e,t){this.selectAll([e],t)},t.prototype.selectRange=function(e,t,n){var i=this.getItem(e),o=this.getItem(t);i&&o&&this.selectAll(u(i,o),n)},t.prototype.deselectRange=function(e,t,n){var i=this.getItem(e),o=this.getItem(t);i&&o&&this.deselectAll(u(i,o),n)},t.prototype.selectAll=function(e,t){this.addTraits("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.deselect=function(e,t){this.deselectAll([e],t)},t.prototype.deselectAll=function(e,t){this.removeTraits("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.setSelection=function(e,t){this.setTraits("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.toggleSelection=function(e,t){this.toggleTrait("selected",e);var n={selection:this.getSelection(),payload:t};this.emit("selection",n)},t.prototype.isSelected=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("selected")},t.prototype.getSelection=function(e){return this.getElementsWithTrait("selected",e)},t.prototype.selectNext=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=!0);for(var i,o=this.getSelection(),r=o.length>0?o[0]:this.input,s=this.getNavigator(r,!1),a=0;a<e&&(i=s.next(),i);a++)r=i;t?this.setSelection([r],n):this.select(r,n)},t.prototype.selectPrevious=function(e,t,n){void 0===e&&(e=1),void 0===t&&(t=!0);var i=this.getSelection(),o=null,r=null;if(0===i.length){for(var s=this.getNavigator(this.input);o=s.next();)r=o;o=r}else{o=i[0];for(var s=this.getNavigator(o,!1),a=0;a<e&&(r=s.previous(),r);a++)o=r}t?this.setSelection([o],n):this.select(o,n)},t.prototype.selectParent=function(e,t){void 0===t&&(t=!0);var n=this.getSelection(),i=n.length>0?n[0]:this.input,o=this.getNavigator(i,!1),r=o.parent();r&&(t?this.setSelection([r],e):this.select(r,e))},t.prototype.setFocus=function(e,t){this.setTraits("focused",e?[e]:[]);var n={focus:this.getFocus(),payload:t};this.emit("focus",n)},t.prototype.isFocused=function(e){var t=this.getItem(e);return!!t&&t.hasTrait("focused")},t.prototype.getFocus=function(e){var t=this.getElementsWithTrait("focused",e);return 0===t.length?null:t[0]},t.prototype.focusNext=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,o=this.getNavigator(i,!1),r=0;r<e&&(n=o.next(),n);r++)i=n;this.setFocus(i,t)},t.prototype.focusPrevious=function(e,t){void 0===e&&(e=1);for(var n,i=this.getFocus()||this.input,o=this.getNavigator(i,!1),r=0;r<e&&(n=o.previous(),
n);r++)i=n;this.setFocus(i,t)},t.prototype.focusParent=function(e){var t=this.getFocus()||this.input,n=this.getNavigator(t,!1),i=n.parent();i&&this.setFocus(i,e)},t.prototype.focusFirstChild=function(e){var t=this.getItem(this.getFocus()||this.input),n=this.getNavigator(t,!1),i=n.next(),o=n.parent();o===t&&this.setFocus(i,e)},t.prototype.focusFirst=function(e){this.focusNth(0,e)},t.prototype.focusNth=function(e,t){for(var n=this.getNavigator(this.input),i=n.first(),o=0;o<e;o++)i=n.next();i&&this.setFocus(i,t)},t.prototype.focusLast=function(e){var t=this.getNavigator(this.input),n=t.last();n&&this.setFocus(n,e)},t.prototype.getNavigator=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),new f(this.getItem(e),t)},t.prototype.getItem=function(e){return void 0===e&&(e=null),null===e?this.input:e instanceof h?e:"string"==typeof e?this.registry.getItem(e):this.registry.getItem(this.context.dataSource.getId(this.context.tree,e))},t.prototype.addTraits=function(e,t){for(var n,i=this.traitsToItems[e]||{},o=0,r=t.length;o<r;o++)n=this.getItem(t[o]),n&&(n.addTrait(e),i[n.id]=n);this.traitsToItems[e]=i},t.prototype.removeTraits=function(e,t){var n,i,o=this.traitsToItems[e]||{};if(0===t.length){for(i in o)o.hasOwnProperty(i)&&(n=o[i],n.removeTrait(e));delete this.traitsToItems[e]}else for(var r=0,s=t.length;r<s;r++)n=this.getItem(t[r]),n&&(n.removeTrait(e),delete o[n.id])},t.prototype.hasTrait=function(e,t){var n=this.getItem(t);return n&&n.hasTrait(e)},t.prototype.toggleTrait=function(e,t){var n=this.getItem(t);n&&(n.hasTrait(e)?this.removeTraits(e,[t]):this.addTraits(e,[t]))},t.prototype.setTraits=function(e,t){if(0===t.length)this.removeTraits(e,t);else{for(var n,i={},o=0,r=t.length;o<r;o++)n=this.getItem(t[o]),n&&(i[n.id]=n);var s,a=this.traitsToItems[e]||{},u=[];for(s in a)a.hasOwnProperty(s)&&(i.hasOwnProperty(s)?delete i[s]:u.push(a[s]));for(var o=0,r=u.length;o<r;o++)n=u[o],n.removeTrait(e),delete a[n.id];for(s in i)i.hasOwnProperty(s)&&(n=i[s],n.addTrait(e),a[s]=n);this.traitsToItems[e]=a}},t.prototype.getElementsWithTrait=function(e,t){var n,i=[],o=this.traitsToItems[e]||{};for(n in o)o.hasOwnProperty(n)&&(o[n].isVisible()||t)&&i.push(o[n].getElement());return i},t.prototype.dispose=function(){this.registry&&(this.registry.dispose(),this.registry=null),e.prototype.dispose.call(this)},t}(s.EventEmitter);t.TreeModel=g}),define(d[186],h([0,1,25,77]),function(e,t,n,i){"use strict";var o=function(e){function t(){var t=e.call(this)||this;return t.heightMap=[],t.indexes={},t}return m(t,e),t.prototype.getTotalHeight=function(){var e=this.heightMap[this.heightMap.length-1];return e?e.top+e.height:0},t.prototype.onInsertItems=function(e,t){void 0===t&&(t=null);var n,i,o,r,s,a=0;if(null===t)o=0,s=0;else{if(o=this.indexes[t]+1,i=this.heightMap[o-1],!i)return void console.error("view item doesnt exist");s=i.top+i.height}for(var u=this.heightMap.splice.bind(this.heightMap,o,0),l=[];n=e.next();)i=this.createViewItem(n),i.top=s+a,this.emit("viewItem:create",{item:i.model}),this.indexes[n.id]=o++,l.push(i),a+=i.height;for(u.apply(this.heightMap,l),r=o;r<this.heightMap.length;r++)i=this.heightMap[r],i.top+=a,this.indexes[i.model.id]=r;for(r=l.length-1;r>=0;r--)this.onInsertItem(l[r]);for(r=this.heightMap.length-1;r>=o;r--)this.onRefreshItem(this.heightMap[r]);return a},t.prototype.onInsertItem=function(e){},t.prototype.onRemoveItems=function(e){for(var t,n,i,o=null,r=0;t=e.next();){if(i=this.indexes[t],n=this.heightMap[i],!n)return void console.error("view item doesnt exist");r-=n.height,delete this.indexes[t],this.onRemoveItem(n),null===o&&(o=i)}if(0!==r)for(this.heightMap.splice(o,i-o+1),i=o;i<this.heightMap.length;i++)n=this.heightMap[i],n.top+=r,this.indexes[n.model.id]=i,this.onRefreshItem(n)},t.prototype.onRemoveItem=function(e){},t.prototype.onRefreshItemSet=function(e){var t=this,n=e.sort(function(e,n){return t.indexes[e.id]-t.indexes[n.id]});this.onRefreshItems(new i.ArrayIterator(n))},t.prototype.onRefreshItems=function(e){for(var t,n,i,o,r=null,s=0;t=e.next();){for(o=this.indexes[t.id];0!==s&&null!==r&&r<o;r++)n=this.heightMap[r],n.top+=s,this.onRefreshItem(n);n=this.heightMap[o],i=t.getHeight(),n.top+=s,s+=i-n.height,n.height=i,this.onRefreshItem(n,!0),r=o+1}if(0!==s&&null!==r)for(;r<this.heightMap.length;r++)n=this.heightMap[r],n.top+=s,this.onRefreshItem(n)},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1)},t.prototype.itemsCount=function(){return this.heightMap.length},t.prototype.itemAt=function(e){return this.heightMap[this.indexAt(e)].model.id},t.prototype.withItemsInRange=function(e,t,n){e=this.indexAt(e),t=this.indexAt(t);for(var i=e;i<=t;i++)n(this.heightMap[i].model.id)},t.prototype.indexAt=function(e){for(var t,n,i=0,o=this.heightMap.length;i<o;)if(t=Math.floor((i+o)/2),n=this.heightMap[t],e<n.top)o=t;else{if(!(e>=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},t.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)},t.prototype.itemAtIndex=function(e){return this.heightMap[e]},t.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},t.prototype.createViewItem=function(e){throw new Error("not implemented")},t.prototype.dispose=function(){this.heightMap=null,this.indexes=null},t}(n.EventEmitter);t.HeightMap=o}),define(d[188],h([0,1,18,156]),function(e,t,n,i){"use strict";function o(e,t){return void 0===t&&(t=!1),n.globals.MonacoEnvironment&&n.globals.MonacoEnvironment.hasOwnProperty(e)?n.globals.MonacoEnvironment[e]:t}function r(t,n){return e.toUrl("./"+t)+"#"+n}var s=o("getWorkerUrl",null),a=s||r,u=function(){function e(e,t,n,i,o){this.id=t,this.worker=new Worker(a("workerMain.js",n)),this.postMessage(e),this.worker.onmessage=function(e){i(e.data)},"function"==typeof this.worker.addEventListener&&this.worker.addEventListener("error",o)}return e.prototype.getId=function(){return this.id},e.prototype.postMessage=function(e){this.worker&&this.worker.postMessage(e)},e.prototype.dispose=function(){this.worker.terminate(),this.worker=null},e}(),l=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,n,o){var r=this,s=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new u(t,s,this._label||"anonymous"+s,n,function(e){i.logOnceWebWorkerWarning(e),r._webWorkerFailedBeforeError=e,o(e)})},e}();l.LAST_WORKER_ID=0,t.DefaultWorkerFactory=l}),define(d[190],h([5]),{}),define(d[34],h([0,1,6,22,4,9,55,11,190]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t){s.ok(i.isString(e),"Expected String as parameter");var n=document.getElementById(e);return n?new x(n,t):null}function l(e){return e[b]||(e[b]={}),e[b]}function c(e){return!!e[b]}function d(e,t){return e instanceof M?new M(e):new x(e.getHTMLElement(),t)}function h(e,t){return new x(e,t)}function p(){return new x(null,!0)}function f(e,t,n){l(e)[t]=n}function g(e,t,n){if(c(e)){var o=l(e)[t];if(!i.isUndefined(o))return o}return n}function v(e,t){c(e)&&delete l(e)[t]}function _(e,t){f(e,w,t)}function y(e){v(e,w)}function C(e){return g(e,w)}t.withElementById=u,t.Build={withElementById:u};var b="_msDataKey",w="__$binding",S="__$listeners",E="__$visibility",L=function(){function e(e,t){this.x=e,this.y=t}return e}();t.Position=L;var N=function(){function e(e,t,n,i){this.top=e,this.right=t,this.bottom=n,this.left=i}return e}();t.Box=N;var T=function(){function e(e,t){this.width=e,this.height=t}return e.prototype.substract=function(t){return new e(this.width-t.left-t.right,this.height-t.top-t.bottom)},e}();t.Dimension=T;var x=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toUnbind={},this.captureToUnbind={}}return e.prototype.asContainer=function(){return d(this,this.offdom)},e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,t.createdElements=this.createdElements,t.captureToUnbind=this.captureToUnbind,t.toUnbind=this.toUnbind,t},e.prototype.and=function(t){t instanceof e||t instanceof M||(t=new e(t,this.offdom));var n=[this];if(t instanceof M)for(var i=0;i<t.length;i++)n.push(t.item(i));else n.push(t);return new M(n)},e.prototype.build=function(t,n){s.ok(this.offdom,"This builder was not created off-dom, so build() can not be called."),t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,s.ok(t,"Builder can only be build() with a container provided."),s.ok(a.isHTMLElement(t),"The container must either be a HTMLElement or a Builder.");var o,r,u=t,l=u.childNodes;if(i.isNumber(n)&&n<l.length)for(o=0,r=this.createdElements.length;o<r;o++)u.insertBefore(this.createdElements[o],l[n++]);else for(o=0,r=this.createdElements.length;o<r;o++)u.appendChild(this.createdElements[o]);return this},e.prototype.appendTo=function(t,n){t?t instanceof e&&(t=t.getHTMLElement()):t=this.container,s.ok(t,"Builder can only be build() with a container provided."),s.ok(a.isHTMLElement(t),"The container must either be a HTMLElement or a Builder.");var o=t;this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement);var r=o.childNodes;return i.isNumber(n)&&n<r.length?o.insertBefore(this.currentElement,r[n]):o.appendChild(this.currentElement),this},e.prototype.append=function(t,n){return s.ok(t,"Need a child to append"),a.isHTMLElement(t)&&(t=h(t)),s.ok(t instanceof e||t instanceof M,"Need a child to append"),t.appendTo(this,n),this},e.prototype.offDOM=function(){return this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement),this},e.prototype.getHTMLElement=function(){return this.currentElement},e.prototype.getContainer=function(){return this.container},e.prototype.div=function(e,t){return this.doElement("div",e,t)},e.prototype.p=function(e,t){return this.doElement("p",e,t)},e.prototype.ul=function(e,t){return this.doElement("ul",e,t)},e.prototype.ol=function(e,t){return this.doElement("ol",e,t)},e.prototype.li=function(e,t){return this.doElement("li",e,t)},e.prototype.span=function(e,t){return this.doElement("span",e,t)},e.prototype.img=function(e,t){return this.doElement("img",e,t)},e.prototype.a=function(e,t){return this.doElement("a",e,t)},e.prototype.header=function(e,t){return this.doElement("header",e,t)},e.prototype.section=function(e,t){return this.doElement("section",e,t)},e.prototype.footer=function(e,t){return this.doElement("footer",e,t)},e.prototype.element=function(e,t,n){return this.doElement(e,t,n)},e.prototype.doElement=function(t,n,o){var r=document.createElement(t);if(this.currentElement=r,this.offdom&&this.createdElements.push(r),i.isObject(n)&&this.attr(n),i.isFunction(n)&&(o=n),i.isFunction(o)){var s=new e(r);o.call(s,s)}return this.offdom||this.container.appendChild(r),this},e.prototype.domFocus=function(){return this.currentElement.focus(),this},e.prototype.hasFocus=function(){var e=document.activeElement;return e===this.currentElement},e.prototype.domSelect=function(e){void 0===e&&(e=null);var t=this.currentElement;return t.select(),e&&t.setSelectionRange(e.start,e.end),this},e.prototype.domBlur=function(){return this.currentElement.blur(),this},e.prototype.domClick=function(){return this.currentElement.click(),this},e.prototype.on=function(e,t,n,o){var r=this;if(i.isArray(e))e.forEach(function(e){r.on(e,t,n,o)});else{var s=e,u=a.addDisposableListener(this.currentElement,s,function(e){t(e,r,u)},o||!1);o?(this.captureToUnbind[s]||(this.captureToUnbind[s]=[]),this.captureToUnbind[s].push(u)):(this.toUnbind[s]||(this.toUnbind[s]=[]),this.toUnbind[s].push(u));var l=this.getProperty(S,[]);l.push(u),this.setProperty(S,l),n&&i.isArray(n)&&n.push(u)}return this},e.prototype.off=function(e,t){var n=this;if(i.isArray(e))e.forEach(function(e){n.off(e)});else{var r=e;t?this.captureToUnbind[r]&&(this.captureToUnbind[r]=o.dispose(this.captureToUnbind[r])):this.toUnbind[r]&&(this.toUnbind[r]=o.dispose(this.toUnbind[r]))}return this},e.prototype.once=function(e,t,n,o){var r=this;if(i.isArray(e))e.forEach(function(e){r.once(e,t)});else{var s=e,u=a.addDisposableListener(this.currentElement,s,function(e){t(e,r,u),u.dispose()},o||!1);n&&i.isArray(n)&&n.push(u)}return this},e.prototype.preventDefault=function(e,t,n,i){var o=function(e){e.preventDefault(),t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)};return this.on(e,o,n,i)},e.prototype.attr=function(e,t){if(i.isObject(e)){for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];this.doSetAttr(n,o)}return this}return i.isString(e)&&!i.isString(t)?this.currentElement.getAttribute(e):(i.isString(e)&&(i.isString(t)||(t=String(t)),this.doSetAttr(e,t)),this)},e.prototype.doSetAttr=function(e,t){"class"===e&&(e="addClass"),this[e]?i.isArray(t)?this[e].apply(this,t):this[e].call(this,t):this.currentElement.setAttribute(e,t)},e.prototype.removeAttribute=function(e){this.currentElement.removeAttribute(e)},e.prototype.id=function(e){return this.currentElement.setAttribute("id",e),this},e.prototype.src=function(e){return this.currentElement.setAttribute("src",e),this},e.prototype.href=function(e){return this.currentElement.setAttribute("href",e),this},e.prototype.title=function(e){return this.currentElement.setAttribute("title",e),this},e.prototype.name=function(e){return this.currentElement.setAttribute("name",e),this},e.prototype.type=function(e){return this.currentElement.setAttribute("type",e),this},e.prototype.value=function(e){return this.currentElement.setAttribute("value",e),this},e.prototype.alt=function(e){return this.currentElement.setAttribute("alt",e),this},e.prototype.draggable=function(e){return this.currentElement.setAttribute("draggable",e?"true":"false"),this},e.prototype.tabindex=function(e){return this.currentElement.setAttribute("tabindex",e.toString()),this},e.prototype.style=function(e,t){if(i.isObject(e)){for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];this.doSetStyle(n,o)}}else{if(i.isString(e)&&!i.isString(t))return this.currentElement.style[this.cssKeyToJavaScriptProperty(e)];i.isString(e)&&i.isString(t)&&this.doSetStyle(e,t)}return this},e.prototype.doSetStyle=function(e,t){if(e.indexOf("-")>=0){var n=e.split("-");e=n[0];for(var i=1;i<n.length;i++){var o=n[i];e=e+o.charAt(0).toUpperCase()+o.substr(1)}}this.currentElement.style[this.cssKeyToJavaScriptProperty(e)]=t},e.prototype.cssKeyToJavaScriptProperty=function(e){if(e.indexOf("-")>=0){var t=e.split("-");e=t[0];for(var n=1;n<t.length;n++){var i=t[n];e=e+i.charAt(0).toUpperCase()+i.substr(1)}}else"float"===e&&(e="cssFloat");return e},e.prototype.getComputedStyle=function(){return a.getComputedStyle(this.currentElement)},e.prototype.addClass=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach(function(t){var n=t.split(" ");n.forEach(function(t){a.addClass(e.currentElement,t)})}),this},e.prototype.setClass=function(e,t){return void 0===t&&(t=null),null===t?this.currentElement.className=e:t?this.addClass(e):this.removeClass(e),this},e.prototype.hasClass=function(e){return a.hasClass(this.currentElement,e)},e.prototype.removeClass=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach(function(t){var n=t.split(" ");n.forEach(function(t){a.removeClass(e.currentElement,t)})}),this},e.prototype.swapClass=function(e,t){return this.hasClass(e)?(this.removeClass(e),this.addClass(t)):(this.removeClass(t),this.addClass(e)),this},e.prototype.toggleClass=function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e),this},e.prototype.color=function(e){return this.currentElement.style.color=e,this},e.prototype.background=function(e){return this.currentElement.style.backgroundColor=e,this},e.prototype.padding=function(e,t,n,o){return i.isString(e)&&e.indexOf(" ")>=0?this.padding.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.paddingTop=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.paddingRight=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.paddingBottom=this.toPixel(n)),i.isUndefinedOrNull(o)||(this.currentElement.style.paddingLeft=this.toPixel(o)),this)},e.prototype.margin=function(e,t,n,o){return i.isString(e)&&e.indexOf(" ")>=0?this.margin.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.marginTop=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.marginRight=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.marginBottom=this.toPixel(n)),i.isUndefinedOrNull(o)||(this.currentElement.style.marginLeft=this.toPixel(o)),this)},e.prototype.position=function(e,t,n,o,r){return i.isString(e)&&e.indexOf(" ")>=0?this.position.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.top=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.right=this.toPixel(t)),i.isUndefinedOrNull(n)||(this.currentElement.style.bottom=this.toPixel(n)),i.isUndefinedOrNull(o)||(this.currentElement.style.left=this.toPixel(o)),r||(r="absolute"),this.currentElement.style.position=r,this)},e.prototype.size=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.size.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.width=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.height=this.toPixel(t)),this)},e.prototype.minSize=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.minSize.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.minWidth=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.minHeight=this.toPixel(t)),this)},e.prototype.maxSize=function(e,t){return i.isString(e)&&e.indexOf(" ")>=0?this.maxSize.apply(this,e.split(" ")):(i.isUndefinedOrNull(e)||(this.currentElement.style.maxWidth=this.toPixel(e)),i.isUndefinedOrNull(t)||(this.currentElement.style.maxHeight=this.toPixel(t)),this)},e.prototype.float=function(e){return this.currentElement.style.cssFloat=e,this},e.prototype.clear=function(e){return this.currentElement.style.clear=e,this},e.prototype.normal=function(){return this.currentElement.style.fontStyle="normal",this.currentElement.style.fontWeight="normal",this.currentElement.style.textDecoration="none",this},e.prototype.italic=function(){return this.currentElement.style.fontStyle="italic",this},e.prototype.bold=function(){return this.currentElement.style.fontWeight="bold",this},e.prototype.underline=function(){return this.currentElement.style.textDecoration="underline",this},e.prototype.overflow=function(e){return this.currentElement.style.overflow=e,this},e.prototype.display=function(e){return this.currentElement.style.display=e,this},e.prototype.disable=function(){return this.currentElement.setAttribute("disabled","disabled"),this},e.prototype.enable=function(){return this.currentElement.removeAttribute("disabled"),this},e.prototype.show=function(){return this.hasClass("builder-hidden")&&this.removeClass("builder-hidden"),this.attr("aria-hidden","false"),this.cancelVisibilityPromise(),this},e.prototype.showDelayed=function(e){var t=this;this.cancelVisibilityPromise();var i=n.TPromise.timeout(e);return this.setProperty(E,i),i.done(function(){t.removeProperty(E),t.show()}),this},e.prototype.hide=function(){return this.hasClass("builder-hidden")||this.addClass("builder-hidden"),this.attr("aria-hidden","true"),this.cancelVisibilityPromise(),this},e.prototype.isHidden=function(){return this.hasClass("builder-hidden")||"none"===this.currentElement.style.display},e.prototype.toggleVisibility=function(){return this.cancelVisibilityPromise(),this.swapClass("builder-visible","builder-hidden"),this.isHidden()?this.attr("aria-hidden","true"):this.attr("aria-hidden","false"),this},e.prototype.cancelVisibilityPromise=function(){var e=this.getProperty(E);e&&(e.cancel(),this.removeProperty(E))},e.prototype.border=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.border.apply(this,e.split(" ")):(this.currentElement.style.borderWidth=this.toPixel(e),n&&(this.currentElement.style.borderColor=n),t&&(this.currentElement.style.borderStyle=t),this)},e.prototype.borderTop=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderTop.apply(this,e.split(" ")):(this.currentElement.style.borderTopWidth=this.toPixel(e),n&&(this.currentElement.style.borderTopColor=n),t&&(this.currentElement.style.borderTopStyle=t),this)},e.prototype.borderBottom=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderBottom.apply(this,e.split(" ")):(this.currentElement.style.borderBottomWidth=this.toPixel(e),n&&(this.currentElement.style.borderBottomColor=n),t&&(this.currentElement.style.borderBottomStyle=t),this)},e.prototype.borderLeft=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderLeft.apply(this,e.split(" ")):(this.currentElement.style.borderLeftWidth=this.toPixel(e),n&&(this.currentElement.style.borderLeftColor=n),t&&(this.currentElement.style.borderLeftStyle=t),this)},e.prototype.borderRight=function(e,t,n){return i.isString(e)&&e.indexOf(" ")>=0?this.borderRight.apply(this,e.split(" ")):(this.currentElement.style.borderRightWidth=this.toPixel(e),n&&(this.currentElement.style.borderRightColor=n),t&&(this.currentElement.style.borderRightStyle=t),this)},e.prototype.textAlign=function(e){return this.currentElement.style.textAlign=e,this},e.prototype.verticalAlign=function(e){return this.currentElement.style.verticalAlign=e,this},e.prototype.toPixel=function(e){return e.toString().indexOf("px")===-1?e.toString()+"px":e},e.prototype.innerHtml=function(e,t){return t?this.currentElement.innerHTML+=e:this.currentElement.innerHTML=e,this},e.prototype.text=function(e,t){return t?0===this.currentElement.children.length?this.currentElement.textContent+=e:this.currentElement.appendChild(document.createTextNode(e)):this.currentElement.textContent=e,this},e.prototype.safeInnerHtml=function(e,t){return this.innerHtml(r.escape(e),t)},e.prototype.bind=function(e){return _(this.currentElement,e),this},e.prototype.unbind=function(){return y(this.currentElement),this},e.prototype.getBinding=function(){return C(this.currentElement)},e.prototype.setProperty=function(e,t){return f(this.currentElement,e,t),this},e.prototype.getProperty=function(e,t){return g(this.currentElement,e,t)},e.prototype.removeProperty=function(e){return c(this.currentElement)&&delete l(this.currentElement)[e],this},e.prototype.parent=function(e){return s.ok(!this.offdom,"Builder was created with offdom = true and thus has no parent set"),h(this.currentElement.parentNode,e)},e.prototype.children=function(e){for(var t=this.currentElement.children,n=[],i=0;i<t.length;i++)n.push(h(t.item(i),e));return new M(n)},e.prototype.child=function(e){void 0===e&&(e=0);var t=this.currentElement.children;return h(t.item(e))},e.prototype.removeChild=function(e){return this.currentElement===e.parent().getHTMLElement()&&this.currentElement.removeChild(e.getHTMLElement()),this},e.prototype.select=function(e,t){s.ok(i.isString(e),"Expected String as parameter");for(var n=this.currentElement.querySelectorAll(e),o=[],r=0;r<n.length;r++)o.push(h(n.item(r),t));return new M(o)},e.prototype.matches=function(e){var t=this.currentElement,n=t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return n&&n.call(t,e)},e.prototype.isEmpty=function(){return!this.currentElement.childNodes||0===this.currentElement.childNodes.length},e.prototype.unbindDescendants=function(e){if(e&&e.children)for(var t=0,n=e.children.length;t<n;t++){var o=e.children.item(t);if(c(o)){var r=l(o)[S];if(i.isArray(r))for(;r.length;)r.pop().dispose();delete o[b]}this.unbindDescendants(o)}},e.prototype.empty=function(){return this.unbindDescendants(this.currentElement),this.clearChildren(),this.offdom&&(this.createdElements=[]),this},e.prototype.clearChildren=function(){return this.currentElement&&a.clearNode(this.currentElement),this},e.prototype.destroy=function(){if(this.currentElement&&(this.currentElement.parentNode&&this.currentElement.parentNode.removeChild(this.currentElement),this.empty(),c(this.currentElement))){var e=l(this.currentElement)[S];if(i.isArray(e))for(;e.length;)e.pop().dispose();delete this.currentElement[b]}var t;for(t in this.toUnbind)this.toUnbind.hasOwnProperty(t)&&i.isArray(this.toUnbind[t])&&(this.toUnbind[t]=o.dispose(this.toUnbind[t]));for(t in this.captureToUnbind)this.captureToUnbind.hasOwnProperty(t)&&i.isArray(this.captureToUnbind[t])&&(this.captureToUnbind[t]=o.dispose(this.captureToUnbind[t]));this.currentElement=null,this.container=null,this.offdom=null,this.createdElements=null,this.captureToUnbind=null,this.toUnbind=null},e.prototype.dispose=function(){this.destroy()},e.prototype.getTotalSize=function(){var e=a.getTotalWidth(this.currentElement),t=a.getTotalHeight(this.currentElement);return new T(e,t)},e.prototype.getContentSize=function(){var e=a.getContentWidth(this.currentElement),t=a.getContentHeight(this.currentElement);return new T(e,t)},e.prototype.getClientArea=function(){if(this.currentElement!==document.body)return new T(this.currentElement.clientWidth,this.currentElement.clientHeight);if(window.innerWidth&&window.innerHeight)return new T(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientWidth)return new T(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new T(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")},e}();t.Builder=x;var M=function(e){function t(n){var o=this;if(s.ok(i.isArray(n)||n instanceof t,"Expected Array or MultiBuilder as parameter"),o=e.call(this)||this,o.length=0,o.builders=[],i.isArray(n))for(var r=0;r<n.length;r++)n[r]instanceof HTMLElement?o.push(h(n[r])):o.push(n[r]);else for(var r=0;r<n.length;r++)o.push(n.item(r));var a=o,u=function(e){a[e]=function(){for(var n,o=Array.prototype.slice.call(arguments),r=!1,s=0;s<a.length;s++){var u=a.item(s)[e].apply(a.item(s),o);if(u instanceof t){n||(n=[]),r=!0;for(var l=0;l<u.length;l++)n.push(u.item(l))}else i.isUndefined(u)||u instanceof x||(n||(n=[]),n.push(u))}return n&&r?new t(n):n||a}};for(var l in x.prototype)"clone"!==l&&"and"!==l&&x.prototype.hasOwnProperty(l)&&i.isFunction(x.prototype[l])&&u(l);return o}return m(t,e),t.prototype.item=function(e){return this.builders[e]},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++)this.builders.push(e[n]);this.length=this.builders.length},t.prototype.pop=function(){var e=this.builders.pop();return this.length=this.builders.length,e},t.prototype.concat=function(e){var t=this.builders.concat(e);return this.length=this.builders.length,t},t.prototype.shift=function(){var e=this.builders.shift();return this.length=this.builders.length,e},t.prototype.unshift=function(e){var t=this.builders.unshift(e);return this.length=this.builders.length,t},t.prototype.slice=function(e,t){var n=this.builders.slice(e,t);return this.length=this.builders.length,n},t.prototype.splice=function(e,t){var n=this.builders.splice(e,t);return this.length=this.builders.length,n},t.prototype.clone=function(){return new t(this)},t.prototype.and=function(e){e instanceof x||e instanceof t||(e=new x(e));var n=[];if(e instanceof t)for(var i=0;i<e.length;i++)n.push(e.item(i));else n.push(e);return this.push.apply(this,n),this},t}(x);t.MultiBuilder=M,t.setPropertyOnElement=f,t.getPropertyFromElement=g,t.removePropertyFromElement=v,t.bindElement=_,t.unbindElement=y,t.getBindingFromElement=C,t.Binding={setPropertyOnElement:f,getPropertyFromElement:g,removePropertyFromElement:v,bindElement:_,unbindElement:y,getBindingFromElement:C};var I=/([\w\-]+)?(#([\w\-]+))?((.([\w\-]+))*)/;t.$=function(e){if(i.isUndefined(e))return p();if(!e)throw new Error("Bad use of $");if(a.isHTMLElement(e)||e===window)return h(e);if(i.isArray(e))return new M(e);if(e instanceof x)return d(e);if(i.isString(e)){if("<"===e[0]){var t=void 0,n=document.createElement("div");if(n.innerHTML=r.format.apply(r,arguments),0===n.children.length)throw new Error("Bad use of $");if(1===n.children.length)return t=n.firstChild,n.removeChild(t),h(t);for(var o=[];n.firstChild;)t=n.firstChild,n.removeChild(t),o.push(h(t));return new M(o)}if(1===arguments.length){var s=I.exec(e);if(!s)throw new Error("Bad use of $");var u=s[1]||"div",l=s[3]||void 0,c=(s[4]||"").replace(/\./g," "),f={};return l&&(f.id=l),c&&(f.class=c),p().element(u,f)}var g=p();return g.element.apply(g,arguments),g}throw new Error("Bad use of $")},t.$.Box=N,t.$.Dimension=T,t.$.Position=L,t.$.Builder=x,t.$.MultiBuilder=M,t.$.Build=t.Build,t.$.Binding=t.Binding}),define(d[198],h([5]),{}),define(d[200],h([5]),{}),define(d[203],h([5]),{}),define(d[206],h([0,1,11,37,203]),function(e,t,n,i){"use strict";var o=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._checked=n._opts.isChecked,n.domNode=document.createElement("div"),n.domNode.title=n._opts.title,n.domNode.className=n._className(),n.domNode.tabIndex=0,n.domNode.setAttribute("role","checkbox"),n.domNode.setAttribute("aria-checked",String(n._checked)),n.domNode.setAttribute("aria-label",n._opts.title),n.onclick(n.domNode,function(e){n.checked=!n._checked,n._opts.onChange(!1),e.preventDefault()}),n.onkeydown(n.domNode,function(e){return 10===e.keyCode||3===e.keyCode?(n.checked=!n._checked,n._opts.onChange(!0),void e.preventDefault()):void(n._opts.onKeyDown&&n._opts.onKeyDown(e))}),n}return m(t,e),t.prototype.focus=function(){this.domNode.focus()},Object.defineProperty(t.prototype,"checked",{get:function(){return this._checked},set:function(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.className=this._className()},enumerable:!0,configurable:!0}),t.prototype._className=function(){return"custom-checkbox "+this._opts.actionClassName+" "+(this._checked?"checked":"unchecked")},t.prototype.width=function(){return 22},t.prototype.enable=function(){this.domNode.tabIndex=0,this.domNode.setAttribute("aria-disabled",String(!1))},t.prototype.disable=function(){n.removeTabIndexAndUpdateFocus(this.domNode),this.domNode.setAttribute("aria-disabled",String(!0))},t}(i.Widget);t.Checkbox=o}),define(d[207],h([5]),{}),define(d[128],h([0,1,34,11,4,25,207]),function(e,t,n,i,o,r){"use strict";function s(e,t,n,i,o){var r=function(e,t,n,i){return t?e:i?n:e},s=function(e,t,n,i,o){return o?r(e,t,n,i):r(n,i,e,t)},l=function(){var o=t.top-e.height,r=t.top+t.height,a=o>=n.top&&o+e.height<=n.top+n.height,l=r>=n.top&&r+e.height<=n.top+n.height;return s(o,a,r,l,i===u.ABOVE)}(),c=function(){var i=t.left,r=t.left+t.width-e.width,u=i>=n.left&&i+e.width<=n.left+n.width,l=r>=n.left&&r+e.width<=n.left+n.width;return s(i,u,r,l,o===a.LEFT)}();return{top:l,left:c}}var a;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(a=t.AnchorAlignment||(t.AnchorAlignment={}));var u;!function(e){e[e.BELOW=0]="BELOW",e[e.ABOVE=1]="ABOVE"}(u=t.AnchorPosition||(t.AnchorPosition={}));var l=function(e){function t(t){var i=e.call(this)||this;return i.$view=n.$(".context-view").hide(),i.setContainer(t),i.toDispose=[{dispose:function(){i.setContainer(null)}}],i.toDisposeOnClean=null,i}return m(t,e),t.prototype.setContainer=function(e){var i=this;this.$container&&(this.$container.off(t.BUBBLE_UP_EVENTS),this.$container.off(t.BUBBLE_DOWN_EVENTS,!0),this.$container=null),e&&(this.$container=n.$(e),this.$view.appendTo(this.$container),this.$container.on(t.BUBBLE_UP_EVENTS,function(e){i.onDOMEvent(e,document.activeElement,!1)}),this.$container.on(t.BUBBLE_DOWN_EVENTS,function(e){i.onDOMEvent(e,document.activeElement,!0)},null,!0))},t.prototype.show=function(e){this.isVisible()&&this.hide(),this.$view.setClass("context-view").empty().style({top:"0px",left:"0px"}).show(),this.toDisposeOnClean=e.render(this.$view.getHTMLElement()),this.delegate=e,this.doLayout()},t.prototype.layout=function(){
if(this.isVisible()){if(this.delegate.canRelayout===!1)return void this.hide();this.delegate.layout&&this.delegate.layout(),this.doLayout()}},t.prototype.doLayout=function(){var e,t=this.delegate.getAnchor();if(i.isHTMLElement(t)){var n=i.getDomNodePagePosition(t);e={top:n.top,left:n.left,width:n.width,height:n.height}}else{var o=t;e={top:o.y,left:o.x,width:o.width||0,height:o.height||0}}var r={top:i.StandardWindow.scrollY,left:i.StandardWindow.scrollX,height:window.innerHeight,width:window.innerWidth},l=this.$view.getTotalSize(),c={width:l.width,height:l.height},d=this.delegate.anchorPosition||u.BELOW,h=this.delegate.anchorAlignment||a.LEFT,p=s(c,e,r,d,h),f=i.getDomNodePagePosition(this.$container.getHTMLElement());p.top-=f.top,p.left-=f.left,this.$view.removeClass("top","bottom","left","right"),this.$view.addClass(d===u.BELOW?"bottom":"top"),this.$view.addClass(h===a.LEFT?"left":"right"),this.$view.style({top:p.top+"px",left:p.left+"px",width:"initial"})},t.prototype.hide=function(e){this.delegate&&this.delegate.onHide&&this.delegate.onHide(e),this.delegate=null,this.toDisposeOnClean&&(this.toDisposeOnClean.dispose(),this.toDisposeOnClean=null),this.$view.hide()},t.prototype.isVisible=function(){return!!this.delegate},t.prototype.onDOMEvent=function(e,t,n){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):n&&!i.isAncestor(e.target,this.$container.getHTMLElement())&&this.hide())},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hide(),this.toDispose=o.dispose(this.toDispose)},t}(r.EventEmitter);l.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],l.BUBBLE_DOWN_EVENTS=["click"],t.ContextView=l}),define(d[214],h([5]),{}),define(d[217],h([0,1,11,9,214]),function(e,t,n,i){"use strict";var o=function(){function e(e,t,i){this.element=n.append(e,n.$(".monaco-count-badge")),this.titleFormat=i||"",this.setCount(t||0)}return e.prototype.setCount=function(e){this.count=e,this.render()},e.prototype.setTitleFormat=function(e){this.titleFormat=e,this.render()},e.prototype.render=function(){this.element.textContent=""+this.count,this.element.title=i.format(this.titleFormat,this.count)},e}();t.CountBadge=o}),define(d[219],h([5]),{}),define(d[221],h([5]),{}),define(d[228],h([5]),{}),define(d[133],h([0,1,11,112,39,22,165,228]),function(e,t,n,i,o,r,s){"use strict";function a(e){if(!e)return null;if(r.isFunction(e.getWorkspace)){var t=e.getWorkspace();return t?t.resource.fsPath:void 0}return e.fsPath}var u=function(){function e(e,t){this.domNode=n.append(e,n.$(".monaco-icon-label")),t&&t.supportHighlights?this.labelNode=new i.HighlightedLabel(n.append(this.domNode,n.$("a.label-name"))):this.labelNode=n.append(this.domNode,n.$("a.label-name")),this.descriptionNode=n.append(this.domNode,n.$("span.label-description"))}return Object.defineProperty(e.prototype,"element",{get:function(){return this.domNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelElement",{get:function(){var e=this.labelNode;return e instanceof i.HighlightedLabel?e.element:e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"descriptionElement",{get:function(){return this.descriptionNode},enumerable:!0,configurable:!0}),e.prototype.setValue=function(e,t,o){var r=this.labelNode;r instanceof i.HighlightedLabel?r.set(e||"",o?o.matches:void 0):r.textContent=e||"",this.descriptionNode.textContent=t||"",t?n.removeClass(this.descriptionNode,"empty"):n.addClass(this.descriptionNode,"empty"),this.domNode.title=o&&o.title?o.title:"";var s=["monaco-icon-label"];o&&(o.extraClasses&&s.push.apply(s,o.extraClasses),o.italic&&s.push("italic")),this.domNode.className=s.join(" ")},e.prototype.dispose=function(){var e=this.labelNode;e instanceof i.HighlightedLabel&&e.dispose()},e}();t.IconLabel=u;var l=function(e){function t(t,n,i){var o=e.call(this,t)||this;return o.setFile(n,i),o}return m(t,e),t.prototype.setFile=function(e,t){var n=a(e),i=o.dirname(n);this.setValue(o.basename(n),i&&"."!==i?s.getPathLabel(i,t):"",{title:n})},t}(u);t.FileLabel=l}),define(d[236],h([5]),{}),define(d[240],h([5]),{}),define(d[243],h([0,1,34,240]),function(e,t,n){"use strict";var i=function(){function e(e,t,i){this.$el=n.$(".monaco-left-right-widget").appendTo(e),this.toDispose=[i(n.$(".right").appendTo(this.$el).getHTMLElement()),t(n.$("span.left").appendTo(this.$el).getHTMLElement())].filter(function(e){return!!e})}return e.prototype.dispose=function(){this.$el&&(this.$el.destroy(),this.$el=null)},e}();t.LeftRightWidget=i}),define(d[245],h([5]),{}),define(d[246],h([5]),{}),define(d[134],h([5]),{}),define(d[250],h([0,1,6,55,34,11,4,134]),function(e,t,n,i,o,r,s){"use strict";var a="done",u="active",l="infinite",c="discrete",d="progress-container",h="progress-bit",p=function(){function e(e){this.toUnbind=[],this.workedVal=0,this.create(e)}return e.prototype.create=function(e){var t=this;e.div({class:d},function(e){t.element=e.clone(),e.div({class:h}).on([r.EventType.ANIMATION_START,r.EventType.ANIMATION_END,r.EventType.ANIMATION_ITERATION],function(e){switch(e.type){case r.EventType.ANIMATION_START:case r.EventType.ANIMATION_END:t.animationRunning=e.type===r.EventType.ANIMATION_START;break;case r.EventType.ANIMATION_ITERATION:t.animationStopToken&&t.animationStopToken(null)}},t.toUnbind),t.bit=e.getHTMLElement()})},e.prototype.off=function(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.removeClass(u),this.element.removeClass(l),this.element.removeClass(c),this.workedVal=0,this.totalWork=void 0},e.prototype.done=function(){return this.doDone(!0)},e.prototype.stop=function(){return this.doDone(!1)},e.prototype.doDone=function(e){var t=this;return this.element.addClass(a),this.element.hasClass(l)?(this.bit.style.opacity="0",e?n.TPromise.timeout(200).then(function(){return t.off()}):this.off()):(this.bit.style.width="inherit",e?n.TPromise.timeout(200).then(function(){return t.off()}):this.off()),this},e.prototype.infinite=function(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.removeClass(c),this.element.removeClass(a),this.element.addClass(u),this.element.addClass(l),this},e.prototype.total=function(e){return this.workedVal=0,this.totalWork=e,this},e.prototype.hasTotal=function(){return!isNaN(this.totalWork)},e.prototype.worked=function(e){return i.ok(!isNaN(this.totalWork),"Total work not set"),e=Number(e),i.ok(!isNaN(e),"Value is not a number"),e=Math.max(1,e),this.workedVal+=e,this.workedVal=Math.min(this.totalWork,this.workedVal),this.element.hasClass(l)&&this.element.removeClass(l),this.element.hasClass(a)&&this.element.removeClass(a),this.element.hasClass(u)||this.element.addClass(u),this.element.hasClass(c)||this.element.addClass(c),this.bit.style.width=100*(this.workedVal/this.totalWork)+"%",this},e.prototype.getContainer=function(){return o.$(this.element)},e.prototype.dispose=function(){this.toUnbind=s.dispose(this.toUnbind)},e}();t.ProgressBar=p}),define(d[253],h([5]),{}),define(d[98],h([0,1,4,34,24,18,22,11,59,25,36,12,253]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";var h;!function(e){e[e.VERTICAL=0]="VERTICAL",e[e.HORIZONTAL=1]="HORIZONTAL"}(h=t.Orientation||(t.Orientation={}));var p=function(e){function t(t,n,s){void 0===s&&(s={});var l=e.call(this)||this;return l.$e=i.$(".monaco-sash").appendTo(t),r.isMacintosh&&l.$e.addClass("mac"),l.gesture=new u.Gesture(l.$e.getHTMLElement()),l.$e.on(a.EventType.MOUSE_DOWN,function(e){l.onMouseDown(e)}),l.$e.on(a.EventType.DBLCLICK,function(e){l.emit("reset",e)}),l.$e.on(u.EventType.Start,function(e){l.onTouchStart(e)}),l.size=s.baseSize||5,o.isIPad&&(l.size*=4,l.$e.addClass("touch")),l.setOrientation(s.orientation||h.VERTICAL),l.isDisabled=!1,l.hidden=!1,l.layoutProvider=n,l}return m(t,e),t.prototype.getHTMLElement=function(){return this.$e.getHTMLElement()},t.prototype.setOrientation=function(e){this.orientation=e,this.$e.removeClass("horizontal","vertical"),this.$e.addClass(this.getOrientation()),this.orientation===h.HORIZONTAL?this.$e.size(null,this.size):this.$e.size(this.size),this.layoutProvider&&this.layout()},t.prototype.getOrientation=function(){return this.orientation===h.HORIZONTAL?"horizontal":"vertical"},t.prototype.onMouseDown=function(e){var t=this;if(a.EventHelper.stop(e,!1),!this.isDisabled){var n=i.$(a.getElementsByTagName("iframe"));n&&n.style("pointer-events","none");var o=new c.StandardMouseEvent(e),s=o.posx,u=o.posy,l={startX:s,currentX:s,startY:u,currentY:u};this.$e.addClass("active"),this.emit("start",l);var d=i.$(window),h=this.getOrientation()+"-cursor-container"+(r.isMacintosh?"-mac":""),p=s,f=u;d.on("mousemove",function(e){a.EventHelper.stop(e,!1);var n=new c.StandardMouseEvent(e),i={startX:s,currentX:n.posx,startY:u,currentY:n.posy};p=n.posx,f=n.posy,t.emit("change",i)}).once("mouseup",function(e){a.EventHelper.stop(e,!1),t.$e.removeClass("active"),t.emit("end"),d.off("mousemove"),document.body.classList.remove(h);var n=i.$(a.getElementsByTagName("iframe"));n&&n.style("pointer-events","auto")}),document.body.classList.add(h)}},t.prototype.onTouchStart=function(e){var t=this;a.EventHelper.stop(e);var i=[],o=e.pageX,r=e.pageY;this.emit("start",{startX:o,currentX:o,startY:r,currentY:r});var l=o,c=r;i.push(a.addDisposableListener(this.$e.getHTMLElement(),u.EventType.Change,function(e){s.isNumber(e.pageX)&&s.isNumber(e.pageY)&&(t.emit("change",{startX:o,currentX:e.pageX,startY:r,currentY:e.pageY}),l=e.pageX,c=e.pageY)})),i.push(a.addDisposableListener(this.$e.getHTMLElement(),u.EventType.End,function(e){t.emit("end"),n.dispose(i)}))},t.prototype.layout=function(){var e;if(this.orientation===h.VERTICAL){var t=this.layoutProvider;e={left:t.getVerticalSashLeft(this)-this.size/2+"px"},t.getVerticalSashTop&&(e.top=t.getVerticalSashTop(this)+"px"),t.getVerticalSashHeight&&(e.height=t.getVerticalSashHeight(this)+"px")}else{var n=this.layoutProvider;e={top:n.getHorizontalSashTop(this)-this.size/2+"px"},n.getHorizontalSashLeft&&(e.left=n.getHorizontalSashLeft(this)+"px"),n.getHorizontalSashWidth&&(e.width=n.getHorizontalSashWidth(this)+"px")}this.$e.style(e)},t.prototype.show=function(){this.hidden=!1,this.$e.show()},t.prototype.hide=function(){this.hidden=!0,this.$e.hide()},t.prototype.isHidden=function(){return this.hidden},t.prototype.enable=function(){this.$e.removeClass("disabled"),this.isDisabled=!1},t.prototype.disable=function(){this.$e.addClass("disabled"),this.isDisabled=!0},t.prototype.dispose=function(){this.$e&&(this.$e.destroy(),this.$e=null),e.prototype.dispose.call(this)},t}(l.EventEmitter);t.Sash=p;var f=function(e){function t(t,n){var i=e.call(this)||this;return i.minWidth=n,i._onPositionChange=new d.Emitter,i.ratio=.5,i.sash=new p(t,i),i._register(i.sash.addListener2("start",function(){return i.onSashDragStart()})),i._register(i.sash.addListener2("change",function(e){return i.onSashDrag(e)})),i._register(i.sash.addListener2("end",function(){return i.onSashDragEnd()})),i._register(i.sash.addListener2("reset",function(){return i.onSashReset()})),i}return m(t,e),Object.defineProperty(t.prototype,"onPositionChange",{get:function(){return this._onPositionChange.event},enumerable:!0,configurable:!0}),t.prototype.getVerticalSashTop=function(){return 0},t.prototype.getVerticalSashLeft=function(){return this.position},t.prototype.getVerticalSashHeight=function(){return this.dimension.height},t.prototype.setDimenesion=function(e){this.dimension=e,this.compute(this.ratio)},t.prototype.onSashDragStart=function(){this.startPosition=this.position},t.prototype.onSashDrag=function(e){this.compute((this.startPosition+(e.currentX-e.startX))/this.dimension.width)},t.prototype.compute=function(e){this.computeSashPosition(e),this.ratio=this.position/this.dimension.width,this._onPositionChange.fire(this.position)},t.prototype.onSashDragEnd=function(){this.sash.layout()},t.prototype.onSashReset=function(){this.ratio=.5,this._onPositionChange.fire(this.position),this.sash.layout()},t.prototype.computeSashPosition=function(e){void 0===e&&(e=this.ratio);var t=this.dimension.width,n=Math.floor((e||.5)*t),i=Math.floor(.5*t);t>2*this.minWidth?(n<this.minWidth&&(n=this.minWidth),n>t-this.minWidth&&(n=t-this.minWidth)):n=i,this.position!==n&&(this.position=n,this.sash.layout())},t}(n.Disposable);t.VSash=f}),define(d[258],h([5]),{}),define(d[60],h([0,1,24,11,18,36,500,501,4,40,37,17,28,12,258]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e){var t={canUseTranslate3d:e.canUseTranslate3d&&n.canUseTranslate3d,lazyRender:"undefined"!=typeof e.lazyRender&&e.lazyRender,className:"undefined"!=typeof e.className?e.className:"",useShadows:"undefined"==typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"==typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!=typeof e.flipAxes&&e.flipAxes,alwaysConsumeMouseWheel:"undefined"!=typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!=typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!=typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,arrowSize:"undefined"!=typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!=typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!=typeof e.horizontal?e.horizontal:l.ScrollbarVisibility.Auto,horizontalScrollbarSize:"undefined"!=typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!=typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!=typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!=typeof e.vertical?e.vertical:l.ScrollbarVisibility.Auto,verticalScrollbarSize:"undefined"!=typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!=typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!=typeof e.verticalSliderSize?e.verticalSliderSize:0,saveLastScrollTimeOnClassName:"undefined"!=typeof e.saveLastScrollTimeOnClassName?e.saveLastScrollTimeOnClassName:null};return t.horizontalSliderSize="undefined"!=typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!=typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,o.isMacintosh&&(t.className+=" mac"),t}var g=500,v=50,_=function(e){function t(t,n){var i=e.call(this)||this;i._onScroll=i._register(new p.Emitter),i.onScroll=i._onScroll.event,t.style.overflow="hidden",i._options=f(n),i._scrollable=i._register(new l.Scrollable),i._register(i._scrollable.onScroll(function(e){i._onDidScroll(e),i._onScroll.fire(e)}));var o={onMouseWheel:function(e){return i._onMouseWheel(e)},onDragStart:function(){return i._onDragStart()},onDragEnd:function(){return i._onDragEnd()}};return i._verticalScrollbar=i._register(new a.VerticalScrollbar(i._scrollable,i._options,o)),i._horizontalScrollbar=i._register(new s.HorizontalScrollbar(i._scrollable,i._options,o)),i._domNode=document.createElement("div"),i._domNode.className="monaco-scrollable-element "+i._options.className,i._domNode.setAttribute("role","presentation"),i._domNode.style.position="relative",i._domNode.style.overflow="hidden",i._domNode.appendChild(t),i._domNode.appendChild(i._horizontalScrollbar.domNode.domNode),i._domNode.appendChild(i._verticalScrollbar.domNode.domNode),i._options.useShadows&&(i._leftShadowDomNode=h.createFastDomNode(document.createElement("div")),i._leftShadowDomNode.setClassName("shadow"),i._domNode.appendChild(i._leftShadowDomNode.domNode),i._topShadowDomNode=h.createFastDomNode(document.createElement("div")),i._topShadowDomNode.setClassName("shadow"),i._domNode.appendChild(i._topShadowDomNode.domNode),i._topLeftShadowDomNode=h.createFastDomNode(document.createElement("div")),i._topLeftShadowDomNode.setClassName("shadow top-left-corner"),i._domNode.appendChild(i._topLeftShadowDomNode.domNode)),i._listenOnDomNode=i._options.listenOnDomNode||i._domNode,i._mouseWheelToDispose=[],i._setListeningToMouseWheel(i._options.handleMouseWheel),i.onmouseover(i._listenOnDomNode,function(e){return i._onMouseOver(e)}),i.onnonbubblingmouseout(i._listenOnDomNode,function(e){return i._onMouseOut(e)}),i._hideTimeout=i._register(new d.TimeoutTimer),i._isDragging=!1,i._mouseIsOver=!1,i._shouldRender=!0,i}return m(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=u.dispose(this._mouseWheelToDispose),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getOverviewRulerLayoutInfo=function(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this._verticalScrollbar.delegateMouseDown(e)},t.prototype.updateState=function(e){this._scrollable.updateState(e)},t.prototype.getWidth=function(){return this._scrollable.getWidth()},t.prototype.getScrollWidth=function(){return this._scrollable.getScrollWidth()},t.prototype.getScrollLeft=function(){return this._scrollable.getScrollLeft()},t.prototype.getHeight=function(){return this._scrollable.getHeight()},t.prototype.getScrollHeight=function(){return this._scrollable.getScrollHeight()},t.prototype.getScrollTop=function(){return this._scrollable.getScrollTop()},t.prototype.updateClassName=function(e){this._options.className=e,o.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className},t.prototype.updateOptions=function(e){var t=f(e);this._options.handleMouseWheel=t.handleMouseWheel,this._options.mouseWheelScrollSensitivity=t.mouseWheelScrollSensitivity,this._setListeningToMouseWheel(this._options.handleMouseWheel),this._shouldRender=this._horizontalScrollbar.setCanUseTranslate3d(t.canUseTranslate3d)||this._shouldRender,this._shouldRender=this._verticalScrollbar.setCanUseTranslate3d(t.canUseTranslate3d)||this._shouldRender,this._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this,n=this._mouseWheelToDispose.length>0;if(n!==e&&(this._mouseWheelToDispose=u.dispose(this._mouseWheelToDispose),e)){var o=function(e){var n=new r.StandardMouseWheelEvent(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,"mousewheel",o)),this._mouseWheelToDispose.push(i.addDisposableListener(this._listenOnDomNode,"DOMMouseScroll",o))}},t.prototype._onMouseWheel=function(e){if(o.isMacintosh&&e.browserEvent&&this._options.saveLastScrollTimeOnClassName){var t=e.browserEvent.target;if(t&&1===t.nodeType){var n=i.findParentWithClass(t,this._options.saveLastScrollTimeOnClassName);n&&n.setAttribute("last-scroll-time",String((new Date).getTime()))}}var r=-1,s=-1;if(e.deltaY||e.deltaX){var a=e.deltaY*this._options.mouseWheelScrollSensitivity,u=e.deltaX*this._options.mouseWheelScrollSensitivity;if(this._options.flipAxes&&(d=[u,a],a=d[0],u=d[1]),this._options.scrollYToX&&!u&&(u=a,a=0),o.isMacintosh&&(a&&Math.abs(u)<.2&&(u=0),Math.abs(a)>.5*Math.abs(u)&&(u=0)),a){var l=this._scrollable.getScrollTop();r=this._verticalScrollbar.validateScrollPosition((r!==-1?r:l)-v*a),r===l&&(r=-1)}if(u){var c=this._scrollable.getScrollLeft();s=this._horizontalScrollbar.validateScrollPosition((s!==-1?s:c)-v*u),s===c&&(s=-1)}r===-1&&s===-1||(r!==-1&&(this._shouldRender=this._verticalScrollbar.setDesiredScrollPosition(r)||this._shouldRender,r=-1),s!==-1&&(this._shouldRender=this._horizontalScrollbar.setDesiredScrollPosition(s)||this._shouldRender,s=-1))}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation());var d},t.prototype._onDidScroll=function(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._reveal(),this._options.lazyRender||this._render()},t.prototype.renderNow=function(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()},t.prototype._render=function(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){var e=this._scrollable.getScrollTop()>0,t=this._scrollable.getScrollLeft()>0;this._leftShadowDomNode.setClassName("shadow"+(t?" left":"")),this._topShadowDomNode.setClassName("shadow"+(e?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(e?" top":"")+(t?" left":""))}},t.prototype._onDragStart=function(){this._isDragging=!0,this._reveal()},t.prototype._onDragEnd=function(){this._isDragging=!1,this._hide()},t.prototype._onMouseOut=function(e){this._mouseIsOver=!1,this._hide()},t.prototype._onMouseOver=function(e){this._mouseIsOver=!0,this._reveal()},t.prototype._reveal=function(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()},t.prototype._hide=function(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())},t.prototype._scheduleHide=function(){var e=this;this._hideTimeout.cancelAndSet(function(){return e._hide()},g)},t}(c.Widget);t.ScrollableElement=_;var y=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._element=t,i.onScroll(function(e){e.scrollTopChanged&&(i._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(i._element.scrollLeft=e.scrollLeft)}),i.scanDomNode(),i}return m(t,e),t.prototype.scanDomNode=function(){this.updateState({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,scrollLeft:this._element.scrollLeft,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight,scrollTop:this._element.scrollTop})},t}(_);t.DomScrollableElement=y}),define(d[262],h([0,1,35,4,59,11,124,60,40,194,447]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";var d=["click","dblclick","mouseup","mousedown","mouseover","mousemove","mouseout","contextmenu"],h={useShadows:!0},p=function(){function e(e,t,i,r){void 0===r&&(r=h),this.delegate=t,this.items=[],this.itemId=0,this.rangeMap=new l.RangeMap,this.renderers=n.toObject(i,function(e){return e.templateId}),this.cache=new c.RowCache(this.renderers),this.lastRenderTop=0,this.lastRenderHeight=0,this._domNode=document.createElement("div"),this._domNode.className="monaco-list",this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",this.gesture=new o.Gesture(this.rowsContainer),this.scrollableElement=new a.ScrollableElement(this.rowsContainer,{canUseTranslate3d:!1,alwaysConsumeMouseWheel:!0,horizontal:u.ScrollbarVisibility.Hidden,vertical:u.ScrollbarVisibility.Auto,useShadows:n.getOrDefault(r,function(e){return e.useShadows},h.useShadows),saveLastScrollTimeOnClassName:"monaco-list-row"}),this._domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this._domNode),this.disposables=[this.rangeMap,this.gesture,this.scrollableElement],this.scrollableElement.onScroll(this.onScroll,this,this.disposables),s.domEvent(this.rowsContainer,o.EventType.Change)(this.onTouchChange,this,this.disposables),this.layout()}return Object.defineProperty(e.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;void 0===n&&(n=[]);var o=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);l.each(o,function(e){return i.removeItemFromDOM(i.items[e])});var r=n.map(function(e){return{id:String(i.itemId++),element:e,size:i.delegate.getHeight(e),templateId:i.delegate.getTemplateId(e),row:null}});(c=this.rangeMap).splice.apply(c,[e,t].concat(r));var s=(d=this.items).splice.apply(d,[e,t].concat(r)),a=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);l.each(a,function(e){return i.insertItemInDOM(i.items[e],e)});var u=this.getContentHeight();return this.rowsContainer.style.height=u+"px",this.scrollableElement.updateState({scrollHeight:u}),s.map(function(e){return e.element});var c,d},Object.defineProperty(e.prototype,"length",{get:function(){return this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderHeight",{get:function(){return this.scrollableElement.getHeight()},enumerable:!0,configurable:!0}),e.prototype.element=function(e){return this.items[e].element},e.prototype.elementHeight=function(e){return this.items[e].size},e.prototype.elementTop=function(e){return this.rangeMap.positionAt(e)},e.prototype.indexAt=function(e){return this.rangeMap.indexAt(e)},e.prototype.indexAfter=function(e){return this.rangeMap.indexAfter(e)},e.prototype.layout=function(e){this.scrollableElement.updateState({height:e||r.getContentHeight(this._domNode)})},e.prototype.render=function(e,t){var n=this,i=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o=this.getRenderRange(e,t),r=l.relativeComplement(o,i),s=l.relativeComplement(i,o);r.forEach(function(e){return l.each(e,function(e){return n.insertItemInDOM(n.items[e],e)})}),s.forEach(function(e){return l.each(e,function(e){return n.removeItemFromDOM(n.items[e])})});var a="translate3d(0px, -"+e+"px, 0px)";this.rowsContainer.style.transform=a,this.rowsContainer.style.webkitTransform=a,this.lastRenderTop=e,this.lastRenderHeight=t},e.prototype.insertItemInDOM=function(e,t){e.row||(e.row=this.cache.alloc(e.templateId)),e.row.domNode.parentElement||this.rowsContainer.appendChild(e.row.domNode);var n=this.renderers[e.templateId];e.row.domNode.style.top=this.elementTop(t)+"px",e.row.domNode.style.height=e.size+"px",e.row.domNode.setAttribute("data-index",""+t),n.renderElement(e.element,t,e.row.templateData)},e.prototype.removeItemFromDOM=function(e){this.cache.release(e.row),e.row=null},e.prototype.getContentHeight=function(){return this.rangeMap.size},e.prototype.getScrollTop=function(){return this.scrollableElement.getScrollTop()},e.prototype.setScrollTop=function(e){this.scrollableElement.updateState({scrollTop:e})},Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.getScrollTop()},set:function(e){this.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.addListener=function(e,t,n){var i=this,s=t,a=this.domNode;return d.indexOf(e)>-1?t=function(e){return i.fireScopedEvent(s,i.getItemIndexFromMouseEvent(e))}:e===o.EventType.Tap&&(a=this.rowsContainer,t=function(e){return i.fireScopedEvent(s,i.getItemIndexFromGestureEvent(e))}),r.addDisposableListener(a,e,t,n)},e.prototype.fireScopedEvent=function(e,t){if(!(t<0)){var i=this.items[t].element;e(n.assign(event,{element:i,index:t}))}},e.prototype.onScroll=function(e){this.render(e.scrollTop,e.height)},e.prototype.onTouchChange=function(e){event.preventDefault(),event.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.getItemIndexFromMouseEvent=function(e){return this.getItemIndexFromEventTarget(e.target)},e.prototype.getItemIndexFromGestureEvent=function(e){return this.getItemIndexFromEventTarget(e.initialTarget)},e.prototype.getItemIndexFromEventTarget=function(e){for(;e instanceof HTMLElement&&e!==this.rowsContainer;){var t=e,n=t.getAttribute("data-index");if(n){var i=Number(n);if(!isNaN(i))return i}e=t.parentElement}return-1},e.prototype.getRenderRange=function(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}},e.prototype.dispose=function(){this.items=null,this._domNode&&this._domNode.parentElement&&(this._domNode.parentNode.removeChild(this._domNode),this._domNode=null),this.disposables=i.dispose(this.disposables)},e}();t.ListView=p});var y=this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};define(d[267],h([0,1,4,22,433,11,59,53,12,124,262,245]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";var d=function(){function e(e,t){this.controller=e,this.renderer=t}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this.renderer.templateId},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this.renderer.renderTemplate(e);return{container:e,data:t}},e.prototype.renderElement=function(e,t,n){this.controller.renderElement(e,t,n.container),this.renderer.renderElement(e,t,n.data)},e.prototype.disposeTemplate=function(e){return this.renderer.disposeTemplate(e.data)},e}(),h=function(){function e(e){this._trait=e,this._onChange=new u.Emitter,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){for(var i=n-t,o=e+t,r=[],s=0,a=r;s<a.length;s++){var u=a[s];u>=e&&u<o||r.push(u>e?u+i:u)}this.indexes=r,this._onChange.fire({indexes:r})},e.prototype.renderElement=function(e,t,n){r.toggleClass(n,this._trait,this.contains(t))},e.prototype.set=function(e){var t=this.indexes;return this.indexes=e,this._onChange.fire({indexes:e}),t},e.prototype.get=function(){return this.indexes},e.prototype.contains=function(e){return this.indexes.some(function(t){return t===e})},e.prototype.wrapRenderer=function(e){return new d(this,e)},e.prototype.dispose=function(){this.indexes=null,this._onChange=n.dispose(this._onChange)},e}(),p=function(e){function t(t){var n=e.call(this,"focused")||this;return n.getElementId=t,n}return m(t,e),t.prototype.renderElement=function(t,n,i){e.prototype.renderElement.call(this,t,n,i),i.setAttribute("role","treeitem"),i.setAttribute("id",this.getElementId(n))},t}(h),f=function(){function e(e,t){var n=this;this.list=e,this.view=t,this.disposables=[],this.disposables.push(t.addListener("mousedown",function(e){return n.onMouseDown(e)})),this.disposables.push(t.addListener("click",function(e){return n.onPointer(e)})),this.disposables.push(t.addListener(s.EventType.Tap,function(e){return n.onPointer(e)}));var i=u.chain(l.domEvent(t.domNode,"keydown")).map(function(e){return new a.StandardKeyboardEvent(e)});i.filter(function(e){return 3===e.keyCode}).on(this.onEnter,this,this.disposables),i.filter(function(e){return 16===e.keyCode}).on(this.onUpArrow,this,this.disposables),i.filter(function(e){return 18===e.keyCode}).on(this.onDownArrow,this,this.disposables),i.filter(function(e){return 11===e.keyCode}).on(this.onPageUpArrow,this,this.disposables),i.filter(function(e){return 12===e.keyCode}).on(this.onPageDownArrow,this,this.disposables)}return e.prototype.onMouseDown=function(e){e.preventDefault(),e.stopPropagation()},e.prototype.onPointer=function(e){e.preventDefault(),e.stopPropagation(),this.view.domNode.focus(),this.list.setFocus([e.index]),this.list.setSelection([e.index])},e.prototype.onEnter=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus())},e.prototype.onUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageUpArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.onPageDownArrow=function(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e}(),g={},v=function(){function e(t,n,i,o){void 0===o&&(o=g);var r=this;this.idPrefix="list_id_"+ ++e.InstanceCount,this.focus=new p(function(e){return r.getElementId(e)}),this.selection=new h("selected"),this.eventBufferer=new u.EventBufferer,i=i.map(function(e){return e=r.focus.wrapRenderer(e),e=r.selection.wrapRenderer(e)}),this.view=new c.ListView(t,n,i,o),this.view.domNode.setAttribute("role","tree"),
this.view.domNode.tabIndex=0,this.controller=new f(this,this.view),this.disposables=[this.focus,this.selection,this.view,this.controller],this._onDOMFocus=l.domEvent(this.view.domNode,"focus"),this.onFocusChange(this._onFocusChange,this,this.disposables),o.ariaLabel&&this.view.domNode.setAttribute("aria-label",o.ariaLabel)}return Object.defineProperty(e.prototype,"onFocusChange",{get:function(){var e=this;return this.eventBufferer.wrapEvent(u.mapEvent(this.focus.onChange,function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){var e=this;return this.eventBufferer.wrapEvent(u.mapEvent(this.selection.onChange,function(t){return e.toListEvent(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return u.fromCallback(function(t){return e.view.addListener("contextmenu",t)})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDOMFocus",{get:function(){return this._onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=this;void 0===n&&(n=[]),this.eventBufferer.bufferEvents(function(){i.focus.splice(e,t,n.length),i.selection.splice(e,t,n.length),i.view.splice(e,t,n)})},Object.defineProperty(e.prototype,"length",{get:function(){return this.view.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentHeight",{get:function(){return this.view.getContentHeight()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"scrollTop",{get:function(){return this.view.getScrollTop()},set:function(e){this.view.setScrollTop(e)},enumerable:!0,configurable:!0}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){var t=this;this.eventBufferer.bufferEvents(function(){e=e.concat(t.selection.set(e)),e.forEach(function(e){return t.view.splice(e,1,[t.view.element(e)])})})},e.prototype.selectNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]+e:0;this.setSelection(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.selectPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.selection.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=this.length+i%this.length),this.setSelection([Math.max(i,0)])}},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){var t=this;this.eventBufferer.bufferEvents(function(){e=e.concat(t.focus.set(e)),e.forEach(function(e){return t.view.splice(e,1,[t.view.element(e)])})})},e.prototype.focusNext=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]+e:0;this.setFocus(t?[i%this.length]:[Math.min(i,this.length-1)])}},e.prototype.focusPrevious=function(e,t){if(void 0===e&&(e=1),void 0===t&&(t=!1),0!==this.length){var n=this.focus.get(),i=n.length>0?n[0]-e:0;t&&i<0&&(i=(this.length+i%this.length)%this.length),this.setFocus([Math.max(i,0)])}},e.prototype.focusNextPage=function(){var e=this,t=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);t=0===t?0:t-1;var n=this.view.element(t),i=this.getFocusedElements()[0];if(i!==n)this.setFocus([t]);else{var o=this.view.getScrollTop();this.view.setScrollTop(o+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==o&&setTimeout(function(){return e.focusNextPage()},0)}},e.prototype.focusPreviousPage=function(){var e,t=this,n=this.view.getScrollTop();e=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);var i=this.view.element(e),o=this.getFocusedElements()[0];if(o!==i)this.setFocus([e]);else{var r=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==r&&setTimeout(function(){return t.focusPreviousPage()},0)}},e.prototype.getFocus=function(){return this.focus.get()},e.prototype.getFocusedElements=function(){var e=this;return this.getFocus().map(function(t){return e.view.element(t)})},e.prototype.reveal=function(e,t){var n=this.view.getScrollTop(),o=this.view.elementTop(e),r=this.view.elementHeight(e);if(i.isNumber(t)){t=t<0?0:t,t=t>1?1:t;var s=r-this.view.renderHeight;this.view.setScrollTop(s*t+o)}else{var a=o+r,u=n+this.view.renderHeight;o<n?this.view.setScrollTop(o):a>=u&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getElementId=function(e){return this.idPrefix+"_"+e},e.prototype.toListEvent=function(e){var t=this,n=e.indexes;return{indexes:n,elements:n.map(function(e){return t.view.element(e)})}},e.prototype._onFocusChange=function(){var e=this.focus.get();e.length>0?this.view.domNode.setAttribute("aria-activedescendant",this.getElementId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),r.toggleClass(this.view.domNode,"element-focused",e.length>0)},e.prototype.dispose=function(){this.disposables=n.dispose(this.disposables)},e}();v.InstanceCount=0,y([o.memoize],v.prototype,"onFocusChange",null),y([o.memoize],v.prototype,"onSelectionChange",null),y([o.memoize],v.prototype,"onContextMenu",null),t.List=v}),define(d[268],h([0,1,18,24,6,4,11,95,59,9,36,53,181,77,60,40,186,179]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_){"use strict";function y(e){var t=e.getAttribute("last-scroll-time");return t?parseInt(t,10):0}function C(e){try{e.parentElement.removeChild(e)}catch(e){}}function b(e,t){return!e&&!t||!(!e||!t)&&(e.accept===t.accept&&(e.bubble===t.bubble&&e.effect===t.effect))}var w=function(){function e(e){this.context=e,this._cache={"":[]},this.scrollingRow=null}return e.prototype.alloc=function(e){var t=this.cache(e).pop();if(!t){var n=document.createElement("div");n.className="content";var i=document.createElement("div");i.appendChild(n),t={element:i,templateId:e,templateData:this.context.renderer.renderTemplate(this.context.tree,e,n)}}return t},e.prototype.release=function(e,t){var n=y(t.element);if(!n)return C(t.element),void this.cache(e).push(t);if(this.scrollingRow){var i=y(this.scrollingRow.element);if(i>n)return C(t.element),void this.cache(e).push(t);this.scrollingRow.element.parentElement&&(C(this.scrollingRow.element),s.removeClass(this.scrollingRow.element,"scrolling"),this.cache(this.scrollingRow.templateId).push(this.scrollingRow))}this.scrollingRow=t,s.addClass(this.scrollingRow.element,"scrolling")},e.prototype.cache=function(e){return this._cache[e]||(this._cache[e]=[])},e.prototype.garbageCollect=function(){var e=this;this._cache&&Object.keys(this._cache).forEach(function(t){e._cache[t].forEach(function(n){e.context.renderer.disposeTemplate(e.context.tree,t,n.templateData),n.element=null,n.templateData=null}),delete e._cache[t]}),this.scrollingRow&&(this.context.renderer.disposeTemplate(this.context.tree,this.scrollingRow.templateId,this.scrollingRow.templateData),this.scrollingRow=null)},e.prototype.dispose=function(){this.garbageCollect(),this._cache=null,this.context=null},e}();t.RowCache=w;var S=function(){function e(e,t){var n=this;this.context=e,this.model=t,this.id=this.model.id,this.row=null,this.top=0,this.height=t.getHeight(),this._styles={},t.getAllTraits().forEach(function(e){return n._styles[e]=!0}),t.isExpanded()&&this.addClass("expanded")}return Object.defineProperty(e.prototype,"expanded",{set:function(e){e?this.addClass("expanded"):this.removeClass("expanded")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{set:function(e){e?this.addClass("loading"):this.removeClass("loading")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draggable",{get:function(){return this._draggable},set:function(e){this._draggable=e,this.render(!0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dropTarget",{set:function(e){e?this.addClass("drop-target"):this.removeClass("drop-target")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.row&&this.row.element},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"templateId",{get:function(){return this._templateId||(this._templateId=this.context.renderer.getTemplateId&&this.context.renderer.getTemplateId(this.context.tree,this.model.getElement()))},enumerable:!0,configurable:!0}),e.prototype.addClass=function(e){this._styles[e]=!0,this.render(!0)},e.prototype.removeClass=function(e){delete this._styles[e],this.render(!0)},e.prototype.render=function(e){var t=this;if(void 0===e&&(e=!1),this.model&&this.element){var n=["monaco-tree-row"];if(n.push.apply(n,Object.keys(this._styles)),this.model.hasChildren()&&n.push("has-children"),this.element.className=n.join(" "),this.element.draggable=this.draggable,this.element.style.height=this.height+"px",this.element.setAttribute("role","treeitem"),this.model.hasTrait("focused")){var i=l.safeBtoa(this.model.id),o=this.context.accessibilityProvider.getAriaLabel(this.context.tree,this.model.getElement());this.element.setAttribute("aria-selected","true"),this.element.setAttribute("id",i),o?this.element.setAttribute("aria-label",o):this.element.setAttribute("aria-labelledby",i)}else this.element.setAttribute("aria-selected","false"),this.element.removeAttribute("id"),this.element.removeAttribute("aria-label"),this.element.removeAttribute("aria-labelledby");this.model.hasChildren()?this.element.setAttribute("aria-expanded",String(this.model.isExpanded())):this.element.removeAttribute("aria-expanded"),this.element.setAttribute("aria-level",String(this.model.getDepth())),this.context.options.paddingOnRow?this.element.style.paddingLeft=this.context.options.twistiePixels+(this.model.getDepth()-1)*this.context.options.indentPixels+"px":(this.element.style.paddingLeft=(this.model.getDepth()-1)*this.context.options.indentPixels+"px",this.row.element.firstElementChild.style.paddingLeft=this.context.options.twistiePixels+"px");var r=this.context.dnd.getDragURI(this.context.tree,this.model.getElement());r!==this.uri&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),r?(this.uri=r,this.draggable=!0,this.unbindDragStart=s.addDisposableListener(this.element,"dragstart",function(e){t.onDragStart(e)})):this.uri=null),e||this.context.renderer.renderElement(this.context.tree,this.model.getElement(),this.templateId,this.row.templateData)}},e.prototype.insertInDOM=function(e,t){if(this.row||(this.row=this.context.cache.alloc(this.templateId),this.element[L.BINDING]=this),!this.element.parentElement){if(null===t)e.appendChild(this.element);else try{e.insertBefore(this.element,t)}catch(t){console.warn("Failed to locate previous tree element"),e.appendChild(this.element)}this.render()}},e.prototype.removeFromDOM=function(){this.row&&(this.unbindDragStart&&(this.unbindDragStart.dispose(),this.unbindDragStart=null),this.uri=null,this.element[L.BINDING]=null,this.context.cache.release(this.templateId,this.row),this.row=null)},e.prototype.dispose=function(){this.row=null,this.model=null},e}();t.ViewItem=S;var E=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o.row={element:i,templateData:null,templateId:null},o}return m(t,e),t.prototype.render=function(){if(this.model&&this.element){var e=["monaco-tree-wrapper"];e.push.apply(e,Object.keys(this._styles)),this.model.hasChildren()&&e.push("has-children"),this.element.className=e.join(" ")}},t.prototype.insertInDOM=function(e,t){},t.prototype.removeFromDOM=function(){},t}(S),L=function(e){function t(t,n){var o=e.call(this)||this;o.lastClickTimeStamp=0,o.isRefreshing=!1,o.refreshingPreviousChildrenIds={},o.context={dataSource:t.dataSource,renderer:t.renderer,controller:t.controller,dnd:t.dnd,filter:t.filter,sorter:t.sorter,tree:t.tree,accessibilityProvider:t.accessibilityProvider,options:t.options,cache:new w(t)},o.modelListeners=[],o.viewListeners=[],o.dragAndDropListeners=[],o.model=null,o.items={},o.domNode=document.createElement("div"),o.domNode.className="monaco-tree no-focused-item",o.domNode.tabIndex=0,o.domNode.setAttribute("role","tree"),o.context.options.ariaLabel&&o.domNode.setAttribute("aria-label",o.context.options.ariaLabel),o.context.options.alwaysFocused&&s.addClass(o.domNode,"focused"),o.context.options.paddingOnRow||s.addClass(o.domNode,"no-row-padding"),o.wrapper=document.createElement("div"),o.wrapper.className="monaco-tree-wrapper",o.scrollableElement=new f.ScrollableElement(o.wrapper,{canUseTranslate3d:!1,alwaysConsumeMouseWheel:!0,horizontal:g.ScrollbarVisibility.Hidden,vertical:"undefined"!=typeof t.options.verticalScrollMode?t.options.verticalScrollMode:g.ScrollbarVisibility.Auto,useShadows:t.options.useShadows,saveLastScrollTimeOnClassName:"monaco-tree-row"}),o.scrollableElement.onScroll(function(e){o.render(e.scrollTop,e.height),o.emit("scroll",e)}),i.isIE?(o.wrapper.style.msTouchAction="none",o.wrapper.style.msContentZooming="none"):o.wrapperGesture=new u.Gesture(o.wrapper),o.rowsContainer=document.createElement("div"),o.rowsContainer.className="monaco-tree-rows",t.options.showTwistie&&(o.rowsContainer.className+=" show-twisties");var r=s.trackFocus(o.domNode);return r.addFocusListener(function(){return o.onFocus()}),r.addBlurListener(function(){return o.onBlur()}),o.viewListeners.push(r),o.viewListeners.push(s.addDisposableListener(o.domNode,"keydown",function(e){return o.onKeyDown(e)})),o.viewListeners.push(s.addDisposableListener(o.domNode,"keyup",function(e){return o.onKeyUp(e)})),o.viewListeners.push(s.addDisposableListener(o.domNode,"mousedown",function(e){return o.onMouseDown(e)})),o.viewListeners.push(s.addDisposableListener(o.domNode,"mouseup",function(e){return o.onMouseUp(e)})),o.viewListeners.push(s.addDisposableListener(o.wrapper,"click",function(e){return o.onClick(e)})),o.viewListeners.push(s.addDisposableListener(o.domNode,"contextmenu",function(e){return o.onContextMenu(e)})),o.viewListeners.push(s.addDisposableListener(o.wrapper,u.EventType.Tap,function(e){return o.onTap(e)})),o.viewListeners.push(s.addDisposableListener(o.wrapper,u.EventType.Change,function(e){return o.onTouchChange(e)})),i.isIE&&(o.viewListeners.push(s.addDisposableListener(o.wrapper,"MSPointerDown",function(e){return o.onMsPointerDown(e)})),o.viewListeners.push(s.addDisposableListener(o.wrapper,"MSGestureTap",function(e){return o.onMsGestureTap(e)})),o.viewListeners.push(s.addDisposableThrottledListener(o.wrapper,"MSGestureChange",function(e){return o.onThrottledMsGestureChange(e)},function(e,t){t.stopPropagation(),t.preventDefault();var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}))),o.viewListeners.push(s.addDisposableListener(window,"dragover",function(e){return o.onDragOver(e)})),o.viewListeners.push(s.addDisposableListener(window,"drop",function(e){return o.onDrop(e)})),o.viewListeners.push(s.addDisposableListener(window,"dragend",function(e){return o.onDragEnd(e)})),o.viewListeners.push(s.addDisposableListener(window,"dragleave",function(e){return o.onDragOver(e)})),o.wrapper.appendChild(o.rowsContainer),o.domNode.appendChild(o.scrollableElement.getDomNode()),n.appendChild(o.domNode),o.lastRenderTop=0,o.lastRenderHeight=0,o.didJustPressContextMenuKey=!1,o.currentDropTarget=null,o.currentDropTargets=[],o.shouldInvalidateDropReaction=!1,o.dragAndDropScrollInterval=null,o.dragAndDropScrollTimeout=null,o.onHiddenScrollTop=null,o.onRowsChanged(),o.layout(),o.setupMSGesture(),o}return m(t,e),t.prototype.createViewItem=function(e){return new S(this.context,e)},t.prototype.getHTMLElement=function(){return this.domNode},t.prototype.focus=function(){this.domNode.focus()},t.prototype.isFocused=function(){return document.activeElement===this.domNode},t.prototype.blur=function(){this.domNode.blur()},t.prototype.onVisible=function(){this.scrollTop=this.onHiddenScrollTop,this.onHiddenScrollTop=null,this.setupMSGesture()},t.prototype.setupMSGesture=function(){var e=this;window.MSGesture&&(this.msGesture=new MSGesture,setTimeout(function(){return e.msGesture.target=e.wrapper},100))},t.prototype.onHidden=function(){this.onHiddenScrollTop=this.scrollTop},t.prototype.isTreeVisible=function(){return null===this.onHiddenScrollTop},t.prototype.layout=function(e){this.isTreeVisible()&&(this.viewHeight=e||s.getContentHeight(this.wrapper))},t.prototype.render=function(e,t){var n,i,o=e,r=e+t,s=this.lastRenderTop+this.lastRenderHeight;for(n=this.indexAfter(r)-1,i=this.indexAt(Math.max(s,o));n>=i;n--)this.insertItemInDOM(this.itemAtIndex(n));for(n=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(r))-1,i=this.indexAt(o);n>=i;n--)this.insertItemInDOM(this.itemAtIndex(n));for(n=this.indexAt(this.lastRenderTop),i=Math.min(this.indexAt(o),this.indexAfter(s));n<i;n++)this.removeItemFromDOM(this.itemAtIndex(n));for(n=Math.max(this.indexAfter(r),this.indexAt(this.lastRenderTop)),i=this.indexAfter(s);n<i;n++)this.removeItemFromDOM(this.itemAtIndex(n));var a=this.itemAtIndex(this.indexAt(o));a&&(this.rowsContainer.style.top=a.top-o+"px"),this.lastRenderTop=o,this.lastRenderHeight=r-o},t.prototype.setModel=function(e){var t=this;this.releaseModel(),this.model=e,this.modelListeners.push(this.model.addBulkListener2(function(e){return t.onModelEvents(e)}))},t.prototype.onModelEvents=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n],r=o.getData();switch(o.getType()){case"refreshing":this.onRefreshing();break;case"refreshed":this.onRefreshed();break;case"clearingInput":this.onClearingInput(r);break;case"setInput":this.onSetInput(r);break;case"item:childrenRefreshing":this.onItemChildrenRefreshing(r);break;case"item:childrenRefreshed":this.onItemChildrenRefreshed(r);break;case"item:refresh":t.push(r.item);break;case"item:expanding":this.onItemExpanding(r);break;case"item:expanded":this.onItemExpanded(r);break;case"item:collapsing":this.onItemCollapsing(r);break;case"item:reveal":this.onItemReveal(r);break;case"item:addTrait":this.onItemAddTrait(r);break;case"item:removeTrait":this.onItemRemoveTrait(r);break;case"focus":this.onModelFocusChange()}}t.length>0&&this.onItemsRefresh(t)},t.prototype.onRefreshing=function(){this.isRefreshing=!0},t.prototype.onRefreshed=function(){this.isRefreshing=!1,this.onRowsChanged()},t.prototype.onRowsChanged=function(e){void 0===e&&(e=this.scrollTop),this.isRefreshing||(this.scrollTop=e)},t.prototype.focusNextPage=function(e){var t=this,n=this.indexAt(this.scrollTop+this.viewHeight);n=0===n?0:n-1;var i=this.itemAtIndex(n).model.getElement(),o=this.model.getFocus();if(o!==i)this.model.setFocus(i,e);else{var r=this.scrollTop;this.scrollTop+=this.viewHeight,this.scrollTop!==r&&setTimeout(function(){t.focusNextPage(e)},0)}},t.prototype.focusPreviousPage=function(e){var t,n=this;t=0===this.scrollTop?this.indexAt(this.scrollTop):this.indexAfter(this.scrollTop-1);var i=this.itemAtIndex(t).model.getElement(),o=this.model.getFocus();if(o!==i)this.model.setFocus(i,e);else{var r=this.scrollTop;this.scrollTop-=this.viewHeight,this.scrollTop!==r&&setTimeout(function(){n.focusPreviousPage(e)},0)}},Object.defineProperty(t.prototype,"viewHeight",{get:function(){return this.scrollableElement.getHeight()},set:function(e){this.scrollableElement.updateState({height:e,scrollHeight:this.getTotalHeight()})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scrollTop",{get:function(){return this.scrollableElement.getScrollTop()},set:function(e){this.scrollableElement.updateState({scrollTop:e,scrollHeight:this.getTotalHeight()})},enumerable:!0,configurable:!0}),t.prototype.getScrollPosition=function(){var e=this.getTotalHeight()-this.viewHeight;return e<=0?0:this.scrollTop/e},t.prototype.setScrollPosition=function(e){var t=this.getTotalHeight()-this.viewHeight;this.scrollTop=t*e},t.prototype.onClearingInput=function(e){var t=e.item;t&&(this.onRemoveItems(new p.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.onSetInput=function(e){this.context.cache.garbageCollect(),this.inputItem=new E(this.context,e.item,this.wrapper),this.emit("viewItem:create",{item:this.inputItem.model})},t.prototype.onItemChildrenRefreshing=function(e){var n=e.item,i=this.items[n.id];if(i&&(i.loadingPromise=o.TPromise.timeout(t.LOADING_DECORATION_DELAY).then(function(){i.loadingPromise=null,i.loading=!0})),!e.isNested){for(var r,s=[],a=n.getNavigator();r=a.next();)s.push(r.id);this.refreshingPreviousChildrenIds[n.id]=s}},t.prototype.onItemChildrenRefreshed=function(e){var t=this,n=e.item,i=this.items[n.id];if(i&&(i.loadingPromise&&(i.loadingPromise.cancel(),i.loadingPromise=null),i.loading=!1),!e.isNested){for(var o,r=this.refreshingPreviousChildrenIds[n.id],s=[],u=n.getNavigator();o=u.next();)s.push(o);var l=Math.abs(r.length-s.length)>1e3,c=void 0,d=void 0;if(!l){var h=new a.LcsDiff({getLength:function(){return r.length},getElementHash:function(e){return r[e]}},{getLength:function(){return s.length},getElementHash:function(e){return s[e].id}},null);c=h.ComputeDiff(),d=c.some(function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n<i;n++)if(t.items.hasOwnProperty(s[n].id))return!0;return!1})}if(!l&&!d&&c.length<50)for(var f=0,g=c.length;f<g;f++){var m=c[f];if(m.originalLength>0&&this.onRemoveItems(new p.ArrayIterator(r,m.originalStart,m.originalStart+m.originalLength)),m.modifiedLength>0){var v=s[m.modifiedStart-1]||n;v=v.getDepth()>0?v:null,this.onInsertItems(new p.ArrayIterator(s,m.modifiedStart,m.modifiedStart+m.modifiedLength),v?v.id:null)}}else(l||c.length)&&(this.onRemoveItems(new p.ArrayIterator(r)),this.onInsertItems(new p.ArrayIterator(s)));(l||c.length)&&this.onRowsChanged()}},t.prototype.onItemsRefresh=function(e){var t=this;this.onRefreshItemSet(e.filter(function(e){return t.items.hasOwnProperty(e.id)})),this.onRowsChanged()},t.prototype.onItemExpanding=function(e){var t=this.items[e.item.id];t&&(t.expanded=!0)},t.prototype.onItemExpanded=function(e){var t=e.item,n=this.items[t.id];if(n){n.expanded=!0;var i=this.onInsertItems(t.getNavigator(),t.id),o=this.scrollTop;n.top+n.height<=this.scrollTop&&(o+=i),this.onRowsChanged(o)}},t.prototype.onItemCollapsing=function(e){var t=e.item,n=this.items[t.id];n&&(n.expanded=!1,this.onRemoveItems(new p.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.getRelativeTop=function(e){if(e&&e.isVisible()){var t=this.items[e.id];if(t)return(t.top-this.scrollTop)/(this.viewHeight-t.height)}return-1},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=n<0?0:n,n=n>1?1:n;var o=i.height-this.viewHeight;this.scrollTop=o*n+i.top}else{var r=i.top+i.height,s=this.scrollTop+this.viewHeight;i.top<this.scrollTop?this.scrollTop=i.top:r>=s&&(this.scrollTop=r-this.viewHeight)}},t.prototype.onItemAddTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.addClass(n),"highlighted"===n&&(s.addClass(this.domNode,n),i&&(this.highlightedItemWasDraggable=!!i.draggable,i.draggable&&(i.draggable=!1)))},t.prototype.onItemRemoveTrait=function(e){var t=e.item,n=e.trait,i=this.items[t.id];i&&i.removeClass(n),"highlighted"===n&&(s.removeClass(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();s.toggleClass(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",l.safeBtoa(this.context.dataSource.getId(this.context.tree,e))):this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onInsertItem=function(e){var t=this;e.onDragStart=function(n){t.onDragStart(e,n)},e.needsRender=!0,this.refreshViewItem(e),this.items[e.id]=e},t.prototype.onRefreshItem=function(e,t){void 0===t&&(t=!1),e.needsRender=e.needsRender||t,this.refreshViewItem(e)},t.prototype.onRemoveItem=function(e){this.removeItemFromDOM(e),e.dispose(),this.emit("viewItem:dispose",{item:this.inputItem.model}),delete this.items[e.id]},t.prototype.refreshViewItem=function(e){e.render(),this.shouldBeRendered(e)?this.insertItemInDOM(e):this.removeItemFromDOM(e)},t.prototype.onClick=function(e){if(!this.lastPointerType||"mouse"===this.lastPointerType){var t=new c.StandardMouseEvent(e),n=this.getItemAround(t.target);n&&(i.isIE&&Date.now()-this.lastClickTimeStamp<300&&(t.detail=2),this.lastClickTimeStamp=Date.now(),this.context.controller.onClick(this.context.tree,n.model.getElement(),t))}},t.prototype.onMouseDown=function(e){if(this.didJustPressContextMenuKey=!1,this.context.controller.onMouseDown&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new c.StandardMouseEvent(e);if(!(t.ctrlKey&&n.isNative&&n.isMacintosh)){var i=this.getItemAround(t.target);i&&this.context.controller.onMouseDown(this.context.tree,i.model.getElement(),t)}}},t.prototype.onMouseUp=function(e){if(this.context.controller.onMouseUp&&(!this.lastPointerType||"mouse"===this.lastPointerType)){var t=new c.StandardMouseEvent(e);if(!(t.ctrlKey&&n.isNative&&n.isMacintosh)){var i=this.getItemAround(t.target);i&&this.context.controller.onMouseUp(this.context.tree,i.model.getElement(),t)}}},t.prototype.onTap=function(e){var t=this.getItemAround(e.initialTarget);t&&this.context.controller.onTap(this.context.tree,t.model.getElement(),e)},t.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},t.prototype.onContextMenu=function(e){var t,n;if(e instanceof KeyboardEvent||this.didJustPressContextMenuKey){this.didJustPressContextMenuKey=!1;var i=new d.StandardKeyboardEvent(e);if(n=this.model.getFocus(),!n)return;var o=this.context.dataSource.getId(this.context.tree,n),r=this.items[o],a=s.getDomNodePagePosition(r.element);t=new _.KeyboardContextMenuEvent(a.left+a.width,a.top,i)}else{var u=new c.StandardMouseEvent(e),l=this.getItemAround(u.target);if(!l)return;n=l.model.getElement(),t=new _.MouseContextMenuEvent(u)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new d.StandardKeyboardEvent(e);this.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode,this.didJustPressContextMenuKey&&(t.preventDefault(),t.stopPropagation()),t.target&&t.target.tagName&&"input"===t.target.tagName.toLowerCase()||this.context.controller.onKeyDown(this.context.tree,t)},t.prototype.onKeyUp=function(e){this.didJustPressContextMenuKey&&this.onContextMenu(e),this.didJustPressContextMenuKey=!1,this.context.controller.onKeyUp(this.context.tree,new d.StandardKeyboardEvent(e))},t.prototype.onDragStart=function(e,n){if(!this.model.getHighlight()){var i,o=e.model.getElement(),r=this.model.getSelection();if(i=r.indexOf(o)>-1?r:[o],n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setData("URL",e.uri),n.dataTransfer.setDragImage){var s=void 0;s=this.context.dnd.getDragLabel?this.context.dnd.getDragLabel(this.context.tree,i):String(i.length);var a=document.createElement("div");a.className="monaco-tree-drag-image",a.textContent=s,document.body.appendChild(a),n.dataTransfer.setDragImage(a,-10,-10),setTimeout(function(){return document.body.removeChild(a)},0)}this.currentDragAndDropData=new h.ElementsDragAndDropData(i),t.currentExternalDragAndDropData=new h.ExternalElementsDragAndDropData(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new c.DragMouseEvent(n))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=s.getTopLeftOffset(this.wrapper).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.viewHeight-35;n<35?i=Math.max(-14,.2*(n-35)):n>o&&(i=Math.min(14,.2*(n-o))),e.scrollTop+=i}},10),this.cancelDragAndDropScrollTimeout(),this.dragAndDropScrollTimeout=window.setTimeout(function(){e.cancelDragAndDropScrollInterval(),e.dragAndDropScrollTimeout=null},1e3))},t.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()},t.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},t.prototype.onDragOver=function(e){var n=this,i=new c.DragMouseEvent(e),r=this.getItemAround(i.target);if(!r)return this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.cancelDragAndDropScrollInterval(),this.currentDropTarget=null,this.currentDropElement=null,this.dragAndDropMouseY=null,!1;if(this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=i.posy,!this.currentDragAndDropData)if(t.currentExternalDragAndDropData)this.currentDragAndDropData=t.currentExternalDragAndDropData;else{if(!i.dataTransfer.types)return!1;this.currentDragAndDropData=new h.DesktopDragAndDropData}this.currentDragAndDropData.update(i);var s,a,u=r.model;do{if(s=u?u.getElement():this.model.getInput(),a=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,s,i),!a||a.bubble!==_.DragOverBubble.BUBBLE_UP)break;u=u&&u.parent}while(u);if(!u)return this.currentDropElement=null,!1;var l=a&&a.accept;l?(this.currentDropElement=u.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=a.effect===_.DragOverEffect.COPY?"copy":"move"):this.currentDropElement=null;var d=u.id===this.inputItem.id?this.inputItem:this.items[u.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==d||!b(this.currentDropElementReaction,a))&&(this.shouldInvalidateDropReaction=!1,this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[],this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null)),this.currentDropTarget=d,this.currentDropElementReaction=a,l)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),a.bubble===_.DragOverBubble.BUBBLE_DOWN)for(var p,f=u.getNavigator();p=f.next();)r=this.items[p.id],r&&(r.dropTarget=!0,this.currentDropTargets.push(r));a.autoExpand&&(this.currentDropPromise=o.TPromise.timeout(500).then(function(){return n.context.tree.expand(n.currentDropElement)}).then(function(){return n.shouldInvalidateDropReaction=!0}))}return!0},t.prototype.onDrop=function(e){if(this.currentDropElement){var t=new c.DragMouseEvent(e);t.preventDefault(),this.currentDragAndDropData.update(t),this.context.dnd.drop(this.context.tree,this.currentDragAndDropData,this.currentDropElement,t),this.onDragEnd(e)}this.cancelDragAndDropScrollInterval()},t.prototype.onDragEnd=function(e){this.currentDropTarget&&(this.currentDropTargets.forEach(function(e){return e.dropTarget=!1}),this.currentDropTargets=[]),this.currentDropPromise&&(this.currentDropPromise.cancel(),this.currentDropPromise=null),this.cancelDragAndDropScrollInterval(),this.currentDragAndDropData=null,t.currentExternalDragAndDropData=null,this.currentDropElement=null,this.currentDropTarget=null,this.dragAndDropMouseY=null},t.prototype.onFocus=function(){this.context.options.alwaysFocused||s.addClass(this.domNode,"focused")},t.prototype.onBlur=function(){this.context.options.alwaysFocused||s.removeClass(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant")},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType;return t===(e.MSPOINTER_TYPE_MOUSE||"mouse")?void(this.lastPointerType="mouse"):void(t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)))}},t.prototype.onThrottledMsGestureChange=function(e){this.scrollTop-=e.translationY},t.prototype.onMsGestureTap=function(e){e.initialTarget=document.elementFromPoint(e.clientX,e.clientY),this.onTap(e)},t.prototype.insertItemInDOM=function(e){var t=null,n=this.itemAfter(e);
n&&n.element&&(t=n.element),e.insertInDOM(this.rowsContainer,t)},t.prototype.removeItemFromDOM=function(e){e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.top<this.lastRenderTop+this.lastRenderHeight&&e.top+e.height>this.lastRenderTop},t.prototype.getItemAround=function(e){var n=this.inputItem;do{if(e[t.BINDING]&&(n=e[t.BINDING]),e===this.wrapper||e===this.domNode)return n;if(e===document.body)return null}while(e=e.parentElement)},t.prototype.releaseModel=function(){this.model&&(this.modelListeners=r.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=r.dispose(this.viewListeners),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.wrapperGesture&&(this.wrapperGesture.dispose(),this.wrapperGesture=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t}(v.HeightMap);L.BINDING="monaco-tree-row",L.LOADING_DECORATION_DELAY=800,L.currentExternalDragAndDropData=null,t.TreeView=L}),define(d[269],h([5]),{}),define(d[274],h([0,1,4,12,37,11,26,269]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n){var o=e.call(this)||this;return o.selectElement=document.createElement("select"),o.selectElement.className="select-box",o.setOptions(t,n),o.toDispose=[],o._onDidSelect=new i.Emitter,o.toDispose.push(r.addStandardDisposableListener(o.selectElement,"change",function(e){o.selectElement.title=e.target.value,o._onDidSelect.fire(e.target.value)})),o}return m(t,e),Object.defineProperty(t.prototype,"onDidSelect",{get:function(){return this._onDidSelect.event},enumerable:!0,configurable:!0}),t.prototype.setOptions=function(e,t,n){var i=this;if(!this.options||!s.equals(this.options,e)){this.options=e,this.selectElement.options.length=0;var o=0;this.options.forEach(function(e){i.selectElement.add(i.createOption(e,n===o++))})}this.select(t)},t.prototype.select=function(e){e>=0&&e<this.options.length?this.selected=e:this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selectElement.title=this.options[this.selected]},t.prototype.focus=function(){this.selectElement&&this.selectElement.focus()},t.prototype.blur=function(){this.selectElement&&this.selectElement.blur()},t.prototype.render=function(e){this.container=e,r.addClass(e,"select-container"),e.appendChild(this.selectElement),this.setOptions(this.options,this.selected)},t.prototype.createOption=function(e,t){var n=document.createElement("option");return n.value=e,n.text=e,n.disabled=t,n},t.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose),e.prototype.dispose.call(this)},t}(o.Widget);t.SelectBox=a}),define(d[275],h([5]),{}),define(d[327],h([5]),{}),define(d[328],h([5]),{}),define(d[329],h([5]),{}),define(d[330],h([5]),{}),define(d[331],h([5]),{}),define(d[332],h([5]),{}),define(d[333],h([5]),{}),define(d[335],h([5]),{}),define(d[337],h([5]),{}),define(d[338],h([5]),{}),define(d[339],h([5]),{}),define(d[340],h([5]),{}),define(d[343],h([5]),{}),define(d[347],h([5]),{}),define(d[348],h([5]),{}),define(d[351],h([5]),{}),define(d[352],h([5]),{}),define(d[354],h([5]),{}),define(d[355],h([5]),{}),define(d[362],h([5]),{}),define(d[364],h([5]),{}),define(d[365],h([5]),{}),define(d[368],h([5]),{}),define(d[370],h([5]),{}),define(d[372],h([5]),{}),define(d[373],h([5]),{}),define(d[374],h([5]),{}),define(d[375],h([5]),{}),define(d[378],h([5]),{}),define(d[386],h([5]),{}),define(d[402],h([5]),{}),define(d[406],h([5]),{}),define(d[407],h([5]),{}),define(d[409],h([5]),{}),define(d[413],h([5]),{}),define(d[414],h([5]),{}),define(d[417],h([5]),{}),define(d[418],h([5]),{}),define(d[420],h([5]),{}),define(d[422],h([5]),{}),define(d[423],h([5]),{}),define(d[424],h([5]),{}),define(d[425],h([5]),{}),define(d[429],h([5]),{}),define(d[430],h([0,1]),function(e,t){"use strict";function n(e,t){var n=new r(e,t);n.read()}var i;!function(e){e[e.Regular=0]="Regular",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold"}(i=t.CharWidthRequestType||(t.CharWidthRequestType={}));var o=function(){function e(e,t){this.chr=e,this.type=t,this.width=0}return e.prototype.fulfill=function(e){this.width=e},e}();t.CharWidthRequest=o;var r=function(){function e(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}return e.prototype.read=function(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null},e.prototype._createDomElements=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";var n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.fontFamily,n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.appendChild(n);var i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.fontFamily,i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.appendChild(i);var o=document.createElement("div");o.style.fontFamily=this._bareFontInfo.fontFamily,o.style.fontWeight=this._bareFontInfo.fontWeight,o.style.fontSize=this._bareFontInfo.fontSize+"px",o.style.lineHeight=this._bareFontInfo.lineHeight+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests.length;s<a;s++){var u=this._requests[s],l=void 0;0===u.type&&(l=n),2===u.type&&(l=i),1===u.type&&(l=o),l.appendChild(document.createElement("br"));var c=document.createElement("span");e._render(c,u),l.appendChild(c),r[s]=c}this._container=t,this._testElements=r},e._render=function(e,t){if(" "===t.chr){for(var n="&nbsp;",i=0;i<8;i++)n+=n;e.innerHTML=n}else{for(var o=t.chr,i=0;i<8;i++)o+=o;e.textContent=o}},e.prototype._readFromDomElements=function(){for(var e=0,t=this._requests.length;e<t;e++){var n=this._requests[e],i=this._testElements[e];n.fulfill(i.offsetWidth/256)}},e}();t.readCharWidths=n}),define(d[431],h([0,1,4]),function(e,t,n){"use strict";var i=function(e){function t(t,n){var i=e.call(this)||this;return i.referenceDomElement=t,i.changeCallback=n,i.measureReferenceDomElementToken=-1,i.width=-1,i.height=-1,i.measureReferenceDomElement(!1),i}return m(t,e),t.prototype.dispose=function(){this.stopObserving(),e.prototype.dispose.call(this)},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.startObserving=function(){var e=this;this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(function(){return e.measureReferenceDomElement(!0)},100))},t.prototype.stopObserving=function(){this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)},t.prototype.observe=function(e){this.measureReferenceDomElement(!0,e)},t.prototype.measureReferenceDomElement=function(e,t){var n=0,i=0;t?(n=t.width,i=t.height):this.referenceDomElement&&(n=this.referenceDomElement.clientWidth,i=this.referenceDomElement.clientHeight),n=Math.max(5,n),i=Math.max(5,i),this.width===n&&this.height===i||(this.width=n,this.height=i,e&&this.changeCallback())},t}(n.Disposable);t.ElementSizeObserver=i}),define(d[432],h([0,1,12,4,24,11]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e){this._event=e}return e.prototype.canUseTextData=function(){return!!this._event.clipboardData||!!window.clipboardData},e.prototype.setTextData=function(e){if(this._event.clipboardData)return this._event.clipboardData.setData("text/plain",e),void this._event.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",e),void this._event.preventDefault();throw new Error("ClipboardEventWrapper.setTextData: Cannot use text data!")},e.prototype.getTextData=function(){if(this._event.clipboardData)return this._event.preventDefault(),this._event.clipboardData.getData("text/plain");if(window.clipboardData)return this._event.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventWrapper.getTextData: Cannot use text data!")},e}(),a=function(){function e(e){this._actual=e}return e.prototype.equals=function(e){return this._actual.equals(e)},e.prototype.preventDefault=function(){this._actual.preventDefault()},e.prototype.isDefaultPrevented=function(){return!!this._actual.browserEvent&&this._actual.browserEvent.defaultPrevented},e}(),u=function(e){function t(t){var i=e.call(this)||this;return i._onKeyDown=i._register(new n.Emitter),i.onKeyDown=i._onKeyDown.event,i._onKeyUp=i._register(new n.Emitter),i.onKeyUp=i._onKeyUp.event,i._onKeyPress=i._register(new n.Emitter),i.onKeyPress=i._onKeyPress.event,i._onCompositionStart=i._register(new n.Emitter),i.onCompositionStart=i._onCompositionStart.event,i._onCompositionUpdate=i._register(new n.Emitter),i.onCompositionUpdate=i._onCompositionUpdate.event,i._onCompositionEnd=i._register(new n.Emitter),i.onCompositionEnd=i._onCompositionEnd.event,i._onInput=i._register(new n.Emitter),i.onInput=i._onInput.event,i._onCut=i._register(new n.Emitter),i.onCut=i._onCut.event,i._onCopy=i._register(new n.Emitter),i.onCopy=i._onCopy.event,i._onPaste=i._register(new n.Emitter),i.onPaste=i._onPaste.event,i._textArea=t,i._register(r.addStandardDisposableListener(i._textArea,"keydown",function(e){return i._onKeyDown.fire(new a(e))})),i._register(r.addStandardDisposableListener(i._textArea,"keyup",function(e){return i._onKeyUp.fire(new a(e))})),i._register(r.addStandardDisposableListener(i._textArea,"keypress",function(e){return i._onKeyPress.fire(new a(e))})),i._register(r.addDisposableListener(i._textArea,"compositionstart",function(e){return i._onCompositionStart.fire(e)})),i._register(r.addDisposableListener(i._textArea,"compositionupdate",function(e){return i._onCompositionUpdate.fire(e)})),i._register(r.addDisposableListener(i._textArea,"compositionend",function(e){return i._onCompositionEnd.fire(e)})),i._register(r.addDisposableListener(i._textArea,"input",function(e){return i._onInput.fire()})),i._register(r.addDisposableListener(i._textArea,"cut",function(e){return i._onCut.fire(new s(e))})),i._register(r.addDisposableListener(i._textArea,"copy",function(e){return i._onCopy.fire(new s(e))})),i._register(r.addDisposableListener(i._textArea,"paste",function(e){return i._onPaste.fire(new s(e))})),i}return m(t,e),Object.defineProperty(t.prototype,"actual",{get:function(){return this._textArea},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this._textArea.value},t.prototype.setValue=function(e,t){this._textArea.value=t},t.prototype.getSelectionStart=function(){return this._textArea.selectionStart},t.prototype.getSelectionEnd=function(){return this._textArea.selectionEnd},t.prototype.setSelectionRange=function(e,t){var n=document.activeElement;n===this._textArea?this._textArea.setSelectionRange(e,t):this._setSelectionRangeJumpy(e,t)},t.prototype._setSelectionRangeJumpy=function(e,t){try{var n=r.saveParentsScrollTop(this._textArea);this._textArea.focus(),this._textArea.setSelectionRange(e,t),r.restoreParentsScrollTop(this._textArea,n)}catch(e){console.log("an error has been thrown!")}},t.prototype.isInOverwriteMode=function(){return!(!o.isIE||!document.queryCommandValue("OverWrite"))},t}(i.Disposable);t.TextAreaWrapper=u}),define(d[21],h([0,1]),function(e,t){"use strict";t.ClassNames={TEXTAREA_COVER:"textAreaCover",TEXTAREA:"inputarea",LINES_CONTENT:"lines-content",OVERFLOW_GUARD:"overflow-guard",VIEW_LINES:"view-lines",VIEW_LINE:"view-line",SCROLLABLE_ELEMENT:"editor-scrollable",CONTENT_WIDGETS:"contentWidgets",OVERFLOWING_CONTENT_WIDGETS:"overflowingContentWidgets",OVERLAY_WIDGETS:"overlayWidgets",MARGIN_VIEW_OVERLAYS:"margin-view-overlays",MARGIN:"margin",LINE_NUMBERS:"line-numbers",GLYPH_MARGIN:"glyph-margin",SCROLL_DECORATION:"scroll-decoration",VIEW_CURSORS_LAYER:"cursors-layer",VIEW_ZONES:"view-zones"};var n;!function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(n=t.ContentWidgetPositionPreference||(t.ContentWidgetPositionPreference={}));var i;!function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(i=t.OverlayWidgetPositionPreference||(t.OverlayWidgetPositionPreference={}))}),define(d[105],h([0,1,4,36,11,103]),function(e,t,n,i,o,r){"use strict";function s(e){var t=o.getDomNodePagePosition(e);return new l(t.left,t.top,t.width,t.height)}var a=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new u(this.x-o.StandardWindow.scrollX,this.y-o.StandardWindow.scrollY)},e}();t.PageCoordinates=a;var u=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new a(this.clientX+o.StandardWindow.scrollX,this.clientY+o.StandardWindow.scrollY)},e}();t.ClientCoordinates=u;var l=function(){function e(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}return e}();t.EditorPagePosition=l,t.createEditorPagePosition=s;var c=function(e){function t(t,n){var i=e.call(this,t)||this;return i.pos=new a(i.posx,i.posy),i.editorPos=s(n),i}return m(t,e),t}(i.StandardMouseEvent);t.EditorMouseEvent=c;var d=function(){function e(e){this._editorViewDomNode=e}return e.prototype._create=function(e){return new c(e,this._editorViewDomNode)},e.prototype.onContextMenu=function(e,t){var n=this;return o.addDisposableListener(e,"contextmenu",function(e){t(n._create(e))})},e.prototype.onMouseUp=function(e,t){var n=this;return o.addDisposableListener(e,"mouseup",function(e){t(n._create(e))})},e.prototype.onMouseDown=function(e,t){var n=this;return o.addDisposableListener(e,"mousedown",function(e){t(n._create(e))})},e.prototype.onMouseLeave=function(e,t){var n=this;return o.addDisposableNonBubblingMouseOutListener(e,function(e){t(n._create(e))})},e.prototype.onMouseMoveThrottled=function(e,t,n,i){var r=this,s=function(e,t){return n(e,r._create(t))};return o.addDisposableThrottledListener(e,"mousemove",t,s,i)},e}();t.EditorMouseEventFactory=d;var h=function(e){function t(t){var n=e.call(this)||this;return n._editorViewDomNode=t,n._globalMouseMoveMonitor=n._register(new r.GlobalMouseMoveMonitor),n}return m(t,e),t.prototype.startMonitoring=function(e,t,n){var i=this,o=function(t,n){return e(t,new c(n,i._editorViewDomNode))};this._globalMouseMoveMonitor.startMonitoring(o,t,n)},t}(n.Disposable);t.GlobalEditorMouseMoveMonitor=h}),define(d[443],h([0,1,25]),function(e,t,n){"use strict";var i=function(){function e(e){this._eventHandlerGateKeeper=e,this._eventHandlers=[],this._eventQueue=null,this._isConsumingQueue=!1}return e.prototype.addEventHandler=function(e){for(var t=0,n=this._eventHandlers.length;t<n;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)},e.prototype.removeEventHandler=function(e){for(var t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}},e.prototype.emit=function(e,t){var i=new n.EmitterEvent(e,t);this._eventQueue?this._eventQueue.push(i):this._eventQueue=[i],this._isConsumingQueue||this.consumeQueue()},e.prototype.emitMany=function(e){this._eventQueue?this._eventQueue=this._eventQueue.concat(e):this._eventQueue=e,this._isConsumingQueue||this.consumeQueue()},e.prototype.consumeQueue=function(){var e=this;this._eventHandlerGateKeeper(function(){try{e._isConsumingQueue=!0,e._doConsumeQueue()}finally{e._isConsumingQueue=!1}})},e.prototype._doConsumeQueue=function(){for(;this._eventQueue;){var e=this._eventQueue;this._eventQueue=null;for(var t=this._eventHandlers.slice(0),n=0,i=t.length;n<i;n++)t[n].handleEvents(e)}},e}();t.ViewEventDispatcher=i}),define(d[108],h([0,1,12]),function(e,t,n){"use strict";t.EditorZoom=new(function(){function e(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.setZoomLevel=function(e){e=Math.min(Math.max(-9,e),9),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))},e}())}),define(d[15],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t){this.lineNumber=e,this.column=t}return e.prototype.equals=function(t){return e.equals(this,t)},e.equals=function(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column},e.prototype.isBefore=function(t){return e.isBefore(this,t)},e.isBefore=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column},e.prototype.isBeforeOrEqual=function(t){return e.isBeforeOrEqual(this,t)},e.isBeforeOrEqual=function(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column},e.compare=function(e,t){var n=0|e.lineNumber,i=0|t.lineNumber;if(n===i){var o=0|e.column,r=0|t.column;return o-r}return n-i},e.prototype.clone=function(){return new e(this.lineNumber,this.column)},e.prototype.toString=function(){return"("+this.lineNumber+","+this.column+")"},e.lift=function(t){return new e(t.lineNumber,t.column)},e.isIPosition=function(e){return e&&"number"==typeof e.lineNumber&&"number"==typeof e.column},e}();t.Position=n}),define(d[3],h([0,1,15]),function(e,t,n){"use strict";var i=function(){function e(e,t,n,i){e>n||e===n&&t>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=n,this.endColumn=i)}return e.prototype.isEmpty=function(){return e.isEmpty(this)},e.isEmpty=function(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn},e.prototype.containsPosition=function(t){return e.containsPosition(this,t)},e.containsPosition=function(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumber<t.startLineNumber?(i=n.startLineNumber,o=n.startColumn):n.startLineNumber===t.startLineNumber?(i=n.startLineNumber,o=Math.min(n.startColumn,t.startColumn)):(i=t.startLineNumber,o=t.startColumn),n.endLineNumber>t.endLineNumber?(r=n.endLineNumber,s=n.endColumn):n.endLineNumber===t.endLineNumber?(r=n.endLineNumber,s=Math.max(n.endColumn,t.endColumn)):(r=t.endLineNumber,s=t.endColumn),new e(i,o,r,s)},e.prototype.intersectRanges=function(t){return e.intersectRanges(this,t)},e.intersectRanges=function(t,n){var i=t.startLineNumber,o=t.startColumn,r=t.endLineNumber,s=t.endColumn,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;return i<a?(i=a,o=u):i===a&&(o=Math.max(o,u)),r>l?(r=l,s=c):r===l&&(s=Math.min(s,c)),i>r?null:i===r&&o>s?null:new e(i,o,r,s)},e.prototype.equalsRange=function(t){return e.equalsRange(this,t)},e.equalsRange=function(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn},e.prototype.getEndPosition=function(){return new n.Position(this.endLineNumber,this.endColumn)},e.prototype.getStartPosition=function(){return new n.Position(this.startLineNumber,this.startColumn)},e.prototype.cloneRange=function(){return new e(this.startLineNumber,this.startColumn,this.endLineNumber,this.endColumn)},e.prototype.toString=function(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"},e.prototype.setEndPosition=function(t,n){return new e(this.startLineNumber,this.startColumn,t,n)},e.prototype.setStartPosition=function(t,n){return new e(t,n,this.endLineNumber,this.endColumn)},e.prototype.collapseToStart=function(){return e.collapseToStart(this)},e.collapseToStart=function(t){return new e(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)},e.lift=function(t){return t?new e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null},e.isIRange=function(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn},e.areIntersectingOrTouching=function(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)},e.compareRangesUsingStarts=function(e,t){var n=0|e.startLineNumber,i=0|t.startLineNumber;if(n===i){var o=0|e.startColumn,r=0|t.startColumn;if(o===r){var s=0|e.endLineNumber,a=0|t.endLineNumber;if(s===a){var u=0|e.endColumn,l=0|t.endColumn;return u-l}return s-a}return o-r}return n-i},e.compareRangesUsingEnds=function(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber},e.spansMultipleLines=function(e){return e.endLineNumber>e.startLineNumber},e}();t.Range=i}),define(d[46],h([0,1,3]),function(e,t,n){"use strict";var i=function(){function e(){}return e.insert=function(e,t){return{identifier:null,range:new n.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{identifier:null,range:e,text:null,forceMoveMarkers:!0}},e.replace=function(e,t){return{identifier:null,range:e,text:t,forceMoveMarkers:!1}},e.replaceMove=function(e,t){return{identifier:null,range:e,text:t,forceMoveMarkers:!0}},e}();t.EditOperation=i}),define(d[448],h([0,1,9,46,3]),function(e,t,n,i,o){"use strict";function r(e,t){t.sort(function(e,t){return e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber});for(var r=t.length-2;r>=0;r--)t[r].lineNumber===t[r+1].lineNumber&&t.splice(r,1);for(var s=[],a=0,u=0,l=t.length,c=1,d=e.getLineCount();c<=d;c++){var h=e.getLineContent(c),p=h.length+1,f=0;if(!(u<l&&t[u].lineNumber===c&&(f=t[u].column,u++,f===p))&&0!==h.length){var g=n.lastNonWhitespaceIndex(h),m=0;if(g===-1)m=1;else{if(g===h.length-1)continue;m=g+2}m=Math.max(f,m),s[a++]=i.EditOperation.delete(new o.Range(c,m,c,p))}}return s}var s=function(){function e(e){this.selection=e}return e.prototype.getEditOperations=function(e,t){for(var n=r(e,[]),i=0,o=n.length;i<o;i++){var s=n[i];t.addEditOperation(s.range,s.text)}this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e}();t.TrimTrailingWhitespaceCommand=s,t.trimTrailingWhitespace=r}),define(d[20],h([0,1,3]),function(e,t,n){"use strict";var i;!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(i=t.SelectionDirection||(t.SelectionDirection={}));var o=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i,o)||this;return r.selectionStartLineNumber=t,r.selectionStartColumn=n,r.positionLineNumber=i,r.positionColumn=o,r}return m(t,e),t.prototype.clone=function(){return new t(this.selectionStartLineNumber,this.selectionStartColumn,this.positionLineNumber,this.positionColumn)},t.prototype.toString=function(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"},t.prototype.equalsSelection=function(e){return t.selectionsEqual(this,e)},t.selectionsEqual=function(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn},t.prototype.getDirection=function(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?i.LTR:i.RTL},t.prototype.setEndPosition=function(e,n){return this.getDirection()===i.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===i.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.liftSelection=function(e){return new t(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)},t.selectionsArrEqual=function(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n++)if(!this.selectionsEqual(e[n],t[n]))return!1;return!0},t.isISelection=function(e){return e&&"number"==typeof e.selectionStartLineNumber&&"number"==typeof e.selectionStartColumn&&"number"==typeof e.positionLineNumber&&"number"==typeof e.positionColumn},t.createWithDirection=function(e,n,o,r,s){return s===i.LTR?new t(e,n,o,r):new t(o,r,e,n)},t}(n.Range);t.Selection=o}),define(d[54],h([0,1,20]),function(e,t,n){"use strict";var i=function(){function e(e,t){this._range=e,this._text=t}return e.prototype.getText=function(){return this._text},e.prototype.getRange=function(){return this._range},e.prototype.setRange=function(e){this._range=e},e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._range,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),o=i[0].range;return new n.Selection(o.endLineNumber,o.endColumn,o.endLineNumber,o.endColumn)},e}();t.ReplaceCommand=i;var o=function(e){function t(t,n){return e.call(this,t,n)||this}return m(t,e),t.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),o=i[0].range;return new n.Selection(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn)},t}(i);t.ReplaceCommandWithoutChangingPosition=o;var r=function(e){function t(t,n,i,o){var r=e.call(this,t,n)||this;return r._columnDeltaOffset=o,r._lineNumberDeltaOffset=i,r}return m(t,e),t.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),o=i[0].range;return new n.Selection(o.endLineNumber+this._lineNumberDeltaOffset,o.endColumn+this._columnDeltaOffset,o.endLineNumber+this._lineNumberDeltaOffset,o.endColumn+this._columnDeltaOffset)},t}(i);t.ReplaceCommandWithOffsetCursorState=r;var s=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._initialSelection=i,o}return m(t,e),t.prototype.getEditOperations=function(t,n){e.prototype.getEditOperations.call(this,t,n),this._selectionId=n.trackSelection(this._initialSelection)},t.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},t}(i);t.ReplaceCommandThatPreservesSelection=s}),define(d[479],h([0,1,3,20]),function(e,t,n,i){"use strict";var o=function(){function e(e,t,n){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(new n.Range(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addEditOperation(new n.Range(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),o=n[0].range,r=n[1].range;return new i.Selection(o.endLineNumber,o.endColumn,r.endLineNumber,r.endColumn-this._charAfterSelection.length)},e}();t.SurroundSelectionCommand=o}),define(d[82],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n){this.offset=0|e,this.type=t,this.language=n}return e.prototype.toString=function(){return"("+this.offset+", "+this.type+")"},e}();t.Token=n;var i=function(){function e(e,t){this.tokens=e,this.endState=t}return e}();t.TokenizationResult=i;var o=function(){function e(e,t){this.tokens=e,this.endState=t}return e}();t.TokenizationResult2=o}),define(d[83],h([0,1]),function(e,t){"use strict";function n(e){return e<0?0:e>255?255:0|e}function i(e){return e<0?0:e>4294967295?4294967295:0|e}function o(e){for(var t=e.length,n=new Uint32Array(t),o=0;o<t;o++)n[o]=i(e[o]);return n}var r=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;o<r;o++)i[o]=n;this._data=i,this._rows=e,this._cols=t}return e.prototype.get=function(e,t){return this._data[e*this._cols+t]},e.prototype.set=function(e,t,n){this._data[e*this._cols+t]=n},e}();t.Uint8Matrix=r;var s;!function(e){e[e.MAX_SAFE_SMALL_INTEGER=1073741824]="MAX_SAFE_SMALL_INTEGER",e[e.MIN_SAFE_SMALL_INTEGER=-1073741824]="MIN_SAFE_SMALL_INTEGER",e[e.MAX_UINT_8=255]="MAX_UINT_8",e[e.MAX_UINT_16=65535]="MAX_UINT_16",e[e.MAX_UINT_32=4294967295]="MAX_UINT_32"}(s=t.Constants||(t.Constants={})),t.toUint8=n,t.toUint32=i,t.toUint32Array=o}),define(d[69],h([0,1,83]),function(e,t,n){"use strict";var i=function(){function e(t){var i=n.toUint8(t);this._defaultValue=i,this._asciiMap=e._createAsciiMap(i),this._map=new Map}return e._createAsciiMap=function(e){for(var t=new Uint8Array(256),n=0;n<256;n++)t[n]=e;return t},e.prototype.set=function(e,t){var i=n.toUint8(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)},e.prototype.get=function(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue},e}();t.CharacterClassifier=i;var o;!function(e){e[e.False=0]="False",e[e.True=1]="True"}(o||(o={}));var r=function(){function e(){this._actual=new i(0)}return e.prototype.add=function(e){this._actual.set(e,1)},e.prototype.has=function(e){return 1===this._actual.get(e)},e}();t.CharacterSet=r}),define(d[88],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t){this.endIndex=e,this.type=t}return e._equals=function(e,t){return e.endIndex===t.endIndex&&e.type===t.type},e.equalsArr=function(e,t){var n=e.length,i=t.length;if(n!==i)return!1;for(var o=0;o<n;o++)if(!this._equals(e[o],t[o]))return!1;return!0},e}();t.ViewLineToken=n}),define(d[502],h([0,1,95,9]),function(e,t,n,i){"use strict";function o(e,t,i){var o=new n.LcsDiff(e,t,i);return o.ComputeDiff()}function r(e){if(e.length<=1)return e;var t,n,i,o,r,s,u=[e[0]],l=u[0];for(t=1,n=e.length;t<n;t++)s=e[t],i=s.originalStart-(l.originalStart+l.originalLength),o=s.modifiedStart-(l.modifiedStart+l.modifiedLength),r=Math.min(i,o),r<a?(l.originalLength=s.originalStart+s.originalLength-l.originalStart,l.modifiedLength=s.modifiedStart+s.modifiedLength-l.modifiedStart):(u.push(s),l=s);return u}var s=5e3,a=3,u=function(){function e(e,t,n){this.buffer=e,this.startMarkers=t,this.endMarkers=n}return e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.getLength()!==n.getLength())return!1;for(var i=0,o=this.getLength();i<o;i++){var r=this.getElementHash(i),s=n.getElementHash(i);if(r!==s)return!1}return!0},e.prototype.getLength=function(){return this.startMarkers.length},e.prototype.getElementHash=function(e){return this.buffer.substring(this.startMarkers[e].offset,this.endMarkers[e].offset)},e.prototype.getStartLineNumber=function(e){return e===this.startMarkers.length?this.startMarkers[e-1].lineNumber+1:this.startMarkers[e].lineNumber},e.prototype.getStartColumn=function(e){return this.startMarkers[e].column},e.prototype.getEndLineNumber=function(e){return this.endMarkers[e].lineNumber},e.prototype.getEndColumn=function(e){return this.endMarkers[e].column},e}(),l=function(e){function t(n,i){var o,r,s,a,u,l=this,c="",d=[],h=[];for(s=0,o=0,r=n.length;o<r;o++)c+=n[o],a=1,u=n[o].length+1,i&&(a=t._getFirstNonBlankColumn(n[o],1),u=t._getLastNonBlankColumn(n[o],1)),d.push({offset:s+a-1,lineNumber:o+1,column:a}),h.push({offset:s+u-1,lineNumber:o+1,column:u}),s+=n[o].length;return l=e.call(this,c,d,h)||this;
}return m(t,e),t._getFirstNonBlankColumn=function(e,t){var n=i.firstNonWhitespaceIndex(e);return n===-1?t:n+1},t._getLastNonBlankColumn=function(e,t){var n=i.lastNonWhitespaceIndex(e);return n===-1?t:n+2},t.prototype.getCharSequence=function(e,t){var n,i,o,r,s=[],a=[];for(n=e;n<=t;n++)for(o=this.startMarkers[n],r=this.endMarkers[n],i=o.offset;i<r.offset;i++)s.push({offset:i,lineNumber:o.lineNumber,column:o.column+(i-o.offset)}),a.push({offset:i+1,lineNumber:o.lineNumber,column:o.column+(i-o.offset)+1});return new u(this.buffer,s,a)},t}(u),c=function(){function e(e,t,n){0===e.originalLength?(this.originalStartLineNumber=0,this.originalStartColumn=0,this.originalEndLineNumber=0,this.originalEndColumn=0):(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart),this.originalStartColumn=t.getStartColumn(e.originalStart),this.originalEndLineNumber=t.getEndLineNumber(e.originalStart+e.originalLength-1),this.originalEndColumn=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(this.modifiedStartLineNumber=0,this.modifiedStartColumn=0,this.modifiedEndLineNumber=0,this.modifiedEndColumn=0):(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart),this.modifiedStartColumn=n.getStartColumn(e.modifiedStart),this.modifiedEndLineNumber=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),this.modifiedEndColumn=n.getEndColumn(e.modifiedStart+e.modifiedLength-1))}return e}(),d=function(){function e(e,t,n,i,s){if(0===e.originalLength?(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart)-1,this.originalEndLineNumber=0):(this.originalStartLineNumber=t.getStartLineNumber(e.originalStart),this.originalEndLineNumber=t.getEndLineNumber(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart)-1,this.modifiedEndLineNumber=0):(this.modifiedStartLineNumber=n.getStartLineNumber(e.modifiedStart),this.modifiedEndLineNumber=n.getEndLineNumber(e.modifiedStart+e.modifiedLength-1)),0!==e.originalLength&&0!==e.modifiedLength&&i()){var a=t.getCharSequence(e.originalStart,e.originalStart+e.originalLength-1),u=n.getCharSequence(e.modifiedStart,e.modifiedStart+e.modifiedLength-1),l=o(a,u,i);s&&(l=r(l)),this.charChanges=[];for(var d=0,h=l.length;d<h;d++)this.charChanges.push(new c(l[d],a,u))}}return e}(),h=function(){function e(e,t,n){this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.maximumRunTimeMs=s,this.original=new l(e,this.shouldIgnoreTrimWhitespace),this.modified=new l(t,this.shouldIgnoreTrimWhitespace),n.shouldConsiderTrimWhitespaceInEmptyCase&&this.shouldIgnoreTrimWhitespace&&this.original.equals(this.modified)&&(this.shouldIgnoreTrimWhitespace=!1,this.original=new l(e,this.shouldIgnoreTrimWhitespace),this.modified=new l(t,this.shouldIgnoreTrimWhitespace))}return e.prototype.computeDiff=function(){this.computationStartTime=(new Date).getTime();for(var e=o(this.original,this.modified,this._continueProcessingPredicate.bind(this)),t=[],n=0,i=e.length;n<i;n++)t.push(new d(e[n],this.original,this.modified,this._continueProcessingPredicate.bind(this),this.shouldPostProcessCharChanges));return t},e.prototype._continueProcessingPredicate=function(){if(0===this.maximumRunTimeMs)return!0;var e=(new Date).getTime();return e-this.computationStartTime<this.maximumRunTimeMs},e}();t.DiffComputer=h}),define(d[145],h([0,1,6]),function(e,t,n){"use strict";var i=function(){function e(e,t,n,i,o,r){this.id=e,this.label=t,this.alias=n,this._precondition=i,this._run=o,this._contextKeyService=r}return e.prototype.isSupported=function(){return this._contextKeyService.contextMatchesRules(this._precondition)},e.prototype.run=function(){return this.isSupported()?n.TPromise.as(this._run()):n.TPromise.as(void 0)},e}();t.InternalEditorAction=i}),define(d[505],h([0,1,10]),function(e,t,n){"use strict";var i=function(){function e(e){this.model=e,this.currentOpenStackElement=null,this.past=[],this.future=[]}return e.prototype.pushStackElement=function(){null!==this.currentOpenStackElement&&(this.past.push(this.currentOpenStackElement),this.currentOpenStackElement=null)},e.prototype.clear=function(){this.currentOpenStackElement=null,this.past=[],this.future=[]},e.prototype.pushEditOperation=function(e,t,i){this.future=[],this.currentOpenStackElement||(this.currentOpenStackElement={beforeVersionId:this.model.getAlternativeVersionId(),beforeCursorState:e,editOperations:[],afterCursorState:null,afterVersionId:-1});var o={operations:this.model.applyEdits(t)};this.currentOpenStackElement.editOperations.push(o);try{this.currentOpenStackElement.afterCursorState=i?i(o.operations):null}catch(e){n.onUnexpectedError(e),this.currentOpenStackElement.afterCursorState=null}return this.currentOpenStackElement.afterVersionId=this.model.getVersionId(),this.currentOpenStackElement.afterCursorState},e.prototype.undo=function(){if(this.pushStackElement(),this.past.length>0){var e=this.past.pop();try{for(var t=e.editOperations.length-1;t>=0;t--)e.editOperations[t]={operations:this.model.applyEdits(e.editOperations[t].operations)}}catch(e){return this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.redo=function(){if(this.future.length>0){if(this.currentOpenStackElement)throw new Error("How is this possible?");var e=this.future.pop();try{for(var t=0;t<e.editOperations.length;t++)e.editOperations[t]={operations:this.model.applyEdits(e.editOperations[t].operations)}}catch(e){return this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e}();t.EditStack=i}),define(d[506],h([0,1]),function(e,t){"use strict";function n(e,t){void 0===t&&(t=1);var n=[],o=[];o.push({indent:-1,line:e.getLineCount()+1});for(var r=e.getLineCount();r>0;r--){var s=e.getIndentLevel(r);if(s!==-1){var a=o[o.length-1];if(a.indent>s){do o.pop(),a=o[o.length-1];while(a.indent>s);var u=a.line-1;u-r>=t&&n.push(new i(r,u,s))}a.indent===s?a.line=r:o.push({indent:s,line:r})}}return n.reverse()}var i=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.indent=n}return e.deepCloneArr=function(t){for(var n=[],i=0,o=t.length;i<o;i++){var r=t[i];n[i]=new e(r.startLineNumber,r.endLineNumber,r.indent)}return n},e}();t.IndentRange=i,t.computeRanges=n}),define(d[507],h([0,1]),function(e,t){"use strict";function n(e,t,n,i){var o;for(o=0;o<t&&o<i;o++){var r=e.charCodeAt(o),s=n.charCodeAt(o);if(r!==s)break}for(var a=0,u=0,l=o;l<t;l++){var r=e.charCodeAt(l);32===r?a++:u++}for(var c=0,d=0,l=o;l<i;l++){var s=n.charCodeAt(l);32===s?c++:d++}if(a>0&&u>0)return 0;if(c>0&&d>0)return 0;var h=Math.abs(u-d),p=Math.abs(a-c);return 0===h?p:p%h===0?p/h:0}function i(e,t,i){for(var o=0,r=0,s="",a=0,u=[2,4,6,8],l=8,c=[0,0,0,0,0,0,0,0,0],d=0,h=e.length;d<h;d++){for(var p=e[d],f=!1,g=0,m=0,v=0,_=0,y=p.length;_<y;_++){var C=p.charCodeAt(_);if(9===C)v++;else{if(32!==C){f=!0,g=_;break}m++}}if(f){v>0?o++:m>1&&r++;var b=n(s,a,p,g);b<=l&&c[b]++,s=p,a=g}}var w=n(s,a,"",0);w<=l&&c[w]++;var S=i;o!==r&&(S=o<r);var E=t,L=S?0:.1*e.length;return u.forEach(function(e){var t=c[e];t>L&&(L=t,E=e)}),{insertSpaces:S,tabSize:E}}t.guessIndentation=i}),define(d[511],h([0,1,15]),function(e,t,n){"use strict";function i(e,t){var i=t.lineNumber;if(1!==e.getLineMaxColumn(i))return t;for(var o=e.getLineCount(),r=1;;){var s=i-r,a=i+r;if(s<1&&a>o)break;if(s>=1){var u=e.getLineMaxColumn(s);if(1!==u)return new n.Position(s,u)}if(a<=o){var l=e.getLineMaxColumn(a);if(1!==l)return new n.Position(a,1)}r++}return null}var o=function(){function e(e,t){this._actual=e,this.lineNumber=t,this.startColumn=this._actual.startOffset+1,this.endColumn=this._actual.endOffset+1,this.type=this._actual.tokenType}return e}(),r=function(){function e(e,t){if(this._model=e,this._lineCount=this._model.getLineCount(),this._prev=null,this._next=null,t=i(e,t)){var n=this._model.getLineTokens(t.lineNumber),r=n.findTokenAtOffset(t.column-1);r&&(this._prev=this._next=new o(r,t.lineNumber))}}return e.prototype._advanceNext=function(){if(this._next){for(var e=this._next.lineNumber,t=this._next._actual.next();!t&&e<this._lineCount;){e++;var n=this._model.getLineTokens(e);t=n.firstToken()}this._prev=this._next,t?this._next=new o(t,e):this._next=null}},e.prototype._advancePrev=function(){if(this._prev){for(var e=this._prev.lineNumber,t=this._prev._actual.prev();!t&&e>1;){e--;var n=this._model.getLineTokens(e);t=n.lastToken()}this._next=this._prev,t?this._prev=new o(t,e):this._prev=null}},e.prototype.hasNext=function(){return null!==this._next},e.prototype.next=function(){var e=this._next;return this._advanceNext(),e},e.prototype.hasPrev=function(){return null!==this._prev},e.prototype.prev=function(){var e=this._prev;return this._advancePrev(),e},e.prototype._invalidate=function(){var e=function(){throw new Error("iteration isn't valid anymore")};this.hasNext=e,this.next=e,this.hasPrev=e,this.prev=e},e}();t.TokenIterator=r}),define(d[147],h([0,1,88]),function(e,t,n){"use strict";var i=function(){function e(){}return e.toBinaryStr=function(e){for(var t=e.toString(2);t.length<32;)t="0"+t;return t},e.printMetadata=function(t){var n=e.getLanguageId(t),i=e.getTokenType(t),o=e.getFontStyle(t),r=e.getForeground(t),s=e.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:o,foreground:r,background:s})},e.getLanguageId=function(e){return(255&e)>>>0},e.getTokenType=function(e){return(1792&e)>>>8},e.getFontStyle=function(e){return(14336&e)>>>11},e.getForeground=function(e){return(8372224&e)>>>14},e.getBackground=function(e){return(4286578688&e)>>>23},e._getClassNameFromMetadata=function(e){var t=this.getForeground(e),n="mtk"+t,i=this.getFontStyle(e);return 1&i&&(n+=" mtki"),2&i&&(n+=" mtkb"),4&i&&(n+=" mtku"),n},e.inflateArr=function(e,t){for(var i=[],o=0,r=e.length>>>1;o<r;o++){var s=o+1<r?e[o+1<<1]:t,a=e[(o<<1)+1];i[o]=new n.ViewLineToken(s,this._getClassNameFromMetadata(a))}return i},e.sliceAndInflate=function(e,t,i,o,r){for(var s=this.findIndexInSegmentsArray(e,t),a=[],u=0,l=s,c=e.length>>>1;l<c;l++){var d=e[l<<1];if(d>=i)break;var h=l+1<c?e[l+1<<1]:r,p=h-t+o,f=e[(l<<1)+1];a[u++]=new n.ViewLineToken(p,this._getClassNameFromMetadata(f))}return a},e.findIndexInSegmentsArray=function(e,t){for(var n=0,i=(e.length>>>1)-1;n<i;){var o=n+Math.ceil((i-n)/2),r=e[o<<1];r>t?i=o-1:n=o}return n},e}();t.TokenMetadata=i}),define(d[89],h([0,1,147]),function(e,t,n){"use strict";function i(e){var t=e.match(o);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 4}throw new Error("Unexpected match for standard token type!")}var o=/\b(comment|string|regex)\b/;t.toStandardTokenType=i;var r=function(){function e(e,t,n,i,o,r,s){this._colorMap=e,this._source=t,this._tokenIndex=n,this._metadata=s,this.startOffset=o,this.endOffset=r,this.hasPrev=this._tokenIndex>0,this.hasNext=this._tokenIndex+1<i}return Object.defineProperty(e.prototype,"languageId",{get:function(){return n.TokenMetadata.getLanguageId(this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenType",{get:function(){return n.TokenMetadata.getTokenType(this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fontStyle",{get:function(){return n.TokenMetadata.getFontStyle(this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foregroundId",{get:function(){return n.TokenMetadata.getForeground(this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foreground",{get:function(){return this._colorMap[this.foregroundId]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"backgroundId",{get:function(){return n.TokenMetadata.getBackground(this._metadata)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"background",{get:function(){return this._colorMap[this.backgroundId]},enumerable:!0,configurable:!0}),e.prototype.prev=function(){return this.hasPrev?this._source.tokenAt(this._tokenIndex-1):null},e.prototype.next=function(){return this.hasNext?this._source.tokenAt(this._tokenIndex+1):null},e}();t.LineToken=r;var s=function(){function e(e,t,n){this._colorMap=e,this._tokens=t,this._tokensCount=this._tokens.length>>>1,this._text=n,this._textLength=this._text.length}return e.prototype.getTokenCount=function(){return this._tokensCount},e.prototype.getLineContent=function(){return this._text},e.prototype.getLineLength=function(){return this._textLength},e.prototype.getTokenStartOffset=function(e){return this._tokens[e<<1]},e.prototype.getLanguageId=function(e){var t=this._tokens[(e<<1)+1];return n.TokenMetadata.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[(e<<1)+1];return n.TokenMetadata.getTokenType(t)},e.prototype.getTokenEndOffset=function(e){return e+1<this._tokensCount?this._tokens[e+1<<1]:this._textLength},e.prototype.findTokenIndexAtOffset=function(e){return n.TokenMetadata.findIndexInSegmentsArray(this._tokens,e)},e.prototype.findTokenAtOffset=function(e){var t=this.findTokenIndexAtOffset(e);return this.tokenAt(t)},e.prototype.tokenAt=function(e){var t,n=this._tokens[e<<1];t=e+1<this._tokensCount?this._tokens[e+1<<1]:this._textLength;var i=this._tokens[(e<<1)+1];return new r(this._colorMap,this,e,this._tokensCount,n,t,i)},e.prototype.firstToken=function(){return 0===this._textLength?null:this.tokenAt(0)},e.prototype.lastToken=function(){return 0===this._textLength?null:this.tokenAt(this._tokensCount-1)},e.prototype.inflate=function(){return n.TokenMetadata.inflateArr(this._tokens,this._textLength)},e.prototype.sliceAndInflate=function(e,t,i){return n.TokenMetadata.sliceAndInflate(this._tokens,e,t,i,this._textLength)},e}();t.LineTokens=s}),define(d[72],h([0,1,89,15]),function(e,t,n,i){"use strict";function o(e,t){for(var n=0,i=0,o=e.length;i<o;){var r=e.charCodeAt(i);if(32===r)n++;else{if(9!==r)break;n=n-n%t+t}i++}return i===o?0:n+1}var r=function(){function e(e,t,n,i){this.id=e,this.internalDecorationId=t,this.position=n,this.stickToPreviousCharacter=i}return e.prototype.toString=function(){return"{'"+this.id+"';"+this.position.toString()+","+this.stickToPreviousCharacter+"}"},e.prototype.updateLineNumber=function(e,t){this.position.lineNumber!==t&&(e.addChangedMarker(this),this.position=new i.Position(t,this.position.column))},e.prototype.updateColumn=function(e,t){this.position.column!==t&&(e.addChangedMarker(this),this.position=new i.Position(this.position.lineNumber,t))},e.prototype.updatePosition=function(e,t){this.position.lineNumber===t.lineNumber&&this.position.column===t.column||(e.addChangedMarker(this),this.position=t)},e.prototype.setPosition=function(e){this.position=e},e.compareMarkers=function(e,t){return e.position.column===t.position.column?(e.stickToPreviousCharacter?0:1)-(t.stickToPreviousCharacter?0:1):e.position.column-t.position.column},e}();t.LineMarker=r;var s=function(){function e(){this._changedDecorations=[],this._changedDecorationsLen=0}return e.prototype.addChangedMarker=function(e){var t=e.internalDecorationId;0!==t&&(this._changedDecorations[this._changedDecorationsLen++]=t)},e.prototype.getDecorationIds=function(){return this._changedDecorations},e}();t.MarkersTracker=s;var a,u={adjust:function(){},finish:function(){}},l={adjustDelta:function(){},adjustSet:function(){},finish:function(){}};!function(e){e[e.MarkerDefined=0]="MarkerDefined",e[e.ForceMove=1]="ForceMove",e[e.ForceStay=2]="ForceStay"}(a||(a={}));var c=function(){function e(e,t,n){this._lineNumber=0|e,this._metadata=0,this._setText(t,n),this._state=null,this._lineTokens=null,this._markers=null}return Object.defineProperty(e.prototype,"lineNumber",{get:function(){return this._lineNumber},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInvalid",{get:function(){return!!(1&this._metadata)},set:function(e){this._metadata=4294967294&this._metadata|(e?1:0)},enumerable:!0,configurable:!0}),e.prototype.getIndentLevel=function(){return((4294967294&this._metadata)>>1)-1},e.prototype._setPlusOneIndentLevel=function(e){this._metadata=1&this._metadata|(4026531839&e)<<1},e.prototype.updateTabSize=function(e){0===e?this._metadata=1&this._metadata:this._setPlusOneIndentLevel(o(this._text,e))},e.prototype.resetTokenizationState=function(){this._state=null,this._lineTokens=null},e.prototype.setState=function(e){this._state=e},e.prototype.getState=function(){return this._state||null},e._getDefaultMetadata=function(e){return(e<<0|0|0|16384|2<<23)>>>0},e.prototype.setTokens=function(t,n){return n&&0!==n.length?2===n.length&&0===n[0]&&n[1]===e._getDefaultMetadata(t)?void(this._lineTokens=null):void(this._lineTokens=n.buffer):void(this._lineTokens=null)},e.prototype.getTokens=function(t,i){var o=this._lineTokens;if(o)return new n.LineTokens(i,new Uint32Array(o),this._text);var r=new Uint32Array(2);return r[0]=0,r[1]=e._getDefaultMetadata(t),new n.LineTokens(i,r,this._text)},e.prototype._createTokensAdjuster=function(){var e=this;if(!this._lineTokens)return u;var t=new Uint32Array(this._lineTokens),n=t.length>>>1,i=0,o=0,r=0,s=function(e,s,a){for(var u=a-1;o<e&&i<n;){if(o>0&&0!==s){var l=Math.max(u,o+s);if(t[i<<1]=l,s<0)for(var c=i;c>0;){var d=t[c-1<<1];if(!(d>=l))break;4294967295!==d&&(t[c-1<<1]=4294967295,r++),c--}}i++,i<n&&(o=t[i<<1])}},a=function(t,n){s(1073741824,t,1),e._deleteMarkedTokens(e._markOverflowingTokensForDeletion(r,n))};return{adjust:s,finish:a}},e.prototype._markOverflowingTokensForDeletion=function(e,t){if(!this._lineTokens)return e;var n=new Uint32Array(this._lineTokens),i=n.length>>>1;if(e+1===i)return e;for(var o=i-1;o>0;o--){var r=n[o<<1];if(r<t)return e;if(4294967295!==r&&(n[o<<1]=4294967295,e++,e+1===i))return e}return e},e.prototype._deleteMarkedTokens=function(e){if(0!==e){for(var t=new Uint32Array(this._lineTokens),n=t.length>>>1,i=new Uint32Array(n-e<<1),o=0,r=0;r<n;r++){var s=t[r<<1];if(4294967295!==s){var a=t[(r<<1)+1];i[o++]=s,i[o++]=a}}this._lineTokens=i.buffer}},e.prototype._setText=function(e,t){this._text=e,0===t?this._metadata=1&this._metadata:this._setPlusOneIndentLevel(o(e,t))},e.prototype._createMarkersAdjuster=function(e){if(!this._markers)return l;if(0===this._markers.length)return l;this._markers.sort(r.compareMarkers);var t=this._markers,n=t.length,i=0,o=t[i],s=function(e,t){return o.position.column<e||!(o.position.column>e)&&(1!==t&&(2===t||o.stickToPreviousCharacter))},a=function(r,a,u,l){for(;i<n&&s(r,l);){if(0!==a){var c=Math.max(u,o.position.column+a);o.updateColumn(e,c)}i++,i<n&&(o=t[i])}},u=function(r,a,u){for(;i<n&&s(r,u);)o.updateColumn(e,a),i++,i<n&&(o=t[i])},c=function(e,t){a(1073741824,e,1,0)};return{adjustDelta:a,adjustSet:u,finish:c}},e.prototype.applyEdits=function(e,t,n){for(var i=0,o=this._text,r=this._createTokensAdjuster(),s=this._createMarkersAdjuster(e),a=0,u=t.length;a<u;a++){var l=t[a],c=i+l.startColumn,d=i+l.endColumn,h=d-c,p=l.text.length;r.adjust(l.startColumn-1,i,1),s.adjustDelta(l.startColumn,i,1,l.forceMoveMarkers?1:h>0?2:0);var f=Math.min(h,p);f>0&&(r.adjust(l.startColumn-1+f,i,c),l.forceMoveMarkers||s.adjustDelta(l.startColumn+f,i,c,l.forceMoveMarkers?1:h>p?2:0)),o=o.substring(0,c-1)+l.text+o.substring(d-1),i+=p-h,r.adjust(l.endColumn,i,c),s.adjustSet(l.endColumn,c+p,l.forceMoveMarkers?1:0)}return r.finish(i,o.length),s.finish(i,o.length),this._setText(o,n),i},e.prototype.split=function(t,n,i,o){var s=this._text.substring(0,n-1),a=this._text.substring(n-1),u=null;if(this._markers){this._markers.sort(r.compareMarkers);for(var l=0,c=this._markers.length;l<c;l++){var d=this._markers[l];if(d.position.column>n||d.position.column===n&&(i||!d.stickToPreviousCharacter)){var h=this._markers.slice(0,l);u=this._markers.slice(l),this._markers=h;break}}if(u)for(var l=0,c=u.length;l<c;l++){var d=u[l];d.updateColumn(t,d.position.column-(n-1))}}this._setText(s,o),this._deleteMarkedTokens(this._markOverflowingTokensForDeletion(0,this._text.length));var p=new e(this._lineNumber+1,a,o);return u&&p.addMarkers(u),p},e.prototype.append=function(e,t,n){var o=this._text.length;this._setText(this._text+t._text,n);var r=t._lineTokens;if(r){var s=new Uint32Array(r);if(o>0)for(var a=0,u=s.length>>>1;a<u;a++)s[a<<1]=s[a<<1]+o;var l=this._lineTokens;if(l){var c=new Uint32Array(l),d=new Uint32Array(c.length+s.length);d.set(c,0),d.set(s,c.length),this._lineTokens=d.buffer}else this._lineTokens=s.buffer}if(t._markers){for(var h=t._markers,a=0,u=h.length;a<u;a++){var p=h[a];p.updatePosition(e,new i.Position(this._lineNumber,p.position.column+o))}this.addMarkers(h)}},e.prototype.addMarker=function(e){this._markers?this._markers.push(e):this._markers=[e]},e.prototype.addMarkers=function(e){0!==e.length&&(this._markers?this._markers=this._markers.concat(e):this._markers=e.slice(0))},e.prototype.removeMarker=function(e){if(this._markers){var t=this._indexOfMarkerId(e.id);t<0||(1===this._markers.length?this._markers=null:this._markers.splice(t,1))}},e.prototype.removeMarkers=function(e){if(this._markers){for(var t=0,n=this._markers.length;t<n;t++){var i=this._markers[t];e[i.id]&&(this._markers.splice(t,1),n--,t--)}0===this._markers.length&&(this._markers=null)}},e.prototype.getMarkers=function(){return this._markers?this._markers.slice(0):[]},e.prototype.updateLineNumber=function(e,t){if(this._lineNumber!==t){if(this._markers)for(var n=this._markers,i=0,o=n.length;i<o;i++){var r=n[i];r.updateLineNumber(e,t)}this._lineNumber=t}},e.prototype.deleteLine=function(){return this._markers?this._markers:[]},e.prototype._indexOfMarkerId=function(e){for(var t=this._markers,n=0,i=t.length;n<i;n++)if(t[n].id===e)return n},e}();t.ModelLine=c}),define(d[73],h([0,1]),function(e,t){"use strict";function n(e){void 0===e&&(e="");for(var n=t.USUAL_WORD_SEPARATORS,i="(-?\\d*\\.\\d\\w*)|([^",o=0;o<n.length;o++)e.indexOf(n[o])>=0||(i+="\\"+n[o]);return i+="\\s]+)",new RegExp(i,"g")}function i(e){var n=t.DEFAULT_WORD_REGEXP;if(e&&e instanceof RegExp)if(e.global)n=e;else{var i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),n=new RegExp(e.source,i)}return n.lastIndex=0,n}function o(e,t,n,i){if(t.test(" "))return r(e,t,n,i);var o=e-1-i,s=n.lastIndexOf(" ",o-1)+1,a=n.indexOf(" ",o);a===-1&&(a=n.length),t.lastIndex=s;for(var u;u=t.exec(n);)if(u.index<=o&&t.lastIndex>=o)return{word:u[0],startColumn:i+1+u.index,endColumn:i+1+t.lastIndex};return null}function r(e,t,n,i){var o=e-1-i;t.lastIndex=0;for(var r;r=t.exec(n);){if(r.index>o)return null;if(t.lastIndex>=o)return{word:r[0],startColumn:i+1+r.index,endColumn:i+1+t.lastIndex}}return null}function s(e,t,n,i){var r=o(e,t,n,i);return t.lastIndex=0,r}t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=n(),t.ensureValidWordDefinition=i,t.getWordAtText=s}),define(d[180],h([0,1]),function(e,t){"use strict";var n=function(){function e(e){this._languageIdentifier=e}return e.prototype.getId=function(){return this._languageIdentifier.language},e.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},e}();t.FrankensteinMode=n}),define(d[65],h([0,1]),function(e,t){"use strict";var n;!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n=t.IndentAction||(t.IndentAction={}));var i=function(){function e(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(var t=0,n=e.notIn.length;t<n;t++){var i=e.notIn[t];switch(i){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4}}}return e.prototype.isOK=function(e){return 0===(this._standardTokenMask&e)},e}();t.StandardAutoClosingPairConditional=i}),define(d[182],h([0,1,167]),function(e,t,n){"use strict";function i(e,t,n){return o(e,t,n)>0}function o(e,t,i){if(Array.isArray(e)){var r=e.map(function(e){return o(e,t,i)});return Math.max.apply(Math,r)}if("string"==typeof e)return e===i?10:"*"===e?5:0;if(e){var s=e,a=0,u=0,l=0;if(s.language)if(s.language===i)a=10;else{if("*"!==s.language)return 0;a=5}if(s.scheme){if(s.scheme!==t.scheme)return 0;u=10}if(s.pattern)if(s.pattern===t.fsPath)l=10;else{if(!n.match(s.pattern,t.fsPath))return 0;l=5}return Math.max(a,u,l)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,t.score=o}),define(d[183],h([0,1,12,182]),function(e,t,n,i){"use strict";var o=function(){function e(){this._clock=0,this._entries=[],this._onDidChange=new n.Emitter}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this,i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),{dispose:function(){if(i){var e=n._entries.indexOf(i);e>=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),i=void 0)}}}},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e||e.isTooLargeForHavingARichMode())return[];this._updateScores(e);for(var t=[],n=0,i=this._entries;n<i.length;n++){var o=i[n];o._score>0&&t.push(o.provider)}return t},e.prototype.ordered=function(e){var t=[];return this._orderedForEach(e,function(e){return t.push(e.provider)}),t},e.prototype.orderedGroups=function(e){var t,n,i=[];return this._orderedForEach(e,function(e){t&&n===e._score?t.push(e.provider):(n=e._score,t=[e.provider],i.push(t))}),i},e.prototype._orderedForEach=function(e,t){if(e&&!e.isTooLargeForHavingARichMode()){this._updateScores(e);for(var n=0;n<this._entries.length;n++){var i=this._entries[n];i._score>0&&t(i)}}},e.prototype._updateScores=function(t){var n={uri:t.uri.toString(),language:t.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==n.language||this._lastCandidate.uri!==n.uri){this._lastCandidate=n;for(var o=0,r=this._entries;o<r.length;o++){var s=r[o];s._score=i.score(s.selector,t.uri,t.getLanguageIdentifier().language)}this._entries.sort(e._compareByScoreAndTime)}},e._compareByScoreAndTime=function(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0},e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=o}),define(d[16],h([0,1,183,12]),function(e,t,n,i){"use strict";var o;!function(e){e[e.Null=0]="Null",e[e.PlainText=1]="PlainText"}(o=t.LanguageId||(t.LanguageId={}));var r=function(){function e(e,t){this.language=e,this.id=t}return e}();t.LanguageIdentifier=r;var s;!function(e){e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline"}(s=t.FontStyle||(t.FontStyle={}));var a;!function(e){e[e.None=0]="None",e[e.DefaultForeground=1]="DefaultForeground",e[e.DefaultBackground=2]="DefaultBackground"}(a=t.ColorId||(t.ColorId={}));var u;!function(e){e[e.Other=0]="Other",e[e.Comment=1]="Comment",e[e.String=2]="String",e[e.RegEx=4]="RegEx"}(u=t.StandardTokenType||(t.StandardTokenType={}));var l;!function(e){e[e.LANGUAGEID_MASK=255]="LANGUAGEID_MASK",e[e.TOKEN_TYPE_MASK=1792]="TOKEN_TYPE_MASK",e[e.FONT_STYLE_MASK=14336]="FONT_STYLE_MASK",e[e.FOREGROUND_MASK=8372224]="FOREGROUND_MASK",e[e.BACKGROUND_MASK=4286578688]="BACKGROUND_MASK",e[e.LANGUAGEID_OFFSET=0]="LANGUAGEID_OFFSET",e[e.TOKEN_TYPE_OFFSET=8]="TOKEN_TYPE_OFFSET",e[e.FONT_STYLE_OFFSET=11]="FONT_STYLE_OFFSET",e[e.FOREGROUND_OFFSET=14]="FOREGROUND_OFFSET",e[e.BACKGROUND_OFFSET=23]="BACKGROUND_OFFSET"}(l=t.MetadataConsts||(t.MetadataConsts={}));var c;!function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(c=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var d;!function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null"}(d=t.SymbolKind||(t.SymbolKind={})),function(e){function t(t){switch(t){case e.Method:return"method";case e.Function:return"function";case e.Constructor:return"constructor";case e.Variable:return"variable";case e.Class:return"class";case e.Interface:return"interface";case e.Namespace:return"namespace";case e.Package:return"package";case e.Module:return"module";case e.Property:return"property";case e.Enum:return"enum";case e.String:return"string";case e.File:return"file";case e.Array:return"array";case e.Number:return"number";case e.Boolean:return"boolean";case e.Object:return"object";case e.Key:return"key";case e.Null:return"null"}return"property"}function n(t){switch(t){case"method":return e.Method;case"function":return e.Function;case"constructor":return e.Constructor;case"variable":return e.Variable;case"class":return e.Class;case"interface":return e.Interface;case"namespace":return e.Namespace;case"package":return e.Package;case"module":return e.Module;case"property":return e.Property;case"enum":return e.Enum;case"string":return e.String;case"file":return e.File;case"array":return e.Array;case"number":return e.Number;case"boolean":return e.Boolean;case"object":return e.Object;case"key":return e.Key;case"null":return e.Null}return e.Property}e.from=t,e.to=n}(d=t.SymbolKind||(t.SymbolKind={})),t.ReferenceProviderRegistry=new n.default,t.RenameProviderRegistry=new n.default,t.SuggestRegistry=new n.default,t.SignatureHelpProviderRegistry=new n.default,t.HoverProviderRegistry=new n.default,t.DocumentSymbolProviderRegistry=new n.default,t.DocumentHighlightProviderRegistry=new n.default,t.DefinitionProviderRegistry=new n.default,t.ImplementationProviderRegistry=new n.default,t.CodeLensProviderRegistry=new n.default,t.CodeActionProviderRegistry=new n.default,t.DocumentFormattingEditProviderRegistry=new n.default,t.DocumentRangeFormattingEditProviderRegistry=new n.default,t.OnTypeFormattingEditProviderRegistry=new n.default,t.LinkProviderRegistry=new n.default;var h=function(){function e(){this._onDidChange=new i.Emitter,this.onDidChange=this._onDidChange.event,this._map=Object.create(null),this._colorMap=null}return e.prototype.fire=function(e){this._onDidChange.fire({languages:e})},e.prototype.register=function(e,t){var n=this;return this._map[e]=t,this.fire([e]),{dispose:function(){n._map[e]===t&&(delete n._map[e],n.fire([e]))}}},e.prototype.get=function(e){return this._map[e]||null},e.prototype.setColorMap=function(e){this._colorMap=e,this.fire(Object.keys(this._map))},e.prototype.getColorMap=function(){return this._colorMap},e}();t.TokenizationRegistryImpl=h,t.TokenizationRegistry=new h}),define(d[185],h([0,1,69,83]),function(e,t,n,i){"use strict";function o(){return null===c&&(c=new l([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),c}function r(){if(null===d){d=new n.CharacterClassifier(0);for(var e=" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…",t=0;t<e.length;t++)d.set(e.charCodeAt(t),1);for(var i=".,;",t=0;t<i.length;t++)d.set(i.charCodeAt(t),2)}return d}function s(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?h.computeLinks(e):[]}var a;!function(e){e[e.Invalid=0]="Invalid",e[e.Start=1]="Start",e[e.H=2]="H",e[e.HT=3]="HT",e[e.HTT=4]="HTT",e[e.HTTP=5]="HTTP",e[e.F=6]="F",e[e.FI=7]="FI",e[e.FIL=8]="FIL",e[e.BeforeColon=9]="BeforeColon",e[e.AfterColon=10]="AfterColon",e[e.AlmostThere=11]="AlmostThere",e[e.End=12]="End",e[e.Accept=13]="Accept"}(a||(a={}));var u,l=function(){function e(e){for(var t=0,n=0,o=0,r=e.length;o<r;o++){
var s=e[o],a=s[0],u=s[1],l=s[2];u>t&&(t=u),a>n&&(n=a),l>n&&(n=l)}t++,n++;for(var c=new i.Uint8Matrix(n,t,0),o=0,r=e.length;o<r;o++){var d=e[o],a=d[0],u=d[1],l=d[2];c.set(a,u,l)}this._states=c,this._maxCharCode=t}return e.prototype.nextState=function(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)},e}(),c=null;!function(e){e[e.None=0]="None",e[e.ForceTermination=1]="ForceTermination",e[e.CannotEndIn=2]="CannotEndIn"}(u||(u={}));var d=null,h=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r),a=e.get(s);if(2!==a)break;r--}while(r>i);return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var n=o(),i=r(),s=[],a=1,u=t.getLineCount();a<=u;a++){for(var l=t.getLineContent(a),c=l.length,d=0,h=0,p=0,f=1,g=!1,m=!1,v=!1;d<c;){var _=!1,y=l.charCodeAt(d);if(13===f){var C=void 0;switch(y){case 40:g=!0,C=0;break;case 41:C=g?0:1;break;case 91:m=!0,C=0;break;case 93:C=m?0:1;break;case 123:v=!0,C=0;break;case 125:C=v?0:1;break;case 39:C=34===p||96===p?0:1;break;case 34:C=39===p||96===p?0:1;break;case 96:C=39===p||34===p?0:1;break;default:C=i.get(y)}1===C&&(s.push(e._createLink(i,l,a,h,d)),_=!0)}else if(12===f){var C=i.get(y);1===C?_=!0:f=13}else f=n.nextState(f,y),0===f&&(_=!0);_&&(f=1,g=!1,m=!1,v=!1,h=d+1,p=y),d++}13===f&&s.push(e._createLink(i,l,a,h,c))}return s},e}();t.computeLinks=s}),define(d[169],h([0,1]),function(e,t){"use strict";function n(e){return!e}function i(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function o(e){return e.replace(/[&<>'"_]/g,"-")}function r(e,t){console.log(e.languageId+": "+t)}function s(e,t){throw new Error(e.languageId+": "+t)}function a(e,t,o,r,s){var a=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,u=null;return t.replace(a,function(t,a,l,c,d,h,p,f,g){return n(l)?n(c)?!n(d)&&d<r.length?i(e,r[d]):!n(p)&&e&&"string"==typeof e[p]?e[p]:(null===u&&(u=s.split("."),u.unshift(s)),!n(h)&&h<u.length?i(e,u[h]):""):i(e,o):"$"})}function u(e,t){for(;t&&t.length>0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return null}function l(e,t){for(;t&&t.length>0;){var n=e.stateNames[t];if(n)return!0;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return!1}var c;!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(c=t.MonarchBracket||(t.MonarchBracket={})),t.empty=n,t.fixCase=i,t.sanitize=o,t.log=r,t.throwError=s,t.substituteMatches=a,t.findRules=u,t.stateExists=l}),define(d[187],h([0,1,35,169]),function(e,t,n,i){"use strict";function o(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;var n;for(n in t)if(t.hasOwnProperty(n)&&!e(t[n]))return!1;return!0}function r(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function s(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function a(e,t){if("string"!=typeof t)return null;for(var n=0;t.indexOf("@")>=0&&n<5;)n++,t=t.replace(/@(\w+)/g,function(n,o){var r="";return"string"==typeof e[o]?r=e[o]:e[o]&&e[o]instanceof RegExp?r=e[o].source:void 0===e[o]?i.throwError(e,"language definition does not contain attribute '"+o+"', used at: "+t):i.throwError(e,"attribute reference '"+o+"' must be a string, used at: "+t),i.empty(r)?"":"(?:"+r+")"});return new RegExp(t,e.ignoreCase?"i":"")}function u(e,t,n,i){if(i<0)return e;if(i<t.length)return t[i];if(i>=100){i-=100;var o=n.split(".");if(o.unshift(n),i<o.length)return o[i]}return null}function l(e,t,r,s){var l=-1,c=r,d=r.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);d&&(d[3]&&(l=parseInt(d[3]),d[2]&&(l+=100)),c=d[4]);var h="~",p=c;c&&0!==c.length?/^\w*$/.test(p)?h="==":(d=c.match(/^(@|!@|~|!~|==|!=)(.*)$/),d&&(h=d[1],p=d[2])):(h="!=",p="");var f;if("~"!==h&&"!~"!==h||!/^(\w|\|)*$/.test(p))if("@"===h||"!@"===h){var g=e[p];g||i.throwError(e,"the @ match target '"+p+"' is not defined, in rule: "+t),o(function(e){return"string"==typeof e},g)||i.throwError(e,"the @ match target '"+p+"' must be an array of strings, in rule: "+t);var m=n.createKeywordMatcher(g,e.ignoreCase);f=function(e){return"@"===h?m(e):!m(e)}}else if("~"===h||"!~"===h)if(p.indexOf("$")<0){var v=a(e,"^"+p+"$");f=function(e){return"~"===h?v.test(e):!v.test(e)}}else f=function(t,n,o,r){var s=a(e,"^"+i.substituteMatches(e,p,n,o,r)+"$");return s.test(t)};else if(p.indexOf("$")<0){var _=i.fixCase(e,p);f=function(e){return"=="===h?e===_:e!==_}}else{var _=i.fixCase(e,p);f=function(t,n,o,r,s){var a=i.substituteMatches(e,_,n,o,r);return"=="===h?t===a:t!==a}}else{var m=n.createKeywordMatcher(p.split("|"),e.ignoreCase);f=function(e){return"~"===h?m(e):!m(e)}}return l===-1?{name:r,value:s,test:function(e,t,n,i){return f(e,e,t,n,i)}}:{name:r,value:s,test:function(e,t,n,i){var o=u(e,t,n,l);return f(o?o:"",e,t,n,i)}}}function c(e,t,n){if(n){if("string"==typeof n)return n;if(n.token||""===n.token){if("string"!=typeof n.token)return i.throwError(e,"a 'token' attribute must be of type string, in rule: "+t),{token:""};var o={token:n.token};if(n.token.indexOf("$")>=0&&(o.tokenSubst=!0),"string"==typeof n.bracket&&("@open"===n.bracket?o.bracket=1:"@close"===n.bracket?o.bracket=-1:i.throwError(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t)),n.next)if("string"!=typeof n.next)i.throwError(e,"the next state must be a string value in rule: "+t);else{var r=n.next;/^(@pop|@push|@popall)$/.test(r)||("@"===r[0]&&(r=r.substr(1)),r.indexOf("$")<0&&(i.stateExists(e,i.substituteMatches(e,r,"",[],""))||i.throwError(e,"the next state '"+n.next+"' is not defined in rule: "+t))),o.next=r}return"number"==typeof n.goBack&&(o.goBack=n.goBack),"string"==typeof n.switchTo&&(o.switchTo=n.switchTo),"string"==typeof n.log&&(o.log=n.log),"string"==typeof n.nextEmbedded&&(o.nextEmbedded=n.nextEmbedded,e.usesEmbedded=!0),o}if(Array.isArray(n)){var s,a=[];for(s in n)n.hasOwnProperty(s)&&(a[s]=c(e,t,n[s]));return{group:a}}if(n.cases){var u,d=[];for(u in n.cases)if(n.cases.hasOwnProperty(u)){var h=c(e,t,n.cases[u]);"@default"===u||"@"===u||""===u?d.push({test:null,value:h,name:u}):"@eos"===u?d.push({test:function(e,t,n,i){return i},value:h,name:u}):d.push(l(e,t,u,h))}var p=e.defaultToken;return{test:function(e,t,n,i){var o;for(o in d)if(d.hasOwnProperty(o)){var r=!d[o].test||d[o].test(e,t,n,i);if(r)return d[o].value}return p}}}return i.throwError(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t),""}return{token:""}}function d(e,t){function n(e,u,l){var c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c],p=d.include;if(p)"string"!=typeof p&&i.throwError(o,"an 'include' attribute must be a string at: "+e),"@"===p[0]&&(p=p.substr(1)),t.tokenizer[p]||i.throwError(o,"include target '"+p+"' is not defined at: "+e),n(e+"."+p,u,t.tokenizer[p]);else{var f=new h(e);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(f.setRegex(a,d[0]),d.length>=3)if("string"==typeof d[1])f.setAction(a,{token:d[1],next:d[2]});else if("object"==typeof d[1]){var g=d[1];g.next=d[2],f.setAction(a,g)}else i.throwError(o,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);else f.setAction(a,d[1]);else d.regex||i.throwError(o,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e),d.name&&(f.name=s(d.name)),d.matchOnlyAtStart&&(f.matchOnlyAtLineStart=r(d.matchOnlyAtLineStart)),f.setRegex(a,d.regex),f.setAction(a,d.action);u.push(f)}}}if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");var o={};o.languageId=e,o.noThrow=!1,o.maxStack=100,o.start=s(t.start),o.ignoreCase=r(t.ignoreCase,!1),o.tokenPostfix=s(t.tokenPostfix,"."+o.languageId),o.defaultToken=s(t.defaultToken,"source",function(){i.throwError(o,"the 'defaultToken' must be a string")}),o.usesEmbedded=!1;var a=t;a.languageId=e,a.ignoreCase=o.ignoreCase,a.noThrow=o.noThrow,a.usesEmbedded=o.usesEmbedded,a.stateNames=t.tokenizer,a.defaultToken=o.defaultToken,t.tokenizer&&"object"==typeof t.tokenizer||i.throwError(o,"a language definition must define the 'tokenizer' attribute as an object"),o.tokenizer=[];var u;for(u in t.tokenizer)if(t.tokenizer.hasOwnProperty(u)){o.start||(o.start=u);var l=t.tokenizer[u];o.tokenizer[u]=new Array,n("tokenizer."+u,o.tokenizer[u],l)}o.usesEmbedded=a.usesEmbedded,t.brackets?Array.isArray(t.brackets)||i.throwError(o,"the 'brackets' attribute must be defined as an array"):t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];var c=[];for(var d in t.brackets)if(t.brackets.hasOwnProperty(d)){var p=t.brackets[d];p&&Array.isArray(p)&&3===p.length&&(p={token:p[2],open:p[0],close:p[1]}),p.open===p.close&&i.throwError(o,"open and close brackets in a 'brackets' attribute must be different: "+p.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required."),"string"==typeof p.open&&"string"==typeof p.token?c.push({token:s(p.token)+o.tokenPostfix,open:i.fixCase(o,s(p.open)),close:i.fixCase(o,s(p.close))}):i.throwError(o,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return o.brackets=c,o.noThrow=!0,o}var h=function(){function e(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}return e.prototype.setRegex=function(e,t){var n;"string"==typeof t?n=t:t instanceof RegExp?n=t.source:i.throwError(e,"rules must start with a match string or regular expression: "+this.name),this.matchOnlyAtLineStart=n.length>0&&"^"===n[0],this.name=this.name+": "+n,this.regex=a(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=c(e,this.name,t)},e}();t.compile=d}),define(d[63],h([0,1,16,82]),function(e,t,n,i){"use strict";function o(e,t,n,o){return new i.TokenizationResult([new i.Token(o,"",e)],n)}function r(e,t,n,o){var r=new Uint32Array(2);return r[0]=o,r[1]=(e<<0|0|0|16384|2<<23)>>>0,new i.TokenizationResult2(r,n)}var s=function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}();t.NULL_STATE=new s,t.NULL_MODE_ID="vs.editor.nullMode",t.NULL_LANGUAGE_IDENTIFIER=new n.LanguageIdentifier(t.NULL_MODE_ID,0),t.nullTokenize=o,t.nullTokenize2=r}),define(d[189],h([0,1,16,169,82,63]),function(e,t,n,i,o,r){"use strict";function s(e,t){if(!t)return null;t=i.fixCase(e,t);for(var n=e.brackets,o=0;o<n.length;o++){var r=n[o];if(r.open===t)return{token:r.token,bracketType:1};if(r.close===t)return{token:r.token,bracketType:-1}}return null}function a(e,t,n,i){return new v(e,t,n,i)}var u=5,l=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new c(e,t);var n=c.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var i=this._entries[n];return i?i:(i=new c(e,t),this._entries[n]=i,i)},e}();l._INSTANCE=new l(u),t.MonarchStackElementFactory=l;var c=function(){function e(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}return e.getStackElementId=function(e){for(var t="";null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t},e._equals=function(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t},e.prototype.equals=function(t){return e._equals(this,t)},e.prototype.push=function(e){return l.create(this,e)},e.prototype.pop=function(){return this.parent},e.prototype.popall=function(){for(var e=this;e.parent;)e=e.parent;return e},e.prototype.switchTo=function(e){return l.create(this.parent,e)},e}();t.MonarchStackElement=c;var d=function(){function e(e,t){this.modeId=e,this.state=t}return e.prototype.equals=function(e){return this.modeId===e.modeId&&this.state.equals(e.state)},e.prototype.clone=function(){var t=this.state.clone();return t===this.state?this:new e(this.modeId,this.state)},e}();t.EmbeddedModeData=d;var h=function(){function e(e){this._maxCacheDepth=e,this._entries=Object.create(null)}return e.create=function(e,t){return this._INSTANCE.create(e,t)},e.prototype.create=function(e,t){if(null!==t)return new p(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new p(e,t);var n=c.getStackElementId(e),i=this._entries[n];return i?i:(i=new p(e,null),this._entries[n]=i,i)},e}();h._INSTANCE=new h(u),t.MonarchLineStateFactory=h;var p=function(){function e(e,t){this.stack=e,this.embeddedModeData=t}return e.prototype.clone=function(){var e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:h.create(this.stack,this.embeddedModeData)},e.prototype.equals=function(t){return t instanceof e&&(!!this.stack.equals(t.stack)&&(null===this.embeddedModeData&&null===t.embeddedModeData||null!==this.embeddedModeData&&null!==t.embeddedModeData&&this.embeddedModeData.equals(t.embeddedModeData)))},e}();t.MonarchLineState=p;var f=Object.hasOwnProperty,g=function(){function e(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}return e.prototype.enterMode=function(e,t){this._language=t},e.prototype.emit=function(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new o.Token(e,t,this._language)))},e.prototype.nestedModeTokenize=function(e,t,i){var o=t.modeId,r=t.state,s=n.TokenizationRegistry.get(o);if(!s)return this.enterMode(i,o),this.emit(i,""),r;var a=s.tokenize(e,r,i);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState},e.prototype.finalize=function(e){return new o.TokenizationResult(this._tokens,e)},e}(),m=function(){function e(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}return e.prototype.enterMode=function(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id},e.prototype.emit=function(e,t){var n=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==n&&(this._lastTokenMetadata=n,this._tokens.push(e),this._tokens.push(n))},e._merge=function(e,t,n){var i=null!==e?e.length:0,o=t.length,r=null!==n?n.length:0;if(0===i&&0===o&&0===r)return new Uint32Array(0);if(0===i&&0===o)return n;if(0===o&&0===r)return e;var s=new Uint32Array(i+o+r);null!==e&&s.set(e);for(var a=0;a<o;a++)s[i+a]=t[a];return null!==n&&s.set(n,i+o),s},e.prototype.nestedModeTokenize=function(t,i,o){var r=i.modeId,s=i.state,a=n.TokenizationRegistry.get(r);if(!a)return this.enterMode(o,r),this.emit(o,""),s;var u=a.tokenize2(t,s,o);return this._prependTokens=e._merge(this._prependTokens,this._tokens,u.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,u.endState},e.prototype.finalize=function(t){return new o.TokenizationResult2(e._merge(this._prependTokens,this._tokens,null),t)},e}(),v=function(){function e(e,t,i,o){var r=this;this._modeService=e,this._standaloneColorService=t,this._modeId=i,this._lexer=o,this._embeddedModes=Object.create(null);var s=!1;this._tokenizationRegistryListener=n.TokenizationRegistry.onDidChange(function(e){if(!s){for(var t=!1,i=0,o=e.languages.length;i<o;i++){var a=e.languages[i];if(r._embeddedModes[a]){t=!0;break}}t&&(s=!0,n.TokenizationRegistry.fire([r._modeId]),s=!1)}})}return e.prototype.dispose=function(){this._tokenizationRegistryListener.dispose()},e.prototype.getInitialState=function(){var e=l.create(null,this._lexer.start);return h.create(e,null)},e.prototype.tokenize=function(e,t,n){var i=new g,o=this._tokenize(e,t,n,i);return i.finalize(o)},e.prototype.tokenize2=function(e,t,n){var i=new m(this._modeService,this._standaloneColorService.getTheme()),o=this._tokenize(e,t,n,i);return i.finalize(o)},e.prototype._tokenize=function(e,t,n,i){return t.embeddedModeData?this._nestedTokenize(e,t,n,i):this._myTokenize(e,t,n,i)},e.prototype._findLeavingNestedModeOffset=function(e,t){var n=this._lexer.tokenizer[t.stack.state];n||(n=i.findRules(this._lexer,t.stack.state),n||i.throwError(this._lexer,"tokenizer state is not defined: "+t.stack.state));var o=-1,r=!1;for(var s in n)if(f.call(n,s)){var a=n[s];if("@pop"===a.action.nextEmbedded){r=!0;var u=a.regex,l=a.regex.source;"^(?:"===l.substr(0,4)&&")"===l.substr(l.length-1,1)&&(u=new RegExp(l.substr(4,l.length-5),u.ignoreCase?"i":""));var c=e.search(u);c!==-1&&(o===-1||c<o)&&(o=c)}}return r||i.throwError(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state),o},e.prototype._nestedTokenize=function(e,t,n,i){var o=this._findLeavingNestedModeOffset(e,t);if(o===-1){var r=i.nestedModeTokenize(e,t.embeddedModeData,n);return h.create(t.stack,new d(t.embeddedModeData.modeId,r))}var s=e.substring(0,o);s.length>0&&i.nestedModeTokenize(s,t.embeddedModeData,n);var a=e.substring(o);return this._myTokenize(a,t,n+o,i)},e.prototype._myTokenize=function(e,t,n,o){o.enterMode(n,this._modeId);for(var r=e.length,a=t.embeddedModeData,u=t.stack,l=0,c=null,d=null,p=null,g=null;l<r;){var m=l,v=u.depth,_=c?c.length:0,y=u.state,C=null,b=null,w=null,S=null,E=null;if(c)C=d,b=p.shift(),w=c.shift(),S=g,0===c.length&&(c=null,d=null,p=null,g=null);else{if(l>=r)break;var L=this._lexer.tokenizer[y];L||(L=i.findRules(this._lexer,y),L||i.throwError(this._lexer,"tokenizer state is not defined: "+y));var N=e.substr(l);for(var T in L)if(f.call(L,T)){var x=L[T];if((0===l||!x.matchOnlyAtLineStart)&&(C=N.match(x.regex))){b=C[0],w=x.action;break}}}for(C||(C=[""],b=""),w||(l<r&&(C=[e.charAt(l)],b=C[0]),w=this._lexer.defaultToken),l+=b.length;w.test;)w=w.test(b,C,y,l===r);var M=null;if("string"==typeof w||Array.isArray(w))M=w;else if(w.group)M=w.group;else if(null!==w.token&&void 0!==w.token){if(M=w.token,w.tokenSubst&&(M=i.substituteMatches(this._lexer,M,b,C,y)),w.nextEmbedded&&("@pop"===w.nextEmbedded?(a||i.throwError(this._lexer,"cannot pop embedded mode if not inside one"),a=null):a?i.throwError(this._lexer,"cannot enter embedded mode from within an embedded mode"):E=i.substituteMatches(this._lexer,w.nextEmbedded,b,C,y)),w.goBack&&(l=Math.max(0,l-w.goBack)),w.switchTo&&"string"==typeof w.switchTo){var I=i.substituteMatches(this._lexer,w.switchTo,b,C,y);"@"===I[0]&&(I=I.substr(1)),i.findRules(this._lexer,I)?u=u.switchTo(I):i.throwError(this._lexer,"trying to switch to a state '"+I+"' that is undefined in rule: "+S.name)}else if(w.transform&&"function"==typeof w.transform)i.throwError(this._lexer,"action.transform not supported");else if(w.next)if("@push"===w.next)u.depth>=this._lexer.maxStack?i.throwError(this._lexer,"maximum tokenizer stack size reached: ["+u.state+","+u.parent.state+",...]"):u=u.push(y);else if("@pop"===w.next)u.depth<=1?i.throwError(this._lexer,"trying to pop an empty stack in rule: "+S.name):u=u.pop();else if("@popall"===w.next)u=u.popall();else{var I=i.substituteMatches(this._lexer,w.next,b,C,y);"@"===I[0]&&(I=I.substr(1)),i.findRules(this._lexer,I)?u=u.push(I):i.throwError(this._lexer,"trying to set a next state '"+I+"' that is undefined in rule: "+S.name)}w.log&&"string"==typeof w.log&&i.log(this._lexer,this._lexer.languageId+": "+i.substituteMatches(this._lexer,w.log,b,C,y))}if(null===M&&i.throwError(this._lexer,"lexer rule has no well-defined action in rule: "+S.name),Array.isArray(M)){c&&c.length>0&&i.throwError(this._lexer,"groups cannot be nested: "+S.name),C.length!==M.length+1&&i.throwError(this._lexer,"matched number of groups does not match the number of actions in rule: "+S.name);for(var D=0,R=1;R<C.length;R++)D+=C[R].length;D!==b.length&&i.throwError(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+S.name),d=C,p=C.slice(1),c=M.slice(0),g=S,l-=b.length}else{if("@rematch"===M&&(l-=b.length,b="",C=null,M=""),0===b.length){if(v!==u.depth||y!==u.state||(c?c.length:0)!==_)continue;i.throwError(this._lexer,"no progress in tokenizer in rule: "+S.name),l=r}var k=null;if(0===M.indexOf("@brackets")){var O=M.substr("@brackets".length),P=s(this._lexer,b);P||(i.throwError(this._lexer,"@brackets token returned but no bracket defined as: "+b),P={token:"",bracketType:0}),k=i.sanitize(P.token+O)}else{var A=""===M?"":M+this._lexer.tokenPostfix;k=i.sanitize(A)}if(o.emit(m+n,k),E){var W=this._modeService.getModeIdForLanguageName(E);W&&(E=W);var F=this._getNestedEmbeddedModeData(E);if(l<r){var N=e.substr(l);return this._nestedTokenize(N,h.create(u,F),n+l,o)}return h.create(u,F)}}}return h.create(u,a)},e.prototype._getNestedEmbeddedModeData=function(e){var t=this._locateMode(e);if(t){var i=n.TokenizationRegistry.get(t.getId());if(i)return new d(t.getId(),i.getInitialState())}var o=t?t.getId():r.NULL_MODE_ID;return new d(o,r.NULL_STATE)},e.prototype._locateMode=function(e){if(!e||!this._modeService.isRegisteredMode(e))return null;var t=this._modeService.getModeId(e);this._modeService.getOrCreateMode(t);var n=this._modeService.getMode(t);return n?(this._embeddedModes[t]=!0,n):(this._embeddedModes[t]=!0,null)},e}();t.MonarchTokenizer=v,t.createTokenizationSupport=a}),define(d[78],h([0,1,16]),function(e,t,n){"use strict";function i(e,t){for(var n=e.getTokenCount(),i=e.findTokenIndexAtOffset(t),o=e.getLanguageId(i),s=i;s+1<n&&e.getLanguageId(s+1)===o;)s++;for(var a=i;a>0&&e.getLanguageId(a-1)===o;)a--;return new r(e,o,a,s+1,e.getTokenStartOffset(a),e.getTokenEndOffset(s))}function o(e){return 0!==(7&e)}t.createScopedLineTokens=i;var r=function(){function e(e,t,n,i,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=n,this._lastTokenIndex=i,this.firstCharOffset=o,this._lastCharOffset=r}return e.prototype.getLineContent=function(){var e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)},e.prototype.getTokenCount=function(){return this._lastTokenIndex-this._firstTokenIndex},e.prototype.findTokenIndexAtOffset=function(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex},e.prototype.getTokenStartOffset=function(e){return this._actual.getTokenStartOffset(e+this._firstTokenIndex)-this.firstCharOffset},e.prototype.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();t.ScopedLineTokens=r;var s;!function(e){e[e.value=7]="value"}(s||(s={})),t.ignoreBracketsInToken=o}),define(d[191],h([0,1,65]),function(e,t,n){"use strict";var i=function(){function e(e){e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(function(e){return new n.StandardAutoClosingPairConditional(e)}):e.brackets?this._autoClosingPairs=e.brackets.map(function(e){return new n.StandardAutoClosingPairConditional({open:e[0],close:e[1]})}):this._autoClosingPairs=[],this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}return e.prototype.getAutoClosingPairs=function(){return this._autoClosingPairs},e.prototype.shouldAutoClosePair=function(e,t,n){if(0===t.getTokenCount())return!0;for(var i=t.findTokenIndexAtOffset(n-2),o=t.getStandardTokenType(i),r=0;r<this._autoClosingPairs.length;++r){var s=this._autoClosingPairs[r];if(s.open===e)return s.isOK(o)}return!0},e.prototype.getSurroundingPairs=function(){return this._surroundingPairs},e}();t.CharacterPairSupport=i}),define(d[192],h([0,1]),function(e,t){"use strict";var n=function(){function e(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}return e.prototype.navigateValueSet=function(e,t,n,i,o){if(e&&t){var r=this.doNavigateValueSet(t,o);if(r)return{range:e,value:r}}if(n&&i){var r=this.doNavigateValueSet(i,o);if(r)return{range:n,value:r}}return null},e.prototype.doNavigateValueSet=function(e,t){var n=this.numberReplace(e,t);return null!==n?n:this.textReplace(e,t)},e.prototype.numberReplace=function(e,t){var n=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),i=Number(e),o=parseFloat(e);return isNaN(i)||isNaN(o)||i!==o?null:0!==i||t?(i=Math.floor(i*n),i+=t?n:-n,String(i/n)):null},e.prototype.textReplace=function(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)},e.prototype.valueSetsReplace=function(e,t,n){for(var i=null,o=0,r=e.length;null===i&&o<r;o++)i=this.valueSetReplace(e[o],t,n);return i},e.prototype.valueSetReplace=function(e,t,n){var i=e.indexOf(t);return i>=0?(i+=n?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null},e}();n.INSTANCE=new n,t.BasicInplaceReplace=n}),define(d[193],h([0,1,10,9,65]),function(e,t,n,i,o){"use strict";var r=function(){function e(t){t=t||{},t.brackets=t.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=t.brackets.map(function(t){return{open:t[0],openRegExp:e._createOpenBracketRegExp(t[0]),close:t[1],closeRegExp:e._createCloseBracketRegExp(t[1])}}),this._regExpRules=t.regExpRules||[],this._indentationRules=t.indentationRules}return e.prototype.onEnter=function(e,t,n){for(var i=0,r=this._regExpRules.length;i<r;i++){var s=this._regExpRules[i];if(s.beforeText.test(t)){if(!s.afterText)return s.action;if(s.afterText.test(n))return s.action}}if(t.length>0&&n.length>0)for(var i=0,r=this._brackets.length;i<r;i++){var a=this._brackets[i];if(a.openRegExp.test(t)&&a.closeRegExp.test(n))return{indentAction:o.IndentAction.IndentOutdent}}if(this._indentationRules){var u=null,l=!1;if(this._indentationRules.increaseIndentPattern&&this._indentationRules.increaseIndentPattern.test(t)&&(u=1),this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(t)&&(u=1),this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(n)&&(u=u?u-1:-1),this._indentationRules.indentNextLinePattern&&this._indentationRules.indentNextLinePattern.test(e)&&(u=u?u-1:-1),this._indentationRules.decreaseIndentPattern&&this._indentationRules.decreaseIndentPattern.test(t)&&(l=!0),null!==u||l)switch(u=u||0){case-1:return{indentAction:o.IndentAction.Outdent,outdentCurrentLine:l};case 0:return{indentAction:o.IndentAction.None,outdentCurrentLine:l};case 1:return{indentAction:o.IndentAction.Indent,outdentCurrentLine:l}}}if(t.length>0)for(var i=0,r=this._brackets.length;i<r;i++){var a=this._brackets[i];if(a.openRegExp.test(t))return{indentAction:o.IndentAction.Indent}}return null},e.prototype.containNonWhitespace=function(e){var t=i.lastNonWhitespaceIndex(e);return t>=0},e.prototype.shouldIgnore=function(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&this._indentationRules.unIndentedLinePattern.test(e))},e._createOpenBracketRegExp=function(t){var n=i.escapeRegExpCharacters(t);return/\B/.test(n.charAt(0))||(n="\\b"+n),n+="\\s*$",e._safeRegExp(n)},e._createCloseBracketRegExp=function(t){var n=i.escapeRegExpCharacters(t);return/\B/.test(n.charAt(n.length-1))||(n+="\\b"),n="^\\s*"+n,e._safeRegExp(n)},e._safeRegExp=function(e){try{return new RegExp(e)}catch(e){return n.onUnexpectedError(e),null}},e}();t.OnEnterSupport=r}),define(d[74],h([0,1,9,3]),function(e,t,n,i){"use strict";function o(e,t){var n={};return function(i){var o=e(i);return n.hasOwnProperty(o)||(n[o]=t(i)),n[o]}}function r(e){var t="("+e.map(n.escapeRegExpCharacters).join(")|(")+")";return n.createRegExp(t,!0)}var s=function(){function e(e,t,n,i,o){this.languageIdentifier=e,this.open=t,this.close=n,this.forwardRegex=i,this.reversedRegex=o}return e}();t.RichEditBracket=s;var a=function(){function e(e,t){var n=this;this.brackets=t.map(function(t){return new s(e,t[0],t[1],u({open:t[0],close:t[1]}),l({open:t[0],close:t[1]}))}),this.forwardRegex=c(this.brackets),this.reversedRegex=d(this.brackets),this.textIsBracket={},this.textIsOpenBracket={};var i=0;this.brackets.forEach(function(e){n.textIsBracket[e.open.toLowerCase()]=e,n.textIsBracket[e.close.toLowerCase()]=e,n.textIsOpenBracket[e.open.toLowerCase()]=!0,n.textIsOpenBracket[e.close.toLowerCase()]=!1,i=Math.max(i,e.open.length),i=Math.max(i,e.close.length)}),this.maxBracketLength=i}return e}();t.RichEditBrackets=a;var u=o(function(e){return e.open+";"+e.close},function(e){return r([e.open,e.close])}),l=o(function(e){return e.open+";"+e.close},function(e){return r([h(e.open),h(e.close)])}),c=o(function(e){return e.map(function(e){return e.open+";"+e.close}).join(";")},function(e){var t=[];return e.forEach(function(e){t.push(e.open),t.push(e.close)}),r(t)}),d=o(function(e){return e.map(function(e){return e.open+";"+e.close}).join(";")},function(e){var t=[];return e.forEach(function(e){t.push(h(e.open)),t.push(h(e.close))}),r(t)}),h=function(){function e(e){for(var t="",n=e.length-1;n>=0;n--)t+=e.charAt(n);return t}var t=null,n=null;return function(i){return t!==i&&(t=i,n=e(t)),n}}(),p=function(){function e(){}return e._findPrevBracketInText=function(e,t,n,o){var r=n.match(e);if(!r)return null;var s=n.length-r.index,a=r[0].length,u=o+s;return new i.Range(t,u-a+1,t,u+1)},e.findPrevBracketInToken=function(e,t,n,i,o){var r=h(n),s=r.substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,s,i)},e.findNextBracketInText=function(e,t,n,o){var r=n.match(e);if(!r)return null;var s=r.index,a=r[0].length,u=o+s;return new i.Range(t,u+1,t,u+1+a)},e.findNextBracketInToken=function(e,t,n,i,o){var r=n.substring(i,o);return this.findNextBracketInText(e,t,r,i)},e}();t.BracketsUtils=p}),define(d[195],h([0,1,78,74,65]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,n){n=n||{},this._richEditBrackets=e,this._complexAutoClosePairs=t.filter(function(e){return e.open.length>1&&!!e.close}).map(function(e){return new o.StandardAutoClosingPairConditional(e)}),n.docComment&&this._complexAutoClosePairs.push(new o.StandardAutoClosingPairConditional({open:n.docComment.open,close:n.docComment.close}))}return e.prototype.getElectricCharacters=function(){var e=[];if(this._richEditBrackets)for(var t=0,n=this._richEditBrackets.brackets.length;t<n;t++){var i=this._richEditBrackets.brackets[t],o=i.close.charAt(i.close.length-1);e.push(o)}for(var r=0,s=this._complexAutoClosePairs;r<s.length;r++){var a=s[r];e.push(a.open.charAt(a.open.length-1))}return e=e.filter(function(e,t,n){return n.indexOf(e)===t})},e.prototype.onElectricCharacter=function(e,t,n){return this._onElectricAutoClose(e,t,n)||this._onElectricAutoIndent(e,t,n)},e.prototype._onElectricAutoIndent=function(e,t,o){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;var r=t.findTokenIndexAtOffset(o-1);if(n.ignoreBracketsInToken(t.getStandardTokenType(r)))return null;var s=this._richEditBrackets.reversedRegex,a=t.getLineContent().substring(0,o-1)+e,u=i.BracketsUtils.findPrevBracketInToken(s,1,a,0,a.length);if(!u)return null;var l=a.substring(u.startColumn-1,u.endColumn-1);l=l.toLowerCase();var c=this._richEditBrackets.textIsOpenBracket[l];if(c)return null;var d=a.substring(0,u.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:l}:null},e.prototype._onElectricAutoClose=function(e,t,n){if(!this._complexAutoClosePairs.length)return null;for(var i=t.getLineContent(),o=0,r=this._complexAutoClosePairs.length;o<r;o++){var s=this._complexAutoClosePairs[o];if(e===s.open.charAt(s.open.length-1)){var a=i.substring(i.length-s.open.length+1)+e;if(a===s.open){var u=t.findTokenIndexAtOffset(n-1),l=t.getStandardTokenType(u);if(s.isOK(l)&&!(i.indexOf(s.close,n-1)>=0))return{appendText:s.close}}}}return null},e}();t.BracketElectricCharacterSupport=r}),define(d[38],h([0,1,191,195,193,74,12,10,9,73,78,3,65]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=function(){function e(t,o,s){var a=null;o&&(a=o._conf),this._conf=e._mergeConf(a,s),this._conf.brackets&&(this.brackets=new r.RichEditBrackets(t,this._conf.brackets)),this.onEnter=e._handleOnEnter(this._conf),this.comments=e._handleComments(this._conf),this.characterPair=new n.CharacterPairSupport(this._conf),this.electricCharacter=new i.BracketElectricCharacterSupport(this.brackets,this.characterPair.getAutoClosingPairs(),this._conf.__electricCharacterSupport),
this.wordDefinition=this._conf.wordPattern||l.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules}return e._mergeConf=function(e,t){return{comments:e?t.comments||e.comments:t.comments,brackets:e?t.brackets||e.brackets:t.brackets,wordPattern:e?t.wordPattern||e.wordPattern:t.wordPattern,indentationRules:e?t.indentationRules||e.indentationRules:t.indentationRules,onEnterRules:e?t.onEnterRules||e.onEnterRules:t.onEnterRules,autoClosingPairs:e?t.autoClosingPairs||e.autoClosingPairs:t.autoClosingPairs,surroundingPairs:e?t.surroundingPairs||e.surroundingPairs:t.surroundingPairs,__electricCharacterSupport:e?t.__electricCharacterSupport||e.__electricCharacterSupport:t.__electricCharacterSupport}},e._handleOnEnter=function(e){var t={},n=!0;return e.brackets&&(n=!1,t.brackets=e.brackets),e.indentationRules&&(n=!1,t.indentationRules=e.indentationRules),e.onEnterRules&&(n=!1,t.regExpRules=e.onEnterRules),n?null:new o.OnEnterSupport(t)},e._handleComments=function(e){var t=e.comments;if(!t)return null;var n={};if(t.lineComment&&(n.lineCommentToken=t.lineComment),t.blockComment){var i=t.blockComment,o=i[0],r=i[1];n.blockCommentStartToken=o,n.blockCommentEndToken=r}return n},e}();t.RichEditSupport=p;var f=function(){function e(){this._onDidChange=new s.Emitter,this.onDidChange=this._onDidChange.event,this._entries=[]}return e.prototype.register=function(e,t){var n=this,i=this._getRichEditSupport(e.id),o=new p(e,i,t);return this._entries[e.id]=o,this._onDidChange.fire(void 0),{dispose:function(){n._entries[e.id]===o&&(n._entries[e.id]=i,n._onDidChange.fire(void 0))}}},e.prototype._getRichEditSupport=function(e){return this._entries[e]||null},e.prototype.getIndentationRules=function(e){var t=this._entries[e];return t?t.indentationRules||null:null},e.prototype._getElectricCharacterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.electricCharacter||null:null},e.prototype.getElectricCharacters=function(e){var t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]},e.prototype.onElectricCharacter=function(e,t,n){var i=c.createScopedLineTokens(t,n-1),o=this._getElectricCharacterSupport(i.languageId);return o?o.onElectricCharacter(e,i,n-i.firstCharOffset):null},e.prototype.getComments=function(e){var t=this._getRichEditSupport(e);return t?t.comments||null:null},e.prototype._getCharacterPairSupport=function(e){var t=this._getRichEditSupport(e);return t?t.characterPair||null:null},e.prototype.getAutoClosingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getAutoClosingPairs():[]},e.prototype.getSurroundingPairs=function(e){var t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]},e.prototype.shouldAutoClosePair=function(e,t,n){var i=c.createScopedLineTokens(t,n-1),o=this._getCharacterPairSupport(i.languageId);return!!o&&o.shouldAutoClosePair(e,i,n-i.firstCharOffset)},e.prototype.getWordDefinition=function(e){var t=this._getRichEditSupport(e);return t?l.ensureValidWordDefinition(t.wordDefinition||null):l.ensureValidWordDefinition(null)},e.prototype._getOnEnterSupport=function(e){var t=this._getRichEditSupport(e);return t?t.onEnter||null:null},e.prototype.getRawEnterActionAtPosition=function(e,t,n){var i=this.getEnterAction(e,new d.Range(t,n,t,n));return i?i.enterAction:null},e.prototype.getEnterAction=function(e,t){var n=this.getIndentationAtPosition(e,t.startLineNumber,t.startColumn),i=!1,o=this.getScopedLineTokens(e,t.startLineNumber),r=this._getOnEnterSupport(o.languageId);if(!r)return{enterAction:{indentAction:h.IndentAction.None,appendText:""},indentation:n,ignoreCurrentLine:!1};var s,u=o.getLineContent(),l=u.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=u.substr(t.startColumn-1-o.firstCharOffset);else{var c=this.getScopedLineTokens(e,t.endLineNumber);s=c.getLineContent().substr(t.endColumn-1-c.firstCharOffset)}var d=t.startLineNumber;if(r.shouldIgnore(l)){i=!0;var p=this.getLastValidLine(e,d,r);if(p<=0)return{enterAction:{indentAction:h.IndentAction.None,appendText:""},indentation:"",ignoreCurrentLine:i};o=this.getScopedLineTokens(e,p),l=this.getLineContent(e,p),d=p,n=this.getIndentationAtPosition(e,d,e.getLineMaxColumn(d))}var f="";if(d>1&&0===o.firstCharOffset){var p=this.getLastValidLine(e,d,r);if(p>=1){var g=this.getScopedLineTokens(e,p);g.languageId===o.languageId&&(f=g.getLineContent())}}var m=null;try{m=r.onEnter(f,l,s)}catch(e){a.onUnexpectedError(e)}return m?m.appendText||(m.indentAction===h.IndentAction.Indent||m.indentAction===h.IndentAction.IndentOutdent?m.appendText="\t":m.appendText=""):m={indentAction:h.IndentAction.None,appendText:""},{enterAction:m,indentation:n,ignoreCurrentLine:i}},e.prototype.getIndentationAtPosition=function(e,t,n){var i=e.getLineContent(t),o=u.getLeadingWhitespace(i);return o.length>n-1&&(o=o.substring(0,n-1)),o},e.prototype.getLastValidLine=function(e,t,n){if(t>1){var i=t-1;for(i=t-1;i>=1;i--){var o=e.getLineContent(i);if(!n.shouldIgnore(o)&&n.containNonWhitespace(o))break}if(i>=1)return i}return-1},e.prototype.getLineContent=function(e,t){var n=this.getScopedLineTokens(e,t),i=e.getLineMaxColumn(t),o=n.getLineContent(),r=o.substr(0,i-1-n.firstCharOffset);return r},e.prototype.getScopedLineTokens=function(e,t){var n=e.getLineTokens(t,!1),i=e.getLineMaxColumn(t),o=c.createScopedLineTokens(n,i-1);return o},e.prototype.getGoodIndentActionForLine=function(e,t){var n=this._getOnEnterSupport(e.getLanguageIdentifier().id);if(!n)return null;var i=this.getLastValidLine(e,t,n);if(i<1)return null;if(t<=e.getLineCount()){var o=this.getScopedLineTokens(e,t),r=this.getScopedLineTokens(e,i);if(o.languageId!==r.languageId)return null}var s,a=e.getLineContent(i);i>1&&(s=e.getLineContent(i-1));var l=u.getLeadingWhitespace(a),c=n.onEnter(s,a,"");return{indentation:l,action:c?c.indentAction:null}},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t?t.brackets||null:null},e}();t.LanguageConfigurationRegistryImpl=f,t.LanguageConfigurationRegistry=new f}),define(d[197],h([0,1,89]),function(e,t,n){"use strict";function i(e){if(!e||!Array.isArray(e))return[];for(var t=[],n=0,i=0,o=e.length;i<o;i++){var r=e[i],a=-1;if("string"==typeof r.fontStyle){a=0;for(var u=r.fontStyle.split(" "),l=0,c=u.length;l<c;l++){var d=u[l];switch(d){case"italic":a|=1;break;case"bold":a|=2;break;case"underline":a|=4}}}var h=null;"string"==typeof r.foreground&&(h=r.foreground);var p=null;"string"==typeof r.background&&(p=r.background),t[n++]=new s(r.token||"",i,a,h,p)}return t}function o(e){e.sort(function(e,t){var n=r(e.token,t.token);return 0!==n?n:e.index-t.index});for(var t=0,n="000000",i="ffffff";e.length>=1&&""===e[0].token;){var o=e.shift();o.fontStyle!==-1&&(t=o.fontStyle),null!==o.foreground&&(n=o.foreground),null!==o.background&&(i=o.background)}for(var s=new a,c=new l(t,s.getId(n),s.getId(i)),h=new d(c),p=0,f=e.length;p<f;p++){var g=e[p];h.insert(g.token,g.fontStyle,s.getId(g.foreground),s.getId(g.background))}return new u(s,h)}function r(e,t){return e<t?-1:e>t?1:0}var s=function(){function e(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}return e}();t.ParsedThemeRule=s,t.parseTheme=i;var a=function(){function e(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}return e.prototype.getId=function(e){if(null===e)return 0;if(e=e.toUpperCase(),!/^[0-9A-F]{6}$/.test(e))throw new Error("Illegal color name: "+e);var t=this._color2id.get(e);return t?t:(t=++this._lastColorId,this._color2id.set(e,t),this._id2color[t]=e,t)},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=a;var u=function(){function e(e,t){this._colorMap=e,this._root=t,this._cache=new Map}return e.createFromRawTheme=function(e){return this.createFromParsedTheme(i(e))},e.createFromParsedTheme=function(e){return o(e)},e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype.getThemeTrieElement=function(){return this._root.toExternalThemeTrieElement()},e.prototype._match=function(e){var t=this._cache.get(e);return"undefined"==typeof t&&(t=this._root.match(e),this._cache.set(e,t)),t},e.prototype.match=function(e,t){var i=this._match(t),o=n.toStandardTokenType(t);return(i.metadata|o<<8|e<<0)>>>0},e}();t.Theme=u,t.strcmp=r;var l=function(){function e(e,t,n){this._fontStyle=e,this._foreground=t,this._background=n,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}return e.prototype.clone=function(){return new e(this._fontStyle,this._foreground,this._background)},e.cloneArr=function(e){for(var t=[],n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t},e.prototype.acceptOverwrite=function(e,t,n){e!==-1&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==n&&(this._background=n),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0},e}();t.ThemeTrieElementRule=l;var c=function(){function e(e,t){this.mainRule=e,this.children=t||Object.create(null)}return e}();t.ExternalThemeTrieElement=c;var d=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.toExternalThemeTrieElement=function(){var e=Object.create(null);return this._children.forEach(function(t,n){e[n]=t.toExternalThemeTrieElement()}),new c(this._mainRule,e)},e.prototype.match=function(e){if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");i===-1?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return"undefined"!=typeof o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""===t)return void this._mainRule.acceptOverwrite(n,i,o);var r,s,a=t.indexOf(".");a===-1?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var u=this._children.get(r);"undefined"==typeof u&&(u=new e(this._mainRule.clone()),this._children.set(r,u)),u.insert(s,n,i,o)},e}();t.ThemeTrieElement=d}),define(d[139],h([0,1,9,16,63,89]),function(e,t,n,i,o,r){"use strict";function s(e,t){return u(e,a(t))}function a(e){var t=i.TokenizationRegistry.get(e);return t?t:{getInitialState:function(){return o.NULL_STATE},tokenize:void 0,tokenize2:function(e,t,n){return o.nullTokenize2(0,e,t,n)}}}function u(e,t){for(var i='<div class="monaco-tokenized-source">',o=e.split(/\r\n|\r|\n/),s=t.getInitialState(),a=0,u=o.length;a<u;a++){var l=o[a];a>0&&(i+="<br/>");for(var c=t.tokenize2(l,s,0),d=new r.LineTokens(null,c.tokens,l),h=d.inflate(),p=0,f=0,g=h.length;f<g;f++){var m=h[f];i+='<span class="'+m.type+'">'+n.escape(l.substring(p,m.endIndex))+"</span>",p=m.endIndex}s=c.endState}return i+="</div>"}t.tokenizeToString=s}),define(d[199],h([0,1,12]),function(e,t,n){"use strict";var i=function(){function e(){this._codeEditors=Object.create(null),this._onCodeEditorAdd=new n.Emitter,this._onCodeEditorRemove=new n.Emitter}return e.prototype.addCodeEditor=function(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorAdd",{get:function(){return this._onCodeEditorAdd.event},enumerable:!0,configurable:!0}),e.prototype.removeCodeEditor=function(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)},Object.defineProperty(e.prototype,"onCodeEditorRemove",{get:function(){return this._onCodeEditorRemove.event},enumerable:!0,configurable:!0}),e.prototype.getCodeEditor=function(e){return this._codeEditors[e]||null},e.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map(function(t){return e._codeEditors[t]})},e.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0;n<t.length;n++){var i=t[n];if(i.isFocused())return i;i.hasWidgetFocus()&&(e=i)}return e},e}();t.AbstractCodeEditorService=i}),define(d[140],h([0,1,12,31,15,3,20,6,142,82,27]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(){return{editor:void 0,languages:void 0,CancellationTokenSource:u.CancellationTokenSource,Emitter:n.Emitter,KeyCode:f,KeyMod:p,Keybinding:i.Keybinding,Position:o.Position,Range:r.Range,Selection:s.Selection,SelectionDirection:s.SelectionDirection,Severity:h,Promise:a.TPromise,Uri:c.default,Token:l.Token}}var h;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(h=t.Severity||(t.Severity={}));var p=function(){function e(){}return e.chord=function(e,t){return i.KeyChord(e,t)},e}();p.CtrlCmd=2048,p.Shift=1024,p.Alt=512,p.WinCtrl=256,t.KeyMod=p;var f;!function(e){e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.MAX_VALUE=109]="MAX_VALUE"}(f=t.KeyCode||(t.KeyCode={})),t.createMonacoBaseAPI=d}),define(d[201],h([0,1]),function(e,t){"use strict";t.vs=[{token:"",foreground:"000000"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"09885A"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.jade",foreground:"4F76AC"},{token:"tag.class.jade",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"09885A"},{token:"attribute.value.unit",foreground:"09885A"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"FF00FF"}],t.vs_dark=[{token:"",foreground:"D4D4D4"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.jade",foreground:"4F76AC"},{token:"tag.class.jade",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],t.hc_black=[{token:"",foreground:"FFFFFF"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.jade",foreground:"4F76AC"},{token:"tag.class.jade",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}]}),define(d[202],h([0,1,197,201,11,16]),function(e,t,n,i,o,r){"use strict";function s(e){return e===l||e===c||e===d}function a(e){switch(e){case l:return i.vs;case c:return i.vs_dark;case d:return i.hc_black}}var u=function(){function e(e,t){this.cssClassName=e,this.rules=t}return e}(),l="vs",c="vs-dark",d="hc-black",h=function(){function e(){this._knownThemes=new Map,this._knownThemes.set(l,new u(l,a(l))),this._knownThemes.set(c,new u(c,a(c))),this._knownThemes.set(d,new u(d,a(d))),this._styleElement=o.createStyleSheet(),this._styleElement.className="monaco-tokens-styles",this.setTheme(l)}return e._generateCSS=function(e){for(var t=[],n=1,i=e.length;n<i;n++){var o=e[n];t[n]=".mtk"+n+" { color: #"+o+"; }"}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; }"),t.join("\n")},e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e)||s(e))throw new Error("Illegal theme name!");if(!s(t.base))throw new Error("Illegal theme base!");var n=t.base+" "+e,i=[];t.inherit&&(i=i.concat(a(t.base))),i=i.concat(t.rules),this._knownThemes.set(e,new u(n,i))},e.prototype.getTheme=function(){return this._theme},e.prototype.setTheme=function(t){var i;i=this._knownThemes.has(t)?this._knownThemes.get(t):this._knownThemes.get(l),this._theme=n.Theme.createFromRawTheme(i.rules);var o=this._theme.getColorMap(),s=e._generateCSS(o);return this._styleElement.innerHTML=s,r.TokenizationRegistry.setColorMap(o),i.cssClassName},e}();t.StandaloneColorServiceImpl=h}),define(d[85],h([0,1,3]),function(e,t,n){"use strict";var i=function(){function e(e,t,n){this._viewLines=e,this._layoutProvider=t,this.linesViewportData=n,this.scrollWidth=this._layoutProvider.getScrollWidth(),this.scrollHeight=this._layoutProvider.getScrollHeight(),this.visibleRange=this.linesViewportData.visibleRange,this.bigNumbersDelta=this.linesViewportData.bigNumbersDelta;var i=this._layoutProvider.getCurrentViewport();this.viewportWidth=i.width,this.viewportHeight=i.height,this.viewportLeft=i.left,this.viewportTop=i.top}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return this._layoutProvider.getScrolledTopFromAbsoluteTop(e)},e.prototype.getViewportVerticalOffsetForLineNumber=function(e){var t=this._layoutProvider.getVerticalOffsetForLineNumber(e),n=this._layoutProvider.getScrolledTopFromAbsoluteTop(t);return n},e.prototype.lineIsVisible=function(e){return this.linesViewportData.visibleRange.startLineNumber<=e&&e<=this.linesViewportData.visibleRange.endLineNumber},e.prototype.getDecorationsInViewport=function(){return this.linesViewportData.getDecorationsInViewport()},e.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},e.prototype.visibleRangeForPosition=function(e){var t=this.linesViewportData.visibleRangesDeltaTop,i=this._viewLines.visibleRangesForRange2(new n.Range(e.lineNumber,e.column,e.lineNumber,e.column),t);return i?i[0]:null},e}();t.RenderingContext=i;var o=function(){function e(e,t){this.lineNumber=e,this.ranges=t}return e}();t.LineVisibleRanges=o;var r=function(){function e(e,t,n){this.top=0|e,this.left=0|t,this.width=0|n}return e}();t.VisibleRange=r;var s=function(){function e(e,t){this.left=Math.round(e),this.width=Math.round(t)}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e}();t.HorizontalRange=s}),define(d[204],h([0,1,85]),function(e,t,n){"use strict";var i=function(){function e(e,t){this.left=e,this.width=t}return e.prototype.toString=function(){return"["+this.left+","+this.width+"]"},e.compare=function(e,t){return e.left-t.left},e}(),o=function(){function e(){}return e._createRange=function(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange},e._detachRange=function(e,t){e.selectNodeContents(t)},e._readClientRects=function(e,t,n,i,o){var r=this._createRange();try{return r.setStart(e,t),r.setEnd(n,i),r.getClientRects()}catch(e){return null}finally{this._detachRange(r,o)}},e._mergeAdjacentRanges=function(e){if(1===e.length)return[new n.HorizontalRange(e[0].left,e[0].width)];e.sort(i.compare);for(var t=[],o=0,r=e[0].left,s=e[0].width,a=1,u=e.length;a<u;a++){var l=e[a],c=l.left,d=l.width;r+s+.9>=c?s=Math.max(s,c+d-r):(t[o++]=new n.HorizontalRange(r,s),r=c,s=d)}return t[o++]=new n.HorizontalRange(r,s),t},e._createHorizontalRangesFromClientRects=function(e,t){if(!e||0===e.length)return null;for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];n[o]=new i(Math.max(0,s.left-t),s.width)}return this._mergeAdjacentRanges(n)},e.readHorizontalRanges=function(e,t,n,i,o,r,s){var a=0,u=e.children.length-1;if(a>u)return null;t=Math.min(u,Math.max(a,t)),i=Math.min(u,Math.max(a,i)),t!==i&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var l=e.children[t].firstChild,c=e.children[i].firstChild;if(!l||!c)return null;n=Math.min(l.textContent.length,Math.max(0,n)),o=Math.min(c.textContent.length,Math.max(0,o));var d=this._readClientRects(l,n,c,o,s);return this._createHorizontalRangesFromClientRects(d,r)},e}();t.RangeUtil=o}),define(d[205],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n,i,o){this.configuration=e,this.model=t,this.privateViewEventBus=n,this.addEventHandler=i,this.removeEventHandler=o}return e}();t.ViewContext=n}),define(d[119],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n,i){this.startColumn=e,this.endColumn=t,this.className=n,this.insertsBeforeOrAfter=i}return e._equals=function(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.insertsBeforeOrAfter===t.insertsBeforeOrAfter},e.equalsArr=function(t,n){var i=t.length,o=n.length;if(i!==o)return!1;for(var r=0;r<i;r++)if(!e._equals(t[r],n[r]))return!1;return!0},e.filter=function(t,n,i,o){if(0===t.length)return[];for(var r=[],s=0,a=0,u=t.length;a<u;a++){var l=t[a],c=l.range;if(!(c.endLineNumber<n||c.startLineNumber>n||c.isEmpty())){var d=c.startLineNumber===n?c.startColumn:i,h=c.endLineNumber===n?c.endColumn:o;h<=1||(r[s++]=new e(d,h,l.inlineClassName,l.insertsBeforeOrAfter))}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.className<t.className?-1:e.className>t.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}();t.Decoration=n;var i=function(){function e(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}return e}();t.DecorationSegment=i;var o=function(){function e(){this.stopOffsets=[],this.classNames=[],this.count=0}return e.prototype.consumeLowerThan=function(e,t,n){for(;this.count>0&&this.stopOffsets[0]<e;){for(var o=0;o+1<this.count&&this.stopOffsets[o]===this.stopOffsets[o+1];)o++;n.push(new i(t,this.stopOffsets[o],this.classNames.join(" "))),t=this.stopOffsets[o]+1,this.stopOffsets.splice(0,o+1),this.classNames.splice(0,o+1),this.count-=o+1}return this.count>0&&t<e&&(n.push(new i(t,e-1,this.classNames.join(" "))),t=e),t},e.prototype.insert=function(e,t){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t);else for(var n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),r=function(){function e(){}return e.normalize=function(e){if(0===e.length)return[];for(var t=[],n=new o,i=0,r=0,s=e.length;r<s;r++){var a=e[r],u=a.startColumn-1,l=a.endColumn-2;i=n.consumeLowerThan(u,i,t),0===n.count&&(i=u),n.insert(l,a.className)}return n.consumeLowerThan(1073741824,i,t),t},e}();t.LineDecorationsNormalizer=r}),define(d[120],h([0,1,88,119,9]),function(e,t,n,i,o){"use strict";function r(e){return 0===e.lineContent.length?new m(new g(0,0),"<span><span>&nbsp;</span></span>",!1,!1):d(s(e))}function s(e){var t,n,i=e.useMonospaceOptimizations,r=e.lineContent;e.stopRenderingLineAfter!==-1&&e.stopRenderingLineAfter<r.length?(t=!0,n=e.stopRenderingLineAfter):(t=!1,n=r.length);var s=a(e.lineTokens,n);2!==e.renderWhitespace&&1!==e.renderWhitespace||(s=l(r,n,s,e.fauxIndentLength,e.tabSize,i,1===e.renderWhitespace));var d=!1;if(e.lineDecorations.length>0){for(var h=0,p=e.lineDecorations.length;h<p;h++){var f=e.lineDecorations[h];if(f.insertsBeforeOrAfter){d=!0;break}}s=c(r,n,s,e.lineDecorations)}var g=!1;return e.mightContainRTL&&(g=o.containsRTL(r)),g||(s=u(s)),new _(i,r,n,t,s,d,e.tabSize,g,e.spaceWidth,e.renderWhitespace,e.renderControlCharacters)}function a(e,t){if(0===e.length)return e;if(e[e.length-1].endIndex===t)return e;for(var i=[],o=0,r=e.length;o<r;o++){var s=e[o].endIndex;if(s===t){i[o]=e[o];break}if(s>t){i[o]=new n.ViewLineToken(t,e[o].type);break}i[o]=e[o]}return i}function u(e){for(var t=0,i=[],o=0,r=0,s=e.length;r<s;r++){var a=e[r],u=a.endIndex,l=u-t;if(l>50){for(var c=a.type,d=Math.ceil(l/50),h=1;h<d;h++){var p=t+50*h;i[o++]=new n.ViewLineToken(p,c)}i[o++]=new n.ViewLineToken(u,c)}else i[o++]=a;t=u}return i}function l(e,t,i,r,s,a,u){var l=[],c=0,d=0,h=i[d].type,p=i[d].endIndex;r>0&&(l[c++]=new n.ViewLineToken(r,""));var f,g=o.firstNonWhitespaceIndex(e);g===-1?(g=t,f=t):f=o.lastNonWhitespaceIndex(e);for(var m=0,v=0;v<r;v++){var _=e.charCodeAt(v);9===_?m=s:m++}m%=s;for(var y=!1,v=r;v<t;v++){var _=e.charCodeAt(v),C=void 0;if(v<g||v>f)C=!0;else if(9===_)C=!0;else if(32===_)if(u)if(y)C=!0;else{var b=v+1<t?e.charCodeAt(v+1):0;C=32===b||9===b}else C=!0;else C=!1;y?(!C||!a&&m>=s)&&(l[c++]=new n.ViewLineToken(v,"vs-whitespace"),m%=s):(v===p||C&&v>r)&&(l[c++]=new n.ViewLineToken(v,h),m%=s),9===_?m=s:m++,y=C,v===p&&(d++,h=i[d].type,p=i[d].endIndex)}return y?l[c++]=new n.ViewLineToken(t,"vs-whitespace"):l[c++]=new n.ViewLineToken(t,h),l}function c(e,t,o,r){r.sort(i.Decoration.compare);for(var s=i.LineDecorationsNormalizer.normalize(r),a=s.length,u=0,l=[],c=0,d=0,h=0,p=o.length;h<p;h++){for(var f=o[h],g=f.endIndex,m=f.type;u<a&&s[u].startOffset<g;){var v=s[u];if(v.startOffset>d&&(d=v.startOffset,l[c++]=new n.ViewLineToken(d,m)),!(v.endOffset+1<=g)){d=g,l[c++]=new n.ViewLineToken(d,m+" "+v.className);break}d=v.endOffset+1,l[c++]=new n.ViewLineToken(d,m+" "+v.className),u++}g>d&&(d=g,l[c++]=new n.ViewLineToken(d,m))}return l}function d(e){for(var t=e.fontIsMonospace,n=e.containsForeignElements,i=e.lineContent,o=e.len,r=e.isOverflowing,s=e.tokens,a=e.tabSize,u=e.containsRTL,l=e.spaceWidth,c=e.renderWhitespace,d=e.renderControlCharacters,h=new g(o+1,s.length),p=0,f=0,v=0,_="<span>",y=0,C=s.length;y<C;y++){var b=s[y],w=b.endIndex,S=b.type,E=0!==c&&S.indexOf("vs-whitespace")>=0;if(v=0,E){for(var L=0,N="";p<w;p++){h.setPartData(p,y,v);var T=i.charCodeAt(p);if(9===T){var x=a-(p+f)%a;for(f+=x-1,v+=x-1,x>0&&(N+="&rarr;",L++,x--);x>0;)N+="&nbsp;",L++,x--}else N+="&middot;",L++;v++}h.setPartLength(y,L),_+=t?'<span class="'+S+'">'+N+"</span>":'<span class="'+S+'" style="width:'+l*L+'px">'+N+"</span>"}else{for(var L=0,N="";p<w;p++){h.setPartData(p,y,v);var T=i.charCodeAt(p);switch(T){case 9:var x=a-(p+f)%a;for(f+=x-1,v+=x-1;x>0;)N+="&nbsp;",L++,x--;break;case 32:N+="&nbsp;",L++;break;case 60:N+="&lt;",L++;break;case 62:N+="&gt;",L++;break;case 38:N+="&amp;",L++;break;case 0:N+="&#00;",L++;break;case 65279:case 8232:N+="�",L++;break;case 13:N+="&#8203",L++;break;default:d&&T<32?(N+=String.fromCharCode(9216+T),L++):(N+=String.fromCharCode(T),L++)}v++}h.setPartLength(y,L),_+=u?'<span dir="ltr" class="'+S+'">'+N+"</span>":'<span class="'+S+'">'+N+"</span>"}}return h.setPartData(o,s.length-1,v),r&&(_+='<span class="vs-whitespace">&hellip;</span>'),_+="</span>",new m(h,_,u,n)}var h;!function(e){e[e.None=0]="None",
e[e.Boundary=1]="Boundary",e[e.All=2]="All"}(h=t.RenderWhitespace||(t.RenderWhitespace={}));var p=function(){function e(e,t,n,i,o,r,s,a,u,l,c){this.useMonospaceOptimizations=e,this.lineContent=t,this.mightContainRTL=n,this.fauxIndentLength=i,this.lineTokens=o,this.lineDecorations=r,this.tabSize=s,this.spaceWidth=a,this.stopRenderingLineAfter=u,this.renderWhitespace="all"===l?2:"boundary"===l?1:0,this.renderControlCharacters=c}return e.prototype.equals=function(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.lineContent===e.lineContent&&this.mightContainRTL===e.mightContainRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.spaceWidth===e.spaceWidth&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&i.Decoration.equalsArr(this.lineDecorations,e.lineDecorations)&&n.ViewLineToken.equalsArr(this.lineTokens,e.lineTokens)},e}();t.RenderLineInput=p;var f;!function(e){e[e.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",e[e.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",e[e.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",e[e.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"}(f=t.CharacterMappingConstants||(t.CharacterMappingConstants={}));var g=function(){function e(e,t){this.length=e,this._data=new Uint32Array(this.length),this._partLengths=new Uint16Array(t)}return e.getPartIndex=function(e){return(4294901760&e)>>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n){var i=(t<<16|n<<0)>>>0;this._data[e]=i},e.prototype.setPartLength=function(e,t){this._partLengths[e]=t},e.prototype.getPartLengths=function(){return this._partLengths},e.prototype.charOffsetToPartData=function(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]},e.prototype.partDataToCharOffset=function(t,n,i){if(0===this.length)return 0;for(var o=(t<<16|i<<0)>>>0,r=0,s=this.length-1;r+1<s;){var a=r+s>>>1,u=this._data[a];if(u===o)return a;u>o?s=a:r=a}if(r===s)return r;var l=this._data[r],c=this._data[s];if(l===o)return r;if(c===o)return s;var d,h=e.getPartIndex(l),p=e.getCharIndex(l),f=e.getPartIndex(c);d=h!==f?n:e.getCharIndex(c);var g=i-p,m=d-i;return g<=m?r:s},e}();t.CharacterMapping=g;var m=function(){function e(e,t,n,i){this.characterMapping=e,this.output=t,this.containsRTL=n,this.containsForeignElements=i}return e}();t.RenderLineOutput=m,t.renderViewLine=r;var v,_=function(){function e(e,t,n,i,o,r,s,a,u,l,c){this.fontIsMonospace=e,this.lineContent=t,this.len=n,this.isOverflowing=i,this.tokens=o,this.containsForeignElements=r,this.tabSize=s,this.containsRTL=a,this.spaceWidth=u,this.renderWhitespace=l,this.renderControlCharacters=c}return e}();!function(e){e[e.LongToken=50]="LongToken"}(v||(v={}))}),define(d[146],h([0,1,6,16,120,88,89,9]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t,n){return c(e,t,n)}function l(e,t){for(var n=[],i=0,s=e.length;i<s;i++){var a=e[i],u=o.renderViewLine(new o.RenderLineInput(!1,a,!1,0,[new r.ViewLineToken(a.length,"")],[],t,0,-1,"none",!1));n=n.concat(u.output),n.push("<br/>")}return n.join("")}function c(e,t,n){for(var r=[],a=n.getInitialState(),u=i.TokenizationRegistry.getColorMap(),l=0,c=e.length;l<c;l++){var d=e[l],h=n.tokenize2(d,a,0),p=new s.LineTokens(u,h.tokens,d),f=o.renderViewLine(new o.RenderLineInput(!1,d,!0,0,p.inflate(),[],t,0,-1,"none",!1));r=r.concat(f.output),r.push("<br/>"),a=h.endState}return r.join("")}var d=function(){function e(){}return e.colorizeElement=function(e,t,n,i){i=i||{};var o=i.theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(!r)return void console.error("Mode not detected");e.setTheme(o);var s=n.firstChild.nodeValue;n.className+="monaco-editor "+o;var a=function(e){n.innerHTML=e};return this.colorize(t,s,r,i).then(a,function(e){return console.error(e)},a)},e._tokenizationSupportChangedPromise=function(e){var t=null,o=function(){t&&(t.dispose(),t=null)};return new n.TPromise(function(n,r,s){t=i.TokenizationRegistry.onDidChange(function(t){t.languages.indexOf(e)>=0&&(o(),n(void 0))})},o)},e.colorize=function(e,t,o,r){a.startsWithUTF8BOM(t)&&(t=t.substr(1));var s=t.split(/\r\n|\r|\n/),c=e.getModeId(o);r=r||{},"undefined"==typeof r.tabSize&&(r.tabSize=4),e.getOrCreateMode(c);var d=i.TokenizationRegistry.get(c);return d?n.TPromise.as(u(s,r.tabSize,d)):n.TPromise.any([this._tokenizationSupportChangedPromise(c),n.TPromise.timeout(500)]).then(function(e){var t=i.TokenizationRegistry.get(c);return t?u(s,r.tabSize,t):l(s,r.tabSize)})},e.colorizeLine=function(e,t,n,i){void 0===i&&(i=4);var r=o.renderViewLine(new o.RenderLineInput(!1,e,t,0,n,[],i,0,-1,"none",!1));return r.output},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t),o=e.getLineTokens(t,!1),r=o.inflate();return this.colorizeLine(i,e.mightContainRTL(),r,n)},e}();t.Colorizer=d}),define(d[209],h([0,1,24,18,9,28,119,120,21,204,85]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,n,i){return new y(e,t,n,i)}function h(e,t,n,i){return new _(e,t,n,i)}var p=function(){return!!i.isNative||!(i.isLinux||n.isFirefox||n.isSafari)}(),f=function(){function e(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}return Object.defineProperty(e.prototype,"clientRectDeltaLeft",{get:function(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft},enumerable:!0,configurable:!0}),e}();t.DomReadingContext=f;var g=function(){function e(e){this._context=e,this._renderWhitespace=this._context.configuration.editor.viewInfo.renderWhitespace,this._renderControlCharacters=this._context.configuration.editor.viewInfo.renderControlCharacters,this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth,this._useMonospaceOptimizations=this._context.configuration.editor.fontInfo.isMonospace&&!this._context.configuration.editor.viewInfo.disableMonospaceOptimizations,this._lineHeight=this._context.configuration.editor.lineHeight,this._stopRenderingLineAfter=this._context.configuration.editor.viewInfo.stopRenderingLineAfter,this._isMaybeInvalid=!0,this._renderedViewLine=null}return e.prototype.getDomNode=function(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null},e.prototype.setDomNode=function(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=r.createFastDomNode(e)},e.prototype.onContentChanged=function(){this._isMaybeInvalid=!0},e.prototype.onTokensChanged=function(){this._isMaybeInvalid=!0},e.prototype.onModelDecorationsChanged=function(){this._isMaybeInvalid=!0},e.prototype.onConfigurationChanged=function(e){e.viewInfo.renderWhitespace&&(this._isMaybeInvalid=!0,this._renderWhitespace=this._context.configuration.editor.viewInfo.renderWhitespace),e.viewInfo.renderControlCharacters&&(this._isMaybeInvalid=!0,this._renderControlCharacters=this._context.configuration.editor.viewInfo.renderControlCharacters),e.viewInfo.disableMonospaceOptimizations&&(this._isMaybeInvalid=!0,this._useMonospaceOptimizations=this._context.configuration.editor.fontInfo.isMonospace&&!this._context.configuration.editor.viewInfo.disableMonospaceOptimizations),e.fontInfo&&(this._isMaybeInvalid=!0,this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth,this._useMonospaceOptimizations=this._context.configuration.editor.fontInfo.isMonospace&&!this._context.configuration.editor.viewInfo.disableMonospaceOptimizations),e.lineHeight&&(this._isMaybeInvalid=!0,this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.stopRenderingLineAfter&&(this._isMaybeInvalid=!0,this._stopRenderingLineAfter=this._context.configuration.editor.viewInfo.stopRenderingLineAfter)},e.prototype.shouldUpdateHTML=function(e,t,n){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;var i=this._context.model,r=s.Decoration.filter(n,t,i.getLineMinColumn(t),i.getLineMaxColumn(t)),u=i.getLineContent(t),l=new a.RenderLineInput(this._useMonospaceOptimizations,u,i.mightContainRTL(),i.getLineMinColumn(t)-1,i.getLineTokens(t),r,i.getTabSize(),this._spaceWidth,this._stopRenderingLineAfter,this._renderWhitespace,this._renderControlCharacters);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;var c=a.renderViewLine(l),d=null;if(p&&this._useMonospaceOptimizations&&!c.containsForeignElements){var h=!0;i.mightContainNonBasicASCII()&&(h=o.isBasicASCII(u)),h&&u.length<1e3&&(d=new v(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c))}if(!d){var f=/^\s*$/.test(l.lineContent);d=C(this._renderedViewLine?this._renderedViewLine.domNode:null,l,f,c)}return this._renderedViewLine=d,!0},e.prototype.getLineOuterHTML=function(e,t,n){e.push('<div lineNumber="'+t+'" style="top:'+n+"px;height:"+this._lineHeight+'px;" class="'+u.ClassNames.VIEW_LINE+'">'),e.push(this.getLineInnerHTML(t)),e.push("</div>")},e.prototype.getLineInnerHTML=function(e){return this._renderedViewLine.html},e.prototype.layoutLine=function(e,t){this._renderedViewLine.domNode.setLineNumber(String(e)),this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._lineHeight)},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getVisibleRangesForRange=function(e,t,n){return this._renderedViewLine.getVisibleRangesForRange(e,t,n)},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e}();t.ViewLine=g;var v=function(){function e(t,n,i){this.domNode=t,this.input=n,this.html=i.output,this._characterMapping=i.characterMapping,this._charWidth=n.spaceWidth,this._charOffset=e._createCharOffset(i.characterMapping)}return e._createCharOffset=function(e){for(var t=e.getPartLengths(),n=e.length,i=new Uint32Array(n),o=0,r=0,s=0;s<n;s++){for(var u=e.charOffsetToPartData(s),l=a.CharacterMapping.getPartIndex(u),c=a.CharacterMapping.getCharIndex(u);o<l;)r+=t[o],o++;i[s]=r+c}return i},e.prototype.getWidth=function(){return this._getCharPosition(this._charOffset.length)},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0;var i=0|this.input.stopRenderingLineAfter;if(i!==-1&&e>i&&t>i)return null;i!==-1&&e>i&&(e=i),i!==-1&&t>i&&(t=i);var o=this._getCharPosition(e),r=this._getCharPosition(t);return[new c.HorizontalRange(o,r-o)]},e.prototype._getCharPosition=function(e){return 0===this._charOffset.length?0:Math.round(this._charWidth*this._charOffset[e-1])},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;var r=this._characterMapping.partDataToCharOffset(o,i,n);return r+1},e}(),_=function(){function e(e,t,n,i){if(this.domNode=e,this.input=t,this.html=i.output,this._characterMapping=i.characterMapping,this._isWhitespaceOnly=n,this._cachedWidth=-1,this._pixelOffsetCache=null,!i.containsRTL){this._pixelOffsetCache=new Int32Array(this._characterMapping.length+1);for(var o=0,r=this._characterMapping.length;o<=r;o++)this._pixelOffsetCache[o]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0;var i=0|this.input.stopRenderingLineAfter;if(i!==-1&&e>i&&t>i)return null;if(i!==-1&&e>i&&(e=i),i!==-1&&t>i&&(t=i),null!==this._pixelOffsetCache){var o=this._readPixelOffset(e,n);if(o===-1)return null;var r=this._readPixelOffset(t,n);return r===-1?null:[new c.HorizontalRange(o,r-o)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return i===-1?null:[new c.HorizontalRange(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(n!==-1)return n;var i=this._actualReadPixelOffset(e,t);return this._pixelOffsetCache[e]=i,i}return this._actualReadPixelOffset(e,t)},e.prototype._actualReadPixelOffset=function(e,t){if(0===this._characterMapping.length)return 0;if(e===this._characterMapping.length&&this._isWhitespaceOnly)return this.getWidth();var n=this._characterMapping.charOffsetToPartData(e-1),i=a.CharacterMapping.getPartIndex(n),o=a.CharacterMapping.getCharIndex(n),r=l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),i,o,i,o,t.clientRectDeltaLeft,t.endNode);return r&&0!==r.length?r[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new c.HorizontalRange(0,this.getWidth())];var i=this._characterMapping.charOffsetToPartData(e-1),o=a.CharacterMapping.getPartIndex(i),r=a.CharacterMapping.getCharIndex(i),s=this._characterMapping.charOffsetToPartData(t-1),u=a.CharacterMapping.getPartIndex(s),d=a.CharacterMapping.getCharIndex(s);return l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),o,r,u,d,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;var r=this._characterMapping.partDataToCharOffset(o,i,n);return r+1},e}(),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._readVisibleRangesForRange=function(t,n,i){var o=e.prototype._readVisibleRangesForRange.call(this,t,n,i);if(!o||0===o.length||t===n||1===t&&n===this._characterMapping.length)return o;var r=this._readPixelOffset(n-1,i),s=this._readPixelOffset(n,i);if(r!==-1&&s!==-1){var a=r<=s,u=o[o.length-1];a&&u.left<s&&(u.width=s-u.left)}return o},t}(_),C=function(){return n.isWebKit?d:h}()}),define(d[210],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n,i){this.viewportTop=0|e.viewportTop,this.viewportHeight=0|e.viewportHeight,this.bigNumbersDelta=0|e.bigNumbersDelta,this.visibleRangesDeltaTop=0|e.visibleRangesDeltaTop,this.startLineNumber=0|e.startLineNumber,this.endLineNumber=0|e.endLineNumber,this.relativeVerticalOffset=e.relativeVerticalOffset,this.visibleRange=t,this.completelyVisibleLinesRange=n,this._decorations=i.decorations,this._inlineDecorations=i.inlineDecorations}return e.prototype.getDecorationsInViewport=function(){return this._decorations},e.prototype.getInlineDecorationsForLineInViewport=function(e){return e|=0,this._inlineDecorations[e-this.startLineNumber]},e}();t.ViewLinesViewportData=n}),define(d[211],h([0,1]),function(e,t){"use strict";var n=function(){function e(){this.heights=[],this.ids=[],this.afterLineNumbers=[],this.ordinals=[],this.prefixSum=[],this.prefixSumValidIndex=-1,this.whitespaceId2Index={},this.lastWhitespaceId=0}return e.findInsertionIndex=function(e,t,n,i){for(var o,r=0,s=e.length;r<s;)o=r+s>>>1,t===e[o]?i<n[o]?s=o:r=o+1:t<e[o]?s=o:r=o+1;return r},e.prototype.insertWhitespace=function(t,n,i){t|=0,n|=0,i|=0;var o=++this.lastWhitespaceId,r=e.findInsertionIndex(this.afterLineNumbers,t,this.ordinals,n);return this.insertWhitespaceAtIndex(o,r,t,n,i),o},e.prototype.insertWhitespaceAtIndex=function(e,t,n,i,o){e|=0,t|=0,n|=0,i|=0,o|=0,this.heights.splice(t,0,o),this.ids.splice(t,0,e),this.afterLineNumbers.splice(t,0,n),this.ordinals.splice(t,0,i),this.prefixSum.splice(t,0,0);for(var r=Object.keys(this.whitespaceId2Index),s=0,a=r.length;s<a;s++){var u=r[s],l=this.whitespaceId2Index[u];l>=t&&(this.whitespaceId2Index[u]=l+1)}this.whitespaceId2Index[e.toString()]=t,this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,t-1)},e.prototype.changeWhitespace=function(e,t,n){e|=0,t|=0,n|=0;var i=!1;return i=this.changeWhitespaceHeight(e,n)||i,i=this.changeWhitespaceAfterLineNumber(e,t)||i},e.prototype.changeWhitespaceHeight=function(e,t){e|=0,t|=0;var n=e.toString();if(this.whitespaceId2Index.hasOwnProperty(n)){var i=this.whitespaceId2Index[n];if(this.heights[i]!==t)return this.heights[i]=t,this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,i-1),!0}return!1},e.prototype.changeWhitespaceAfterLineNumber=function(t,n){t|=0,n|=0;var i=t.toString();if(this.whitespaceId2Index.hasOwnProperty(i)){var o=this.whitespaceId2Index[i];if(this.afterLineNumbers[o]!==n){var r=this.ordinals[o],s=this.heights[o];this.removeWhitespace(t);var a=e.findInsertionIndex(this.afterLineNumbers,n,this.ordinals,r);return this.insertWhitespaceAtIndex(t,a,n,r,s),!0}}return!1},e.prototype.removeWhitespace=function(e){e|=0;var t=e.toString();if(this.whitespaceId2Index.hasOwnProperty(t)){var n=this.whitespaceId2Index[t];return delete this.whitespaceId2Index[t],this.removeWhitespaceAtIndex(n),!0}return!1},e.prototype.removeWhitespaceAtIndex=function(e){e|=0,this.heights.splice(e,1),this.ids.splice(e,1),this.afterLineNumbers.splice(e,1),this.ordinals.splice(e,1),this.prefixSum.splice(e,1),this.prefixSumValidIndex=Math.min(this.prefixSumValidIndex,e-1);for(var t=Object.keys(this.whitespaceId2Index),n=0,i=t.length;n<i;n++){var o=t[n],r=this.whitespaceId2Index[o];r>=e&&(this.whitespaceId2Index[o]=r-1)}},e.prototype.onModelLinesDeleted=function(e,t){e|=0,t|=0;var n,i,o;for(i=0,o=this.afterLineNumbers.length;i<o;i++)n=this.afterLineNumbers[i],e<=n&&n<=t?this.afterLineNumbers[i]=e-1:n>t&&(this.afterLineNumbers[i]-=t-e+1)},e.prototype.onModelLinesInserted=function(e,t){e|=0,t|=0;var n,i,o;for(i=0,o=this.afterLineNumbers.length;i<o;i++)n=this.afterLineNumbers[i],e<=n&&(this.afterLineNumbers[i]+=t-e+1)},e.prototype.getTotalHeight=function(){return 0===this.heights.length?0:this.getAccumulatedHeight(this.heights.length-1)},e.prototype.getAccumulatedHeight=function(e){e|=0;var t=Math.max(0,this.prefixSumValidIndex+1);0===t&&(this.prefixSum[0]=this.heights[0],t++);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.heights[n];return this.prefixSumValidIndex=Math.max(this.prefixSumValidIndex,e),this.prefixSum[e]},e.prototype.getAccumulatedHeightBeforeLineNumber=function(e){e|=0;var t=this.findLastWhitespaceBeforeLineNumber(e);return t===-1?0:this.getAccumulatedHeight(t)},e.prototype.findLastWhitespaceBeforeLineNumber=function(e){e|=0;for(var t=this.afterLineNumbers,n=0,i=t.length-1;n<=i;){var o=i-n|0,r=o/2|0,s=n+r|0;if(t[s]<e){if(s+1>=t.length||t[s+1]>=e)return s;n=s+1|0}else i=s-1|0}return-1},e.prototype.findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this.findLastWhitespaceBeforeLineNumber(e),n=t+1;return n<this.heights.length?n:-1},e.prototype.getFirstWhitespaceIndexAfterLineNumber=function(e){return e|=0,this.findFirstWhitespaceAfterLineNumber(e)},e.prototype.getCount=function(){return this.heights.length},e.prototype.getAfterLineNumberForWhitespaceIndex=function(e){return e|=0,this.afterLineNumbers[e]},e.prototype.getIdForWhitespaceIndex=function(e){return e|=0,this.ids[e]},e.prototype.getHeightForWhitespaceIndex=function(e){return e|=0,this.heights[e]},e.prototype.getWhitespaces=function(e){e|=0;for(var t=[],n=0;n<this.heights.length;n++)t.push({id:this.ids[n],afterLineNumber:this.afterLineNumbers[n],heightInLines:this.heights[n]/e});return t},e}();t.WhitespaceComputer=n}),define(d[212],h([0,1,211]),function(e,t,n){"use strict";var i=function(){function e(){this.linesCount=0,this.whitespaces=new n.WhitespaceComputer}return e.prototype.replaceLines=function(e){this.linesCount=e},e.prototype.insertWhitespace=function(e,t,n){return this.whitespaces.insertWhitespace(e,t,n)},e.prototype.changeWhitespace=function(e,t,n){return this.whitespaces.changeWhitespace(e,t,n)},e.prototype.removeWhitespace=function(e){return this.whitespaces.removeWhitespace(e)},e.prototype.onModelLinesDeleted=function(e,t){this.linesCount-=t-e+1,this.whitespaces.onModelLinesDeleted(e,t)},e.prototype.onModelLinesInserted=function(e,t){this.linesCount+=t-e+1,this.whitespaces.onModelLinesInserted(e,t)},e.prototype.getTotalHeight=function(e){e|=0;var t=e*this.linesCount,n=this.whitespaces.getTotalHeight();return t+n},e.prototype.getVerticalOffsetForLineNumber=function(e,t){e|=0,t|=0;var n;n=e>1?t*(e-1):0;var i=this.whitespaces.getAccumulatedHeightBeforeLineNumber(e);return n+i},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this.whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this.whitespaces.getCount()>0},e.prototype.isAfterLines=function(e,t){var n=this.getTotalHeight(t);return e>n},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e,t){if(e|=0,t|=0,e<0)return 1;for(var n=1,i=0|this.linesCount,o=i;n<o;){var r=(n+o)/2|0,s=0|this.getVerticalOffsetForLineNumber(r,t);if(e>=s+t)n=r+1;else{if(e>=s)return r;o=r}}return n>i?i:n},e.prototype.getCenteredLineInViewport=function(e,t,n){e|=0,t|=0,n|=0;for(var i,o,r=this.getLinesViewportData(e,t,n),s=(t-e)/2,a=r.startLineNumber;a<=r.endLineNumber;a++)if(i=r.visibleRangesDeltaTop+r.relativeVerticalOffset[a-r.startLineNumber],o=i+n,i<=s&&s<o||i>s)return a;return r.endLineNumber},e.prototype.getLinesViewportData=function(e,t,n){e|=0,t|=0,n|=0;var i,o,r=0|this.getLineNumberAtOrAfterVerticalOffset(e,n),s=0|this.linesCount,a=0|this.getVerticalOffsetForLineNumber(r,n),u=0|this.whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),l=0|this.whitespaces.getCount();u===-1?(u=l,o=s+1,i=0):(o=0|this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=0|this.whitespaces.getHeightForWhitespaceIndex(u));var c=a,d=c,h=5e5,p=0;a>=h&&(p=Math.floor(a/h)*h,p=Math.floor(p/n)*n,d-=p);for(var f=[],g=r;g<=s;g++){for(c+=n,f.push(d),d+=n;o===g;)d+=i,c+=i,u++,u>=l?o=s+1:(o=0|this.whitespaces.getAfterLineNumberForWhitespaceIndex(u),i=0|this.whitespaces.getHeightForWhitespaceIndex(u));if(c>=t){s=g;break}}return{viewportTop:e-p,viewportHeight:t-e,bigNumbersDelta:p,startLineNumber:r,endLineNumber:s,visibleRangesDeltaTop:-(e-p),relativeVerticalOffset:f}},e.prototype.getVerticalOffsetForWhitespaceIndex=function(e,t){e|=0,t|=0;var n,i=this.whitespaces.getAfterLineNumberForWhitespaceIndex(e);n=i>=1?t*i:0;var o;return o=e>0?this.whitespaces.getAccumulatedHeight(e-1):0,n+o},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e,t){e|=0,t|=0;var n,i,o,r=0,s=this.whitespaces.getCount()-1;if(s<0)return-1;var a=this.getVerticalOffsetForWhitespaceIndex(s,t),u=this.whitespaces.getHeightForWhitespaceIndex(s);if(e>=a+u)return-1;for(;r<s;)if(n=Math.floor((r+s)/2),i=this.getVerticalOffsetForWhitespaceIndex(n,t),o=this.whitespaces.getHeightForWhitespaceIndex(n),e>=i+o)r=n+1;else{if(e>=i)return n;s=n}return r},e.prototype.getWhitespaceAtVerticalOffset=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e,t);if(n<0)return null;if(n>=this.whitespaces.getCount())return null;var i=this.getVerticalOffsetForWhitespaceIndex(n,t);if(i>e)return null;var o=this.whitespaces.getHeightForWhitespaceIndex(n),r=this.whitespaces.getIdForWhitespaceIndex(n),s=this.whitespaces.getAfterLineNumberForWhitespaceIndex(n);return{id:r,afterLineNumber:s,verticalOffset:i,height:o}},e.prototype.getWhitespaceViewportData=function(e,t,n){e|=0,t|=0,n|=0;var i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e,n),o=this.whitespaces.getCount()-1;if(i<0)return[];var r,s,a,u=[];for(r=i;r<=o&&(s=this.getVerticalOffsetForWhitespaceIndex(r,n),a=this.whitespaces.getHeightForWhitespaceIndex(r),!(s>=t));r++)u.push({id:this.whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this.whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a});return u},e.prototype.getWhitespaces=function(e){return this.whitespaces.getWhitespaces(e)},e}();t.VerticalObjects=i}),define(d[213],h([0,1,212,3,210]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t){this.configuration=e,this._lineHeight=this.configuration.editor.lineHeight,this._scrollBeyondLastLine=this.configuration.editor.viewInfo.scrollBeyondLastLine,this.model=t,this.verticalObjects=new n.VerticalObjects,this.verticalObjects.replaceLines(t.getLineCount())}return e.prototype.onConfigurationChanged=function(e){e.lineHeight&&(this._lineHeight=this.configuration.editor.lineHeight),e.viewInfo.scrollBeyondLastLine&&(this._scrollBeyondLastLine=this.configuration.editor.viewInfo.scrollBeyondLastLine)},e.prototype.insertWhitespace=function(e,t,n){return this.verticalObjects.insertWhitespace(e,t,n)},e.prototype.changeWhitespace=function(e,t,n){return this.verticalObjects.changeWhitespace(e,t,n)},e.prototype.removeWhitespace=function(e){return this.verticalObjects.removeWhitespace(e)},e.prototype.onModelFlushed=function(){this.verticalObjects.replaceLines(this.model.getLineCount())},e.prototype.onModelLinesDeleted=function(e){this.verticalObjects.onModelLinesDeleted(e.fromLineNumber,e.toLineNumber)},e.prototype.onModelLinesInserted=function(e){this.verticalObjects.onModelLinesInserted(e.fromLineNumber,e.toLineNumber)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this.verticalObjects.getVerticalOffsetForLineNumber(e,this._lineHeight)},e.prototype.getLinesTotalHeight=function(){return this.verticalObjects.getTotalHeight(this._lineHeight)},e.prototype.getTotalHeight=function(e,t){var n=this.getLinesTotalHeight();return n+=this._scrollBeyondLastLine?e.height-this._lineHeight:t,Math.max(e.height,n)},e.prototype.isAfterLines=function(e){return this.verticalObjects.isAfterLines(e,this._lineHeight)},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){return this.verticalObjects.getLineNumberAtOrAfterVerticalOffset(e,this._lineHeight)},e.prototype.getHeightForLineNumber=function(e){return this._lineHeight},e.prototype.getWhitespaceViewportData=function(e){return this.verticalObjects.getWhitespaceViewportData(e.top,e.top+e.height,this._lineHeight)},e.prototype.getWhitespaces=function(){return this.verticalObjects.getWhitespaces(this._lineHeight)},e.prototype.getWhitespaceAtVerticalOffset=function(e){return this.verticalObjects.getWhitespaceAtVerticalOffset(e,this._lineHeight)},e.prototype.getLinesViewportData=function(e){var t=this.verticalObjects.getLinesViewportData(e.top,e.top+e.height,this._lineHeight),n=this.model.getDecorationsViewportData(t.startLineNumber,t.endLineNumber),r=new i.Range(t.startLineNumber,1,t.endLineNumber,this.model.getLineMaxColumn(t.endLineNumber)),s=t.startLineNumber===t.endLineNumber||t.relativeVerticalOffset[0]>=t.viewportTop?t.startLineNumber:t.startLineNumber+1,a=t.relativeVerticalOffset[t.relativeVerticalOffset.length-1]+this._lineHeight<=t.viewportTop+t.viewportHeight?t.endLineNumber:t.endLineNumber-1,u=new i.Range(s,1,a,this.model.getLineMaxColumn(a));return new o.ViewLinesViewportData(t,r,u,n)},e.prototype.getCenteredLineInViewport=function(e){return this.verticalObjects.getCenteredLineInViewport(e.top,e.top+e.height,this._lineHeight)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this.verticalObjects.getWhitespaceAccumulatedHeightBeforeLineNumber(e)},e.prototype.hasWhitespace=function(){return this.verticalObjects.hasWhitespace()},e}();t.LinesLayout=r}),define(d[86],h([0,1,83]),function(e,t,n){"use strict";var i=function(){function e(e,t){this.index=e,this.remainder=t}return e}();t.PrefixSumIndexOfResult=i;var o=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=-1}return e.prototype.getCount=function(){return this.values.length},e.prototype.insertValues=function(e,t){e=n.toUint32(e);var i=this.values,o=this.prefixSum,r=t.length;0!==r&&(this.values=new Uint32Array(i.length+r),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+r),this.values.set(t,e),e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex>=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex+1)))},e.prototype.changeValue=function(e,t){e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1))},e.prototype.removeValues=function(e,t){e=n.toUint32(e),t=n.toUint32(t);var i=this.values,o=this.prefixSum;if(!(e>=i.length)){var r=i.length-e;t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex&&(this.prefixSumValidIndex=e-1),this.prefixSumValidIndex>=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex+1)))}},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this.getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){if(e<0)return 0;if(e=n.toUint32(e),e<=this.prefixSumValidIndex)return this.prefixSum[e];var t=this.prefixSumValidIndex+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex=Math.max(this.prefixSumValidIndex,e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e);for(var t,n,o,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,n=this.getAccumulatedValue(t),o=n-this.values[t],e<o)s=t-1;else{if(!(e>=n))break;r=t+1}return new i(t,e-o)},e}();t.PrefixSumComputer=o}),define(d[215],h([0,1,86]),function(e,t,n){"use strict";var i=function(){function e(e,t,n,i){this._uri=e,this._lines=t,this._eol=n,this._versionId=i}return e.prototype.dispose=function(){this._lines.length=0},Object.defineProperty(e.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),e.prototype.getText=function(){return this._lines.join(this._eol)},e.prototype.onEvents=function(e){for(var t=null,n=0,i=e.length;n<i;n++){var o=e[n];o.eol&&(t=o.eol)}t&&t!==this._eol&&(this._eol=t,this._lineStarts=null);for(var r=-1,n=0,i=e.length;n<i;n++){var o=e[n];this._acceptDeleteRange(o.range),this._acceptInsertText({lineNumber:o.range.startLineNumber,column:o.range.startColumn},o.text),r=Math.max(r,o.versionId)}r!==-1&&(this._versionId=r)},e.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._eol.length,t=this._lines.length,i=new Uint32Array(t),o=0;o<t;o++)i[o]=this._lines[o].length+e;this._lineStarts=new n.PrefixSumComputer(i)}},e.prototype._setLineText=function(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)},e.prototype._acceptDeleteRange=function(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)},e.prototype._acceptInsertText=function(e,t){if(0!==t.length){var n=t.split(/\r\n|\r|\n/);if(1===n.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]+this._lines[e.lineNumber-1].substring(e.column-1));n[n.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+n[0]);for(var i=new Uint32Array(n.length-1),o=1;o<n.length;o++)this._lines.splice(e.lineNumber+o-1,0,n[o]),i[o-1]=n[o].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,i)}},e}();t.MirrorModel2=i}),define(d[216],h([0,1,27,6,3,502,95,15,215,185,192,73,140]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";function p(){return new v}var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,
configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._versionId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eol",{get:function(){return this._eol},enumerable:!0,configurable:!0}),t.prototype.getValue=function(){return this.getText()},t.prototype.getLinesContent=function(){return this._lines.slice(0)},t.prototype.getLineCount=function(){return this._lines.length},t.prototype.getLineContent=function(e){return this._lines[e-1]},t.prototype.getWordAtPosition=function(e,t){var n=d.getWordAtText(e.column,d.ensureValidWordDefinition(t),this._lines[e.lineNumber-1],0);return n?new o.Range(e.lineNumber,n.startColumn,e.lineNumber,n.endColumn):null},t.prototype.getWordUntilPosition=function(e,t){var n=this.getWordAtPosition(e,t);return n?{word:this._lines[e.lineNumber-1].substring(n.startColumn-1,e.column-1),startColumn:n.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}},t.prototype._getAllWords=function(e){var t=this,n=[];return this._lines.forEach(function(i){t._wordenize(i,e).forEach(function(e){n.push(i.substring(e.start,e.end))})}),n},t.prototype.getAllUniqueWords=function(e,t){var n=!1,i=Object.create(null);return this._getAllWords(e).filter(function(e){return t&&!n&&t===e?(n=!0,!1):!i[e]&&(i[e]=!0,!0)})},t.prototype._wordenize=function(e,t){var n,i=[];for(t.lastIndex=0;(n=t.exec(e))&&0!==n[0].length;)i.push({start:n.index,end:n.index+n[0].length});return i},t.prototype.getValueInRange=function(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);var t=this._eol,n=e.startLineNumber-1,i=e.endLineNumber-1,o=[];o.push(this._lines[n].substring(e.startColumn-1));for(var r=n+1;r<i;r++)o.push(this._lines[r]);return o.push(this._lines[i].substring(0,e.endColumn-1)),o.join(t)},t.prototype.offsetAt=function(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)},t.prototype.positionAt=function(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,n)}},t.prototype._validateRange=function(e){var t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),n=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||n.lineNumber!==e.endLineNumber||n.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:n.lineNumber,endColumn:n.column}:e},t.prototype._validatePosition=function(e){if(!a.Position.isIPosition(e))throw new Error("bad position");var t=e.lineNumber,n=e.column,i=!1;if(t<1)t=1,n=1,i=!0;else if(t>this._lines.length)t=this._lines.length,n=this._lines[t-1].length+1,i=!0;else{var o=this._lines[t-1].length+1;n<1?(n=1,i=!0):n>o&&(n=o,i=!0)}return i?{lineNumber:t,column:n}:e},t}(u.MirrorModel2),g=function(){function e(){this._foreignModule=null}return e.prototype.computeDiff=function(e,t,n){var o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,{shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!0});return i.TPromise.as(l.computeDiff())},e.prototype.computeDirtyDiff=function(e,t,n){var o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;var a=o.getLinesContent(),u=s.getLinesContent(),l=new r.DiffComputer(a,u,{shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:n,shouldConsiderTrimWhitespaceInEmptyCase:!1});return i.TPromise.as(l.computeDiff())},e.prototype.computeMoreMinimalEdits=function(t,n,r){var a=this._getModel(t);if(!a)return i.TPromise.as(n);for(var u=[],l=0,c=n;l<c.length;l++){var d=c[l],h=d.range,p=d.text,f=a.getValueInRange(h);if(p=p.replace(/\r\n|\n|\r/g,a.eol),f!==p)if(Math.max(p.length,f.length)>e._diffLimit)u.push({range:h,text:p});else for(var g=s.stringDiff(f,p),m=a.offsetAt(o.Range.lift(h).getStartPosition()),v=0,_=g;v<_.length;v++){var y=_[v],C=a.positionAt(m+y.originalStart),b=a.positionAt(m+y.originalStart+y.originalLength),w={text:p.substr(y.modifiedStart,y.modifiedLength),range:{startLineNumber:C.lineNumber,startColumn:C.column,endLineNumber:b.lineNumber,endColumn:b.column}};a.getValueInRange(w.range)!==w.text&&u.push(w)}}return i.TPromise.as(u)},e.prototype.computeLinks=function(e){var t=this._getModel(e);return t?i.TPromise.as(l.computeLinks(t)):null},e.prototype.textualSuggest=function(e,t,n,o){var r=this._getModel(e);if(r){for(var s=[],a=new RegExp(n,o),u=r.getWordUntilPosition(t,a).word,l=0,c=r.getAllUniqueWords(a);l<c.length;l++){var d=c[l];d!==u&&isNaN(Number(d))&&s.push({type:"text",label:d,insertText:d,noAutoAccept:!0,overwriteBefore:u.length})}return i.TPromise.as({suggestions:s})}},e.prototype.navigateValueSet=function(e,t,n,o,r){var s=this._getModel(e);if(!s)return null;var a=new RegExp(o,r);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});var u=s.getValueInRange(t),l=s.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},a),d=null;null!==l&&(d=s.getValueInRange(l));var h=c.BasicInplaceReplace.INSTANCE.navigateValueSet(t,u,l,d,n);return i.TPromise.as(h)},e.prototype.loadForeignModule=function(e,t){var n=this;return new i.TPromise(function(i,o){self.require([e],function(e){var o={getMirrorModels:function(){return n._getModels()}};n._foreignModule=e.create(o,t);var r=[];for(var s in n._foreignModule)"function"==typeof n._foreignModule[s]&&r.push(s);i(r)},o)})},e.prototype.fmr=function(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return i.TPromise.wrapError(new Error("Missing requestHandler or method: "+e));try{return i.TPromise.as(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return i.TPromise.wrapError(e)}},e}();g._diffLimit=1e4,t.BaseEditorSimpleWorker=g;var v=function(e){function t(){var t=e.call(this)||this;return t._models=Object.create(null),t}return m(t,e),t.prototype.dispose=function(){this._models=Object.create(null)},t.prototype._getModel=function(e){return this._models[e]},t.prototype._getModels=function(){var e=this,t=[];return Object.keys(this._models).forEach(function(n){return t.push(e._models[n])}),t},t.prototype.acceptNewModel=function(e){this._models[e.url]=new f(n.default.parse(e.url),e.value.lines,e.value.EOL,e.versionId)},t.prototype.acceptModelChanged=function(e,t){if(this._models[e]){var n=this._models[e];n.onEvents(t)}},t.prototype.acceptRemovedModel=function(e){this._models[e]&&delete this._models[e]},t}(g);t.EditorSimpleWorkerImpl=v,t.create=p;var _=self,y="function"==typeof _.importScripts;y&&(_.monaco=h.createMonacoBaseAPI())}),define(d[148],h([0,1]),function(e,t){"use strict";var n=function(){function e(e,t,n){this.range=e,this.inlineClassName=t,this.insertsBeforeOrAfter=n}return e}();t.InlineDecoration=n;var i=function(){function e(e){this.range=null,this.source=e}return e}();t.ViewModelDecoration=i}),define(d[218],h([0,1,3]),function(e,t,n){"use strict";var i=function(){function e(e,t){this._selection=e,this._isMovingLeft=t}return e.prototype.getEditOperations=function(e,t){var i=this._selection;if(this._selectionId=t.trackSelection(i),i.startLineNumber===i.endLineNumber&&(!this._isMovingLeft||0!==i.startColumn)&&(this._isMovingLeft||i.endColumn!==e.getLineMaxColumn(i.startLineNumber))){var o,r,s,a=i.selectionStartLineNumber,u=e.getLineContent(a);this._isMovingLeft?(o=u.substring(0,i.startColumn-2),r=u.substring(i.startColumn-1,i.endColumn-1),s=u.substring(i.startColumn-2,i.startColumn-1)+u.substring(i.endColumn-1)):(o=u.substring(0,i.startColumn-1)+u.substring(i.endColumn-1,i.endColumn),r=u.substring(i.startColumn-1,i.endColumn-1),s=u.substring(i.endColumn));var l=o+r+s;t.addEditOperation(new n.Range(a,1,a,e.getLineMaxColumn(a)),null),t.addEditOperation(new n.Range(a,1,a,1),l),this._cutStartIndex=i.startColumn+(this._isMovingLeft?-1:1),this._cutEndIndex=this._cutStartIndex+i.endColumn-i.startColumn,this._moved=!0}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moved&&(n=n.setStartPosition(n.startLineNumber,this._cutStartIndex),n=n.setEndPosition(n.startLineNumber,this._cutEndIndex)),n},e}();t.MoveCaretCommand=i}),define(d[149],h([0,1,46,15,3,20,38]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e){this._selection=e,this._usedEndToken=null}return e._haystackHasNeedleAtOffset=function(e,t,n){if(n<0)return!1;var i=t.length,o=e.length;if(n+i>o)return!1;for(var r=0;r<i;r++)if(e.charCodeAt(n+r)!==t.charCodeAt(r))return!1;return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,o){var r,s=t.startLineNumber,a=t.startColumn,u=t.endLineNumber,l=t.endColumn,c=n.blockCommentStartToken,d=n.blockCommentEndToken,h=i.getLineContent(s).lastIndexOf(c,a-1+c.length),p=i.getLineContent(u).indexOf(d,l-1-d.length);h!==-1&&p!==-1?r=e._createRemoveBlockCommentOperations({startLineNumber:s,startColumn:h+1+c.length,endLineNumber:u,endColumn:p+1},c,d):(r=e._createAddBlockCommentOperations(t,c,d),this._usedEndToken=1===r.length?d:null);for(var f=0;f<r.length;f++)o.addEditOperation(r[f].range,r[f].text)},e._createRemoveBlockCommentOperations=function(e,t,i){var r=[];return o.Range.isEmpty(e)?r.push(n.EditOperation.delete(new o.Range(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(r.push(n.EditOperation.delete(new o.Range(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),r.push(n.EditOperation.delete(new o.Range(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),r},e._createAddBlockCommentOperations=function(e,t,r){var s=[];return o.Range.isEmpty(e)?s.push(n.EditOperation.replace(new o.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+r)):(s.push(n.EditOperation.insert(new i.Position(e.startLineNumber,e.startColumn),t)),s.push(n.EditOperation.insert(new i.Position(e.endLineNumber,e.endColumn),r))),s},e.prototype.getEditOperations=function(e,t){var n=this._selection.startLineNumber,i=this._selection.startColumn,o=this._selection.endLineNumber,r=this._selection.endColumn,a=e.getLanguageIdAtPosition(n,i),u=s.LanguageConfigurationRegistry.getComments(a);u&&u.blockCommentStartToken&&u.blockCommentEndToken&&this._createOperationsForBlockComment({startLineNumber:n,startColumn:i,endLineNumber:o,endColumn:r},u,e,t)},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations();if(2===n.length){var i=n[0],o=n[1];return new r.Selection(i.range.endLineNumber,i.range.endColumn,o.range.startLineNumber,o.range.startColumn)}var s=n[0].range,a=this._usedEndToken?-this._usedEndToken.length:0;return new r.Selection(s.endLineNumber,s.endColumn+a,s.endLineNumber,s.endColumn+a)},e}();t.BlockCommentCommand=a}),define(d[220],h([0,1,9,46,15,3,20,149,38]),function(e,t,n,i,o,r,s,a,u){"use strict";var l;!function(e){e[e.Toggle=0]="Toggle",e[e.ForceAdd=1]="ForceAdd",e[e.ForceRemove=2]="ForceRemove"}(l=t.Type||(t.Type={}));var c=function(){function e(e,t,n){this._selection=e,this._tabSize=t,this._type=n,this._deltaColumn=0}return e._gatherPreflightCommentStrings=function(e,t,n){for(var i=[],o=[],r=0,s=n-t+1;r<s;r++){var a=t+r,l=e.getLanguageIdAtPosition(a,1),c=void 0;if(i[l])c=i[l];else{var d=u.LanguageConfigurationRegistry.getComments(l);if(c=d?d.lineCommentToken:null,!c)return null;i[l]=c}o.push({ignore:!1,commentStr:c,commentStrOffset:0,commentStrLength:c.length})}return o},e._analyzeLines=function(e,t,i,o){var r,s,u,l,c,d,h,p,f=!0;for(h=0===e||1!==e,l=0,c=i.length;l<c;l++)r=i[l],d=o+l,p=t.getLineContent(d),s=n.firstNonWhitespaceIndex(p),s!==-1?(f=!1,r.ignore=!1,r.commentStrOffset=s,h&&!a.BlockCommentCommand._haystackHasNeedleAtOffset(p,r.commentStr,s)&&(0===e?h=!1:1===e||(r.ignore=!0)),h&&(u=s+r.commentStrLength,u<p.length&&32===p.charCodeAt(u)&&(r.commentStrLength+=1))):(0===e?r.ignore=!0:1===e?r.ignore=!0:r.ignore=!0,r.commentStrOffset=p.length);if(0===e&&f)for(h=!1,l=0,c=i.length;l<c;l++)i[l].ignore=!1;return{supported:!0,shouldRemoveComments:h,lines:i}},e._gatherPreflightData=function(t,n,i,o){var r=e._gatherPreflightCommentStrings(n,i,o);return null===r?{supported:!1,shouldRemoveComments:!1,lines:null}:e._analyzeLines(t,n,r,i)},e.prototype._executeLineComments=function(t,n,i,r){var s;i.shouldRemoveComments?s=e._createRemoveLineCommentsOperations(i.lines,r.startLineNumber):(e._normalizeInsertionPoint(t,i.lines,r.startLineNumber,this._tabSize),s=e._createAddLineCommentsOperations(i.lines,r.startLineNumber));for(var a=new o.Position(r.positionLineNumber,r.positionColumn),u=0,l=s.length;u<l;u++)n.addEditOperation(s[u].range,s[u].text),s[u].range.isEmpty()&&s[u].range.getStartPosition().equals(a)&&(this._deltaColumn=s[u].text.length);this._selectionId=n.trackSelection(r)},e.prototype._attemptRemoveBlockComment=function(e,t,n,i){var o=t.startLineNumber,r=t.endLineNumber,s=i.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),u=e.getLineContent(o).lastIndexOf(n,s-1),l=e.getLineContent(r).indexOf(i,t.endColumn-1-n.length);return u!==-1&&l===-1&&(l=e.getLineContent(o).indexOf(i,u+n.length),r=o),u===-1&&l!==-1&&(u=e.getLineContent(r).lastIndexOf(n,l),o=r),!t.isEmpty()||u!==-1&&l!==-1||(u=e.getLineContent(o).indexOf(n),u!==-1&&(l=e.getLineContent(o).indexOf(i,u+n.length))),u!==-1&&l!==-1?a.BlockCommentCommand._createRemoveBlockCommentOperations({startLineNumber:o,startColumn:u+n.length+1,endLineNumber:r,endColumn:l+1},n,i):null},e.prototype._executeBlockComment=function(e,t,i){var o=e.getLanguageIdAtPosition(i.startLineNumber,i.startColumn),r=u.LanguageConfigurationRegistry.getComments(o);if(r&&r.blockCommentStartToken&&r.blockCommentEndToken){var s=r.blockCommentStartToken,l=r.blockCommentEndToken,c=this._attemptRemoveBlockComment(e,i,s,l);if(!c){if(i.isEmpty()){var d=e.getLineContent(i.startLineNumber),h=n.firstNonWhitespaceIndex(d);h===-1&&(h=d.length),c=a.BlockCommentCommand._createAddBlockCommentOperations({startLineNumber:i.startLineNumber,startColumn:h+1,endLineNumber:i.startLineNumber,endColumn:d.length+1},s,l)}else c=a.BlockCommentCommand._createAddBlockCommentOperations({startLineNumber:i.startLineNumber,startColumn:e.getLineFirstNonWhitespaceColumn(i.startLineNumber),endLineNumber:i.endLineNumber,endColumn:e.getLineMaxColumn(i.endLineNumber)},s,l);1===c.length&&(this._deltaColumn=s.length)}this._selectionId=t.trackSelection(i);for(var p=0;p<c.length;p++)t.addEditOperation(c[p].range,c[p].text)}},e.prototype.getEditOperations=function(t,n){var i=this._selection;this._moveEndPositionDown=!1,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,t.getLineMaxColumn(i.endLineNumber-1)));var o=e._gatherPreflightData(this._type,t,i.startLineNumber,i.endLineNumber);return o.supported?this._executeLineComments(t,n,o,i):this._executeBlockComment(t,n,i)},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),new s.Selection(n.startLineNumber,n.startColumn+this._deltaColumn,n.endLineNumber,n.endColumn+this._deltaColumn)},e._createRemoveLineCommentsOperations=function(e,t){var n,o,s,a=[];for(n=0,o=e.length;n<o;n++)s=e[n],s.ignore||a.push(i.EditOperation.delete(new r.Range(t+n,s.commentStrOffset+1,t+n,s.commentStrOffset+s.commentStrLength+1)));return a},e._createAddLineCommentsOperations=function(e,t){var n,r,s,a=[];for(n=0,r=e.length;n<r;n++)s=e[n],s.ignore||a.push(i.EditOperation.insert(new o.Position(t+n,s.commentStrOffset+1),s.commentStr+" "));return a},e.nextVisibleColumn=function(e,t,n,i){return n?e+(t-e%t):e+i},e._normalizeInsertionPoint=function(t,n,i,o){var r,s,a,u,l,c,d=Number.MAX_VALUE;for(r=0,s=n.length;r<s;r++)if(!n[r].ignore){for(a=t.getLineContent(i+r),c=0,u=0,l=n[r].commentStrOffset;c<d&&u<l;u++)c=e.nextVisibleColumn(c,o,9===a.charCodeAt(u),1);c<d&&(d=c)}for(d=Math.floor(d/o)*o,r=0,s=n.length;r<s;r++)if(!n[r].ignore){for(a=t.getLineContent(i+r),c=0,u=0,l=n[r].commentStrOffset;c<d&&u<l;u++)c=e.nextVisibleColumn(c,o,9===a.charCodeAt(u),1);c>d?n[r].commentStrOffset=u-1:n[r].commentStrOffset=u}},e}();t.LineCommentCommand=c}),define(d[125],h([0,1,55,25,35,3,4]),function(e,t,n,i,o,r,s){"use strict";var a={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0},u=function(e){function t(n,i){void 0===i&&(i={});var r=e.call(this,[t.Events.UPDATED])||this;return r.editor=n,r.options=o.mixin(i,a,!1),r.disposed=!1,r.toUnbind=[],r.nextIdx=-1,r.ranges=[],r.ignoreSelectionChange=!1,r.revealFirst=r.options.alwaysRevealFirst,r.toUnbind.push(r.editor.onDidDispose(function(){return r.dispose()})),r.toUnbind.push(r.editor.onDidUpdateDiff(function(){return r.onDiffUpdated()})),r.options.followsCaret&&r.toUnbind.push(r.editor.getModifiedEditor().onDidChangeCursorPosition(function(e){r.ignoreSelectionChange||(r.nextIdx=-1)})),r.options.alwaysRevealFirst&&r.toUnbind.push(r.editor.getModifiedEditor().onDidChangeModel(function(e){r.revealFirst=!0})),r.init(),r}return m(t,e),t.prototype.init=function(){var e=this.editor.getLineChanges()},t.prototype.onDiffUpdated=function(){this.init(),this.compute(this.editor.getLineChanges()),this.revealFirst&&null!==this.editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next())},t.prototype.compute=function(e){var n=this;this.ranges=[],e&&e.forEach(function(e){!n.options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){n.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):n.ranges.push({rhs:!0,range:new r.Range(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort(function(e,t){return e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0}),this.emit(t.Events.UPDATED,{})},t.prototype.initIdx=function(e){for(var t=!1,n=this.editor.getPosition(),i=0,o=this.ranges.length;i<o&&!t;i++){var r=this.ranges[i].range;n.isBeforeOrEqual(r.getStartPosition())&&(this.nextIdx=i+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)},t.prototype.move=function(e){if(n.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),this.canNavigate()){this.nextIdx===-1?this.initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var t=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var i=t.range.getStartPosition();this.editor.setPosition(i),this.editor.revealPositionInCenter(i)}finally{this.ignoreSelectionChange=!1}}},t.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},t.prototype.next=function(){this.move(!0)},t.prototype.previous=function(){this.move(!1)},t.prototype.dispose=function(){this.toUnbind=s.dispose(this.toUnbind),this.ranges=null,this.disposed=!0,e.prototype.dispose.call(this)},t}(i.EventEmitter);u.Events={UPDATED:"navigation.updated"},t.DiffNavigator=u}),define(d[222],h([0,1,25,3]),function(e,t,n,i){"use strict";var o=function(){function e(){this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._wholeWord=!1,this._matchCase=!1,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._eventEmitter=new n.EventEmitter}return Object.defineProperty(e.prototype,"searchString",{get:function(){return this._searchString},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"replaceString",{get:function(){return this._replaceString},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRevealed",{get:function(){return this._isRevealed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isReplaceRevealed",{get:function(){return this._isReplaceRevealed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRegex",{get:function(){return this._isRegex},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wholeWord",{get:function(){return this._wholeWord},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchCase",{get:function(){return this._matchCase},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"searchScope",{get:function(){return this._searchScope},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchesPosition",{get:function(){return this._matchesPosition},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matchesCount",{get:function(){return this._matchesCount},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentMatch",{get:function(){return this._currentMatch},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._eventEmitter.dispose()},e.prototype.addChangeListener=function(t){return this._eventEmitter.addListener2(e._CHANGED_EVENT,t)},e.prototype.changeMatchInfo=function(t,n,o){var r={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},s=!1;0===n&&(t=0),t>n&&(t=n),this._matchesPosition!==t&&(this._matchesPosition=t,r.matchesPosition=!0,s=!0),this._matchesCount!==n&&(this._matchesCount=n,r.matchesCount=!0,s=!0),"undefined"!=typeof o&&(i.Range.equalsRange(this._currentMatch,o)||(this._currentMatch=o,r.currentMatch=!0,s=!0)),s&&this._eventEmitter.emit(e._CHANGED_EVENT,r)},e.prototype.change=function(t,n,o){void 0===o&&(o=!0);var r={moveCursor:n,updateHistory:o,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1},s=!1;"undefined"!=typeof t.searchString&&this._searchString!==t.searchString&&(this._searchString=t.searchString,r.searchString=!0,s=!0),"undefined"!=typeof t.replaceString&&this._replaceString!==t.replaceString&&(this._replaceString=t.replaceString,r.replaceString=!0,s=!0),"undefined"!=typeof t.isRevealed&&this._isRevealed!==t.isRevealed&&(this._isRevealed=t.isRevealed,r.isRevealed=!0,s=!0),"undefined"!=typeof t.isReplaceRevealed&&this._isReplaceRevealed!==t.isReplaceRevealed&&(this._isReplaceRevealed=t.isReplaceRevealed,r.isReplaceRevealed=!0,s=!0),"undefined"!=typeof t.isRegex&&this._isRegex!==t.isRegex&&(this._isRegex=t.isRegex,r.isRegex=!0,s=!0),"undefined"!=typeof t.wholeWord&&this._wholeWord!==t.wholeWord&&(this._wholeWord=t.wholeWord,r.wholeWord=!0,s=!0),"undefined"!=typeof t.matchCase&&this._matchCase!==t.matchCase&&(this._matchCase=t.matchCase,r.matchCase=!0,s=!0),"undefined"!=typeof t.searchScope&&(i.Range.equalsRange(this._searchScope,t.searchScope)||(this._searchScope=t.searchScope,r.searchScope=!0,s=!0)),s&&this._eventEmitter.emit(e._CHANGED_EVENT,r)},e}();o._CHANGED_EVENT="changed",t.FindReplaceState=o}),define(d[223],h([0,1,3]),function(e,t,n){"use strict";var i=function(){function e(e,t,n){this._editorSelection=e,this._ranges=t,this._replaceStrings=n}return e.prototype.getEditOperations=function(e,t){if(this._ranges.length>0){for(var i=[],o=0;o<this._ranges.length;o++)i.push({range:this._ranges[o],text:this._replaceStrings[o]});i.sort(function(e,t){return n.Range.compareRangesUsingStarts(e.range,t.range)});for(var r=[],s=i[0],o=1;o<i.length;o++)s.range.endLineNumber===i[o].range.startLineNumber&&s.range.endColumn===i[o].range.startColumn?(s.range=s.range.plusRange(i[o].range),s.text=s.text+i[o].text):(r.push(s),s=i[o]);r.push(s);for(var o=0;o<r.length;o++)t.addEditOperation(r[o].range,r[o].text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)},e}();t.ReplaceAllCommand=i}),define(d[224],h([0,1]),function(e,t){"use strict";function n(e){if(!e||0===e.length)return new i(null);for(var t=new r(e),n=0,o=e.length;n<o;n++){var s=e.charCodeAt(n);if(92!==s){if(36===s){if(n++,n>=o)break;var a=e.charCodeAt(n);if(36===a){t.emitUnchanged(n-1),t.emitStatic("$",n+1);continue}if(48===a||38===a){t.emitUnchanged(n-1),t.emitMatchIndex(0,n+1);continue}if(49<=a&&a<=57){var u=a-48;if(n+1<o){var l=e.charCodeAt(n+1);if(48<=l&&l<=57){n++,u=10*u+(l-48),t.emitUnchanged(n-2),t.emitMatchIndex(u,n+1);continue}}t.emitUnchanged(n-1),t.emitMatchIndex(u,n+1);continue}}}else{if(n++,n>=o)break;var a=e.charCodeAt(n);switch(a){case 92:t.emitUnchanged(n-1),t.emitStatic("\\",n+1);break;case 110:t.emitUnchanged(n-1),t.emitStatic("\n",n+1);break;case 116:t.emitUnchanged(n-1),t.emitStatic("\t",n+1)}}}return t.finalize()}var i=function(){function e(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?(this._staticValue=e[0].staticValue,this._pieces=null):(this._staticValue=null,this._pieces=e):(this._staticValue="",this._pieces=null)}return e.fromStaticValue=function(t){return new e([o.staticValue(t)])},Object.defineProperty(e.prototype,"hasReplacementPatterns",{get:function(){return null===this._staticValue},enumerable:!0,configurable:!0}),e.prototype.buildReplaceString=function(t){if(null!==this._staticValue)return this._staticValue;for(var n="",i=0,o=this._pieces.length;i<o;i++){var r=this._pieces[i];n+=null===r.staticValue?e._substitute(r.matchIndex,t):r.staticValue}return n},e._substitute=function(e,t){if(0===e)return t[0];for(var n="";e>0;){if(e<t.length)return t[e]+n;n=String(e%10)+n,e=Math.floor(e/10)}return"$"+n},e}();t.ReplacePattern=i;var o=function(){function e(e,t){this.staticValue=e,this.matchIndex=t}return e.staticValue=function(t){return new e(t,-1)},e.matchIndex=function(t){return new e(null,t)},e}();t.ReplacePiece=o;var r=function(){function e(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}return e.prototype.emitUnchanged=function(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e},e.prototype.emitStatic=function(e,t){this._emitStatic(e),this._lastCharIndex=t},e.prototype._emitStatic=function(e){0!==e.length&&(this._currentStaticPiece+=e)},e.prototype.emitMatchIndex=function(e,t){0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=o.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=o.matchIndex(e),this._lastCharIndex=t},e.prototype.finalize=function(){return this.emitUnchanged(this._source.length),0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=o.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new i(this._result)},e}();t.parseReplaceString=n}),define(d[225],h([0,1]),function(e,t){"use strict";t.ID="editor.contrib.folding"}),define(d[226],h([0,1]),function(e,t){"use strict";function n(e){return e.getIndentRanges()}function i(e,t){if(e.length<=t)return e;var n=[];e.forEach(function(e){e.indent<1e3&&(n[e.indent]=(n[e.indent]||0)+1)});for(var i=n.length,o=0;o<n.length;o++)if(n[o]&&(t-=n[o],t<0)){i=o;break}return e.filter(function(e){return e.indent<i})}t.computeRanges=n,t.limitByIndent=i}),define(d[227],h([0,1,9,3]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){this._edits=e,this._initialSelection=t}return e.prototype.getEditOperations=function(t,n){this._edits.map(function(n){return e.trimEdit(n,t)}).filter(function(e){return null!==e}).forEach(function(e){return n.addEditOperation(i.Range.lift(e.range),e.text)});var o=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(o=!0,this._selectionId=n.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(o=!0,this._selectionId=n.trackSelection(this._initialSelection,!1))),o||(this._selectionId=n.trackSelection(this._initialSelection))},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this._selectionId)},e.fixLineTerminators=function(e,t){e.text=e.text.replace(/\r\n|\r|\n/g,t.getEOL())},e.trimEdit=function(e,t){return this.fixLineTerminators(e,t),this._trimEdit(t.validateRange(e.range),e.text,e.forceMoveMarkers,t)},e._trimEdit=function(e,t,o,r){var s=r.getValueInRange(e),a=n.commonPrefixLength(t,s);if(a===s.length&&a===t.length)return null;if(a>0){var u=r.modifyPosition(e.getStartPosition(),a);e=new i.Range(u.lineNumber,u.column,e.endLineNumber,e.endColumn),t=t.substring(a),s=s.substr(a)}var l=n.commonSuffixLength(t,s);if(l>0){var c=r.modifyPosition(e.getEndPosition(),-l);e=new i.Range(e.startLineNumber,e.startColumn,c.lineNumber,c.column),t=t.substring(0,t.length-l),s=s.substring(0,s.length-l)}return{text:t,range:e,forceMoveMarkers:o}},e}();t.EditOperationsCommand=o}),define(d[154],h([0,1,17,10]),function(e,t,n,i){"use strict";var o;!function(e){e[e.IDLE=0]="IDLE",e[e.FIRST_WAIT=1]="FIRST_WAIT",e[e.SECOND_WAIT=2]="SECOND_WAIT",e[e.WAITING_FOR_ASYNC_COMPUTATION=3]="WAITING_FOR_ASYNC_COMPUTATION"}(o||(o={}));var r=function(){function e(e,t,i,o){var r=this;this._computer=e,this._state=0,this._firstWaitScheduler=new n.RunOnceScheduler(function(){return r._triggerAsyncComputation()},this._getHoverTimeMillis()/2),this._secondWaitScheduler=new n.RunOnceScheduler(function(){return r._triggerSyncComputation()},this._getHoverTimeMillis()/2),this._loadingMessageScheduler=new n.RunOnceScheduler(function(){return r._showLoadingMessage()},3*this._getHoverTimeMillis()),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=o}return e.prototype.getComputer=function(){return this._computer},e.prototype._getHoverTimeMillis=function(){return this._computer.getHoverTimeMillis?this._computer.getHoverTimeMillis():e.HOVER_TIME},e.prototype._triggerAsyncComputation=function(){var e=this;this._state=2,this._secondWaitScheduler.schedule(),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=this._computer.computeAsync().then(function(t){e._asyncComputationPromiseDone=!0,e._withAsyncResult(t)},function(){return e._onError})):this._asyncComputationPromiseDone=!0},e.prototype._triggerSyncComputation=function(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))},e.prototype._showLoadingMessage=function(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())},e.prototype._withAsyncResult=function(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))},e.prototype._onComplete=function(e){this._completeCallback&&this._completeCallback(e)},e.prototype._onError=function(e){this._errorCallback?this._errorCallback(e):i.onUnexpectedError(e)},e.prototype._onProgress=function(e){this._progressCallback&&this._progressCallback(e)},e.prototype.start=function(){0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(),this._loadingMessageScheduler.schedule())},e.prototype.cancel=function(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),
this._asyncComputationPromise=null),this._state=0},e}();r.HOVER_TIME=300,t.HoverOperation=r}),define(d[155],h([0,1,11,15,21,37,60,4]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(e){function t(t,n){var i=e.call(this)||this;return i.disposables=[],i.allowEditorOverflow=!0,i._id=t,i._editor=n,i._isVisible=!1,i._containerDomNode=document.createElement("div"),i._containerDomNode.className="monaco-editor-hover hidden",i._containerDomNode.tabIndex=0,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover-content",i.scrollbar=new s.DomScrollableElement(i._domNode,{canUseTranslate3d:!1}),i.disposables.push(i.scrollbar),i._containerDomNode.appendChild(i.scrollbar.getDomNode()),i.onkeydown(i._containerDomNode,function(e){e.equals(9)&&i.hide()}),i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.onDidLayoutChange(function(e){return i.updateMaxHeight()}),i.updateMaxHeight(),i._editor.addContentWidget(i),i._showAtPosition=null,i}return m(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,n.toggleClass(this._containerDomNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._containerDomNode},t.prototype.showAt=function(e,t){this._showAtPosition=new i.Position(e.lineNumber,e.column),this.isVisible=!0,this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=t,t&&this._containerDomNode.focus()},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1,this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus())},t.prototype.getPosition=function(){return this.isVisible?{position:this._showAtPosition,preference:[o.ContentWidgetPositionPreference.ABOVE,o.ContentWidgetPositionPreference.BELOW]}:null},t.prototype.dispose=function(){this._editor.removeContentWidget(this),this.disposables=a.dispose(this.disposables),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont(),this._editor.layoutContentWidget(this),this.scrollbar.scanDomNode()},t.prototype.updateMaxHeight=function(){var e=Math.max(this._editor.getLayoutInfo().height/4,250),t=this._editor.getConfiguration().fontInfo,n=t.fontSize,i=t.lineHeight;this._domNode.style.fontSize=n+"px",this._domNode.style.lineHeight=i+"px",this._domNode.style.maxHeight=e+"px"},t}(r.Widget);t.ContentHoverWidget=u;var l=function(e){function t(t,n){var i=e.call(this)||this;return i._id=t,i._editor=n,i._isVisible=!1,i._domNode=document.createElement("div"),i._domNode.className="monaco-editor-hover hidden",i._domNode.setAttribute("aria-hidden","true"),i._domNode.setAttribute("role","presentation"),i._showAtLineNumber=-1,i._register(i._editor.onDidChangeConfiguration(function(e){e.fontInfo&&i.updateFont()})),i._editor.addOverlayWidget(i),i}return m(t,e),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,n.toggleClass(this._domNode,"hidden",!this._isVisible)},enumerable:!0,configurable:!0}),t.prototype.getId=function(){return this._id},t.prototype.getDomNode=function(){return this._domNode},t.prototype.showAt=function(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);var t=this._editor.getLayoutInfo(),n=this._editor.getTopForLineNumber(this._showAtLineNumber),i=this._editor.getScrollTop(),o=this._editor.getConfiguration().lineHeight,r=this._domNode.clientHeight,s=n-i-(r-o)/2;this._domNode.style.left=t.glyphMarginLeft+t.glyphMarginWidth+"px",this._domNode.style.top=Math.max(Math.round(s),0)+"px"},t.prototype.hide=function(){this.isVisible&&(this.isVisible=!1)},t.prototype.getPosition=function(){return null},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.updateFont=function(){var e=this,t=Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),n=Array.prototype.slice.call(this._domNode.getElementsByClassName("code"));t.concat(n).forEach(function(t){return e._editor.applyFontInfo(t)})},t.prototype.updateContents=function(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()},t}(r.Widget);t.GlyphHoverWidget=l}),define(d[230],h([0,1,20]),function(e,t,n){"use strict";var i=function(){function e(e,t,n){this._editRange=e,this._originalSelection=t,this._text=n}return e.prototype.getEditOperations=function(e,t){t.addEditOperation(this._editRange,this._text)},e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations(),o=i[0].range;return this._originalSelection.isEmpty()?new n.Selection(o.endLineNumber,Math.min(this._originalSelection.positionColumn,o.endColumn),o.endLineNumber,Math.min(this._originalSelection.positionColumn,o.endColumn)):new n.Selection(o.endLineNumber,o.endColumn-this._text.length,o.endLineNumber,o.endColumn)},e}();t.InPlaceReplaceCommand=i}),define(d[231],h([0,1,3,20]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){this._selection=e,this._isCopyingDown=t}return e.prototype.getEditOperations=function(e,t){var i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));for(var o=[],r=i.startLineNumber;r<=i.endLineNumber;r++)o.push(e.getLineContent(r));var s=o.join("\n");""===s&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._isCopyingDown?t.addEditOperation(new n.Range(i.startLineNumber,1,i.startLineNumber,1),s+"\n"):t.addEditOperation(new n.Range(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){var o=n.startLineNumber,r=n.startColumn,s=n.endLineNumber,a=n.endColumn;0!==this._startLineNumberDelta&&(o+=this._startLineNumberDelta,r=1),0!==this._endLineNumberDelta&&(s+=this._endLineNumberDelta,a=1),n=i.Selection.createWithDirection(o,r,s,a,this._selectionDirection)}return n},e}();t.CopyLinesCommand=o}),define(d[232],h([0,1,3,20]),function(e,t,n,i){"use strict";var o=function(){function e(e,t,n){this.startLineNumber=e,this.endLineNumber=t,this.restoreCursorToColumn=n}return e.createFromSelection=function(t){var n=t.endLineNumber;return t.startLineNumber<t.endLineNumber&&1===t.endColumn&&(n-=1),new e(t.startLineNumber,n,t.positionColumn)},e.prototype.getEditOperations=function(e,t){if(1!==e.getLineCount()||1!==e.getLineMaxColumn(1)){var i=this.startLineNumber,o=this.endLineNumber,r=1,s=e.getLineMaxColumn(o);o<e.getLineCount()?(o+=1,s=1):i>1&&(i-=1,r=e.getLineMaxColumn(i)),t.addEditOperation(new n.Range(i,r,o,s),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),o=n[0].range;return new i.Selection(o.endLineNumber,this.restoreCursorToColumn,o.endLineNumber,this.restoreCursorToColumn)},e}();t.DeleteLinesCommand=o}),define(d[233],h([0,1,3,20]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){this._selection=e,this._isMovingDown=t}return e.prototype.getEditOperations=function(e,t){var o=e.getLineCount();if((!this._isMovingDown||this._selection.endLineNumber!==o)&&(this._isMovingDown||1!==this._selection.startLineNumber)){this._moveEndPositionDown=!1;var r=this._selection;if(r.startLineNumber<r.endLineNumber&&1===r.endColumn&&(this._moveEndPositionDown=!0,r=r.setEndPosition(r.endLineNumber-1,e.getLineMaxColumn(r.endLineNumber-1))),r.startLineNumber===r.endLineNumber&&1===e.getLineMaxColumn(r.startLineNumber)){var s=r.startLineNumber,a=this._isMovingDown?s+1:s-1;1===e.getLineMaxColumn(a)?t.addEditOperation(new n.Range(1,1,1,1),null):(t.addEditOperation(new n.Range(s,1,s,1),e.getLineContent(a)),t.addEditOperation(new n.Range(a,1,a,e.getLineMaxColumn(a)),null)),r=new i.Selection(a,1,a,1)}else{var u,l;this._isMovingDown?(u=r.endLineNumber+1,l=e.getLineContent(u),t.addEditOperation(new n.Range(u-1,e.getLineMaxColumn(u-1),u,e.getLineMaxColumn(u)),null),t.addEditOperation(new n.Range(r.startLineNumber,1,r.startLineNumber,1),l+"\n")):(u=r.startLineNumber-1,l=e.getLineContent(u),t.addEditOperation(new n.Range(u,1,u+1,1),null),t.addEditOperation(new n.Range(r.endLineNumber,e.getLineMaxColumn(r.endLineNumber),r.endLineNumber,e.getLineMaxColumn(r.endLineNumber)),"\n"+l))}this._selectionId=t.trackSelection(r)}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),n},e}();t.MoveLinesCommand=o}),define(d[234],h([0,1,46,3]),function(e,t,n,i){"use strict";function o(e,t,n){var i=t.startLineNumber,o=t.endLineNumber;if(1===t.endColumn&&o--,i>=o)return null;for(var r=[],s=i;s<=o;s++)r.push(e.getLineContent(s));var a=r.slice(0);return a.sort(function(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}),n===!0&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}function r(e,t,r){var s=o(e,t,r);return s?n.EditOperation.replace(new i.Range(s.startLineNumber,1,s.endLineNumber,e.getLineMaxColumn(s.endLineNumber)),s.after.join("\n")):null}var s=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var n=r(e,this.selection,this.descending);n&&t.addEditOperation(n.range,n.text),this.selectionId=t.trackSelection(this.selection)},e.prototype.computeCursorState=function(e,t){return t.getTrackedSelection(this.selectionId)},e.canRun=function(e,t,n){var i=o(e,t,n);if(!i)return!1;for(var r=0,s=i.before.length;r<s;r++)if(i.before[r]!==i.after[r])return!0;return!1},e}();t.SortLinesCommand=s}),define(d[235],h([0,1,11,15,49]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,n){this._editor=e,this._contextMenuService=t,this._commandService=n}return e.prototype.show=function(e,t){var n=this,r=e.then(function(e){return e.map(function(e){var t=e.command;return new o.Action(t.id,t.title,void 0,!0,function(){return(e=n._commandService).executeCommand.apply(e,[t.id].concat(t.arguments));var e})})});this._contextMenuService.showContextMenu({getAnchor:function(){return i.Position.isIPosition(t)&&(t=n._toCoords(t)),t},getActions:function(){return r},onHide:function(){n._visible=!1}})},Object.defineProperty(e.prototype,"isVisible",{get:function(){return this._visible},enumerable:!0,configurable:!0}),e.prototype._toCoords=function(e){this._editor.revealPosition(e),this._editor.render();var t=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=n.getDomNodePagePosition(this._editor.getDomNode()),o=i.left+t.left,r=i.top+t.top+t.height;return{x:o,y:r}},e}();t.QuickFixContextMenu=r}),define(d[92],h([0,1,25,12,39,4,9,116,6,3]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function e(e,t,n){this._parent=e,this._range=t,this._eventBus=n,this._id=a.defaultGenerator.nextId()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._parent.uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._parent.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"directory",{get:function(){return this._parent.directory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e,this._eventBus.emit("ref/changed",this)},enumerable:!0,configurable:!0}),e}();t.OneReference=c;var d=function(){function e(e){this._modelReference=e}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.preview=function(e,t){void 0===t&&(t=8);var n=this._model;if(n){var i=e.startLineNumber,o=e.startColumn,r=e.endColumn,a=n.getWordUntilPosition({lineNumber:i,column:o-t}),u=new l.Range(i,a.startColumn,i,o),c=new l.Range(i,r,i,Number.MAX_VALUE),d={before:n.getValueInRange(u).replace(/^\s+/,s.empty),inside:n.getValueInRange(e),after:n.getValueInRange(c).replace(/\s+$/,s.empty)};return d}},e.prototype.dispose=function(){this._modelReference&&(this._modelReference.dispose(),this._modelReference=null)},e}();t.FilePreview=d;var h=function(){function e(e,t){this._parent=e,this._uri=t,this._children=[]}return Object.defineProperty(e.prototype,"id",{get:function(){return this._uri.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return o.basename(this.uri.fsPath)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"directory",{get:function(){return o.dirname(this.uri.fsPath)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preview",{get:function(){return this._preview},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"failure",{get:function(){return this._loadFailure},enumerable:!0,configurable:!0}),e.prototype.resolve=function(e){var t=this;return this._resolved?u.TPromise.as(this):e.createModelReference(this._uri).then(function(e){var n=e.object;if(!n)throw e.dispose(),new Error;return t._preview=new d(e),t._resolved=!0,t},function(e){return t._children=[],t._resolved=!0,t._loadFailure=e,t})},e.prototype.dispose=function(){this._preview&&(this._preview.dispose(),this._preview=null)},e}();t.FileReferences=h;var p=function(){function e(t){this._groups=[],this._references=[],this._eventBus=new n.EventEmitter,this.onDidChangeReferenceRange=i.fromEventEmitter(this._eventBus,"ref/changed"),t.sort(e._compareReferences);for(var o,r=0,s=t;r<s.length;r++){var a=s[r];if(o&&o.uri.toString()===a.uri.toString()||(o=new h(this,a.uri),this.groups.push(o)),0===o.children.length||!l.Range.equalsRange(a.range,o.children[o.children.length-1].range)){var u=new c(o,a.range,this._eventBus);this._references.push(u),o.children.push(u)}}}return Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._groups.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groups",{get:function(){return this._groups},enumerable:!0,configurable:!0}),e.prototype.nextReference=function(e){var t=e.parent.children.indexOf(e),n=e.parent.children.length,i=e.parent.parent.groups.length;return t+1<n||1===i?e.parent.children[(t+1)%n]:(t=e.parent.parent.groups.indexOf(e.parent),t=(t+1)%i,e.parent.parent.groups[t].children[0])},e.prototype.nearestReference=function(e,t){var n=this._references.map(function(n,i){return{idx:i,prefixLen:s.commonPrefixLength(n.uri.toString(),e.toString()),offsetDist:100*Math.abs(n.range.startLineNumber-t.lineNumber)+Math.abs(n.range.startColumn-t.column)}}).sort(function(e,t){return e.prefixLen>t.prefixLen?-1:e.prefixLen<t.prefixLen?1:e.offsetDist<t.offsetDist?-1:e.offsetDist>t.offsetDist?1:0})[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=r.dispose(this._groups)},e._compareReferences=function(e,t){return e.uri.toString()<t.uri.toString()?-1:e.uri.toString()>t.uri.toString()?1:l.Range.compareRangesUsingStarts(e.range,t.range)},e}();t.ReferencesModel=p}),define(d[237],h([0,1,3,78,74,38]),function(e,t,n,i,o,r){"use strict";function s(e){var t=new c;return t.start=e.range.getStartPosition(),t.end=e.range.getEndPosition(),t}function a(e){var t=new _(e).build();return t}function u(e,t){if(e instanceof d&&e.isEmpty)return null;if(!n.Range.containsPosition(e.range,t))return null;var i;if(e instanceof d){if(e.hasChildren)for(var o=0,r=e.children.length;o<r&&!i;o++)i=u(e.children[o],t)}else e instanceof h&&(i=u(e.open,t)||u(e.elements,t)||u(e.close,t));return i||e}var l;!function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Close=-1]="Close"}(l=t.TokenTreeBracket||(t.TokenTreeBracket={}));var c=function(){function e(){}return Object.defineProperty(e.prototype,"range",{get:function(){return new n.Range(this.start.lineNumber,this.start.column,this.end.lineNumber,this.end.column)},enumerable:!0,configurable:!0}),e}();t.Node=c;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return this.hasChildren?this.children[0].start:this.parent.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.hasChildren?this.children[this.children.length-1].end:this.parent.end},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasChildren",{get:function(){return this.children&&this.children.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.hasChildren&&!this.parent},enumerable:!0,configurable:!0}),t.prototype.append=function(e){return!!e&&(e.parent=this,this.children||(this.children=[]),e instanceof t?e.children&&this.children.push.apply(this.children,e.children):this.children.push(e),!0)},t}(c);t.NodeList=d;var h=function(e){function t(){var t=e.call(this)||this;return t.elements=new d,t.elements.parent=t,t}return m(t,e),Object.defineProperty(t.prototype,"start",{get:function(){return this.open.start},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.close.end},enumerable:!0,configurable:!0}),t}(c);t.Block=h;var p=function(){function e(e,t,n){this.range=e,this.bracket=t,this.bracketType=n}return e}(),f=function(){function e(e,t,n){this.lineNumber=t,this.lineText=n,this.startOffset=e.startOffset,this.endOffset=e.endOffset,this.type=e.tokenType,this.languageId=e.languageId}return e}(),g=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(),this._lineNumber=0,this._lineText=null,this._advance()}return e.prototype._advance=function(){for(this._next=this._next?this._next.next():null;!this._next&&this._lineNumber<this._lineCount;){this._lineNumber++,this._lineText=this._model.getLineContent(this._lineNumber);var e=this._model.getLineTokens(this._lineNumber);this._next=e.firstToken()}},e.prototype.next=function(){if(!this._next)return null;if(this._model.getVersionId()!==this._versionId)return null;var e=new f(this._next,this._lineNumber,this._lineText);return this._advance(),e},e}(),v=function(){function e(e){this._rawTokenScanner=new g(e),this._nextBuff=[],this._cachedLanguageBrackets=null,this._cachedLanguageId=-1}return e.prototype.next=function(){if(this._nextBuff.length>0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null;var t=e.lineNumber,s=e.lineText,a=e.type,u=e.startOffset,l=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=r.LanguageConfigurationRegistry.getBracketsSupport(this._cachedLanguageId));var c=this._cachedLanguageBrackets;if(!c||i.ignoreBracketsInToken(a))return new p(new n.Range(t,u+1,t,l+1),0,null);var d;do if(d=o.BracketsUtils.findNextBracketInToken(c.forwardRegex,t,s,u,l)){var h=d.startColumn-1,f=d.endColumn-1;u<h&&this._nextBuff.push(new p(new n.Range(t,u+1,t,h+1),0,null));var g=s.substring(h,f);g=g.toLowerCase();var m=c.textIsBracket[g],v=c.textIsOpenBracket[g];this._nextBuff.push(new p(new n.Range(t,h+1,t,f+1),v?1:-1,m.languageIdentifier.language+";"+m.open+";"+m.close)),u=f}while(d);return u<l&&this._nextBuff.push(new p(new n.Range(t,u+1,t,l+1),0,null)),this._nextBuff.shift()},e}(),_=function(){function e(e){this._stack=[],this._scanner=new v(e)}return e.prototype.build=function(){for(var e=new d;e.append(this._line()||this._any()););return e},e.prototype._accept=function(e){var t=this._stack.pop()||this._scanner.next();if(!t)return!1;var n=e(t);return n?this._currentToken=t:(this._stack.push(t),this._currentToken=null),n},e.prototype._peek=function(e){var t=!1;return this._accept(function(n){return t=e(n),!1}),t},e.prototype._line=function(){var e,t=new d;for(this._peek(function(t){return e=t.range.startLineNumber,!1});this._peek(function(t){return t.range.startLineNumber===e})&&t.append(this._token()||this._block()););return t.children&&0!==t.children.length?1===t.children.length?t.children[0]:t:null},e.prototype._token=function(){return this._accept(function(e){return 0===e.bracket})?s(this._currentToken):null},e.prototype._block=function(){var e,t;if(t=this._accept(function(t){return e=t.bracketType,1===t.bracket}),!t)return null;var n=new h;for(n.open=s(this._currentToken);n.elements.append(this._line()););if(!this._accept(function(t){return t.bracket===-1&&t.bracketType===e})){var i=new d;return i.append(n.open),i.append(n.elements),i}return n.close=s(this._currentToken),n},e.prototype._any=function(){return this._accept(function(e){return!0})?s(this._currentToken):null},e}();t.build=a,t.find=u}),define(d[238],h([0,1,420]),function(e,t){"use strict"}),define(d[239],h([0,1]),function(e,t){"use strict";var n;!function(e){e[e.Dollar=0]="Dollar",e[e.Colon=1]="Colon",e[e.CurlyOpen=2]="CurlyOpen",e[e.CurlyClose=3]="CurlyClose",e[e.Backslash=4]="Backslash",e[e.Int=5]="Int",e[e.VariableName=6]="VariableName",e[e.Format=7]="Format",e[e.EOF=8]="EOF"}(n=t.TokenType||(t.TokenType={}));var i=function(){function e(){this.text("")}return e.isDigitCharacter=function(e){return e>=48&&e<=57},e.isVariableCharacter=function(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90},e.prototype.text=function(e){this.value=e,this.pos=0},e.prototype.tokenText=function(e){return this.value.substr(e.pos,e.len)},e.prototype.next=function(){if(this.pos>=this.value.length)return{type:n.EOF,pos:this.pos,len:0};var t,i=this.pos,o=0,r=this.value.charCodeAt(i);if(t=e._table[r],"number"==typeof t)return this.pos+=1,{type:t,pos:i,len:1};if(e.isDigitCharacter(r)){t=n.Int;do o+=1,r=this.value.charCodeAt(i+o);while(e.isDigitCharacter(r));return this.pos+=o,{type:t,pos:i,len:o}}if(e.isVariableCharacter(r)){t=n.VariableName;do r=this.value.charCodeAt(i+ ++o);while(e.isVariableCharacter(r)||e.isDigitCharacter(r));return this.pos+=o,{type:t,pos:i,len:o}}t=n.Format;do o+=1,r=this.value.charCodeAt(i+o);while(!isNaN(r)&&"undefined"==typeof e._table[r]&&!e.isDigitCharacter(r)&&!e.isVariableCharacter(r));return this.pos+=o,{type:t,pos:i,len:o}},e}();i._table=(l={},l[36]=n.Dollar,l[58]=n.Colon,l[123]=n.CurlyOpen,l[125]=n.CurlyClose,l[92]=n.Backslash,l),t.Scanner=i;var o=function(){function e(){}return e.toString=function(e){for(var t="",n=0,i=e;n<i.length;n++){var o=i[n];t+=o.toString()}return t},e.prototype.toString=function(){return""},e}();t.Marker=o;var r=function(e){function t(t){var n=e.call(this)||this;return n.string=t,n}return m(t,e),t.prototype.toString=function(){return this.string},t}(o);t.Text=r;var s=function(e){function t(t,n){void 0===t&&(t="");var i=e.call(this)||this;return i.name=t,i.defaultValue=n,i}return m(t,e),t.prototype.toString=function(){return o.toString(this.defaultValue)},t}(o);t.Placeholder=s;var a=function(e){function t(t,n){void 0===t&&(t="");var i=e.call(this)||this;return i.name=t,i.defaultValue=n,i}return m(t,e),Object.defineProperty(t.prototype,"isDefined",{get:function(){return void 0!==this.resolvedValue},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.isDefined?this.resolvedValue:o.toString(this.defaultValue)},t}(o);t.Variable=a;var u=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this._scanner=new i,this._enableTextMate=e,this._enableInternal=t}return e.prototype.escape=function(e){return o.toString(this.parse(e))},e.prototype.parse=function(e){function t(e,n){for(var i=0;i<e.length;i++){var o=e[i];o instanceof s?(void 0===n[o.name]?n[o.name]=o.defaultValue:0===o.defaultValue.length&&(o.defaultValue=n[o.name].slice(0)),o.defaultValue.length>0&&t(o.defaultValue,n)):o instanceof a?t(o.defaultValue,n):i>0&&o instanceof r&&e[i-1]instanceof r&&(e[i-1].string+=e[i].string,e.splice(i,1),i--)}}var n=[];for(this._scanner.text(e),this._token=this._scanner.next();this._parseAny(n)||this._parseText(n););return t(n,Object.create(null)),n},e.prototype._accept=function(e){if(void 0===e||this._token.type===e)return this._prevToken=this._token,this._token=this._scanner.next(),!0},e.prototype._return=function(e){this._prevToken=void 0,this._token=e,this._scanner.pos=e.pos+e.len},e.prototype._parseAny=function(e){return!!this._parseEscaped(e)||(!(!this._enableInternal||!this._parseInternal(e))||(!(!this._enableTextMate||!this._parseTM(e))||void 0))},e.prototype._parseText=function(e){if(this._token.type!==n.EOF)return e.push(new r(this._scanner.tokenText(this._token))),this._accept(void 0),!0},e.prototype._parseTM=function(e){if(this._accept(n.Dollar)){if(this._accept(n.VariableName)||this._accept(n.Int)){var t=this._scanner.tokenText(this._prevToken);return e.push(/^\d+$/.test(t)?new s(t,[]):new a(t,[])),!0}if(this._accept(n.CurlyOpen))for(var i=[],u=[],l=i;;)if(l!==u&&this._accept(n.Colon))l=u;else{if(this._accept(n.CurlyClose)){var t=o.toString(i);return e.push(/^\d+$/.test(t)?new s(t,u):new a(t,u)),!0}if(!this._parseAny(l)&&!this._parseText(l))return u.length>0?(e.push(new r("${"+o.toString(i)+":")),e.push.apply(e,u)):(e.push(new r("${")),e.push.apply(e,i)),!0}return e.push(new r("$")),!0}},e.prototype._parseInternal=function(e){if(this._accept(n.CurlyOpen)){if(!this._accept(n.CurlyOpen))return this._return(this._prevToken),!1;for(var t=[],i=[],a=t;;)if(this._accept(n.Colon))a=i;else{if(this._accept(n.CurlyClose)){if(!this._accept(n.CurlyClose)){this._return(this._prevToken);continue}return i!==a&&(i=t),e.push(new s(o.toString(t),i)),!0}if(!this._parseAny(a)&&!this._parseText(a))return i.length>0?(e.push(new r("{{"+o.toString(t)+":")),e.push.apply(e,i)):(e.push(new r("{{")),e.push.apply(e,t)),!0}}},e.prototype._parseEscaped=function(e){if(this._accept(n.Backslash))return this._enableInternal&&(this._accept(n.CurlyOpen)||this._accept(n.CurlyClose)||this._accept(n.Backslash))||this._enableTextMate&&(this._accept(n.Dollar)||this._accept(n.CurlyClose)||this._accept(n.Backslash)),e.push(new r(this._scanner.tokenText(this._prevToken))),!0},e}();t.SnippetParser=u;var l}),define(d[93],h([0,1,9,3,239]),function(e,t,n,i,o){"use strict";function r(e,t){for(var n=0,i="",o=0,r=e.length;o<r;){var s=e.substr(o);if(/^\$0/.test(s))o+=2,i+=t===c.EmmetSnippet?"{{_}}":"{{}}";else if(/^\$\{0\}/.test(s))o+=4,i+=t===c.EmmetSnippet?"{{_}}":"{{}}";else{var a=s.match(/^\$(\d+)/);Array.isArray(a)&&2===a.length?(o+=1+a[1].length,i+="{{"+a[1]+":}}"):(a=s.match(/^\$\{(\d+)\}/),Array.isArray(a)&&2===a.length?(o+=3+a[1].length,i+="{{"+a[1]+":}}"):/^\${/.test(s)?(o+=2,++n,i+="{{"):n>0&&/^}/.test(s)?(o+=1,--n,i+="}}"):/^\\./.test(s)?(o+=2,i+=/^\\\$/.test(s)?"$":s.substr(0,2)):(a=s.match(/^({|})/),Array.isArray(a)&&2===a.length?(o+=1,i+="\\"+a[1]):(o+=1,i+=s.charAt(0))))}}return i}function s(e,t){if(t)for(var n=e.slice();n.length>0;){var i=n.shift();if(i instanceof o.Variable){try{i.resolvedValue=t.resolve(i.name)}catch(e){}if(i.isDefined)continue}(i instanceof o.Variable||i instanceof o.Placeholder)&&n.unshift.apply(n,i.defaultValue)}}function a(e){return""===e.id&&""===e.value||"0"===e.id}function u(e,t){var n=Object.create(null),i=!1,r=t.slice();for(e.lines=[""];r.length>0;){var s=r.shift();if(s instanceof o.Text){var u=s.string.split(/\r\n|\n|\r/);e.lines[e.lines.length-1]+=u.shift(),(h=e.lines).push.apply(h,u)}else if(s instanceof o.Placeholder){var l=n[s.name];l||(n[s.name]=l={id:s.name,value:o.Marker.toString(s.defaultValue),occurences:[]},e.placeHolders.push(l)),i=i||a(l);var c=e.lines.length,d=e.lines[c-1].length+1;l.occurences.push({startLineNumber:c,startColumn:d,endLineNumber:c,endColumn:d+o.Marker.toString(s.defaultValue).length}),r.unshift.apply(r,s.defaultValue)}else s instanceof o.Variable&&(s.isDefined?s.resolvedValue?r.unshift(new o.Text(s.resolvedValue)):r.unshift.apply(r,s.defaultValue):r.unshift(new o.Placeholder(s.name,0===s.defaultValue.length?[new o.Text(s.name)]:s.defaultValue)));0!==r.length||i||r.push(new o.Placeholder("0",[]))}e.placeHolders.sort(function(e,t){var n=function(e){return!/^\d+$/.test(e.id)};return a(e)?1:a(t)?-1:n(e)&&n(t)?0:n(e)?-1:n(t)?1:e.id===t.id?0:Number(e.id)<Number(t.id)?-1:1}),e.placeHolders.length>0&&(e.finishPlaceHolderIndex=e.placeHolders.length-1,e.placeHolders[e.finishPlaceHolderIndex].id="");var h}var l=function(){function e(){this.lines=[],this.placeHolders=[],this.finishPlaceHolderIndex=-1}return e.fromTextmate=function(t,n){var i=new o.SnippetParser(!0,!1).parse(t),r=new e;return s(i,n),u(r,i),r},e.fromInternal=function(t){var n=new o.SnippetParser(!1,!0).parse(t),i=new e;return u(i,n),i},e.none=function(t){var n=new e;return n.lines=t.split(/\r\n|\n|\r/),n},e.fromEmmet=function(e){return h.parse(e)},Object.defineProperty(e.prototype,"isInsertOnly",{get:function(){return 0===this.placeHolders.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isSingleTabstopOnly",{get:function(){if(1!==this.placeHolders.length)return!1;var e=this.placeHolders[0];if(""!==e.value||1!==e.occurences.length)return!1;var t=e.occurences[0];return!!i.Range.isEmpty(t)},enumerable:!0,configurable:!0}),e.prototype.extractLineIndentation=function(e,t){void 0===t&&(t=Number.MAX_VALUE);var i=n.getLeadingWhitespace(e);return i.length>t-1?i.substring(0,t-1):i},e.prototype.bind=function(e,t,n,i){for(var o=[],r=[],s=this.extractLineIndentation(e,n+1),a=[],u=0,l=this.lines.length;u<l;u++){var c=this.lines[u];if(0===u)a[u+1]=n,o[u]=c;else{var d=this.extractLineIndentation(c),h=c.substr(d.length),p=i.normalizeIndentation(s+d);a[u+1]=p.length-d.length,o[u]=p+h}}for(var f=0,g=this.placeHolders;f<g.length;f++){for(var m=g[f],v=[],_=0,y=m.occurences;_<y.length;_++){var C=y[_],b=C.startLineNumber,w=C.startColumn,S=C.endLineNumber,E=C.endColumn;w>1||1===b?(w+=a[b],E+=a[S]):(w+=s.length,E+=s.length),v.push({startLineNumber:b+t,startColumn:w,endLineNumber:S+t,endColumn:E})}r.push({id:m.id,value:m.value,occurences:v})}return{lines:o,placeHolders:r,finishPlaceHolderIndex:this.finishPlaceHolderIndex}},e}();t.CodeSnippet=l;var c,d=new(function(){function e(){}return e.prototype.parse=function(e){return this._lastGeneratedId=0,this._snippet=new l,this.parseTemplate(e),this._snippet},e.prototype.parseTemplate=function(e){var t,n,o,r,s=Object.create(null),a=e.split("\n");for(t=0,n=a.length;t<n;t++){var u=this.parseLine(a[t],function(e){return s[e]?s[e].value:""});for(o=0,r=u.placeHolders.length;o<r;o++){var l,c=u.placeHolders[o],d=new i.Range(t+1,c.startColumn,t+1,c.endColumn);s[c.id]?l=s[c.id]:(l={id:c.id,value:c.value,occurences:[]},this._snippet.placeHolders.push(l),s[c.id]=l),l.occurences.push(d)}this._snippet.lines.push(u.line)}this._snippet.placeHolders.sort(function(e,t){var n=function(e){return!/^\d+$/.test(e.id)},i=function(e){return""===e.id&&""===e.value};
return i(e)?1:i(t)?-1:n(e)&&n(t)?0:n(e)?-1:n(t)?1:e.id===t.id?0:Number(e.id)<Number(t.id)?-1:1}),this._snippet.placeHolders.length>0&&""===this._snippet.placeHolders[this._snippet.placeHolders.length-1].value&&(this._snippet.finishPlaceHolderIndex=this._snippet.placeHolders.length-1)},e.prototype.parseLine=function(e,t){for(var n=[{placeHolderId:"",placeHolderText:""}],i=[],o=function(e){var n=t(e);if(n)return n;for(var o=0,r=i;o<r.length;o++){var s=r[o];if(s.id===e&&s.value)return s.value}return""},r=0,s=e.length,a=0;r<s;){var u=e.substr(r);if(/^{{/.test(u)){r+=2,n.push({placeHolderId:"",placeHolderText:""});var l=u.match(/^{{(\w+):/);Array.isArray(l)&&2===l.length&&(n[n.length-1].placeHolderId=l[1],r+=l[1].length+1)}else if(n.length>1&&/^}}/.test(u)){if(r+=2,0===n[n.length-1].placeHolderId.length&&(n[n.length-1].placeHolderId=n[n.length-1].placeHolderText,"_"===n[n.length-1].placeHolderId&&(n[n.length-1].placeHolderId="TAB_STOP_"+String(++this._lastGeneratedId),n[n.length-1].placeHolderText="",--a)),0===n[n.length-1].placeHolderText.length){var c=o(n[n.length-1].placeHolderId);n[n.length-1].placeHolderText=c,a+=c.length}i.push({id:n[n.length-1].placeHolderId,value:n[n.length-1].placeHolderText,startColumn:a+1-n[n.length-1].placeHolderText.length,endColumn:a+1}),n[n.length-2].placeHolderText+=n[n.length-1].placeHolderText,n.pop()}else/^\\./.test(u)&&("{"===u.charAt(1)||"}"===u.charAt(1)||"\\"===u.charAt(1)?++r:(n[n.length-1].placeHolderText+=e.charAt(r),++a,++r)),n[n.length-1].placeHolderText+=e.charAt(r),++a,++r}return i.sort(function(e,t){return e.startColumn<t.startColumn?-1:e.startColumn>t.startColumn?1:e.endColumn<t.endColumn?-1:e.endColumn>t.endColumn?1:0}),{line:n[0].placeHolderText,placeHolders:i}},e}()),h=new(function(){function e(){}return e.prototype.parse=function(e){return e=r(e,c.EmmetSnippet),d.parse(e)},e}());!function(e){e[e.TextMateSnippet=0]="TextMateSnippet",e[e.EmmetSnippet=1]="EmmetSnippet"}(c=t.ExternalSnippetType||(t.ExternalSnippetType={}))}),define(d[241],h([0,1,39]),function(e,t,n){"use strict";var i=function(){function e(e){this._editor=e}return e.prototype.resolve=function(e){var t=this._editor.getModel();if(!t)throw new Error;switch(e){case"SELECTION":case"TM_SELECTED_TEXT":return this._tmSelectedText();case"TM_CURRENT_LINE":return this._tmCurrentLine();case"TM_CURRENT_WORD":return this._tmCurrentWord();case"TM_LINE_INDEX":return this._tmLineIndex();case"TM_LINE_NUMBER":return this._tmLineNumber();case"TM_FILENAME":return this._tmFilename();case"TM_DIRECTORY":return this._tmDirectory();case"TM_FILEPATH":return this._tmFilepath()}},e.prototype._tmCurrentLine=function(){var e=this._editor.getSelection().positionLineNumber;return this._editor.getModel().getValueInRange({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:Number.MAX_VALUE})},e.prototype._tmCurrentWord=function(){var e=this._editor.getModel().getWordAtPosition(this._editor.getPosition());return e?e.word:""},e.prototype._tmFilename=function(){return n.basename(this._editor.getModel().uri.fsPath)},e.prototype._tmDirectory=function(){var e=n.dirname(n.normalize(this._editor.getModel().uri.fsPath));return"."!==e?e:""},e.prototype._tmFilepath=function(){return this._editor.getModel().uri.fsPath},e.prototype._tmLineIndex=function(){return String(this._editor.getSelection().positionLineNumber-1)},e.prototype._tmLineNumber=function(){return String(this._editor.getSelection().positionLineNumber)},e.prototype._tmSelectedText=function(){return this._editor.getModel().getValueInRange(this._editor.getSelection())},e}();t.SnippetVariablesResolver=i}),define(d[242],h([0,1,26,9,87]),function(e,t,n,i,o){"use strict";var r=function(){function e(){}return e}();t.LineContext=r;var s=function(){function e(e,t,n){this._items=e,this._column=t,this._lineContext=n}return Object.defineProperty(e.prototype,"lineContext",{get:function(){return this._lineContext},set:function(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._lineContext=e,this._filteredItems=void 0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this._ensureCachedState(),this._filteredItems},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topScoreIdx",{get:function(){return this._ensureCachedState(),this._topScoreIdx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"incomplete",{get:function(){return this._ensureCachedState(),this._isIncomplete},enumerable:!0,configurable:!0}),e.prototype.resolveIncompleteInfo=function(){for(var e=[],t=[],n=0,i=this._items;n<i.length;n++){var o=i[n];o.container.incomplete?e.indexOf(o.support)<0&&e.push(o.support):t.push(o)}return{incomplete:e,complete:t}},Object.defineProperty(e.prototype,"stats",{get:function(){return this._ensureCachedState(),this._stats},enumerable:!0,configurable:!0}),e.prototype._ensureCachedState=function(){this._filteredItems||this._createCachedState()},e.prototype._createCachedState=function(){this._filteredItems=[],this._topScoreIdx=-1,this._isIncomplete=!1,this._stats={suggestionCount:0,snippetCount:0,textCount:0};for(var t=this._lineContext,i=t.leadingLineContent,r=t.characterCountDelta,s="",a=-1,u=0,l=this._items;u<l.length;u++){var c=l[u],d=c.suggestion,h=c.support,p=c.container,f=h&&h.filter||o.fuzzyContiguousFilter;this._isIncomplete=this._isIncomplete||p.incomplete;var g=d.overwriteBefore+r-(c.position.column-this._column);s.length!==g&&(s=0===g?"":i.slice(-g));var m=!1;if(c.highlights=f(s,d.label),m=null!==c.highlights,m||"string"!=typeof d.filterText||n.isFalsyOrEmpty(f(s,d.filterText))||(m=!0,c.highlights=f(s.replace(/^\W+|\W+$/,""),d.label)),m){this._filteredItems.push(c);var v=e._scoreByHighlight(c,s);switch(v>a&&(a=v,this._topScoreIdx=this._filteredItems.length-1),this._stats.suggestionCount++,d.type){case"snippet":this._stats.snippetCount++;break;case"text":this._stats.textCount++}}}},e._scoreByHighlight=function(t,o){var r=t.highlights,s=t.suggestion;if(n.isFalsyOrEmpty(r))return 0;for(var a=0,u=0,l=0,c=Math.min(e._base,s.label.length),d=0,h=0,p=0;h<c;h++){var f=r[p];if(h===f.start){var g=s.label.substring(f.start,f.end);if(d=i.indexOfIgnoreCase(o,g,d),d>=0)do s.label[h]===o[d]?a+=1:u+=1,h+=1,d+=1;while(h<f.end);if(0===p&&(l=f.start),p+=1,p>=r.length)break}}return Math.pow(e._base,3)*a+Math.pow(e._base,2)*u+Math.pow(e._base,1)*(e._base-l)+Math.pow(e._base,0)*(e._base-r.length)},e}();s._base=100,t.CompletionModel=s}),define(d[161],h([0,1,4,37,35,11,98,3,425]),function(e,t,n,i,o,r,s,a){"use strict";var u={showArrow:!0,showFrame:!0,frameColor:"",className:""},l="vs.editor.contrib.zoneWidget",c=function(){function e(e,t,n,i,o,r){this.domNode=e,this.afterLineNumber=t,this.afterColumn=n,this.heightInLines=i,this._onDomNodeTop=o,this._onComputedHeight=r}return e.prototype.onDomNodeTop=function(e){this._onDomNodeTop(e)},e.prototype.onComputedHeight=function(e){this._onComputedHeight(e)},e}();t.ViewZoneDelegate=c;var d=function(){function e(e,t){this._id=e,this._domNode=t}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return null},e}();t.OverlayWidgetDelegate=d;var h=function(e){function t(t,i){void 0===i&&(i={});var r=e.call(this)||this;return r._overlayWidget=null,r._positionMarkerId=[],r._viewZone=null,r._disposables=new n.Disposables,r.container=null,r.editor=t,r.options=o.mixin(o.clone(u),i),r.domNode=document.createElement("div"),r.options.isAccessible||(r.domNode.setAttribute("aria-hidden","true"),r.domNode.setAttribute("role","presentation")),r._disposables.add(r.editor.onDidLayoutChange(function(e){var t=r._getWidth(e);r.domNode.style.width=t+"px",r._onWidth(t)})),r}return m(t,e),t.prototype.dispose=function(){var e=this;this._disposables.dispose(),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(function(t){t.removeZone(e._viewZone.id),e._viewZone=null}),this.editor.deltaDecorations(this._positionMarkerId,[])},t.prototype.create=function(){r.addClass(this.domNode,"zone-widget"),r.addClass(this.domNode,this.options.className),this.container=document.createElement("div"),r.addClass(this.container,"zone-widget-container"),this.domNode.appendChild(this.container),this._fillContainer(this.container),this._initSash()},t.prototype._getWidth=function(e){return void 0===e&&(e=this.editor.getLayoutInfo()),e.width-e.verticalScrollbarWidth},t.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},t.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px",this._doLayout(t,this._getWidth()),this._resizeSash.layout()},Object.defineProperty(t.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e)return this.editor.getModel().getDecorationRange(e).getStartPosition()},enumerable:!0,configurable:!0}),t.prototype.show=function(e,t){var n=a.Range.isIRange(e)?e:new a.Range(e.lineNumber,e.column,e.lineNumber,e.column);this._showImpl(n,t),this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:{}}])},t.prototype.hide=function(){var e=this;this._viewZone&&(this.editor.changeViewZones(function(t){t.removeZone(e._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null)},t.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;if(this.options.showArrow){var n=Math.round(e/3);t+=2*n}if(this.options.showFrame){var i=Math.round(e/9);t+=2*i}return t},t.prototype._showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn},o=this._getWidth();this.domNode.style.width=o+"px",this.editor.revealPosition(i);var r=document.createElement("div"),s=document.createElement("div"),a=this.editor.getConfiguration().lineHeight,u=0,h=0;if(this.options.showArrow&&(u=Math.round(a/3),s=document.createElement("div"),s.className="zone-widget-arrow below",s.style.top=-u+"px",s.style.borderWidth=u+"px",s.style.left=this.editor.getOffsetForColumn(i.lineNumber,i.column)+"px",s.style.borderBottomColor=this.options.frameColor,r.appendChild(s)),this.options.showFrame&&(h=Math.round(a/9)),this.editor.changeViewZones(function(e){n._viewZone&&e.removeZone(n._viewZone.id),n._overlayWidget&&(n.editor.removeOverlayWidget(n._overlayWidget),n._overlayWidget=null),n.domNode.style.top="-1000px",n._viewZone=new c(r,i.lineNumber,i.column,t,function(e){return n._onViewZoneTop(e)},function(e){return n._onViewZoneHeight(e)}),n._viewZone.id=e.addZone(n._viewZone),n._overlayWidget=new d(l+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)}),this.options.showFrame){var p=this.options.frameWidth?this.options.frameWidth:h;this.container.style.borderTopColor=this.options.frameColor,this.container.style.borderBottomColor=this.options.frameColor,this.container.style.borderTopWidth=p+"px",this.container.style.borderBottomWidth=p+"px"}var f=t*a-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=f+"px",this.container.style.overflow="hidden",this._doLayout(f,o),this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.editor.revealLine(g)},t.prototype._onWidth=function(e){},t.prototype._doLayout=function(e,t){},t.prototype._relayout=function(e){var t=this;this._viewZone.heightInLines!==e&&this.editor.changeViewZones(function(n){t._viewZone.heightInLines=e,n.layoutZone(t._viewZone.id)})},t.prototype._initSash=function(){var e=this;this._resizeSash=new s.Sash(this.domNode,this,{orientation:s.Orientation.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.disable());var t;this._disposables.add(this._resizeSash.addListener2("start",function(n){e._viewZone&&(t={startY:n.startY,heightInLines:e._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.addListener2("end",function(){t=void 0})),this._disposables.add(this._resizeSash.addListener2("change",function(n){if(t){var i=(n.currentY-t.startY)/e.editor.getConfiguration().lineHeight,o=i<0?Math.ceil(i):Math.floor(i),r=t.heightInLines+o;r>5&&r<35&&e._relayout(r)}}))},t.prototype.getHorizontalSashLeft=function(){return 0},t.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},t.prototype.getHorizontalSashWidth=function(){return this.editor.getLayoutInfo().width},t}(i.Widget);t.ZoneWidget=h}),define(d[244],h([8,7]),function(e,t){return e.create("vs/base/browser/ui/actionbar/actionbar",t)}),define(d[71],h([0,1,244,4,34,274,18,49,11,67,22,25,59,53,198]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=function(e){function t(t,n,i){var o=e.call(this)||this;return o.options=i,o._callOnDispose=[],o._context=t||o,o._action=n,n instanceof a.Action&&o._callOnDispose.push(n.onDidChange(function(e){o.builder&&o._handleActionChangeEvent(e)})),o}return m(t,e),t.prototype._handleActionChangeEvent=function(e){void 0!==e.enabled&&this._updateEnabled(),void 0!==e.checked&&this._updateChecked(),void 0!==e.class&&this._updateClass(),void 0!==e.label&&(this._updateLabel(),this._updateTooltip()),void 0!==e.tooltip&&this._updateTooltip()},Object.defineProperty(t.prototype,"callOnDispose",{get:function(){return this._callOnDispose},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),t.prototype.getAction=function(){return this._action},t.prototype.isEnabled=function(){return this._action.enabled},t.prototype.setActionContext=function(e){this._context=e},t.prototype.render=function(e){var t=this;this.builder=o.$(e),this.gesture=new h.Gesture(e);var n=this.options&&this.options.draggable;n&&(e.draggable=!0),this.builder.on(h.EventType.Tap,function(e){return t.onClick(e)}),s.isMacintosh&&this.builder.on(u.EventType.CONTEXT_MENU,function(e){return t.onClick(e)}),this.builder.on(u.EventType.MOUSE_DOWN,function(e){n||u.EventHelper.stop(e),t._action.enabled&&t.builder.addClass("active")}),this.builder.on(u.EventType.CLICK,function(e){u.EventHelper.stop(e,!0),setTimeout(function(){return t.onClick(e)},50)}),this.builder.on([u.EventType.MOUSE_UP,u.EventType.MOUSE_OUT],function(e){u.EventHelper.stop(e),t.builder.removeClass("active")})},t.prototype.onClick=function(e){u.EventHelper.stop(e,!0);var t;c.isUndefinedOrNull(this._context)?t=e:(t=this._context,t.event=e),this._actionRunner.run(this._action,t)},t.prototype.focus=function(){this.builder&&this.builder.domFocus()},t.prototype.blur=function(){this.builder&&this.builder.domBlur()},t.prototype._updateEnabled=function(){},t.prototype._updateLabel=function(){},t.prototype._updateTooltip=function(){},t.prototype._updateClass=function(){},t.prototype._updateChecked=function(){},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.builder&&(this.builder.destroy(),this.builder=null),this.gesture&&(this.gesture.dispose(),this.gesture=null),this._callOnDispose=i.dispose(this._callOnDispose)},t}(d.EventEmitter);t.BaseActionItem=f;var g=function(e){function t(n,i){var o=e.call(this,t.ID,n,n?"separator text":"separator")||this;return o.checked=!1,o.radio=!1,o.enabled=!1,o.order=i,o}return m(t,e),t}(a.Action);g.ID="vs.actions.separator",t.Separator=g;var v=function(e){function t(t,n,i){void 0===i&&(i={});var o=e.call(this,t,n,i)||this;return o.options=i,o.options.icon=void 0!==i.icon&&i.icon,o.options.label=void 0===i.label||i.label,o.cssClass="",o}return m(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=o.$("a.action-label").appendTo(this.builder),this.$e.attr({role:"button"}),this.options.label&&this.options.keybinding&&o.$("span.keybinding").text(this.options.keybinding).appendTo(this.builder),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype.focus=function(){e.prototype.focus.call(this),this.$e.domFocus()},t.prototype._updateLabel=function(){this.options.label&&this.$e.text(this.getAction().label)},t.prototype._updateTooltip=function(){var e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=n.localize(0,null,e,this.options.keybinding))),e&&this.$e.attr({title:e})},t.prototype._updateClass=function(){this.cssClass&&this.$e.removeClass(this.cssClass),this.options.icon?(this.cssClass=this.getAction().class,this.$e.addClass("icon"),this.cssClass&&this.$e.addClass(this.cssClass),this._updateEnabled()):this.$e.removeClass("icon")},t.prototype._updateEnabled=function(){this.getAction().enabled?(this.builder.removeClass("disabled"),this.$e.removeClass("disabled"),this.$e.attr({tabindex:0})):(this.builder.addClass("disabled"),this.$e.addClass("disabled"),u.removeTabIndexAndUpdateFocus(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$e.addClass("checked"):this.$e.removeClass("checked")},t.prototype._updateRadio=function(){this.getAction().radio?this.$e.addClass("radio"):this.$e.removeClass("radio")},t}(f);t.ActionItem=v;var _;!function(e){e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=2]="VERTICAL"}(_=t.ActionsOrientation||(t.ActionsOrientation={}));var y={orientation:_.HORIZONTAL,context:null},C=function(e){function t(t,n){void 0===n&&(n=y);var i=e.call(this)||this;i.options=n,i._context=n.context,i.toDispose=[],i._actionRunner=i.options.actionRunner,i._actionRunner||(i._actionRunner=new a.ActionRunner,i.toDispose.push(i._actionRunner)),i.toDispose.push(i.addEmitter2(i._actionRunner)),i.items=[],i.focusedItem=void 0,i.domNode=document.createElement("div"),i.domNode.className="monaco-action-bar",n.animated!==!1&&u.addClass(i.domNode,"animated");var r=i.options.orientation===_.VERTICAL;return r&&(i.domNode.className+=" vertical"),o.$(i.domNode).on(u.EventType.KEY_DOWN,function(e){var t=new p.StandardKeyboardEvent(e),n=!0;t.equals(r?16:15)?i.focusPrevious():t.equals(r?18:17)?i.focusNext():t.equals(9)?i.cancel():t.equals(3)||t.equals(10)||(n=!1),n&&(t.preventDefault(),t.stopPropagation())}),o.$(i.domNode).on(u.EventType.CONTEXT_MENU,function(e){e.preventDefault(),e.stopPropagation()}),o.$(i.domNode).on(u.EventType.KEY_UP,function(e){var t=new p.StandardKeyboardEvent(e);t.equals(3)||t.equals(10)?(i.doTrigger(t),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&i.updateFocusedItem()}),i.focusTracker=u.trackFocus(i.domNode),i.focusTracker.addBlurListener(function(){document.activeElement!==i.domNode&&u.isAncestor(document.activeElement,i.domNode)||(i.emit(u.EventType.BLUR,{}),i.focusedItem=void 0)}),i.focusTracker.addFocusListener(function(){return i.updateFocusedItem()}),i.actionsList=document.createElement("ul"),i.actionsList.className="actions-container",i.actionsList.setAttribute("role","toolbar"),i.options.ariaLabel&&i.actionsList.setAttribute("aria-label",i.options.ariaLabel),i.domNode.appendChild(i.actionsList),(t instanceof o.Builder?t.getHTMLElement():t).appendChild(i.domNode),i}return m(t,e),t.prototype.setAriaLabel=function(e){e?this.actionsList.setAttribute("aria-label",e):this.actionsList.removeAttribute("aria-label")},t.prototype.updateFocusedItem=function(){for(var e=0;e<this.actionsList.children.length;e++){var t=this.actionsList.children[e];if(u.isAncestor(document.activeElement,t)){this.focusedItem=e;break}}},Object.defineProperty(t.prototype,"context",{get:function(){return this._context},set:function(e){this._context=e,this.items.forEach(function(t){return t.setActionContext(e)})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){e&&(this._actionRunner=e,this.items.forEach(function(t){return t.actionRunner=e}))},enumerable:!0,configurable:!0}),t.prototype.getContainer=function(){return o.$(this.domNode)},t.prototype.push=function(e,t){var n=this;void 0===t&&(t={});var i=Array.isArray(e)?e:[e],o=c.isNumber(t.index)?t.index:null;i.forEach(function(e){var i=document.createElement("li");i.className="action-item",i.setAttribute("role","presentation");var r=null;n.options.actionItemProvider&&(r=n.options.actionItemProvider(e)),r||(r=new v(n.context,e,t)),r.actionRunner=n._actionRunner,r.setActionContext(n.context),n.addEmitter2(r),r.render(i),null===o||o<0||o>=n.actionsList.children.length?n.actionsList.appendChild(i):n.actionsList.insertBefore(i,n.actionsList.children[o++]),n.items.push(r)})},t.prototype.pull=function(e){e>=0&&e<this.items.length&&(this.items.splice(e,1),this.actionsList.removeChild(this.actionsList.childNodes[e]))},t.prototype.clear=function(){this.items=this.options.actionItemProvider?[]:i.dispose(this.items),o.$(this.actionsList).empty()},t.prototype.length=function(){return this.items.length},t.prototype.isEmpty=function(){return 0===this.items.length},t.prototype.focus=function(e){e&&"undefined"==typeof this.focusedItem&&(this.focusedItem=0),this.updateFocus()},t.prototype.focusNext=function(){"undefined"==typeof this.focusedItem&&(this.focusedItem=this.items.length-1);var e,t=this.focusedItem;do this.focusedItem=(this.focusedItem+1)%this.items.length,e=this.items[this.focusedItem];while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.focusPrevious=function(){"undefined"==typeof this.focusedItem&&(this.focusedItem=0);var e,t=this.focusedItem;do this.focusedItem=this.focusedItem-1,this.focusedItem<0&&(this.focusedItem=this.items.length-1),e=this.items[this.focusedItem];while(this.focusedItem!==t&&!e.isEnabled());this.focusedItem!==t||e.isEnabled()||(this.focusedItem=void 0),this.updateFocus()},t.prototype.updateFocus=function(){if("undefined"==typeof this.focusedItem)return void this.domNode.focus();for(var e=0;e<this.items.length;e++){var t=this.items[e],n=t;e===this.focusedItem?c.isFunction(n.focus)&&n.focus():c.isFunction(n.blur)&&n.blur()}},t.prototype.doTrigger=function(e){if("undefined"!=typeof this.focusedItem){var t=this.items[this.focusedItem];if(t instanceof f){var n=null===t._context||void 0===t._context?e:t._context;this.run(t._action,n).done()}}},t.prototype.cancel=function(){document.activeElement instanceof HTMLElement&&document.activeElement.blur(),this.emit(l.EventType.CANCEL)},t.prototype.run=function(e,t){return this._actionRunner.run(e,t)},t.prototype.dispose=function(){null!==this.items&&i.dispose(this.items),this.items=null,this.focusTracker&&(this.focusTracker.dispose(),this.focusTracker=null),this.toDispose=i.dispose(this.toDispose),this.getContainer().destroy(),e.prototype.dispose.call(this)},t}(d.EventEmitter);t.ActionBar=C;var b=function(e){function t(t,n,i,o){var s=e.call(this,t,n)||this;return s.selectBox=new r.SelectBox(i,o),s.toDispose=[],s.toDispose.push(s.selectBox),s.registerListeners(),s}return m(t,e),t.prototype.setOptions=function(e,t){this.selectBox.setOptions(e,t)},t.prototype.select=function(e){this.selectBox.select(e)},t.prototype.registerListeners=function(){var e=this;this.toDispose.push(this.selectBox.onDidSelect(function(t){e.actionRunner.run(e._action,e.getActionContext(t)).done()}))},t.prototype.getActionContext=function(e){return e},t.prototype.focus=function(){this.selectBox&&this.selectBox.focus()},t.prototype.blur=function(){this.selectBox&&this.selectBox.blur()},t.prototype.render=function(e){this.selectBox.render(e)},t.prototype.dispose=function(){this.toDispose=i.dispose(this.toDispose),e.prototype.dispose.call(this)},t}(f);t.SelectActionItem=b}),define(d[248],h([0,1,34,71,25,246]),function(e,t,n,i,o){"use strict";var r=function(e){function t(t,o,r){void 0===r&&(r={});var s=e.call(this)||this;n.$(t).addClass("monaco-menu-container");var a=n.$(".monaco-menu").appendTo(t);return s.actionBar=new i.ActionBar(a,{orientation:i.ActionsOrientation.VERTICAL,actionItemProvider:r.actionItemProvider,context:r.context,actionRunner:r.actionRunner}),s.listener=s.addEmitter2(s.actionBar),s.actionBar.push(o,{icon:!0,label:!0}),s}return m(t,e),t.prototype.focus=function(){this.actionBar.focus(!0)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.actionBar&&(this.actionBar.dispose(),this.actionBar=null),this.listener&&(this.listener.dispose(),this.listener=null)},t}(o.EventEmitter);t.Menu=r}),define(d[249],h([8,7]),function(e,t){return e.create("vs/base/browser/ui/aria/aria",t)}),define(d[99],h([0,1,249,18,34,200]),function(e,t,n,i,o){"use strict";function r(e){l=o.$(".aria-container").appendTo(e),c=o.$(".alert").appendTo(l).attr({role:"alert","aria-atomic":"true"}),d=o.$(".status").appendTo(l).attr({role:"status","aria-atomic":"true"})}function s(e){u(c,e)}function a(e){i.isMacintosh?s(e):u(d,e)}function u(e,t){l&&(e.getHTMLElement().textContent===t&&(t=n.localize(0,null,t)),o.$(e).empty(),o.$(e).text(t))}var l,c,d;t.setARIAContainer=r,t.alert=s,t.status=a}),define(d[251],h([8,7]),function(e,t){return e.create("vs/base/browser/ui/findinput/findInput",t)}),define(d[252],h([8,7]),function(e,t){return e.create("vs/base/browser/ui/findinput/findInputCheckboxes",t)}),define(d[132],h([0,1,252,206,221]),function(e,t,n,i){"use strict";var o=n.localize(0,null),r=n.localize(1,null),s=n.localize(2,null),a=function(e){function t(t){return e.call(this,{actionClassName:"monaco-case-sensitive",title:o+t.appendTitle,isChecked:t.isChecked,onChange:t.onChange,onKeyDown:t.onKeyDown})||this}return m(t,e),t}(i.Checkbox);t.CaseSensitiveCheckbox=a;var u=function(e){function t(t){return e.call(this,{actionClassName:"monaco-whole-word",title:r+t.appendTitle,isChecked:t.isChecked,onChange:t.onChange,onKeyDown:t.onKeyDown})||this}return m(t,e),t}(i.Checkbox);t.WholeWordsCheckbox=u;var l=function(e){function t(t){return e.call(this,{actionClassName:"monaco-regex",title:s+t.appendTitle,isChecked:t.isChecked,onChange:t.onChange,onKeyDown:t.onKeyDown})||this}return m(t,e),t}(i.Checkbox);t.RegexCheckbox=l}),define(d[254],h([8,7]),function(e,t){return e.create("vs/base/browser/ui/inputbox/inputBox",t)}),define(d[100],h([0,1,254,24,11,104,99,71,128,12,37,236]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";var d,h=o.$;!function(e){e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR"}(d=t.MessageType||(t.MessageType={}));var p=function(e){function t(t,n,r){var s=e.call(this)||this;s.state="idle",s._onDidChange=s._register(new l.Emitter),s.onDidChange=s._onDidChange.event,s._onDidHeightChange=s._register(new l.Emitter),s.onDidHeightChange=s._onDidHeightChange.event,s.contextViewProvider=n,s.options=r||Object.create(null),s.message=null,s.cachedHeight=null,s.placeholder=s.options.placeholder||"",s.ariaLabel=s.options.ariaLabel||"",s.options.validationOptions&&(s.validation=s.options.validationOptions.validation,s.showValidationMessage=s.options.validationOptions.showMessage||!1),s.element=o.append(t,h(".monaco-inputbox.idle"));var u=s.options.flexibleHeight?"textarea":"input",c=o.append(s.element,h(".wrapper"));return s.input=o.append(c,h(u+".input")),s.input.setAttribute("autocorrect","off"),s.input.setAttribute("autocapitalize","off"),s.input.setAttribute("spellcheck","false"),s.onfocus(s.input,function(){return o.addClass(s.element,"synthetic-focus")}),s.onblur(s.input,function(){return o.removeClass(s.element,"synthetic-focus")}),s.options.flexibleHeight?s.mirror=o.append(c,h("div.mirror")):(s.input.type=s.options.type||"text",s.input.setAttribute("wrap","off")),s.ariaLabel&&s.input.setAttribute("aria-label",s.ariaLabel),s.placeholder&&(s.input.setAttribute("placeholder",s.placeholder),s.input.title=s.placeholder),s.oninput(s.input,function(){return s.onValueChange()}),s.onblur(s.input,function(){return s.onBlur()}),s.onfocus(s.input,function(){return s.onFocus()}),s.placeholder&&i.isIE&&s.onclick(s.input,function(e){o.EventHelper.stop(e,!0),s.input.focus()}),setTimeout(function(){return s.updateMirror()},0),s.options.actions&&(s.actionbar=s._register(new a.ActionBar(s.element)),s.actionbar.push(s.options.actions,{icon:!0,label:!1})),s}return m(t,e),t.prototype.onBlur=function(){this._hideMessage()},t.prototype.onFocus=function(){this._showMessage()},t.prototype.setPlaceHolder=function(e){this.input&&this.input.setAttribute("placeholder",e)},t.prototype.setAriaLabel=function(e){this.ariaLabel=e,this.input&&(e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label"))},t.prototype.setContextViewProvider=function(e){this.contextViewProvider=e},Object.defineProperty(t.prototype,"inputElement",{get:function(){return this.input},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.input.value},set:function(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return null===this.cachedHeight?o.getTotalHeight(this.element):this.cachedHeight},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this.input.focus()},t.prototype.blur=function(){this.input.blur()},t.prototype.hasFocus=function(){return document.activeElement===this.input},t.prototype.select=function(e){void 0===e&&(e=null),this.input.select(),e&&this.input.setSelectionRange(e.start,e.end)},t.prototype.enable=function(){this.input.removeAttribute("disabled")},t.prototype.disable=function(){this.input.disabled=!0,this._hideMessage()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},Object.defineProperty(t.prototype,"width",{get:function(){return o.getTotalWidth(this.input)},set:function(e){this.input.style.width=e+"px"},enumerable:!0,configurable:!0}),t.prototype.showMessage=function(e,t){this.message=e,o.removeClass(this.element,"idle"),o.removeClass(this.element,"info"),o.removeClass(this.element,"warning"),o.removeClass(this.element,"error"),o.addClass(this.element,this.classForType(e.type));var i;i=e.type===d.ERROR?n.localize(0,null,e.content):e.type===d.WARNING?n.localize(1,null,e.content):n.localize(2,null,e.content),s.alert(i),(this.hasFocus()||t)&&this._showMessage()},t.prototype.hideMessage=function(){this.message=null,o.removeClass(this.element,"info"),o.removeClass(this.element,"warning"),o.removeClass(this.element,"error"),o.addClass(this.element,"idle"),this._hideMessage()},t.prototype.isInputValid=function(){return!!this.validation&&!this.validation(this.value)},t.prototype.validate=function(){var e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),!e},t.prototype.classForType=function(e){switch(e){case d.INFO:return"info";case d.WARNING:return"warning";default:return"error"}},t.prototype._showMessage=function(){var e=this;if(this.contextViewProvider&&this.message){var t,n=function(){return t.style.width=o.getTotalWidth(e.element)+"px"};this.state="open",this.contextViewProvider.showContextView({getAnchor:function(){return e.element},anchorAlignment:u.AnchorAlignment.RIGHT,render:function(i){t=o.append(i,h(".monaco-inputbox-container")),n();var s={tagName:"span",className:"monaco-inputbox-message"};e.message.formatContent?s.formattedText=e.message.content:s.text=e.message.content;var a=r.renderHtml(s);return o.addClass(a,e.classForType(e.message.type)),o.append(t,a),null},layout:n})}},t.prototype._hideMessage=function(){this.contextViewProvider&&"open"===this.state&&(this.state="idle",this.contextViewProvider.hideContextView())},t.prototype.onValueChange=function(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),"open"===this.state&&this.contextViewProvider.layout()},t.prototype.updateMirror=function(){
if(this.mirror){var e=this.value||this.placeholder,t=e.charCodeAt(e.length-1),n=10===t?" ":"";this.mirror.textContent=e+n,this.layout()}},t.prototype.layout=function(){if(this.mirror){var e=this.cachedHeight;this.cachedHeight=o.getTotalHeight(this.mirror),e!==this.cachedHeight&&(this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedHeight))}},t.prototype.dispose=function(){this._hideMessage(),this.element=null,this.input=null,this.contextViewProvider=null,this.message=null,this.placeholder=null,this.ariaLabel=null,this.validation=null,this.showValidationMessage=null,this.state=null,this.actionbar=null,e.prototype.dispose.call(this)},t}(c.Widget);t.InputBox=p}),define(d[256],h([0,1,251,11,100,37,12,132,219]),function(e,t,n,i,o,r,s,a){"use strict";var u=n.localize(0,null),l=function(e){function t(t,n,i){var o=e.call(this)||this;return o._onDidOptionChange=o._register(new s.Emitter),o.onDidOptionChange=o._onDidOptionChange.event,o._onKeyDown=o._register(new s.Emitter),o.onKeyDown=o._onKeyDown.event,o._onInput=o._register(new s.Emitter),o.onInput=o._onInput.event,o._onKeyUp=o._register(new s.Emitter),o.onKeyUp=o._onKeyUp.event,o._onCaseSensitiveKeyDown=o._register(new s.Emitter),o.onCaseSensitiveKeyDown=o._onCaseSensitiveKeyDown.event,o._lastHighlightFindOptions=0,o.contextViewProvider=n,o.width=i.width||100,o.placeholder=i.placeholder||"",o.validation=i.validation,o.label=i.label||u,o.regex=null,o.wholeWords=null,o.caseSensitive=null,o.domNode=null,o.inputBox=null,o.buildDomNode(i.appendCaseSensitiveLabel||"",i.appendWholeWordsLabel||"",i.appendRegexLabel||""),Boolean(t)&&t.appendChild(o.domNode),o.onkeydown(o.inputBox.inputElement,function(e){return o._onKeyDown.fire(e)}),o.onkeyup(o.inputBox.inputElement,function(e){return o._onKeyUp.fire(e)}),o.oninput(o.inputBox.inputElement,function(e){return o._onInput.fire()}),o}return m(t,e),t.prototype.enable=function(){i.removeClass(this.domNode,"disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()},t.prototype.disable=function(){i.addClass(this.domNode,"disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t.prototype.clear=function(){this.clearValidation(),this.setValue(""),this.focus()},t.prototype.setWidth=function(e){this.width=e,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()},t.prototype.getValue=function(){return this.inputBox.value},t.prototype.setValue=function(e){this.inputBox.value!==e&&(this.inputBox.value=e)},t.prototype.select=function(){this.inputBox.select()},t.prototype.focus=function(){this.inputBox.focus()},t.prototype.getCaseSensitive=function(){return this.caseSensitive.checked},t.prototype.setCaseSensitive=function(e){this.caseSensitive.checked=e,this.setInputWidth()},t.prototype.getWholeWords=function(){return this.wholeWords.checked},t.prototype.setWholeWords=function(e){this.wholeWords.checked=e,this.setInputWidth()},t.prototype.getRegex=function(){return this.regex.checked},t.prototype.setRegex=function(e){this.regex.checked=e,this.setInputWidth()},t.prototype.focusOnCaseSensitive=function(){this.caseSensitive.focus()},t.prototype.highlightFindOptions=function(){i.removeClass(this.domNode,"highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,i.addClass(this.domNode,"highlight-"+this._lastHighlightFindOptions)},t.prototype.setInputWidth=function(){var e=this.width-this.caseSensitive.width()-this.wholeWords.width()-this.regex.width();this.inputBox.width=e},t.prototype.buildDomNode=function(e,t,n){var r=this;this.domNode=document.createElement("div"),this.domNode.style.width=this.width+"px",i.addClass(this.domNode,"monaco-findInput"),this.inputBox=this._register(new o.InputBox(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation||null,showMessage:!0}})),this.regex=this._register(new a.RegexCheckbox({appendTitle:n,isChecked:!1,onChange:function(e){r._onDidOptionChange.fire(e),e||r.inputBox.focus(),r.setInputWidth(),r.validate()}})),this.wholeWords=this._register(new a.WholeWordsCheckbox({appendTitle:t,isChecked:!1,onChange:function(e){r._onDidOptionChange.fire(e),e||r.inputBox.focus(),r.setInputWidth(),r.validate()}})),this.caseSensitive=this._register(new a.CaseSensitiveCheckbox({appendTitle:e,isChecked:!1,onChange:function(e){r._onDidOptionChange.fire(e),e||r.inputBox.focus(),r.setInputWidth(),r.validate()},onKeyDown:function(e){r._onCaseSensitiveKeyDown.fire(e)}}));var s=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,function(e){if(e.equals(15)||e.equals(17)||e.equals(9)){var t=s.indexOf(document.activeElement);if(t>=0){var n=void 0;e.equals(17)?n=(t+1)%s.length:e.equals(15)&&(n=0===t?s.length-1:t-1),e.equals(9)?s[t].blur():n>=0&&s[n].focus(),i.EventHelper.stop(e,!0)}}}),this.setInputWidth();var u=document.createElement("div");u.className="controls",u.appendChild(this.caseSensitive.domNode),u.appendChild(this.wholeWords.domNode),u.appendChild(this.regex.domNode),this.domNode.appendChild(u)},t.prototype.validate=function(){this.inputBox.validate()},t.prototype.showMessage=function(e){this.inputBox.showMessage(e)},t.prototype.clearMessage=function(){this.inputBox.hideMessage()},t.prototype.clearValidation=function(){this.inputBox.hideMessage()},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t}(r.Widget);l.OPTION_CHANGE="optionChange",t.FindInput=l}),define(d[257],h([8,7]),function(e,t){return e.create("vs/base/common/json",t)}),define(d[178],h([0,1,257]),function(e,t,n){"use strict";function i(e,t){function n(t,n){for(var i=0,o=0;i<t||!n;){var r=e.charCodeAt(h);if(r>=48&&r<=57)o=16*o+r-48;else if(r>=65&&r<=70)o=16*o+r-65+10;else{if(!(r>=97&&r<=102))break;o=16*o+r-97+10}h++,i++}return i<t&&(o=-1),o}function i(e){h=e,f="",g=0,_=v.Unknown,y=m.None}function a(){var t=h;if(48===e.charCodeAt(h))h++;else for(h++;h<e.length&&s(e.charCodeAt(h));)h++;if(h<e.length&&46===e.charCodeAt(h)){if(h++,!(h<e.length&&s(e.charCodeAt(h))))return y=m.UnexpectedEndOfNumber,e.substring(t,h);for(h++;h<e.length&&s(e.charCodeAt(h));)h++}var n=h;if(h<e.length&&(69===e.charCodeAt(h)||101===e.charCodeAt(h)))if(h++,(h<e.length&&43===e.charCodeAt(h)||45===e.charCodeAt(h))&&h++,h<e.length&&s(e.charCodeAt(h))){for(h++;h<e.length&&s(e.charCodeAt(h));)h++;n=h}else y=m.UnexpectedEndOfNumber;return e.substring(t,n)}function u(){for(var t="",i=h;;){if(h>=p){t+=e.substring(i,h),y=m.UnexpectedEndOfString;break}var o=e.charCodeAt(h);if(34===o){t+=e.substring(i,h),h++;break}if(92!==o){if(r(o)){t+=e.substring(i,h),y=m.UnexpectedEndOfString;break}h++}else{if(t+=e.substring(i,h),h++,h>=p){y=m.UnexpectedEndOfString;break}switch(o=e.charCodeAt(h++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var s=n(4,!0);s>=0?t+=String.fromCharCode(s):y=m.InvalidUnicode;break;default:y=m.InvalidEscapeCharacter}i=h}}return t}function l(){if(f="",y=m.None,g=h,h>=p)return g=p,_=v.EOF;var t=e.charCodeAt(h);if(o(t)){do h++,f+=String.fromCharCode(t),t=e.charCodeAt(h);while(o(t));return _=v.Trivia}if(r(t))return h++,f+=String.fromCharCode(t),13===t&&10===e.charCodeAt(h)&&(h++,f+="\n"),_=v.LineBreakTrivia;switch(t){case 123:return h++,_=v.OpenBraceToken;case 125:return h++,_=v.CloseBraceToken;case 91:return h++,_=v.OpenBracketToken;case 93:return h++,_=v.CloseBracketToken;case 58:return h++,_=v.ColonToken;case 44:return h++,_=v.CommaToken;case 34:return h++,f=u(),_=v.StringLiteral;case 47:var n=h-1;if(47===e.charCodeAt(h+1)){for(h+=2;h<p&&!r(e.charCodeAt(h));)h++;return f=e.substring(n,h),_=v.LineCommentTrivia}if(42===e.charCodeAt(h+1)){h+=2;for(var i=p-1,l=!1;h<i;){var d=e.charCodeAt(h);if(42===d&&47===e.charCodeAt(h+1)){h+=2,l=!0;break}h++}return l||(h++,y=m.UnexpectedEndOfComment),f=e.substring(n,h),_=v.BlockCommentTrivia}return f+=String.fromCharCode(t),h++,_=v.Unknown;case 45:if(f+=String.fromCharCode(t),h++,h===p||!s(e.charCodeAt(h)))return _=v.Unknown;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return f+=a(),_=v.NumericLiteral;default:for(;h<p&&c(t);)h++,t=e.charCodeAt(h);if(g!==h){switch(f=e.substring(g,h)){case"true":return _=v.TrueKeyword;case"false":return _=v.FalseKeyword;case"null":return _=v.NullKeyword}return _=v.Unknown}return f+=String.fromCharCode(t),h++,_=v.Unknown}}function c(e){if(o(e)||r(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:return!1}return!0}function d(){var e;do e=l();while(e>=v.LineCommentTrivia&&e<=v.Trivia);return e}void 0===t&&(t=!1);var h=0,p=e.length,f="",g=0,_=v.Unknown,y=m.None;return{setPosition:i,getPosition:function(){return h},scan:t?d:l,getToken:function(){return _},getTokenValue:function(){return f},getTokenOffset:function(){return g},getTokenLength:function(){return h-g},getTokenError:function(){return y}}}function o(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function r(e){return 10===e||13===e||8232===e||8233===e}function s(e){return e>=48&&e<=57}function a(e,t){var n,o,r=i(e),s=[],a=0;do switch(o=r.getPosition(),n=r.scan()){case v.LineCommentTrivia:case v.BlockCommentTrivia:case v.EOF:a!==o&&s.push(e.substring(a,o)),void 0!==t&&s.push(r.getTokenValue().replace(/[^\r\n]/g,t)),a=r.getPosition()}while(n!==v.EOF);return s.join("")}function u(e){switch(e){case y.InvalidSymbol:return n.localize(0,null);case y.InvalidNumberFormat:return n.localize(1,null);case y.PropertyNameExpected:return n.localize(2,null);case y.ValueExpected:return n.localize(3,null);case y.ColonExpected:return n.localize(4,null);case y.CommaExpected:return n.localize(5,null);case y.CloseBraceExpected:return n.localize(6,null);case y.CloseBracketExpected:return n.localize(7,null);case y.EndOfFileExpected:return n.localize(8,null);default:return""}}function l(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";default:return"null"}}function c(e,t){function n(e,t,n,i){s.value=e,s.offset=t,s.length=n,s.type=i,s.columnOffset=void 0,r=s}var i=[],o=new Object,r=void 0,s={value:void 0,offset:void 0,length:void 0,type:void 0},a=!1;try{g(e,{onObjectBegin:function(e,n){if(t<=e)throw o;r=void 0,a=t>e,i.push("")},onObjectProperty:function(e,r,s){if(t<r)throw o;if(n(e,r,s,"property"),i[i.length-1]=e,t<=r+s)throw o},onObjectEnd:function(e,n){if(t<=e)throw o;r=void 0,i.pop()},onArrayBegin:function(e,n){if(t<=e)throw o;r=void 0,i.push(0)},onArrayEnd:function(e,n){if(t<=e)throw o;r=void 0,i.pop()},onLiteralValue:function(e,i,r){if(t<i)throw o;if(n(e,i,r,l(e)),t<=i+r)throw o},onSeparator:function(e,n,s){if(t<=n)throw o;if(":"===e&&"property"===r.type)r.columnOffset=n,a=!1,r=void 0;else if(","===e){var u=i[i.length-1];"number"==typeof u?i[i.length-1]=u+1:(a=!0,i[i.length-1]=""),r=void 0}}})}catch(e){if(e!==o)throw e}return""===i[i.length-1]&&i.pop(),{path:i,previousNode:r,isAtPropertyKey:a,matches:function(e){for(var t=0,n=0;t<e.length&&n<i.length;n++)if(e[t]===i[n]||"*"===e[t])t++;else if("**"!==e[t])return!1;return t===e.length}}}function d(e,t,n){function i(e){Array.isArray(r)?r.push(e):o&&(r[o]=e)}void 0===t&&(t=[]);var o=null,r=[],s=[],a={onObjectBegin:function(){var e={};i(e),s.push(r),r=e,o=null},onObjectProperty:function(e){o=e},onObjectEnd:function(){r=s.pop()},onArrayBegin:function(){var e=[];i(e),s.push(r),r=e,o=null},onArrayEnd:function(){r=s.pop()},onLiteralValue:i,onError:function(e){t.push({error:e})}};return g(e,a,n),r[0]}function h(e,t,n){function i(e){"property"===r.type&&(r.length=e-r.offset,r=r.parent)}function o(e){return r.children.push(e),e}void 0===t&&(t=[]);var r={type:"array",offset:-1,length:-1,children:[]},s={onObjectBegin:function(e){r=o({type:"object",offset:e,length:-1,parent:r,children:[]})},onObjectProperty:function(e,t,n){r=o({type:"property",offset:t,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:e,offset:t,length:n,parent:r})},onObjectEnd:function(e,t){r.length=e+t-r.offset,r=r.parent,i(e+t)},onArrayBegin:function(e,t){r=o({type:"array",offset:e,length:-1,parent:r,children:[]})},onArrayEnd:function(e,t){r.length=e+t-r.offset,r=r.parent,i(e+t)},onLiteralValue:function(e,t,n){o({type:l(e),offset:t,length:n,parent:r,value:e}),i(t+n)},onSeparator:function(e,t,n){"property"===r.type&&(":"===e?r.columnOffset=t:","===e&&i(t))},onError:function(e){t.push({error:e})}};g(e,s,n);var a=r.children[0];return a&&delete a.parent,a}function p(e,t){if(e){for(var n=e,i=0,o=t;i<o.length;i++){var r=o[i];if("string"==typeof r){if("object"!==n.type)return;for(var s=!1,a=0,u=n.children;a<u.length;a++){var l=u[a];if(l.children[0].value===r){n=l.children[1],s=!0;break}}if(!s)return}else{var c=r;if("array"!==n.type||c<0||c>=n.children.length)return;n=n.children[c]}}return n}}function f(e){if("array"===e.type)return e.children.map(f);if("object"===e.type){for(var t={},n=0,i=e.children;n<i.length;n++){var o=i[n];t[o.children[0].value]=f(o.children[1])}return t}return e.value}function g(e,t,n){function o(e){return e?function(){return e(f.getTokenOffset(),f.getTokenLength())}:function(){return!0}}function r(e){return e?function(t){return e(t,f.getTokenOffset(),f.getTokenLength())}:function(){return!0}}function s(){for(;;){var e=f.scan();switch(e){case v.LineCommentTrivia:case v.BlockCommentTrivia:L&&a(y.InvalidSymbol);break;case v.Unknown:a(y.InvalidSymbol);break;case v.Trivia:case v.LineBreakTrivia:break;default:return e}}}function a(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),E(e),t.length+n.length>0)for(var i=f.getToken();i!==v.EOF;){if(t.indexOf(i)!==-1){s();break}if(n.indexOf(i)!==-1)break;i=s()}}function u(e){var t=f.getTokenValue();return e?w(t):m(t),s(),!0}function l(){switch(f.getToken()){case v.NumericLiteral:var e=0;try{e=JSON.parse(f.getTokenValue()),"number"!=typeof e&&(a(y.InvalidNumberFormat),e=0)}catch(e){a(y.InvalidNumberFormat)}w(e);break;case v.NullKeyword:w(null);break;case v.TrueKeyword:w(!0);break;case v.FalseKeyword:w(!1);break;default:return!1}return s(),!0}function c(){return f.getToken()!==v.StringLiteral?(a(y.PropertyNameExpected,[],[v.CloseBraceToken,v.CommaToken]),!1):(u(!1),f.getToken()===v.ColonToken?(S(":"),s(),p()||a(y.ValueExpected,[],[v.CloseBraceToken,v.CommaToken])):a(y.ColonExpected,[],[v.CloseBraceToken,v.CommaToken]),!0)}function d(){g(),s();for(var e=!1;f.getToken()!==v.CloseBraceToken&&f.getToken()!==v.EOF;)f.getToken()===v.CommaToken?(e||a(y.ValueExpected,[],[]),S(","),s()):e&&a(y.CommaExpected,[],[]),c()||a(y.ValueExpected,[],[v.CloseBraceToken,v.CommaToken]),e=!0;return _(),f.getToken()!==v.CloseBraceToken?a(y.CloseBraceExpected,[v.CloseBraceToken],[]):s(),!0}function h(){C(),s();for(var e=!1;f.getToken()!==v.CloseBracketToken&&f.getToken()!==v.EOF;)f.getToken()===v.CommaToken?(e||a(y.ValueExpected,[],[]),S(","),s()):e&&a(y.CommaExpected,[],[]),p()||a(y.ValueExpected,[],[v.CloseBracketToken,v.CommaToken]),e=!0;return b(),f.getToken()!==v.CloseBracketToken?a(y.CloseBracketExpected,[v.CloseBracketToken],[]):s(),!0}function p(){switch(f.getToken()){case v.OpenBracketToken:return h();case v.OpenBraceToken:return d();case v.StringLiteral:return u(!0);default:return l()}}var f=i(e,!1),g=o(t.onObjectBegin),m=r(t.onObjectProperty),_=o(t.onObjectEnd),C=o(t.onArrayBegin),b=o(t.onArrayEnd),w=r(t.onLiteralValue),S=r(t.onSeparator),E=r(t.onError),L=n&&n.disallowComments;return s(),f.getToken()===v.EOF||(p()?(f.getToken()!==v.EOF&&a(y.EndOfFileExpected,[],[]),!0):(a(y.ValueExpected,[],[]),!1))}var m;!function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter"}(m=t.ScanError||(t.ScanError={}));var v;!function(e){e[e.Unknown=0]="Unknown",e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.EOF=16]="EOF"}(v=t.SyntaxKind||(t.SyntaxKind={})),t.createScanner=i;var _;!function(e){e[e.nullCharacter=0]="nullCharacter",e[e.maxAsciiCharacter=127]="maxAsciiCharacter",e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.lineSeparator=8232]="lineSeparator",e[e.paragraphSeparator=8233]="paragraphSeparator",e[e.nextLine=133]="nextLine",e[e.space=32]="space",e[e.nonBreakingSpace=160]="nonBreakingSpace",e[e.enQuad=8192]="enQuad",e[e.emQuad=8193]="emQuad",e[e.enSpace=8194]="enSpace",e[e.emSpace=8195]="emSpace",e[e.threePerEmSpace=8196]="threePerEmSpace",e[e.fourPerEmSpace=8197]="fourPerEmSpace",e[e.sixPerEmSpace=8198]="sixPerEmSpace",e[e.figureSpace=8199]="figureSpace",e[e.punctuationSpace=8200]="punctuationSpace",e[e.thinSpace=8201]="thinSpace",e[e.hairSpace=8202]="hairSpace",e[e.zeroWidthSpace=8203]="zeroWidthSpace",e[e.narrowNoBreakSpace=8239]="narrowNoBreakSpace",e[e.ideographicSpace=12288]="ideographicSpace",e[e.mathematicalSpace=8287]="mathematicalSpace",e[e.ogham=5760]="ogham",e[e._=95]="_",e[e.$=36]="$",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.ampersand=38]="ampersand",e[e.asterisk=42]="asterisk",e[e.at=64]="at",e[e.backslash=92]="backslash",e[e.bar=124]="bar",e[e.caret=94]="caret",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.closeParen=41]="closeParen",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.equals=61]="equals",e[e.exclamation=33]="exclamation",e[e.greaterThan=62]="greaterThan",e[e.lessThan=60]="lessThan",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.openParen=40]="openParen",e[e.percent=37]="percent",e[e.plus=43]="plus",e[e.question=63]="question",e[e.semicolon=59]="semicolon",e[e.singleQuote=39]="singleQuote",e[e.slash=47]="slash",e[e.tilde=126]="tilde",e[e.backspace=8]="backspace",e[e.formFeed=12]="formFeed",e[e.byteOrderMark=65279]="byteOrderMark",e[e.tab=9]="tab",e[e.verticalTab=11]="verticalTab"}(_||(_={})),t.stripComments=a;var y;!function(e){e[e.InvalidSymbol=0]="InvalidSymbol",e[e.InvalidNumberFormat=1]="InvalidNumberFormat",e[e.PropertyNameExpected=2]="PropertyNameExpected",e[e.ValueExpected=3]="ValueExpected",e[e.ColonExpected=4]="ColonExpected",e[e.CommaExpected=5]="CommaExpected",e[e.CloseBraceExpected=6]="CloseBraceExpected",e[e.CloseBracketExpected=7]="CloseBracketExpected",e[e.EndOfFileExpected=8]="EndOfFileExpected"}(y=t.ParseErrorCode||(t.ParseErrorCode={})),t.getParseErrorMessage=u,t.getLocation=c,t.parse=d,t.parseTree=h,t.findNodeAtLocation=p,t.getNodeValue=f,t.visit=g}),define(d[259],h([8,7]),function(e,t){return e.create("vs/base/common/keybinding",t)}),define(d[137],h([0,1,259,18,31]),function(e,t,n,i,o){"use strict";function r(e,t,n){var i=[],s=o.BinaryKeybindings.hasCtrlCmd(e),a=o.BinaryKeybindings.hasShift(e),u=o.BinaryKeybindings.hasAlt(e),l=o.BinaryKeybindings.hasWinCtrl(e),c=o.BinaryKeybindings.extractKeyCode(e),d=t.getLabelForKey(c);if(!d)return"";(s&&!n.isMacintosh||l&&n.isMacintosh)&&i.push(t.ctrlKeyLabel),a&&i.push(t.shiftKeyLabel),u&&i.push(t.altKeyLabel),s&&n.isMacintosh&&i.push(t.cmdKeyLabel),l&&!n.isMacintosh&&i.push(t.windowsKeyLabel),i.push(d);var h=i.join(t.modifierSeparator);return o.BinaryKeybindings.hasChord(e)?h+" "+r(o.BinaryKeybindings.extractChordPart(e),t,n):h}function s(e,t){e.length>0&&e.push({tagName:"span",text:"+"}),e.push({tagName:"span",className:"monaco-kbkey",text:t})}function a(e,t,n,i){void 0===i&&(i=!1);var r=[],u=o.BinaryKeybindings.hasCtrlCmd(e),l=o.BinaryKeybindings.hasShift(e),c=o.BinaryKeybindings.hasAlt(e),d=o.BinaryKeybindings.hasWinCtrl(e),h=o.BinaryKeybindings.extractKeyCode(e),p=t.getLabelForKey(h);if(!p)return[];(u&&!n.isMacintosh||d&&n.isMacintosh)&&s(r,t.ctrlKeyLabel),l&&s(r,t.shiftKeyLabel),c&&s(r,t.altKeyLabel),u&&n.isMacintosh&&s(r,t.cmdKeyLabel),d&&!n.isMacintosh&&s(r,t.windowsKeyLabel),s(r,p);var f=null;return o.BinaryKeybindings.hasChord(e)&&(f=a(o.BinaryKeybindings.extractChordPart(e),t,n,!0),r.push({tagName:"span",text:" "}),r=r.concat(f)),i?r:[{tagName:"span",className:"monaco-kb",children:r}]}var u=function(){function e(){}return e.getUserSettingsKeybindingRegex=function(){if(!this._cachedKeybindingRegex){var e="numpad(0|1|2|3|4|5|6|7|8|9|_multiply|_add|_subtract|_decimal|_divide|_separator)",t="`|\\-|=|\\[|\\]|\\\\\\\\|;|'|,|\\.|\\/|oem_8|oem_102",n="left|up|right|down|pageup|pagedown|end|home|tab|enter|escape|space|backspace|delete|pausebreak|capslock|insert|contextmenu|numlock|scrolllock",i="[a-z]|[0-9]|f(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19)",o="(("+[e,t,n,i].join(")|(")+"))",r="((ctrl|shift|alt|cmd|win|meta)\\+)*",s="("+r+o+")";this._cachedKeybindingRegex='"\\s*('+s+"(\\s+"+s+')?)\\s*"'}return this._cachedKeybindingRegex},e.toUserSettingsLabel=function(e,t){void 0===t&&(t=i);var n=r(e,p.INSTANCE,t);return n=n.toLowerCase(),t.isMacintosh?n=n.replace(/meta/g,"cmd"):t.isWindows&&(n=n.replace(/meta/g,"win")),n},e.fromUserSettingsLabel=function(t,n){if(void 0===n&&(n=i),!t)return null;t=t.toLowerCase().trim();for(var r=!1,s=!1,a=!1,u=!1,l="";/^(ctrl|shift|alt|meta|win|cmd)(\+|\-)/.test(t);)/^ctrl(\+|\-)/.test(t)&&(n.isMacintosh?u=!0:r=!0,t=t.substr("ctrl-".length)),/^shift(\+|\-)/.test(t)&&(s=!0,t=t.substr("shift-".length)),/^alt(\+|\-)/.test(t)&&(a=!0,t=t.substr("alt-".length)),/^meta(\+|\-)/.test(t)&&(n.isMacintosh?r=!0:u=!0,t=t.substr("meta-".length)),/^win(\+|\-)/.test(t)&&(n.isMacintosh?r=!0:u=!0,t=t.substr("win-".length)),/^cmd(\+|\-)/.test(t)&&(n.isMacintosh?r=!0:u=!0,t=t.substr("cmd-".length));var c=0,d=t.indexOf(" ");d>0?(l=t.substring(0,d),c=e.fromUserSettingsLabel(t.substring(d),n)):l=t;var h=o.USER_SETTINGS.toKeyCode(l),p=0;return r&&(p|=2048),s&&(p|=1024),a&&(p|=512),u&&(p|=256),p|=h,o.KeyChord(p,c)},e._toUSLabel=function(e,t){return void 0===t&&(t=i),r(e.value,t.isMacintosh?c.INSTANCE:h.INSTANCE,t)},e._toUSAriaLabel=function(e,t){return void 0===t&&(t=i),r(e.value,d.INSTANCE,t)},e._toUSHTMLLabel=function(e,t){return void 0===t&&(t=i),a(e.value,t.isMacintosh?c.INSTANCE:h.INSTANCE,t)},e.toCustomLabel=function(e,t,n){return void 0===n&&(n=i),r(e.value,t,n)},e.toCustomHTMLLabel=function(e,t,n){return void 0===n&&(n=i),a(e.value,t,n)},e._toElectronAccelerator=function(e,t){if(void 0===t&&(t=i),o.BinaryKeybindings.hasChord(e.value))return null;var n=o.BinaryKeybindings.extractKeyCode(e.value);return n>=93&&n<=108?null:r(e.value,l.INSTANCE,t)},e}();u._cachedKeybindingRegex=null,t.KeybindingLabels=u;var l=function(){function e(){this.ctrlKeyLabel="Ctrl",this.shiftKeyLabel="Shift",this.altKeyLabel="Alt",this.cmdKeyLabel="Cmd",this.windowsKeyLabel="Super",this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return o.KeyCodeUtils.toString(e)},e}();l.INSTANCE=new l,t.ElectronAcceleratorLabelProvider=l;var c=function(){function e(){this.ctrlKeyLabel="⌃",this.shiftKeyLabel="⇧",this.altKeyLabel="⌥",this.cmdKeyLabel="⌘",this.windowsKeyLabel=n.localize(0,null),this.modifierSeparator=""}return e.prototype.getLabelForKey=function(t){switch(t){case 15:return e.leftArrowUnicodeLabel;case 16:return e.upArrowUnicodeLabel;case 17:return e.rightArrowUnicodeLabel;case 18:return e.downArrowUnicodeLabel}return o.KeyCodeUtils.toString(t)},e}();c.INSTANCE=new c,c.leftArrowUnicodeLabel=String.fromCharCode(8592),c.upArrowUnicodeLabel=String.fromCharCode(8593),c.rightArrowUnicodeLabel=String.fromCharCode(8594),c.downArrowUnicodeLabel=String.fromCharCode(8595),t.MacUIKeyLabelProvider=c;var d=function(){function e(){this.ctrlKeyLabel=n.localize(1,null),this.shiftKeyLabel=n.localize(2,null),this.altKeyLabel=n.localize(3,null),this.cmdKeyLabel=n.localize(4,null),this.windowsKeyLabel=n.localize(5,null),this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){return o.KeyCodeUtils.toString(e)},e}();d.INSTANCE=new c,t.AriaKeyLabelProvider=d;var h=function(){function e(){this.ctrlKeyLabel=n.localize(6,null),this.shiftKeyLabel=n.localize(7,null),this.altKeyLabel=n.localize(8,null),this.cmdKeyLabel=n.localize(9,null),this.windowsKeyLabel=n.localize(10,null),this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){return o.KeyCodeUtils.toString(e)},e}();h.INSTANCE=new h,t.ClassicUIKeyLabelProvider=h;var p=function(){function e(){this.ctrlKeyLabel="Ctrl",this.shiftKeyLabel="Shift",this.altKeyLabel="Alt",this.cmdKeyLabel="Meta",this.windowsKeyLabel="Meta",this.modifierSeparator="+"}return e.prototype.getLabelForKey=function(e){return o.USER_SETTINGS.fromKeyCode(e)},e}();p.INSTANCE=new p}),define(d[261],h([8,7]),function(e,t){return e.create("vs/base/common/severity",t)}),define(d[30],h([0,1,261,9]),function(e,t,n,i){"use strict";var o;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(o||(o={})),function(e){function t(t){return t?i.equalsIgnoreCase(s,t)?e.Error:i.equalsIgnoreCase(a,t)||i.equalsIgnoreCase(u,t)?e.Warning:i.equalsIgnoreCase(l,t)?e.Info:e.Ignore:e.Ignore}function o(e){return c[e]||i.empty}function r(e,t){return t-e}var s="error",a="warning",u="warn",l="info",c=Object.create(null);c[e.Error]=n.localize(0,null),c[e.Warning]=n.localize(1,null),c[e.Info]=n.localize(2,null),e.fromValue=t,e.toString=o,e.compare=r}(o||(o={})),Object.defineProperty(t,"__esModule",{value:!0}),t.default=o}),define(d[263],h([0,1,4,12,30,11,409]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e){var t=this;this._onClick=new i.Emitter,this._toDispose=[],this._editor=e,this._editor.addOverlayWidget(this),this._toDispose.push(this._editor.onDidScrollChange(function(){t._visible&&t._layout()})),this._toDispose.push(i.any(this._editor.onDidChangeConfiguration,this._editor.onDidChangeModelDecorations)(function(){t._visible&&!t._hasSpaceInGlyphMargin(t._line)&&t.hide()}))}return e.prototype.dispose=function(){this._editor.removeOverlayWidget(this),this._toDispose=n.dispose(this._toDispose)},Object.defineProperty(e.prototype,"onClick",{get:function(){return this._onClick.event},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return"__lightBulbWidget"},e.prototype.getDomNode=function(){var e=this;return this._domNode||(this._domNode=document.createElement("div"),this._domNode.style.width="21px",this._domNode.style.height="20px",this._domNode.className="lightbulb-glyph hidden",this._toDispose.push(r.addDisposableListener(this._domNode,"mousedown",function(t){t.preventDefault();var n=r.getDomNodePagePosition(e._domNode),i=n.top,o=n.height,s=e._editor.getConfiguration().lineHeight;e._onClick.fire({x:t.clientX,y:i+o+Math.floor(s/3)})}))),this._domNode},e.prototype.getPosition=function(){return null},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){var t=this;this._model=e,this.hide();var n=this._model;e.fixes.done(function(i){n===t._model&&i&&i.length>0?t.show(e):t.hide()},function(e){t.hide()})},enumerable:!0,configurable:!0}),e.prototype.show=function(e){var t=e.range.startLineNumber;this._hasSpaceInGlyphMargin(t)&&(this._visible&&this._line===t||(this._line=t,this._visible=!0,this._layout(),this._domNode.dataset.severity=e.severity>=o.default.Warning?"high":""))},e.prototype._hasSpaceInGlyphMargin=function(e){if(!this._editor.getRawConfiguration().glyphMargin)return!1;var t=this._editor.getLineDecorations(e);if(t)for(var n=0,i=t;n<i.length;n++){var o=i[n].options;if(o.glyphMarginClassName)return!1}return!0},e.prototype._layout=function(){var e=this._editor.getTopForLineNumber(this._line),t=this._editor.getScrollTop(),n=e-t;this._domNode.style.top=n+"px",this._domNode.style.left="0px",this._domNode.classList.remove("hidden")},e.prototype.hide=function(){this._visible&&(this._visible=!1,this._domNode.classList.add("hidden"))},e}();t.LightBulbWidget=s}),define(d[264],h([8,7]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenModel",t)}),define(d[265],h([8,7]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenWidget",t)}),define(d[266],h([8,7]),function(e,t){return e.create("vs/base/parts/tree/browser/treeDefaults",t)}),define(d[75],h([0,1,266,6,49,18,10,11]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(){function e(){}return e.prototype.getHeight=function(e,t){return 20},e.prototype.getTemplateId=function(e,t){return"legacy"},e.prototype.renderTemplate=function(e,t,n){return{root:n,element:null,previousCleanupFn:null}},e.prototype.renderElement=function(e,t,n,i){for(i.previousCleanupFn&&i.previousCleanupFn(e,i.element);i.root&&i.root.firstChild;)i.root.removeChild(i.root.firstChild);i.element=t,i.previousCleanupFn=this.render(e,t,i.root)},e.prototype.disposeTemplate=function(e,t,n){n.previousCleanupFn&&n.previousCleanupFn(e,n.element),n.root=null,n.element=null,n.previousCleanupFn=null},e.prototype.render=function(e,t,n,i){return n.textContent=""+t,null},e}();t.LegacyRenderer=u;var l;!function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP"}(l=t.ClickBehavior||(t.ClickBehavior={}));var c=function(){function e(){this._arr=[]}return e.prototype.set=function(e,t){this._arr.push({keybinding:e,callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t];if(e.value===n.keybinding)return n.callback}return null},e}();t.KeybindingDispatcher=c;var d=function(){function e(e){void 0===e&&(e={clickBehavior:l.ON_MOUSE_UP});var t=this;this.options=e,this.downKeyBindingDispatcher=new c,this.downKeyBindingDispatcher.set(10,function(e,n){return t.onSpace(e,n)}),this.downKeyBindingDispatcher.set(16,function(e,n){return t.onUp(e,n)}),this.downKeyBindingDispatcher.set(11,function(e,n){return t.onPageUp(e,n)}),this.downKeyBindingDispatcher.set(18,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(12,function(e,n){return t.onPageDown(e,n)}),this.downKeyBindingDispatcher.set(15,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(17,function(e,n){return t.onRight(e,n)}),this.downKeyBindingDispatcher.set(9,function(e,n){return t.onEscape(e,n)}),this.downKeyBindingDispatcher.set(14,function(e,n){return t.onHome(e,n)}),this.downKeyBindingDispatcher.set(13,function(e,n){return t.onEnd(e,n)}),this.upKeyBindingDispatcher=new c,this.upKeyBindingDispatcher.set(3,this.onEnter.bind(this)),
this.upKeyBindingDispatcher.set(2051,this.onEnter.bind(this))}return e.prototype.onMouseDown=function(e,t,n,i){if(void 0===i&&(i="mouse"),this.options.clickBehavior===l.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(a.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,n){var i=r.isMacintosh;return i&&n.ctrlKey?(n.preventDefault(),n.stopPropagation(),!1):(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&((this.options.clickBehavior!==l.ON_MOUSE_DOWN||!n.leftButton&&!n.middleButton)&&this.onLeftClick(e,t,n))},e.prototype.onLeftClick=function(e,t,n,i){void 0===i&&(i="mouse");var o={origin:i,originalEvent:n};if(e.getInput()===t)e.clearFocus(o),e.clearSelection(o);else{var r=n&&n.browserEvent&&"mousedown"===n.browserEvent.type;r||n.preventDefault(),n.stopPropagation(),e.DOMFocus(),e.setSelection([t],o),e.setFocus(t,o),e.isExpanded(t)?e.collapse(t).done(null,s.onUnexpectedError):e.expand(t).done(null,s.onUnexpectedError)}return!0},e.prototype.onContextMenu=function(e,t,n){return(!n.target||!n.target.tagName||"input"!==n.target.tagName.toLowerCase())&&(n&&(n.preventDefault(),n.stopPropagation()),!1)},e.prototype.onTap=function(e,t,n){var i=n.initialTarget;return(!i||!i.tagName||"input"!==i.tagName.toLowerCase())&&this.onLeftClick(e,t,n,"touch")},e.prototype.onKeyDown=function(e,t){return this.onKey(this.downKeyBindingDispatcher,e,t)},e.prototype.onKeyUp=function(e,t){return this.onKey(this.upKeyBindingDispatcher,e,t)},e.prototype.onKey=function(e,t,n){var i=e.dispatch(n.toKeybinding());return!(!i||!i(t,n))&&(n.preventDefault(),n.stopPropagation(),!0)},e.prototype.onUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPrevious(1,n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onPageUp=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusPreviousPage(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNext(1,n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onPageDown=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusNextPage(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onHome=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusFirst(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onEnd=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?e.clearHighlight(n):(e.focusLast(n),e.reveal(e.getFocus()).done(null,s.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.collapse(i).then(function(t){if(i&&!t)return e.focusParent(n),e.reveal(e.getFocus())}).done(null,s.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var i=e.getFocus();e.expand(i).then(function(t){if(i&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())}).done(null,s.onUnexpectedError)}return!0},e.prototype.onEnter=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())return!1;var i=e.getFocus();return i&&e.setSelection([i],n),!0},e.prototype.onSpace=function(e,t){if(e.getHighlight())return!1;var n=e.getFocus();return n&&e.toggleExpansion(n),!0},e.prototype.onEscape=function(e,t){var n={origin:"keyboard",originalEvent:t};return e.getHighlight()?(e.clearHighlight(n),!0):e.getSelection().length?(e.clearSelection(n),!0):!!e.getFocus()&&(e.clearFocus(n),!0)},e}();t.DefaultController=d;var h=function(){function e(){}return e.prototype.getDragURI=function(e,t){return null},e.prototype.onDragStart=function(e,t,n){},e.prototype.onDragOver=function(e,t,n,i){return null},e.prototype.drop=function(e,t,n,i){},e}();t.DefaultDragAndDrop=h;var p=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=p;var f=function(){function e(){}return e.prototype.compare=function(e,t,n){return 0},e}();t.DefaultSorter=f;var g=function(){function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=g;var v=function(e){function t(t,i){var o=e.call(this,"vs.tree.collapse",n.localize(0,null),"monaco-tree-action collapse-all",i)||this;return o.viewer=t,o}return m(t,e),t.prototype.run=function(e){return this.viewer.getHighlight()?i.TPromise.as(null):(this.viewer.collapseAll(),this.viewer.clearSelection(),this.viewer.clearFocus(),this.viewer.DOMFocus(),this.viewer.focusFirst(),i.TPromise.as(null))},t}(o.Action);t.CollapseAllAction=v}),define(d[106],h([0,1,264,6,22,87,9,39,133,176,71,75,112,11]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=0,g=function(){function e(){}return e.getLabel=function(e){return e.getLabel()},e.getResourcePath=function(e){var t=e.getResource();return t&&t.fsPath},e}(),v=function(){function e(e){void 0===e&&(e=[]),this.id=(f++).toString(),this.labelHighlights=e,this.descriptionHighlights=[]}return e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return null},e.prototype.getLabelOptions=function(){return null},e.prototype.getAriaLabel=function(){return this.getLabel()},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getResource=function(){return null},e.prototype.isHidden=function(){return this.hidden},e.prototype.setHidden=function(e){this.hidden=e},e.prototype.setHighlights=function(e,t,n){this.labelHighlights=e,this.descriptionHighlights=t,this.detailHighlights=n},e.prototype.getHighlights=function(){return[this.labelHighlights,this.descriptionHighlights,this.detailHighlights]},e.prototype.run=function(e,t){return!1},e.compare=function(e,t,n){n&&(n=s.stripWildcards(n).toLowerCase());var i=e.getHighlights()[0]||[],o=t.getHighlights()[0]||[];if(i.length&&!o.length)return-1;if(!i.length&&o.length)return 1;var r=e.getLabel(),a=t.getLabel();if(r===a){var u=e.getResource(),c=t.getResource();u&&c&&(r=u.fsPath,a=c.fsPath)}return l.compareAnything(r,a,n)},e.compareByScore=function(e,t,n,i,o){return l.compareByScore(e,t,g,n,i,o)},e.highlight=function(e,t,n){void 0===n&&(n=!1);var i=[],o=[],u=s.stripWildcards(t),l=e.getLabel(),c=e.getDescription();if(e.getResource())if(t.toLowerCase()===e.getResource().fsPath.toLowerCase())i.push({start:0,end:l.length}),o.push({start:0,end:c.length});else if(n||t.indexOf(a.nativeSep)>=0){var d=r.matchesFuzzy(t,l,n);if(d)i=d;else{var h=c?c+a.nativeSep:"",p=h.length,f=r.matchesFuzzy(t,h+l,n);f||t===u||(f=r.matchesFuzzy(u,h+l,n)),f&&f.forEach(function(e){e.start<p&&e.end>p?(i.push({start:0,end:e.end-p}),o.push({start:e.start,end:p})):e.start>=p?i.push({start:e.start-p,end:e.end-p}):o.push(e)})}}else i=r.matchesFuzzy(t,l);else i=r.matchesFuzzy(t,l);return{labelHighlights:i,descriptionHighlights:o}},e.prototype.isFile=function(){return!1},e}();t.QuickOpenEntry=v;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getHeight=function(){return 0},t.prototype.render=function(e,t,n){return null},t}(v);t.QuickOpenEntryItem=_;var y=function(e){function t(t,n,i){var o=e.call(this)||this;return o.entry=t,o.groupLabel=n,o.withBorder=i,o}return m(t,e),t.prototype.getGroupLabel=function(){return this.groupLabel},t.prototype.setGroupLabel=function(e){this.groupLabel=e},t.prototype.showBorder=function(){return this.withBorder},t.prototype.setShowBorder=function(e){this.withBorder=e},t.prototype.getLabel=function(){return this.entry?this.entry.getLabel():e.prototype.getLabel.call(this)},t.prototype.getLabelOptions=function(){return this.entry?this.entry.getLabelOptions():e.prototype.getLabelOptions.call(this)},t.prototype.getAriaLabel=function(){return this.entry?this.entry.getAriaLabel():e.prototype.getAriaLabel.call(this)},t.prototype.getDetail=function(){return this.entry?this.entry.getDetail():e.prototype.getDetail.call(this)},t.prototype.getResource=function(){return this.entry?this.entry.getResource():e.prototype.getResource.call(this)},t.prototype.getIcon=function(){return this.entry?this.entry.getIcon():e.prototype.getIcon.call(this)},t.prototype.getDescription=function(){return this.entry?this.entry.getDescription():e.prototype.getDescription.call(this)},t.prototype.getEntry=function(){return this.entry},t.prototype.getHighlights=function(){return this.entry?this.entry.getHighlights():e.prototype.getHighlights.call(this)},t.prototype.isHidden=function(){return this.entry?this.entry.isHidden():e.prototype.isHidden.call(this)},t.prototype.setHighlights=function(t,n,i){this.entry?this.entry.setHighlights(t,n,i):e.prototype.setHighlights.call(this,t,n,i)},t.prototype.setHidden=function(t){this.entry?this.entry.setHidden(t):e.prototype.setHidden.call(this,t)},t.prototype.run=function(t,n){return this.entry?this.entry.run(t,n):e.prototype.run.call(this,t,n)},t}(v);t.QuickOpenEntryGroup=y;var C="quickOpenEntry",b="quickOpenEntryGroup",w="quickOpenEntryItem",S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getTemplateId=function(e,t){return w},t.prototype.render=function(t,n,i,o){return n instanceof _?n.render(t,i,o):e.prototype.render.call(this,t,n,i,o)},t}(d.LegacyRenderer),E=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.TPromise.as(null)},e.prototype.hasSecondaryActions=function(e,t){return!1},e.prototype.getSecondaryActions=function(e,t){return i.TPromise.as(null)},e.prototype.getActionItem=function(e,t,n){return null},e}(),L=function(){function e(e,t){void 0===e&&(e=new E),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t,this.entryItemRenderer=new S}return e.prototype.getHeight=function(e){return e instanceof _?e.getHeight():e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof _?w:e instanceof y?b:C},e.prototype.renderTemplate=function(e,t){if(e===w)return this.entryItemRenderer.renderTemplate(null,e,t);var n;e===b&&(n=document.createElement("div"),p.addClass(n,"results-group"),t.appendChild(n)),p.addClass(t,"actions");var i=document.createElement("div");p.addClass(i,"sub-content"),t.appendChild(i);var o=document.createElement("div");p.addClass(o,"primary-action-bar"),t.appendChild(o);var r=new c.ActionBar(o,{actionRunner:this.actionRunner}),s=p.$(".row"),a=p.$(".row"),l=p.$(".quick-open-entry",null,s,a);i.appendChild(l);var d=document.createElement("span");s.appendChild(d);var f=new u.IconLabel(s,{supportHighlights:!0}),g=document.createElement("span");s.appendChild(g),p.addClass(g,"quick-open-entry-description");var m=new h.HighlightedLabel(g),v=document.createElement("div");a.appendChild(v),p.addClass(v,"quick-open-entry-meta");var _=new h.HighlightedLabel(v);return{container:t,entry:l,icon:d,label:f,detail:_,description:m,group:n,actionBar:r}},e.prototype.renderElement=function(e,t,n){if(t===w)return void this.entryItemRenderer.renderElement(null,e,t,n);var i=n;if(this.actionProvider.hasActions(null,e)?p.addClass(i.container,"has-actions"):p.removeClass(i.container,"has-actions"),i.actionBar.context=e,this.actionProvider.getActions(null,e).then(function(e){i.actionBar.isEmpty()&&e&&e.length>0?i.actionBar.push(e,{icon:!0,label:!1}):i.actionBar.isEmpty()||e&&0!==e.length||i.actionBar.clear()}),e instanceof y){var o=e;o.showBorder()?p.addClass(i.container,"results-group-separator"):p.removeClass(i.container,"results-group-separator");var r=o.getGroupLabel()||"";n.group.textContent=r}if(e instanceof v){var s=e.getHighlights(),a=s[0],u=s[1],l=s[2],c=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";i.icon.className=c;var d=e.getLabelOptions()||Object.create(null);d.matches=a||[],i.label.setValue(e.getLabel(),null,d),i.detail.set(e.getDetail(),l),i.description.set(e.getDescription(),u||[]),i.description.element.title=e.getDescription()}},e.prototype.disposeTemplate=function(e,t){if(e===w)this.entryItemRenderer.disposeTemplate(null,e,t);else{var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null,n.entry=null,n.description.dispose(),n.description=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null}},e}(),N=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new E),this._entries=e,this._dataSource=this,this._renderer=new L(t),this._filter=this,this._runner=this,this._accessibilityProvider=this}return Object.defineProperty(e.prototype,"entries",{get:function(){return this._entries},set:function(e){this._entries=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this._dataSource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return this._renderer},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"runner",{get:function(){return this._runner},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityProvider",{get:function(){return this._accessibilityProvider},enumerable:!0,configurable:!0}),e.prototype.addEntries=function(e){o.isArray(e)&&(this._entries=this._entries.concat(e))},e.prototype.setEntries=function(e){o.isArray(e)&&(this._entries=e)},e.prototype.getEntries=function(e){return e?this._entries.filter(function(e){return!e.isHidden()}):this._entries},e.prototype.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){var t=e.getAriaLabel();return t?n.localize(0,null,e.getAriaLabel()):n.localize(1,null)},e.prototype.isVisible=function(e){return!e.isHidden()},e.prototype.run=function(e,t,n){return e.run(t,n)},e}();t.QuickOpenModel=N}),define(d[141],h([0,1,75,25,184,268,77,327]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,t,i){if(void 0===i&&(i={}),this.tree=e,this.configuration=t,this.options=i,!t.dataSource)throw new Error("You must provide a Data Source to the tree.");this.dataSource=t.dataSource,this.renderer=t.renderer||new n.LegacyRenderer,this.controller=t.controller||new n.DefaultController,this.dnd=t.dnd||new n.DefaultDragAndDrop,this.filter=t.filter||new n.DefaultFilter,this.sorter=t.sorter||null,this.accessibilityProvider=t.accessibilityProvider||new n.DefaultAccessibilityProvider}return e}();t.TreeContext=a;var u=function(e){function t(t,n,i){void 0===i&&(i={});var s=e.call(this)||this;return s.container=t,s.configuration=n,s.options=i,s.options.twistiePixels="number"==typeof s.options.twistiePixels?s.options.twistiePixels:32,s.options.showTwistie=s.options.showTwistie!==!1,s.options.indentPixels="number"==typeof s.options.indentPixels?s.options.indentPixels:12,s.options.alwaysFocused=s.options.alwaysFocused===!0,s.options.useShadows=s.options.useShadows!==!1,s.options.paddingOnRow=s.options.paddingOnRow!==!1,s.context=new a(s,n,i),s.model=new o.TreeModel(s.context),s.view=new r.TreeView(s.context,s.container),s.view.setModel(s.model),s.addEmitter2(s.model),s.addEmitter2(s.view),s}return m(t,e),t.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},t.prototype.layout=function(e){this.view.layout(e)},t.prototype.DOMFocus=function(){this.view.focus()},t.prototype.isDOMFocused=function(){return this.view.isFocused()},t.prototype.DOMBlur=function(){this.view.blur()},t.prototype.onVisible=function(){this.view.onVisible()},t.prototype.onHidden=function(){this.view.onHidden()},t.prototype.setInput=function(e){return this.model.setInput(e)},t.prototype.getInput=function(){return this.model.getInput()},t.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},t.prototype.refreshAll=function(e,t){return void 0===t&&(t=!0),this.model.refreshAll(e,t)},t.prototype.expand=function(e){return this.model.expand(e)},t.prototype.expandAll=function(e){return this.model.expandAll(e)},t.prototype.collapse=function(e,t){return void 0===t&&(t=!1),this.model.collapse(e,t)},t.prototype.collapseAll=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!1),this.model.collapseAll(e,t)},t.prototype.toggleExpansion=function(e){return this.model.toggleExpansion(e)},t.prototype.toggleExpansionAll=function(e){return this.model.toggleExpansionAll(e)},t.prototype.isExpanded=function(e){return this.model.isExpanded(e)},t.prototype.getExpandedElements=function(){return this.model.getExpandedElements()},t.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},t.prototype.getRelativeTop=function(e){var t=this.model.getItem(e);return this.view.getRelativeTop(t)},t.prototype.getScrollPosition=function(){return this.view.getScrollPosition()},t.prototype.setScrollPosition=function(e){this.view.setScrollPosition(e)},t.prototype.getContentHeight=function(){return this.view.getTotalHeight()},t.prototype.setHighlight=function(e,t){this.model.setHighlight(e,t)},t.prototype.getHighlight=function(){return this.model.getHighlight()},t.prototype.isHighlighted=function(e){return this.model.isFocused(e)},t.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},t.prototype.select=function(e,t){this.model.select(e,t)},t.prototype.selectRange=function(e,t,n){this.model.selectRange(e,t,n)},t.prototype.deselectRange=function(e,t,n){this.model.deselectRange(e,t,n)},t.prototype.selectAll=function(e,t){this.model.selectAll(e,t)},t.prototype.deselect=function(e,t){this.model.deselect(e,t)},t.prototype.deselectAll=function(e,t){this.model.deselectAll(e,t)},t.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},t.prototype.toggleSelection=function(e,t){this.model.toggleSelection(e,t)},t.prototype.isSelected=function(e){return this.model.isSelected(e)},t.prototype.getSelection=function(){return this.model.getSelection()},t.prototype.clearSelection=function(e){this.model.setSelection([],e)},t.prototype.selectNext=function(e,t,n){this.model.selectNext(e,t,n)},t.prototype.selectPrevious=function(e,t,n){this.model.selectPrevious(e,t,n)},t.prototype.selectParent=function(e,t){this.model.selectParent(e,t)},t.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},t.prototype.isFocused=function(e){return this.model.isFocused(e)},t.prototype.getFocus=function(){return this.model.getFocus()},t.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},t.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},t.prototype.focusParent=function(e){this.model.focusParent(e)},t.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)},t.prototype.focusFirst=function(e){this.model.focusFirst(e)},t.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},t.prototype.focusLast=function(e){this.model.focusLast(e)},t.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},t.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},t.prototype.clearFocus=function(e){this.model.setFocus(null,e)},t.prototype.addTraits=function(e,t){this.model.addTraits(e,t)},t.prototype.removeTraits=function(e,t){this.model.removeTraits(e,t)},t.prototype.toggleTrait=function(e,t){this.model.hasTrait(e,t)?this.model.removeTraits(e,[t]):this.model.addTraits(e,[t])},t.prototype.hasTrait=function(e,t){return this.model.hasTrait(e,t)},t.prototype.getNavigator=function(e,t){return new s.MappedNavigator(this.model.getNavigator(e,t),function(e){return e&&e.getElement()})},t.prototype.dispose=function(){null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),e.prototype.dispose.call(this)},t}(i.EventEmitter);t.Tree=u}),define(d[270],h([0,1,265,6,18,67,22,10,76,177,34,100,30,141,250,53,75,11,4,40,275]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y,C){"use strict";var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.onContextMenu=function(t,n,i){return o.isMacintosh?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(v.DefaultController);t.QuickOpenController=b;var w;!function(e){e[e.ELEMENT_SELECTED=0]="ELEMENT_SELECTED",e[e.FOCUS_LOST=1]="FOCUS_LOST",e[e.CANCELED=2]="CANCELED"}(w=t.HideReason||(t.HideReason={}));var S=n.localize(0,null),E=function(){function e(e,t,n,i){this.toUnbind=[],this.container=e,this.callbacks=t,this.options=n,this.usageLogger=i,this.model=null}return e.prototype.getElement=function(){return c.$(this.builder)},e.prototype.getModel=function(){return this.model},e.prototype.setCallbacks=function(e){this.callbacks=e},e.prototype.create=function(){var e=this;return this.builder=c.$().div(function(t){t.on(_.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t);9===n.keyCode&&(_.EventHelper.stop(t,!0),e.hide(w.CANCELED))}).on(_.EventType.CONTEXT_MENU,function(e){return _.EventHelper.stop(e,!0)}).on(_.EventType.FOCUS,function(t){return e.gainingFocus()},null,!0).on(_.EventType.BLUR,function(t){return e.loosingFocus(t)},null,!0),e.progressBar=new f.ProgressBar(t.clone()),e.progressBar.getContainer().hide(),t.div({class:"quick-open-input"},function(t){e.inputContainer=t,e.inputBox=new d.InputBox(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:S}),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),_.addDisposableListener(e.inputBox.inputElement,_.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)_.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart=e.inputBox.value.length;else if(3===n.keyCode||i){_.EventHelper.stop(t,!0);var o=e.tree.getFocus();o&&e.elementSelected(o,t,i?u.Mode.OPEN_IN_BACKGROUND:u.Mode.OPEN)}}),_.addDisposableListener(e.inputBox.inputElement,_.EventType.INPUT,function(t){e.onType()})}),e.treeContainer=t.div({class:"quick-open-tree"},function(t){e.tree=new p.Tree(t.getHTMLElement(),{dataSource:new l.DataSource(e),controller:new b({clickBehavior:v.ClickBehavior.ON_MOUSE_UP}),renderer:new l.Renderer(e),filter:new l.Filter(e),accessibilityProvider:new l.AccessibilityProvider(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:C.ScrollbarVisibility.Visible,ariaLabel:n.localize(1,null)}),e.treeElement=e.tree.getHTMLElement(),e.toUnbind.push(e.tree.addListener2(r.EventType.FOCUS,function(t){e.elementFocused(t.focus,t)})),e.toUnbind.push(e.tree.addListener2(r.EventType.SELECTION,function(t){t.selection&&t.selection.length>0&&e.elementSelected(t.selection[0],t)}))}).on(_.EventType.KEY_DOWN,function(t){var n=new g.StandardKeyboardEvent(t);e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(_.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode)))}).on(_.EventType.KEY_UP,function(t){var n=new g.StandardKeyboardEvent(t),i=n.keyCode;if(e.quickNavigateConfiguration){var r=e.quickNavigateConfiguration.keybindings,s=3===i||r.some(function(e){if(e.hasShift()&&4===i)return!(n.ctrlKey||n.altKey||n.metaKey);if(e.hasAlt()&&6===i)return!0;if(o.isMacintosh){if(e.hasCtrlCmd()&&57===i)return!0;if(e.hasWinCtrl()&&5===i)return!0}else{if(e.hasCtrlCmd()&&5===i)return!0;if(e.hasWinCtrl()&&57===i)return!0}return!1});if(s){var a=e.tree.getFocus();a&&e.elementSelected(a,t)}}}).clone()}).addClass("quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.builder.getHTMLElement()},e.prototype.shouldOpenInBackground=function(e){return 17===e.keyCode&&(!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&this.inputBox.inputElement.selectionStart===this.inputBox.value.length)},e.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},e.prototype.navigate=function(e,t){this.isVisible&&(this.quickNavigateConfiguration||(this.quickNavigateConfiguration=t,this.tree.DOMFocus()),this.navigateInTree(e?18:16))},e.prototype.navigateInTree=function(e,t){var n=this.tree.getInput(),i=n?n.entries:[],o=this.tree.getFocus();switch(e){case 18:this.tree.focusNext();break;case 16:this.tree.focusPrevious();break;case 12:this.tree.focusNextPage();break;case 11:this.tree.focusPreviousPage();break;case 2:t?this.tree.focusPrevious():this.tree.focusNext()}var r=this.tree.getFocus();i.length>1&&o===r&&(16===e||2===e&&t?this.tree.focusLast():(18===e||2===e&&!t)&&this.tree.focusFirst()),r=this.tree.getFocus(),r&&this.tree.reveal(r).done(null,a.onUnexpectedError)},e.prototype.elementFocused=function(e,t){if(e&&this.isVisible()){this.inputElement.setAttribute("aria-activedescendant",this.treeElement.getAttribute("aria-activedescendant"));var n={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};this.model.runner.run(e,u.Mode.PREVIEW,n)}},e.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var o=n||u.Mode.OPEN,r={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,o,r)}if(this.usageLogger){var s=this.model.entries.indexOf(e),a=this.model.entries.length;this.usageLogger.publicLog("quickOpenWidgetItemAccepted",{index:s,count:a,isQuickNavigate:!!this.quickNavigateConfiguration})}i&&this.hide(w.ELEMENT_SELECTED)},e.prototype.extractKeyMods=function(e){var t=e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey));return t?[2048]:[]},e.prototype.show=function(e,t){this.visible=!0,this.isLoosingFocus=!1,this.quickNavigateConfiguration=t?t.quickNavigateConfiguration:void 0,this.quickNavigateConfiguration?(this.inputContainer.hide(),this.builder.show(),this.tree.DOMFocus()):(this.inputContainer.show(),this.builder.show(),this.inputBox.focus()),this.helpText&&(this.quickNavigateConfiguration||s.isString(e)?this.helpText.hide():this.helpText.show()),s.isString(e)?this.doShowWithPrefix(e):this.doShowWithInput(e,t&&t.autoFocus?t.autoFocus:{}),this.callbacks.onShow&&this.callbacks.onShow()},e.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},e.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},e.prototype.setInputAndLayout=function(e,t){var n=this;this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.setInput(null).then(function(){return n.model=e,n.inputElement.setAttribute("aria-haspopup",String(e&&e.entries&&e.entries.length>0)),n.tree.setInput(e)}).done(function(){n.tree.layout(),e&&e.entries.some(function(t){return n.isElementVisible(e,t)})&&n.autoFocus(e,t)},a.onUnexpectedError)},e.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},e.prototype.autoFocus=function(e,t){var n=this;void 0===t&&(t={});var i=e.entries.filter(function(t){return n.isElementVisible(e,t)});if(t.autoFocusPrefixMatch){for(var o=void 0,r=void 0,s=t.autoFocusPrefixMatch,u=s.toLowerCase(),l=0;l<i.length;l++){var c=i[l],d=e.dataSource.getLabel(c);if(o||0!==d.indexOf(s)?r||0!==d.toLowerCase().indexOf(u)||(r=c):o=c,o&&r)break}var h=o||r;if(h)return this.tree.setFocus(h),void this.tree.reveal(h,.5).done(null,a.onUnexpectedError)}t.autoFocusFirstEntry?(this.tree.focusFirst(),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):"number"==typeof t.autoFocusIndex?i.length>t.autoFocusIndex&&(this.tree.focusNth(t.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):t.autoFocusSecondEntry?i.length>1&&this.tree.focusNth(1):t.autoFocusLastEntry&&i.length>1&&this.tree.focusLast()},e.prototype.refresh=function(e,t){var n=this;this.isVisible()&&(this.treeContainer.style({height:this.getHeight(e)+"px"}),this.tree.refresh().done(function(){n.tree.layout();var i=t&&e&&e.entries.some(function(t){return n.isElementVisible(e,t)});i&&!t.autoFocusPrefixMatch&&(i=!n.tree.getFocus()),i&&n.autoFocus(e,t)},a.onUnexpectedError))},e.prototype.getHeight=function(t){var n=this,i=t.renderer;if(!t){var o=i.getHeight(null);return this.options.minItemsToShow?this.options.minItemsToShow*o:0}var r,s=0;this.layoutDimensions&&this.layoutDimensions.height&&(r=.4*(this.layoutDimensions.height-50)),(!r||r>e.MAX_ITEMS_HEIGHT)&&(r=e.MAX_ITEMS_HEIGHT);for(var a=t.entries.filter(function(e){return n.isElementVisible(t,e)}),u=this.options.maxItemsToShow||a.length,l=0;l<u&&l<a.length;l++){var c=i.getHeight(a[l]);if(!(s+c<=r))break;s+=c}return s},e.prototype.hide=function(e){var t=this;if(this.isVisible()){if(this.visible=!1,this.builder.hide(),this.builder.domBlur(),e===w.CANCELED&&this.model){var n=this.model.entries.filter(function(e){return t.isElementVisible(t.model,e)}).length;this.usageLogger&&this.usageLogger.publicLog("quickOpenWidgetCancelled",{count:n,isQuickNavigate:!!this.quickNavigateConfiguration})}this.inputBox.value="",this.tree.setInput(null),this.inputElement.setAttribute("aria-haspopup","false"),this.treeContainer.style({height:(this.options.minItemsToShow?22*this.options.minItemsToShow:0)+"px"}),this.progressBar.stop().getContainer().hide(),this.tree.isDOMFocused()?this.tree.DOMBlur():this.inputBox.hasFocus()&&this.inputBox.blur(),e===w.ELEMENT_SELECTED?this.callbacks.onOk():this.callbacks.onCancel(),this.callbacks.onHide&&this.callbacks.onHide(e)}},e.prototype.getQuickNavigateConfiguration=function(){return this.quickNavigateConfiguration},e.prototype.setPlaceHolder=function(e){this.inputBox&&this.inputBox.setPlaceHolder(e)},e.prototype.setValue=function(e,t){this.inputBox&&(this.inputBox.value=e,t&&this.inputBox.select())},e.prototype.setPassword=function(e){this.inputBox&&(this.inputBox.inputElement.type=e?"password":"text")},e.prototype.setInput=function(e,t,n){this.isVisible()&&(this.getInput()&&this.onInputChanging(),this.setInputAndLayout(e,t),this.inputBox&&this.inputBox.setAriaLabel(n||S))},e.prototype.onInputChanging=function(){var e=this;this.inputChangingTimeoutHandle&&(clearTimeout(this.inputChangingTimeoutHandle),this.inputChangingTimeoutHandle=null),this.builder.addClass("content-changing"),this.inputChangingTimeoutHandle=setTimeout(function(){e.builder.removeClass("content-changing")},500)},e.prototype.getInput=function(){return this.tree.getInput()},e.prototype.showInputDecoration=function(e){this.inputBox&&this.inputBox.showMessage({type:e===h.default.Info?d.MessageType.INFO:e===h.default.Warning?d.MessageType.WARNING:d.MessageType.ERROR,content:""})},e.prototype.clearInputDecoration=function(){this.inputBox&&this.inputBox.hideMessage()},e.prototype.focus=function(){this.isVisible()&&this.inputBox&&this.inputBox.focus()},e.prototype.accept=function(){if(this.isVisible()){var e=this.tree.getFocus();e&&this.elementSelected(e)}},e.prototype.getProgressBar=function(){return this.progressBar},e.prototype.getInputBox=function(){return this.inputBox},e.prototype.setExtraClass=function(e){var t=this.builder.getProperty("extra-class");t&&this.builder.removeClass(t),e?(this.builder.addClass(e),this.builder.setProperty("extra-class",e)):t&&this.builder.removeProperty("extra-class")},e.prototype.isVisible=function(){return this.visible},e.prototype.layout=function(t){this.layoutDimensions=t;var n=Math.min(.62*this.layoutDimensions.width,e.MAX_WIDTH);this.builder&&(this.builder.style({width:n+"px",marginLeft:"-"+n/2+"px"}),this.inputContainer.style({width:n-12+"px"}))},e.prototype.gainingFocus=function(){
this.isLoosingFocus=!1},e.prototype.loosingFocus=function(e){var t=this;if(this.isVisible()){var n=e.relatedTarget;!this.quickNavigateConfiguration&&_.isAncestor(n,this.builder.getHTMLElement())||(this.isLoosingFocus=!0,i.TPromise.timeout(0).then(function(){if(t.isLoosingFocus){var e=t.callbacks.onFocusLost&&t.callbacks.onFocusLost();e||t.hide(w.FOCUS_LOST)}}))}},e.prototype.dispose=function(){this.toUnbind=y.dispose(this.toUnbind),this.progressBar.dispose(),this.inputBox.dispose(),this.tree.dispose()},e}();E.MAX_WIDTH=600,E.MAX_ITEMS_HEIGHT=440,t.QuickOpenWidget=E}),define(d[271],h([0,1,34,270,21]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,n,i,o){this.codeEditor=e,this.create(t,n,i,o)}return e.prototype.create=function(e,t,o,r){this.domNode=n.$().div().getHTMLElement(),this.quickOpenWidget=new i.QuickOpenWidget(this.domNode,{onOk:e,onCancel:t,onType:o},{inputPlaceHolder:null,inputAriaLabel:r.inputAriaLabel},null),this.quickOpenWidget.create(),this.codeEditor.addOverlayWidget(this)},e.prototype.setInput=function(e,t){this.quickOpenWidget.setInput(e,t)},e.prototype.getId=function(){return e.ID},e.prototype.getDomNode=function(){return this.domNode},e.prototype.destroy=function(){this.codeEditor.removeOverlayWidget(this),this.quickOpenWidget.dispose()},e.prototype.isVisible=function(){return this.visible},e.prototype.show=function(e){this.visible=!0;var t=this.codeEditor.getLayoutInfo();t&&this.quickOpenWidget.layout(new n.Dimension(t.width,t.height)),this.quickOpenWidget.show(e),this.codeEditor.layoutOverlayWidget(this)},e.prototype.hide=function(){this.visible=!1,this.quickOpenWidget.hide(),this.codeEditor.layoutOverlayWidget(this)},e.prototype.getPosition=function(){return this.visible?{preference:o.OverlayWidgetPositionPreference.TOP_CENTER}:null},e}();r.ID="editor.contrib.quickOpenEditorWidget",t.QuickOpenEditorWidget=r}),define(d[272],h([8,7]),function(e,t){return e.create("vs/editor/common/config/commonEditorConfig",t)}),define(d[273],h([8,7]),function(e,t){return e.create("vs/editor/common/config/defaultConfig",t)}),define(d[42],h([0,1,273,18,73]),function(e,t,n,i,o){"use strict";t.DEFAULT_INDENTATION={tabSize:4,insertSpaces:!0,detectIndentation:!0},t.DEFAULT_TRIM_AUTO_WHITESPACE=!0;var r="Consolas, 'Courier New', monospace",s="Menlo, Monaco, 'Courier New', monospace",a="'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'";t.GOLDEN_LINE_HEIGHT_RATIO=i.isMacintosh?1.5:1.35;var u=function(){function e(){this.editor={experimentalScreenReader:!0,rulers:[],wordSeparators:o.USUAL_WORD_SEPARATORS,selectionClipboard:!0,ariaLabel:n.localize(0,null),lineNumbers:"on",selectOnLineNumbers:!0,lineNumbersMinChars:5,glyphMargin:!0,lineDecorationsWidth:10,revealHorizontalRightPadding:30,roundedSelection:!0,theme:"vs",readOnly:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1},fixedOverflowWidgets:!1,overviewRulerLanes:2,cursorBlinking:"blink",mouseWheelZoom:!1,cursorStyle:"line",fontLigatures:!1,disableTranslate3d:!1,disableMonospaceOptimizations:!1,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,automaticLayout:!1,wrappingColumn:300,wordWrap:!1,wrappingIndent:"same",wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",hover:!0,contextmenu:!0,mouseWheelScrollSensitivity:1,quickSuggestions:!0,quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,autoClosingBrackets:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:!0,acceptSuggestionOnCommitCharacter:!0,snippetSuggestions:"bottom",emptySelectionClipboard:!0,tabCompletion:!1,wordBasedSuggestions:!0,suggestFontSize:0,suggestLineHeight:0,selectionHighlight:!0,codeLens:!0,referenceInfos:!0,folding:!0,renderWhitespace:"none",renderControlCharacters:!1,renderIndentGuides:!1,renderLineHighlight:"line",useTabStops:!0,fontFamily:i.isMacintosh?s:i.isLinux?a:r,fontWeight:"normal",fontSize:i.isMacintosh?12:14,lineHeight:0}}return e}();t.DefaultConfig=new u}),define(d[109],h([0,1,42,108]),function(e,t,n,i){"use strict";function o(e,t){if("number"==typeof e)return e;var n=parseFloat(e);return isNaN(n)?t:n}function r(e,t){if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?t:n}function s(e,t,n){return e<t?t:e>n?n:e}var a=function(){function e(e){this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight}return e.createFromRawSettings=function(t){var a=String(t.fontFamily)||n.DefaultConfig.editor.fontFamily,u=String(t.fontWeight)||n.DefaultConfig.editor.fontWeight,l=o(t.fontSize,n.DefaultConfig.editor.fontSize);l=s(l,0,100),0===l&&(l=n.DefaultConfig.editor.fontSize);var c=r(t.lineHeight,0);c=s(c,0,150),0===c&&(c=Math.round(n.GOLDEN_LINE_HEIGHT_RATIO*l));var d=1+.1*i.EditorZoom.getZoomLevel();return l*=d,c*=d,new e({fontFamily:a,fontWeight:u,fontSize:l,lineHeight:c})},e.prototype.getId=function(){return this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"},e}();t.BareFontInfo=a;var u=function(e){function t(t){var n=e.call(this,t)||this;return n.isMonospace=t.isMonospace,n.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,n.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,n.spaceWidth=t.spaceWidth,n.maxDigitWidth=t.maxDigitWidth,n}return m(t,e),t.prototype.equals=function(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.lineHeight===e.lineHeight&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t.prototype.clone=function(){return new t(this)},t}(a);t.FontInfo=u}),define(d[276],h([8,7]),function(e,t){return e.create("vs/editor/common/controller/cursor",t)}),define(d[277],h([8,7]),function(e,t){return e.create("vs/editor/common/model/textModelWithTokens",t)}),define(d[278],h([8,7]),function(e,t){return e.create("vs/editor/common/modes/modesRegistry",t)}),define(d[279],h([8,7]),function(e,t){return e.create("vs/editor/common/modes/snippetsRegistry",t)}),define(d[280],h([8,7]),function(e,t){return e.create("vs/editor/common/services/bulkEdit",t)}),define(d[281],h([0,1,280,26,91,4,27,6,46,3,20]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,n,i,o){void 0===o&&(o=null);var r=h(e,t,i);return r.add(n),r.progress(o),r.finish()}function h(e,t,i){function o(e){l=e}function r(e){c.push.apply(c,e)}function s(){for(var e,t=0,i=c;t<i.length;t++){var o=i[t];d.hasChanged(o.resource)&&(e||(e=[]),e.push(o.resource.fsPath))}if(e)return n.localize(0,null,e.join(", "))}function u(){if(0===c.length)return a.TPromise.as(void 0);var n=s();if(n)return a.TPromise.wrapError(n);var i,o;t&&t.getModel()&&(i=t.getModel().uri,o=t.getSelections());var r=new v(e,i,o,c,l);return r.prepare().then(function(e){var t=s();if(t)throw new Error(t);d.stop();var n=r.apply();return r.dispose(),n})}var l,c=[],d=new p(i).start();return{progress:o,add:r,finish:u}}var p=function(){function e(e){this._fileService=e}return e.prototype.start=function(){var e,t=Object.create(null);return this._fileService&&(e=this._fileService.onFileChanges(function(e){e.changes.forEach(function(e){var n=String(e.resource),i=t[n];i||(t[n]=i=[]),i.push(e)})})),{stop:function(){return e&&e.dispose()},hasChanged:function(e){return!!t[e.toString()]},allChanges:function(){return i.flatten(o.values(t))}}},e}(),f=function(){function e(e){this._endCursorSelection=null,this._modelReference=e,this._edits=[]}return Object.defineProperty(e.prototype,"_model",{get:function(){return this._modelReference.object.textEditorModel},enumerable:!0,configurable:!0}),e.prototype.addEdit=function(e){var t;t=e.range?e.range:this._model.getFullModelRange(),this._edits.push(u.EditOperation.replace(l.Range.lift(t),e.newText))},e.prototype.apply=function(){var t=this;0!==this._edits.length&&(this._edits.sort(e._editCompare),this._initialSelections=this._getInitialSelections(),this._model.pushEditOperations(this._initialSelections,this._edits,function(e){return t._getEndCursorSelections(e)}))},e.prototype._getInitialSelections=function(){var e=this._edits[0].range,t=new c.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);return[t]},e.prototype._getEndCursorSelections=function(e){for(var t=0,n=0;n<e.length;n++)for(var i=e[n].range,o=0;o<this._initialSelections.length;o++){var r=this._initialSelections[o];if(l.Range.areIntersectingOrTouching(i,r)){t=n;break}}var s=e[t].range;return this._endCursorSelection=new c.Selection(s.endLineNumber,s.endColumn,s.endLineNumber,s.endColumn),[this._endCursorSelection]},e.prototype.getEndCursorSelection=function(){return this._endCursorSelection},e._editCompare=function(e,t){return l.Range.compareRangesUsingStarts(e.range,t.range)},e.prototype.dispose=function(){this._model&&(this._modelReference.dispose(),this._modelReference=null)},e}(),g=function(e){function t(t,n){var i=e.call(this,t)||this;return i._knownInitialSelections=n,i}return m(t,e),t.prototype._getInitialSelections=function(){return this._knownInitialSelections},t}(f),v=function(){function e(e,t,n,i,o){void 0===o&&(o=null),this.progress=o,this._numberOfResourcesToModify=0,this._numberOfChanges=0,this._edits=Object.create(null),this._textModelResolverService=e,this._sourceModel=t,this._sourceSelections=n,this._sourceModelTask=null;for(var r=0,s=i;r<s.length;r++){var a=s[r];this._addEdit(a)}}return e.prototype.resourcesCount=function(){return this._numberOfResourcesToModify},e.prototype.changeCount=function(){return this._numberOfChanges},e.prototype._addEdit=function(e){var t=this._edits[e.resource.toString()];t||(this._edits[e.resource.toString()]=t=[],this._numberOfResourcesToModify+=1),this._numberOfChanges+=1,t.push(e)},e.prototype.prepare=function(){var e=this;if(this._tasks)throw new Error("illegal state - already prepared");this._tasks=[];var t=[];return this.progress&&this.progress.total(2*this._numberOfResourcesToModify),o.forEach(this._edits,function(n){var i=e._textModelResolverService.createModelReference(s.default.parse(n.key)).then(function(t){var i=t.object;if(!i||!i.textEditorModel)throw new Error("Cannot load file "+n.key);var o,r=i.textEditorModel;e._sourceModel&&r.uri.toString()===e._sourceModel.toString()?(e._sourceModelTask=new g(t,e._sourceSelections),o=e._sourceModelTask):o=new f(t),n.value.forEach(function(e){return o.addEdit(e)}),e._tasks.push(o),e.progress&&e.progress.worked(1)});t.push(i)}),a.TPromise.join(t).then(function(t){return e})},e.prototype.apply=function(){var e=this;this._tasks.forEach(function(t){return e.applyTask(t)});var t=null;return this._sourceModelTask&&(t=this._sourceModelTask.getEndCursorSelection()),t},e.prototype.applyTask=function(e){e.apply(),this.progress&&this.progress.worked(1)},e.prototype.dispose=function(){this._tasks=r.dispose(this._tasks)},e}();t.bulkEdit=d,t.createBulkEdit=h}),define(d[282],h([8,7]),function(e,t){return e.create("vs/editor/common/services/modeServiceImpl",t)}),define(d[283],h([8,7]),function(e,t){return e.create("vs/editor/common/services/modelServiceImpl",t)}),define(d[284],h([8,7]),function(e,t){return e.create("vs/editor/contrib/bracketMatching/common/bracketMatching",t)}),define(d[285],h([8,7]),function(e,t){return e.create("vs/editor/contrib/caretOperations/common/caretOperations",t)}),define(d[286],h([8,7]),function(e,t){return e.create("vs/editor/contrib/caretOperations/common/transpose",t)}),define(d[287],h([8,7]),function(e,t){return e.create("vs/editor/contrib/clipboard/browser/clipboard",t)}),define(d[288],h([8,7]),function(e,t){return e.create("vs/editor/contrib/comment/common/comment",t)}),define(d[289],h([8,7]),function(e,t){return e.create("vs/editor/contrib/contextmenu/browser/contextmenu",t)}),define(d[290],h([8,7]),function(e,t){return e.create("vs/editor/contrib/find/browser/findWidget",t)}),define(d[291],h([8,7]),function(e,t){return e.create("vs/editor/contrib/find/common/findController",t)}),define(d[292],h([8,7]),function(e,t){return e.create("vs/editor/contrib/folding/browser/folding",t)}),define(d[293],h([8,7]),function(e,t){return e.create("vs/editor/contrib/format/common/formatActions",t)}),define(d[294],h([8,7]),function(e,t){return e.create("vs/editor/contrib/goToDeclaration/browser/goToDeclaration",t)}),define(d[295],h([8,7]),function(e,t){return e.create("vs/editor/contrib/gotoError/browser/gotoError",t)}),define(d[296],h([8,7]),function(e,t){return e.create("vs/editor/contrib/hover/browser/hover",t)}),define(d[297],h([8,7]),function(e,t){return e.create("vs/editor/contrib/hover/browser/modesContentHover",t)}),define(d[298],h([8,7]),function(e,t){return e.create("vs/editor/contrib/inPlaceReplace/common/inPlaceReplace",t)}),define(d[299],h([8,7]),function(e,t){return e.create("vs/editor/contrib/inspectTokens/browser/inspectTokens",t)}),define(d[300],h([8,7]),function(e,t){return e.create("vs/editor/contrib/linesOperations/common/linesOperations",t)}),define(d[301],h([8,7]),function(e,t){return e.create("vs/editor/contrib/links/browser/links",t)}),define(d[302],h([8,7]),function(e,t){return e.create("vs/editor/contrib/multicursor/common/multicursor",t)}),define(d[303],h([8,7]),function(e,t){return e.create("vs/editor/contrib/parameterHints/browser/parameterHints",t)}),define(d[304],h([8,7]),function(e,t){return e.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",t)});define(d[305],h([8,7]),function(e,t){return e.create("vs/editor/contrib/quickFix/browser/quickFix",t)});define(d[306],h([8,7]),function(e,t){return e.create("vs/editor/contrib/quickOpen/browser/gotoLine",t)}),define(d[307],h([8,7]),function(e,t){return e.create("vs/editor/contrib/quickOpen/browser/quickCommand",t)}),define(d[308],h([8,7]),function(e,t){return e.create("vs/editor/contrib/quickOpen/browser/quickOutline",t)}),define(d[309],h([8,7]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/browser/referenceSearch",t)}),define(d[310],h([8,7]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/browser/referencesController",t)}),define(d[311],h([8,7]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/browser/referencesWidget",t)}),define(d[312],h([8,7]),function(e,t){return e.create("vs/editor/contrib/rename/browser/rename",t)}),define(d[313],h([8,7]),function(e,t){return e.create("vs/editor/contrib/rename/browser/renameInputField",t)}),define(d[314],h([0,1,313,10,4,6,3,21,418]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(){function e(e){var t=this;this._disposables=[],this.allowEditorOverflow=!0,this._currentAcceptInput=null,this._currentCancelInput=null,this._editor=e,this._editor.addContentWidget(this),this._disposables.push(e.onDidChangeConfiguration(function(e){e.fontInfo&&t.updateFont()}))}return e.prototype.dispose=function(){this._disposables=o.dispose(this._disposables),this._editor.removeContentWidget(this)},e.prototype.getId=function(){return"__renameInputWidget"},e.prototype.getDomNode=function(){return this._domNode||(this._inputField=document.createElement("input"),this._inputField.className="rename-input",this._inputField.type="text",this._inputField.setAttribute("aria-label",n.localize(0,null)),this._domNode=document.createElement("div"),this._domNode.style.height=this._editor.getConfiguration().lineHeight+"px",this._domNode.className="monaco-editor rename-box",this._domNode.appendChild(this._inputField),this.updateFont()),this._domNode},e.prototype.updateFont=function(){if(this._inputField){var e=this._editor.getConfiguration().fontInfo;this._inputField.style.fontFamily=e.fontFamily,this._inputField.style.fontWeight=e.fontWeight,this._inputField.style.fontSize=e.fontSize+"px"}},e.prototype.getPosition=function(){return this._visible?{position:this._position,preference:[a.ContentWidgetPositionPreference.BELOW,a.ContentWidgetPositionPreference.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(){this._currentCancelInput&&this._currentCancelInput()},e.prototype.getInput=function(e,t,n,a){var u=this;this._position={lineNumber:e.startLineNumber,column:e.startColumn},this._inputField.value=t,this._inputField.setAttribute("selectionStart",n.toString()),this._inputField.setAttribute("selectionEnd",a.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var l,c=[];return l=function(){o.dispose(c),u._hide()},new r.TPromise(function(n,o){u._currentCancelInput=function(){return u._currentAcceptInput=null,u._currentCancelInput=null,o(i.canceled()),!0},u._currentAcceptInput=function(){return 0===u._inputField.value.trim().length||u._inputField.value===t?void u._currentCancelInput():(u._currentAcceptInput=null,u._currentCancelInput=null,void n(u._inputField.value))};var r=function(){s.Range.containsPosition(e,u._editor.getPosition())||u._currentCancelInput()};c.push(u._editor.onDidChangeCursorSelection(r)),c.push(u._editor.onDidBlurEditor(u._currentCancelInput)),u._show()},this._currentCancelInput).then(function(e){return l(),e},function(e){return l(),r.TPromise.wrapError(e)})},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber),this._visible=!0,this._editor.layoutContentWidget(this),setTimeout(function(){e._inputField.focus(),e._inputField.setSelectionRange(parseInt(e._inputField.getAttribute("selectionStart")),parseInt(e._inputField.getAttribute("selectionEnd")))},25)},e.prototype._hide=function(){this._visible=!1,this._editor.layoutContentWidget(this)},e}();Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}),define(d[315],h([8,7]),function(e,t){return e.create("vs/editor/contrib/rename/common/rename",t)}),define(d[316],h([8,7]),function(e,t){return e.create("vs/editor/contrib/smartSelect/common/smartSelect",t)}),define(d[317],h([8,7]),function(e,t){return e.create("vs/editor/contrib/suggest/browser/suggestController",t)}),define(d[318],h([8,7]),function(e,t){return e.create("vs/editor/contrib/suggest/browser/suggestWidget",t)}),define(d[319],h([8,7]),function(e,t){return e.create("vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode",t)}),define(d[320],h([8,7]),function(e,t){return e.create("vs/editor/contrib/zoneWidget/browser/peekViewWidget",t)}),define(d[321],h([8,7]),function(e,t){return e.create("vs/platform/configuration/common/configurationRegistry",t)}),define(d[322],h([8,7]),function(e,t){return e.create("vs/platform/extensions/common/extensionsRegistry",t)}),define(d[323],h([8,7]),function(e,t){return e.create("vs/platform/keybinding/common/abstractKeybindingService",t)}),define(d[324],h([8,7]),function(e,t){return e.create("vs/platform/message/common/message",t)}),define(d[325],h([0,1,34,4,36,49,248,67,30,429]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(){function e(e,t,n,i){var o=this;this.setContainer(e),this.contextViewService=t,this.telemetryService=n,this.messageService=i,this.actionRunner=new r.ActionRunner,this.menuContainerElement=null,this.toDispose=[];var s=!1;this.toDispose.push(this.actionRunner.addListener2(a.EventType.BEFORE_RUN,function(e){o.telemetryService&&o.telemetryService.publicLog("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),s=!!e.retainActionItem,s||o.contextViewService.hideContextView(!1)})),this.toDispose.push(this.actionRunner.addListener2(a.EventType.RUN,function(e){s&&o.contextViewService.hideContextView(!1),s=!1,e.error&&o.messageService&&o.messageService.show(u.default.Error,e.error)}))}return e.prototype.setContainer=function(e){var t=this;this.$el&&(this.$el.off(["click","mousedown"]),this.$el=null),e&&(this.$el=n.$(e),this.$el.on("mousedown",function(e){return t.onMouseDown(e)}))},e.prototype.showContextMenu=function(e){var t=this;e.getActions().done(function(n){t.contextViewService.showContextView({getAnchor:function(){return e.getAnchor()},canRelayout:!1,render:function(o){t.menuContainerElement=o;var r=e.getMenuClassName?e.getMenuClassName():"";r&&(o.className+=" "+r);var u=new s.Menu(o,n,{actionItemProvider:e.getActionItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:t.actionRunner}),l=u.addListener2(a.EventType.CANCEL,function(e){t.contextViewService.hideContextView(!0)}),c=u.addListener2(a.EventType.BLUR,function(e){t.contextViewService.hideContextView(!0)});return u.focus(),i.combinedDisposable([l,c,u])},onHide:function(n){e.onHide&&e.onHide(n),t.menuContainerElement=null}})})},e.prototype.onMouseDown=function(e){if(this.menuContainerElement){for(var t=new o.StandardMouseEvent(e),n=t.target;n;){if(n===this.menuContainerElement)return;n=n.parentElement}this.contextViewService.hideContextView()}},e.prototype.dispose=function(){this.setContainer(null)},e}();t.ContextMenuHandler=l}),define(d[326],h([0,1,325]),function(e,t,n){"use strict";var i=function(){function e(e,t,i,o){this.contextMenuHandler=new n.ContextMenuHandler(e,o,t,i)}return e.prototype.dispose=function(){this.contextMenuHandler.dispose()},e.prototype.setContainer=function(e){this.contextMenuHandler.setContainer(e)},e.prototype.showContextMenu=function(e){this.contextMenuHandler.showContextMenu(e)},e}();t.ContextMenuService=i}),define(d[144],h([0,1,10]),function(e,t,n){"use strict";var i=function(){function e(e){this._staticArguments=e}return e.prototype.appendStaticArguments=function(e){this._staticArguments.push.apply(this._staticArguments,e)},e.prototype.staticArguments=function(e){return isNaN(e)?this._staticArguments.slice(0):this._staticArguments[e]},e.prototype._validate=function(e){if(!e)throw n.illegalArgument("can not be falsy")},e}();t.AbstractDescriptor=i;var o=function(e){function t(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=e.call(this,n)||this;return o._ctor=t,o}return m(t,e),Object.defineProperty(t.prototype,"ctor",{get:function(){return this._ctor},enumerable:!0,configurable:!0}),t.prototype.bind=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return i=i.concat(this.staticArguments()),i=i.concat(e),new(t.bind.apply(t,[void 0,this._ctor].concat(i)))},t}(i);t.SyncDescriptor=o,t.createSyncDescriptor=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new(o.bind.apply(o,[void 0,e].concat(t)))};var r=function(e){function t(t,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];var r=e.call(this,i)||this;if(r._moduleName=t,r._ctorName=n,"string"!=typeof t)throw new Error("Invalid AsyncDescriptor arguments, expected `moduleName` to be a string!");return r}return m(t,e),t.create=function(e,n){return new t(e,n)},Object.defineProperty(t.prototype,"moduleName",{get:function(){return this._moduleName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ctorName",{get:function(){return this._ctorName},enumerable:!0,configurable:!0}),t.prototype.bind=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=[];return i=i.concat(this.staticArguments()),i=i.concat(e),new(t.bind.apply(t,[void 0,this.moduleName,this.ctorName].concat(i)))},t}(i);t.AsyncDescriptor=r}),define(d[14],h([0,1]),function(e,t){"use strict";function n(e,t,n,i){t[r.DI_TARGET]===t?t[r.DI_DEPENDENCIES].push({id:e,index:n,optional:i}):(t[r.DI_DEPENDENCIES]=[{id:e,index:n,optional:i}],t[r.DI_TARGET]=t)}function i(e){if(r.serviceIds.has(e))return r.serviceIds.get(e);var t=function(e,i,o){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");n(t,e,o,!1)};return t.toString=function(){return e},r.serviceIds.set(e,t),t}function o(e){return function(t,i,o){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");n(e,t,o,!0)}}var r;!function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(r=t._util||(t._util={})),t.IInstantiationService=i("instantiationService"),t.createDecorator=i,t.optional=o}),define(d[48],h([0,1,14]),function(e,t,n){"use strict";t.ID_EDITOR_WORKER_SERVICE="editorWorkerService",t.IEditorWorkerService=n.createDecorator(t.ID_EDITOR_WORKER_SERVICE)}),define(d[80],h([0,1,14]),function(e,t,n){"use strict";t.IModeService=n.createDecorator("modeService")}),define(d[44],h([0,1,14]),function(e,t,n){"use strict";t.IModelService=n.createDecorator("modelService")}),define(d[68],h([0,1,14]),function(e,t,n){"use strict";t.ITextModelResolverService=n.createDecorator("textModelResolverService")}),define(d[84],h([0,1,14]),function(e,t,n){"use strict";t.IStandaloneColorService=n.createDecorator("standaloneColorService")});var C=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};define(d[334],h([0,1,6,3,44,237]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e){this._modelService=e}return e.prototype.getRangesToPosition=function(e,t){return n.TPromise.as(this.getRangesToPositionSync(e,t))},e.prototype.getRangesToPositionSync=function(e,t){var n=this._modelService.getModel(e),i=[];return n&&this._doGetRangesToPosition(n,t).forEach(function(e){i.push({type:void 0,range:e})}),i},e.prototype._doGetRangesToPosition=function(e,t){var n,o,s=r.build(e);n=r.find(s,t);for(var a=[];n;)o&&i.Range.equalsRange(o,n.range)||a.push(n.range),o=n.range,n=n.parent;return a=a.reverse()},e}();s=y([C(0,o.IModelService)],s),t.TokenSelectionSupport=s}),define(d[23],h([0,1,6,22,14]),function(e,t,n,i,o){"use strict";function r(e){return"object"==typeof e&&"function"==typeof e.handler&&(!e.description||"object"==typeof e.description)}t.ICommandService=o.createDecorator("commandService"),t.CommandsRegistry=new(function(){function e(){this._commands=new Map}return e.prototype.registerCommand=function(e,t){var n=this;if(!t)throw new Error("invalid command");var o;if(r(t)){var s=t.handler,a=t.description;if(a){for(var u=[],l=0,c=a.args;l<c.length;l++){var d=c[l];u.push(d.constraint)}o={description:a,handler:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return i.validateConstraints(t,u),s.apply(void 0,[e].concat(t))}}}else o={handler:s}}else o={handler:t};var h=this._commands.get(e);return void 0===h?this._commands.set(e,o):Array.isArray(h)?h.unshift(o):this._commands.set(e,[o,h]),{dispose:function(){var t=n._commands.get(e);if(Array.isArray(t)){var i=t.indexOf(o);i>=0&&(t.splice(i,1),0===t.length&&n._commands.delete(e))}else r(t)&&n._commands.delete(e)}}},e.prototype.getCommand=function(e){var t=this._commands.get(e);return Array.isArray(t)?t[0]:t},e.prototype.getCommands=function(){var e=this,t=Object.create(null);return this._commands.forEach(function(n,i){t[i]=e.getCommand(i)}),t},e}()),t.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:function(){return{dispose:function(){}}},executeCommand:function(){return n.TPromise.as(void 0)}}}),define(d[336],h([0,1,10,27,6,3,16,17,23,44]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=[],i=s.LinkProviderRegistry.ordered(e).reverse().map(function(i){return a.asWinJsPromise(function(t){return i.provideLinks(e,t)}).then(function(e){if(Array.isArray(e)){var n=e.map(function(e){return new h(e,i)});t=d(t,n)}},n.onUnexpectedExternalError)});return o.TPromise.join(i).then(function(){return t})}function d(e,t){var n,i,o,s,a,u,l,c=[];for(n=0,o=0,i=e.length,s=t.length;n<i&&o<s;)a=e[n],u=t[o],r.Range.areIntersectingOrTouching(a.range,u.range)?n++:(l=r.Range.compareRangesUsingStarts(a.range,u.range),l<0?(c.push(a),n++):(c.push(u),o++));for(;n<i;n++)c.push(e[n]);for(;o<s;o++)c.push(t[o]);return c}var h=function(){function e(e,t){this._link=e,this._provider=t}return Object.defineProperty(e.prototype,"range",{get:function(){return this._link.range},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._link.url},enumerable:!0,configurable:!0}),e.prototype.resolve=function(){var e=this;if(this._link.url)try{return o.TPromise.as(i.default.parse(this._link.url))}catch(e){return o.TPromise.wrapError("invalid")}return"function"==typeof this._provider.resolveLink?a.asWinJsPromise(function(t){return e._provider.resolveLink(e._link,t)}).then(function(t){return e._link=t||e._link,e._link.url?e.resolve():o.TPromise.wrapError("missing")}):o.TPromise.wrapError("missing")},e}();t.Link=h,t.getLinks=c,u.CommandsRegistry.registerCommand("_executeLinkProvider",function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=t[0];if(o instanceof i.default){var r=e.get(l.IModelService).getModel(o);if(r)return c(r)}})}),define(d[57],h([0,1,49,6,144,14,23]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e){this._id=e}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),e}();a.EditorTitle=new a("1"),a.EditorTitleContext=new a("2"),a.EditorContext=new a("3"),a.ExplorerContext=new a("4"),a.ProblemsPanelContext=new a("5"),a.DebugVariablesContext=new a("6"),a.DebugWatchContext=new a("7"),a.DebugCallStackContext=new a("8"),a.DebugBreakpointsContext=new a("9"),a.DebugConsoleContext=new a("10"),a.SCMTitle=new a("11"),a.SCMResourceGroupContext=new a("12"),a.SCMResourceContext=new a("13"),t.MenuId=a,t.IMenuService=r.createDecorator("menuService"),t.MenuRegistry=new(function(){function e(){this.commands=Object.create(null),this.menuItems=Object.create(null)}return e.prototype.addCommand=function(e){var t=this.commands[e.id];return this.commands[e.id]=e,void 0!==t},e.prototype.getCommand=function(e){return this.commands[e]},e.prototype.appendMenuItem=function(e,t){var n=e.id,i=this.menuItems[n];return i?i.push(t):this.menuItems[n]=i=[t],{dispose:function(){var e=i.indexOf(t);e>=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id;return this.menuItems[t]||[]},e}());var u=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._commandService=i,o}return m(t,e),t.prototype.run=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(n=this._commandService).executeCommand.apply(n,[this.id].concat(e));var n},t}(n.Action);u=y([C(2,s.ICommandService)],u),t.ExecuteCommandAction=u;var l=function(e){function t(n,i,o,r){var s=e.call(this,n.id,n.title,r)||this;return s._cssClass=n.iconClass,s._enabled=!0,s._arg=o,s.item=n,s.alt=i?new t(i,void 0,o,r):void 0,s}return m(t,e),t.prototype.run=function(){return e.prototype.run.call(this,this._arg)},t}(u);l=y([C(3,s.ICommandService)],l),t.MenuItemAction=l;var c=function(){function e(e,t,n,i,r,s){this._id=t,this._label=n,this._keybindings=i,this._keybindingContext=r,this._keybindingWeight=s,this._descriptor=o.createSyncDescriptor(e,this._id,this._label)}return Object.defineProperty(e.prototype,"syncDescriptor",{get:function(){return this._descriptor},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keybindings",{get:function(){return this._keybindings},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keybindingContext",{get:function(){return this._keybindingContext},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keybindingWeight",{get:function(){return this._keybindingWeight},enumerable:!0,configurable:!0}),e}();t.SyncActionDescriptor=c;var d=function(e){function t(t,n,i,o,r,s){void 0===o&&(o=""),void 0===r&&(r=""),void 0===s&&(s=!0);var a=e.call(this,i,o,r,s)||this;return a._instantiationService=t,a._descriptor=n,a}return m(t,e),Object.defineProperty(t.prototype,"cachedAction",{get:function(){return this._cachedAction},set:function(e){
this._cachedAction=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.id:this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"label",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.label:this._label},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.label=e:this._setLabel(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.class:this._cssClass},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.class=e:this._setClass(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.enabled:this._enabled},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.enabled=e:this._setEnabled(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"order",{get:function(){return this._cachedAction instanceof n.Action?this._cachedAction.order:this._order},set:function(e){this._cachedAction instanceof n.Action?this._cachedAction.order=e:this._order=e},enumerable:!0,configurable:!0}),t.prototype.run=function(e){return this._cachedAction?this._cachedAction.run(e):this._createAction().then(function(t){return t.run(e)})},t.prototype._createAction=function(){var e=this,t=i.TPromise.as(void 0);return t.then(function(){return e._instantiationService.createInstance(e._descriptor)}).then(function(t){if(!(t instanceof n.Action))throw new Error("Action must be an instanceof Base Action");return e._cachedAction=t,e._emitterUnbind=t.onDidChange(function(t){return e._onDidChange.fire(t)}),t})},t.prototype.dispose=function(){this._emitterUnbind&&this._emitterUnbind.dispose(),this._cachedAction&&this._cachedAction.dispose(),e.prototype.dispose.call(this)},t}(n.Action);t.DeferredAction=d}),define(d[56],h([0,1,14]),function(e,t,n){"use strict";function i(e,t,n){function i(e,t){for(var n=e,i=0;i<t.length;i++)if(n=n[t[i]],"undefined"==typeof n||null===n)return;return n}var o=t.split("."),r=i(e,o);return"undefined"==typeof r?n:r}t.IConfigurationService=n.createDecorator("configurationService");var o;!function(e){e[e.Default=1]="Default",e[e.User=2]="User",e[e.Workspace=3]="Workspace"}(o=t.ConfigurationSource||(t.ConfigurationSource={})),t.getConfigurationValue=i}),define(d[19],h([0,1,14]),function(e,t,n){"use strict";function i(e,t){var n=e.getType(),i=t.getType();if(n!==i)return n-i;switch(n){case o.Defined:return e.cmp(t);case o.Not:return e.cmp(t);case o.Equals:return e.cmp(t);case o.NotEquals:return e.cmp(t);default:throw new Error("Unknown ContextKeyExpr!")}}var o;!function(e){e[e.Defined=1]="Defined",e[e.Not=2]="Not",e[e.Equals=3]="Equals",e[e.NotEquals=4]="NotEquals",e[e.And=5]="And"}(o=t.ContextKeyExprType||(t.ContextKeyExprType={}));var r=function(){function e(){}return e.has=function(e){return new s(e)},e.equals=function(e,t){return new a(e,t)},e.notEquals=function(e,t){return new u(e,t)},e.not=function(e){return new l(e)},e.and=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new c(e)},e.deserialize=function(e){var t=this;if(!e)return null;var n=e.split("&&"),i=new c(n.map(function(e){return t._deserializeOne(e)}));return i.normalize()},e._deserializeOne=function(e){if(e=e.trim(),e.indexOf("!=")>=0){var t=e.split("!=");return new u(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){var t=e.split("==");return new a(t[0].trim(),this._deserializeValue(t[1]))}return/^\!\s*/.test(e)?new l(e.substr(1).trim()):new s(e)},e._deserializeValue=function(e){if(e=e.trim(),"true"===e)return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e}();t.ContextKeyExpr=r;var s=function(){function e(e){this.key=e}return e.prototype.getType=function(){return o.Defined},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e[this.key]},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyDefinedExpr=s;var a=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return o.Equals},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e[this.key]==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new s(this.key):new l(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" == '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyEqualsExpr=a;var u=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return o.NotEquals},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:this.value<e.value?-1:this.value>e.value?1:0},e.prototype.equals=function(t){return t instanceof e&&(this.key===t.key&&this.value===t.value)},e.prototype.evaluate=function(e){return e[this.key]!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new l(this.key):new s(this.key):this},e.prototype.serialize=function(){return"boolean"==typeof this.value?this.normalize().serialize():this.key+" != '"+this.value+"'"},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotEqualsExpr=u;var l=function(){function e(e){this.key=e}return e.prototype.getType=function(){return o.Not},e.prototype.cmp=function(e){return this.key<e.key?-1:this.key>e.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e[this.key]},e.prototype.normalize=function(){return this},e.prototype.serialize=function(){return"!"+this.key},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotExpr=l;var c=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return o.And},e.prototype.equals=function(t){if(t instanceof e){if(this.expr.length!==t.expr.length)return!1;for(var n=0,i=this.expr.length;n<i;n++)if(!this.expr[n].equals(t.expr[n]))return!1;return!0}},e.prototype.evaluate=function(e){for(var t=0,n=this.expr.length;t<n;t++)if(!this.expr[t].evaluate(e))return!1;return!0},e._normalizeArr=function(t){var n=[];if(t){for(var o=0,r=t.length;o<r;o++){var s=t[o];s&&(s=s.normalize(),s&&(s instanceof e?n=n.concat(s.expr):n.push(s)))}n.sort(i)}return n},e.prototype.normalize=function(){return 0===this.expr.length?null:1===this.expr.length?this.expr[0]:this},e.prototype.serialize=function(){return 0===this.expr.length?"":1===this.expr.length?this.normalize().serialize():this.expr.map(function(e){return e.serialize()}).join(" && ")},e.prototype.keys=function(){for(var e=[],t=0,n=this.expr;t<n.length;t++){var i=n[t];e.push.apply(e,i.keys())}return e},e}();t.ContextKeyAndExpr=c;var d=function(e){function t(t,n){var i=e.call(this,t)||this;return i._defaultValue=n,i}return m(t,e),t.prototype.bindTo=function(e){return e.createKey(this.key,this._defaultValue)},t.prototype.getValue=function(e){return e.getContextKeyValue(this.key)},t.prototype.toNegated=function(){return r.not(this.key)},t.prototype.isEqualTo=function(e){return r.equals(this.key,e)},t}(s);t.RawContextKey=d,t.IContextKeyService=n.createDecorator("contextKeyService"),t.SET_CONTEXT_COMMAND_ID="setContext"}),define(d[2],h([0,1,22,19]),function(e,t,n,i){"use strict";function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===t.EditorType.ICodeEditor}function r(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===t.EditorType.IDiffEditor}function s(e){if(e===R.Line)return"line";if(e===R.Block)return"block";if(e===R.Underline)return"underline";throw new Error("cursorStyleToString: Unknown cursorStyle")}var a;!function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent"}(a=t.WrappingIndent||(t.WrappingIndent={}));var u=function(){function e(e){this.arrowSize=0|e.arrowSize,this.vertical=0|e.vertical,this.horizontal=0|e.horizontal,this.useShadows=Boolean(e.useShadows),this.verticalHasArrows=Boolean(e.verticalHasArrows),this.horizontalHasArrows=Boolean(e.horizontalHasArrows),this.handleMouseWheel=Boolean(e.handleMouseWheel),this.horizontalScrollbarSize=0|e.horizontalScrollbarSize,this.horizontalSliderSize=0|e.horizontalSliderSize,this.verticalScrollbarSize=0|e.verticalScrollbarSize,this.verticalSliderSize=0|e.verticalSliderSize,this.mouseWheelScrollSensitivity=Number(e.mouseWheelScrollSensitivity)}return e.prototype.equals=function(e){return this.arrowSize===e.arrowSize&&this.vertical===e.vertical&&this.horizontal===e.horizontal&&this.useShadows===e.useShadows&&this.verticalHasArrows===e.verticalHasArrows&&this.horizontalHasArrows===e.horizontalHasArrows&&this.handleMouseWheel===e.handleMouseWheel&&this.horizontalScrollbarSize===e.horizontalScrollbarSize&&this.horizontalSliderSize===e.horizontalSliderSize&&this.verticalScrollbarSize===e.verticalScrollbarSize&&this.verticalSliderSize===e.verticalSliderSize&&this.mouseWheelScrollSensitivity===e.mouseWheelScrollSensitivity},e.prototype.clone=function(){return new e(this)},e}();t.InternalEditorScrollbarOptions=u;var l=function(){function e(e){this.isViewportWrapping=Boolean(e.isViewportWrapping),this.wrappingColumn=0|e.wrappingColumn,this.wrappingIndent=0|e.wrappingIndent,this.wordWrapBreakBeforeCharacters=String(e.wordWrapBreakBeforeCharacters),this.wordWrapBreakAfterCharacters=String(e.wordWrapBreakAfterCharacters),this.wordWrapBreakObtrusiveCharacters=String(e.wordWrapBreakObtrusiveCharacters)}return e.prototype.equals=function(e){return this.isViewportWrapping===e.isViewportWrapping&&this.wrappingColumn===e.wrappingColumn&&this.wrappingIndent===e.wrappingIndent&&this.wordWrapBreakBeforeCharacters===e.wordWrapBreakBeforeCharacters&&this.wordWrapBreakAfterCharacters===e.wordWrapBreakAfterCharacters&&this.wordWrapBreakObtrusiveCharacters===e.wordWrapBreakObtrusiveCharacters},e.prototype.clone=function(){return new e(this)},e}();t.EditorWrappingInfo=l;var c=function(){function e(t){this.theme=String(t.theme),this.canUseTranslate3d=Boolean(t.canUseTranslate3d),this.disableMonospaceOptimizations=Boolean(t.disableMonospaceOptimizations),this.experimentalScreenReader=Boolean(t.experimentalScreenReader),this.rulers=e._toSortedIntegerArray(t.rulers),this.ariaLabel=String(t.ariaLabel),this.renderLineNumbers=Boolean(t.renderLineNumbers),this.renderCustomLineNumbers=t.renderCustomLineNumbers,this.renderRelativeLineNumbers=Boolean(t.renderRelativeLineNumbers),this.selectOnLineNumbers=Boolean(t.selectOnLineNumbers),this.glyphMargin=Boolean(t.glyphMargin),this.revealHorizontalRightPadding=0|t.revealHorizontalRightPadding,this.roundedSelection=Boolean(t.roundedSelection),this.overviewRulerLanes=0|t.overviewRulerLanes,this.cursorBlinking=0|t.cursorBlinking,this.mouseWheelZoom=Boolean(t.mouseWheelZoom),this.cursorStyle=0|t.cursorStyle,this.hideCursorInOverviewRuler=Boolean(t.hideCursorInOverviewRuler),this.scrollBeyondLastLine=Boolean(t.scrollBeyondLastLine),this.editorClassName=String(t.editorClassName),this.stopRenderingLineAfter=0|t.stopRenderingLineAfter,this.renderWhitespace=t.renderWhitespace,this.renderControlCharacters=Boolean(t.renderControlCharacters),this.renderIndentGuides=Boolean(t.renderIndentGuides),this.renderLineHighlight=t.renderLineHighlight,this.scrollbar=t.scrollbar.clone(),this.fixedOverflowWidgets=Boolean(t.fixedOverflowWidgets)}return e._toSortedIntegerArray=function(e){if(!Array.isArray(e))return[];var t=e,n=t.map(function(e){var t=parseInt(e,10);return isNaN(t)?0:t});return n.sort(),n},e._numberArraysEqual=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},e.prototype.equals=function(t){return this.theme===t.theme&&this.canUseTranslate3d===t.canUseTranslate3d&&this.disableMonospaceOptimizations===t.disableMonospaceOptimizations&&this.experimentalScreenReader===t.experimentalScreenReader&&e._numberArraysEqual(this.rulers,t.rulers)&&this.ariaLabel===t.ariaLabel&&this.renderLineNumbers===t.renderLineNumbers&&this.renderCustomLineNumbers===t.renderCustomLineNumbers&&this.renderRelativeLineNumbers===t.renderRelativeLineNumbers&&this.selectOnLineNumbers===t.selectOnLineNumbers&&this.glyphMargin===t.glyphMargin&&this.revealHorizontalRightPadding===t.revealHorizontalRightPadding&&this.roundedSelection===t.roundedSelection&&this.overviewRulerLanes===t.overviewRulerLanes&&this.cursorBlinking===t.cursorBlinking&&this.mouseWheelZoom===t.mouseWheelZoom&&this.cursorStyle===t.cursorStyle&&this.hideCursorInOverviewRuler===t.hideCursorInOverviewRuler&&this.scrollBeyondLastLine===t.scrollBeyondLastLine&&this.editorClassName===t.editorClassName&&this.stopRenderingLineAfter===t.stopRenderingLineAfter&&this.renderWhitespace===t.renderWhitespace&&this.renderControlCharacters===t.renderControlCharacters&&this.renderIndentGuides===t.renderIndentGuides&&this.renderLineHighlight===t.renderLineHighlight&&this.scrollbar.equals(t.scrollbar)&&this.fixedOverflowWidgets===t.fixedOverflowWidgets},e.prototype.createChangeEvent=function(t){return{theme:this.theme!==t.theme,canUseTranslate3d:this.canUseTranslate3d!==t.canUseTranslate3d,disableMonospaceOptimizations:this.disableMonospaceOptimizations!==t.disableMonospaceOptimizations,experimentalScreenReader:this.experimentalScreenReader!==t.experimentalScreenReader,rulers:!e._numberArraysEqual(this.rulers,t.rulers),ariaLabel:this.ariaLabel!==t.ariaLabel,renderLineNumbers:this.renderLineNumbers!==t.renderLineNumbers,renderCustomLineNumbers:this.renderCustomLineNumbers!==t.renderCustomLineNumbers,renderRelativeLineNumbers:this.renderRelativeLineNumbers!==t.renderRelativeLineNumbers,selectOnLineNumbers:this.selectOnLineNumbers!==t.selectOnLineNumbers,glyphMargin:this.glyphMargin!==t.glyphMargin,revealHorizontalRightPadding:this.revealHorizontalRightPadding!==t.revealHorizontalRightPadding,roundedSelection:this.roundedSelection!==t.roundedSelection,overviewRulerLanes:this.overviewRulerLanes!==t.overviewRulerLanes,cursorBlinking:this.cursorBlinking!==t.cursorBlinking,mouseWheelZoom:this.mouseWheelZoom!==t.mouseWheelZoom,cursorStyle:this.cursorStyle!==t.cursorStyle,hideCursorInOverviewRuler:this.hideCursorInOverviewRuler!==t.hideCursorInOverviewRuler,scrollBeyondLastLine:this.scrollBeyondLastLine!==t.scrollBeyondLastLine,editorClassName:this.editorClassName!==t.editorClassName,stopRenderingLineAfter:this.stopRenderingLineAfter!==t.stopRenderingLineAfter,renderWhitespace:this.renderWhitespace!==t.renderWhitespace,renderControlCharacters:this.renderControlCharacters!==t.renderControlCharacters,renderIndentGuides:this.renderIndentGuides!==t.renderIndentGuides,renderLineHighlight:this.renderLineHighlight!==t.renderLineHighlight,scrollbar:!this.scrollbar.equals(t.scrollbar),fixedOverflowWidgets:this.fixedOverflowWidgets!==t.fixedOverflowWidgets}},e.prototype.clone=function(){return new e(this)},e}();t.InternalEditorViewOptions=c;var d=function(){function e(e){this.selectionClipboard=Boolean(e.selectionClipboard),this.hover=Boolean(e.hover),this.contextmenu=Boolean(e.contextmenu),this.quickSuggestions=Boolean(e.quickSuggestions),this.quickSuggestionsDelay=e.quickSuggestionsDelay||0,this.parameterHints=Boolean(e.parameterHints),this.iconsInSuggestions=Boolean(e.iconsInSuggestions),this.formatOnType=Boolean(e.formatOnType),this.formatOnPaste=Boolean(e.formatOnPaste),this.suggestOnTriggerCharacters=Boolean(e.suggestOnTriggerCharacters),this.acceptSuggestionOnEnter=Boolean(e.acceptSuggestionOnEnter),this.acceptSuggestionOnCommitCharacter=Boolean(e.acceptSuggestionOnCommitCharacter),this.snippetSuggestions=e.snippetSuggestions,this.emptySelectionClipboard=e.emptySelectionClipboard,this.tabCompletion=e.tabCompletion,this.wordBasedSuggestions=e.wordBasedSuggestions,this.suggestFontSize=e.suggestFontSize,this.suggestLineHeight=e.suggestLineHeight,this.selectionHighlight=Boolean(e.selectionHighlight),this.codeLens=Boolean(e.codeLens),this.folding=Boolean(e.folding)}return e.prototype.equals=function(e){return this.selectionClipboard===e.selectionClipboard&&this.hover===e.hover&&this.contextmenu===e.contextmenu&&this.quickSuggestions===e.quickSuggestions&&this.quickSuggestionsDelay===e.quickSuggestionsDelay&&this.parameterHints===e.parameterHints&&this.iconsInSuggestions===e.iconsInSuggestions&&this.formatOnType===e.formatOnType&&this.formatOnPaste===e.formatOnPaste&&this.suggestOnTriggerCharacters===e.suggestOnTriggerCharacters&&this.acceptSuggestionOnEnter===e.acceptSuggestionOnEnter&&this.acceptSuggestionOnCommitCharacter===e.acceptSuggestionOnCommitCharacter&&this.snippetSuggestions===e.snippetSuggestions&&this.emptySelectionClipboard===e.emptySelectionClipboard&&this.tabCompletion===e.tabCompletion&&this.wordBasedSuggestions===e.wordBasedSuggestions&&this.suggestFontSize===e.suggestFontSize&&this.suggestLineHeight===e.suggestLineHeight&&this.selectionHighlight===e.selectionHighlight&&this.codeLens===e.codeLens&&this.folding===e.folding},e.prototype.clone=function(){return new e(this)},e}();t.EditorContribOptions=d;var h=function(){function e(e){this.lineHeight=0|e.lineHeight,this.readOnly=Boolean(e.readOnly),this.wordSeparators=String(e.wordSeparators),this.autoClosingBrackets=Boolean(e.autoClosingBrackets),this.useTabStops=Boolean(e.useTabStops),this.tabFocusMode=Boolean(e.tabFocusMode),this.layoutInfo=e.layoutInfo.clone(),this.fontInfo=e.fontInfo.clone(),this.viewInfo=e.viewInfo.clone(),this.wrappingInfo=e.wrappingInfo.clone(),this.contribInfo=e.contribInfo.clone()}return e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.readOnly===e.readOnly&&this.wordSeparators===e.wordSeparators&&this.autoClosingBrackets===e.autoClosingBrackets&&this.useTabStops===e.useTabStops&&this.tabFocusMode===e.tabFocusMode&&this.layoutInfo.equals(e.layoutInfo)&&this.fontInfo.equals(e.fontInfo)&&this.viewInfo.equals(e.viewInfo)&&this.wrappingInfo.equals(e.wrappingInfo)&&this.contribInfo.equals(e.contribInfo)},e.prototype.createChangeEvent=function(e){return{lineHeight:this.lineHeight!==e.lineHeight,readOnly:this.readOnly!==e.readOnly,wordSeparators:this.wordSeparators!==e.wordSeparators,autoClosingBrackets:this.autoClosingBrackets!==e.autoClosingBrackets,useTabStops:this.useTabStops!==e.useTabStops,tabFocusMode:this.tabFocusMode!==e.tabFocusMode,layoutInfo:!this.layoutInfo.equals(e.layoutInfo),fontInfo:!this.fontInfo.equals(e.fontInfo),viewInfo:this.viewInfo.createChangeEvent(e.viewInfo),wrappingInfo:!this.wrappingInfo.equals(e.wrappingInfo),contribInfo:!this.contribInfo.equals(e.contribInfo)}},e.prototype.clone=function(){return new e(this)},e}();t.InternalEditorOptions=h;var p;!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(p=t.OverviewRulerLane||(t.OverviewRulerLane={}));var f;!function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(f=t.EndOfLinePreference||(t.EndOfLinePreference={}));var g;!function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(g=t.DefaultEndOfLine||(t.DefaultEndOfLine={}));var m;!function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(m=t.EndOfLineSequence||(t.EndOfLineSequence={}));var v=function(){function e(e){this.tabSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}return e.prototype.equals=function(e){return this.tabSize===e.tabSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace},e.prototype.createChangeEvent=function(e){return{tabSize:this.tabSize!==e.tabSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}},e}();t.TextModelResolvedOptions=v;var _=function(){function e(e,t){this.range=e,this.matches=t}return e}();t.FindMatch=_;var y;!function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(y=t.TrackedRangeStickiness||(t.TrackedRangeStickiness={}));var C;!function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(C=t.CursorChangeReason||(t.CursorChangeReason={}));var b;!function(e){e[e.Simple=0]="Simple",e[e.Center=1]="Center",e[e.CenterIfOutsideViewport=2]="CenterIfOutsideViewport",e[e.Top=3]="Top",e[e.Bottom=4]="Bottom"}(b=t.VerticalRevealType||(t.VerticalRevealType={}));var w=function(){function e(e){this.width=0|e.width,this.height=0|e.height,this.top=0|e.top,this.right=0|e.right}return e.prototype.equals=function(e){return this.width===e.width&&this.height===e.height&&this.top===e.top&&this.right===e.right},e.prototype.clone=function(){return new e(this)},e}();t.OverviewRulerPosition=w;var S=function(){function e(e){this.width=0|e.width,this.height=0|e.height,this.glyphMarginLeft=0|e.glyphMarginLeft,this.glyphMarginWidth=0|e.glyphMarginWidth,this.glyphMarginHeight=0|e.glyphMarginHeight,this.lineNumbersLeft=0|e.lineNumbersLeft,this.lineNumbersWidth=0|e.lineNumbersWidth,this.lineNumbersHeight=0|e.lineNumbersHeight,this.decorationsLeft=0|e.decorationsLeft,this.decorationsWidth=0|e.decorationsWidth,this.decorationsHeight=0|e.decorationsHeight,this.contentLeft=0|e.contentLeft,this.contentWidth=0|e.contentWidth,this.contentHeight=0|e.contentHeight,this.verticalScrollbarWidth=0|e.verticalScrollbarWidth,this.horizontalScrollbarHeight=0|e.horizontalScrollbarHeight,this.overviewRuler=e.overviewRuler.clone()}return e.prototype.equals=function(e){return this.width===e.width&&this.height===e.height&&this.glyphMarginLeft===e.glyphMarginLeft&&this.glyphMarginWidth===e.glyphMarginWidth&&this.glyphMarginHeight===e.glyphMarginHeight&&this.lineNumbersLeft===e.lineNumbersLeft&&this.lineNumbersWidth===e.lineNumbersWidth&&this.lineNumbersHeight===e.lineNumbersHeight&&this.decorationsLeft===e.decorationsLeft&&this.decorationsWidth===e.decorationsWidth&&this.decorationsHeight===e.decorationsHeight&&this.contentLeft===e.contentLeft&&this.contentWidth===e.contentWidth&&this.contentHeight===e.contentHeight&&this.verticalScrollbarWidth===e.verticalScrollbarWidth&&this.horizontalScrollbarHeight===e.horizontalScrollbarHeight&&this.overviewRuler.equals(e.overviewRuler)},e.prototype.clone=function(){return new e(this)},e}();t.EditorLayoutInfo=S;var E;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET"}(E=t.MouseTargetType||(t.MouseTargetType={}));var L;!function(e){e.TextFocus=new i.RawContextKey("editorTextFocus",!1),e.Focus=new i.RawContextKey("editorFocus",!1),e.ReadOnly=new i.RawContextKey("editorReadonly",!1),e.Writable=e.ReadOnly.toNegated(),e.HasNonEmptySelection=new i.RawContextKey("editorHasSelection",!1),e.HasOnlyEmptySelection=e.HasNonEmptySelection.toNegated(),e.HasMultipleSelections=new i.RawContextKey("editorHasMultipleSelections",!1),e.HasSingleSelection=e.HasMultipleSelections.toNegated(),e.TabMovesFocus=new i.RawContextKey("editorTabMovesFocus",!1),e.TabDoesNotMoveFocus=e.TabMovesFocus.toNegated(),e.LanguageId=new i.RawContextKey("editorLangId",void 0)}(L=t.EditorContextKeys||(t.EditorContextKeys={}));var N;!function(e){e.hasCompletionItemProvider=new i.RawContextKey("editorHasCompletionItemProvider",void 0),e.hasCodeActionsProvider=new i.RawContextKey("editorHasCodeActionsProvider",void 0),e.hasCodeLensProvider=new i.RawContextKey("editorHasCodeLensProvider",void 0),e.hasDefinitionProvider=new i.RawContextKey("editorHasDefinitionProvider",void 0),e.hasImplementationProvider=new i.RawContextKey("editorHasImplementationProvider",void 0),e.hasHoverProvider=new i.RawContextKey("editorHasHoverProvider",void 0),e.hasDocumentHighlightProvider=new i.RawContextKey("editorHasDocumentHighlightProvider",void 0),e.hasDocumentSymbolProvider=new i.RawContextKey("editorHasDocumentSymbolProvider",void 0),e.hasReferenceProvider=new i.RawContextKey("editorHasReferenceProvider",void 0),e.hasRenameProvider=new i.RawContextKey("editorHasRenameProvider",void 0),e.hasDocumentFormattingProvider=new i.RawContextKey("editorHasDocumentFormattingProvider",void 0),e.hasDocumentSelectionFormattingProvider=new i.RawContextKey("editorHasDocumentSelectionFormattingProvider",void 0),e.hasSignatureHelpProvider=new i.RawContextKey("editorHasSignatureHelpProvider",void 0),e.isInEmbeddedEditor=new i.RawContextKey("isInEmbeddedEditor",void 0)}(N=t.ModeContextKeys||(t.ModeContextKeys={})),t.ViewEventNames={ModelFlushedEvent:"modelFlushedEvent",LinesDeletedEvent:"linesDeletedEvent",LinesInsertedEvent:"linesInsertedEvent",LineChangedEvent:"lineChangedEvent",TokensChangedEvent:"tokensChangedEvent",DecorationsChangedEvent:"decorationsChangedEvent",CursorPositionChangedEvent:"cursorPositionChangedEvent",CursorSelectionChangedEvent:"cursorSelectionChangedEvent",RevealRangeEvent:"revealRangeEvent",LineMappingChangedEvent:"lineMappingChangedEvent",ScrollRequestEvent:"scrollRequestEvent"};var T=function(){function e(e,t,n,i){this.top=0|e,this.left=0|t,this.width=0|n,this.height=0|i}return e}();t.Viewport=T;var x;!function(e){e[e.Value=0]="Value",e[e.Selection=1]="Selection",e[e.Position=2]="Position",e[e.Scroll=3]="Scroll"}(x=t.CodeEditorStateFlag||(t.CodeEditorStateFlag={})),t.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"},t.isCommonCodeEditor=o,t.isCommonDiffEditor=r,t.ClassName={EditorWarningDecoration:"greensquiggly",EditorErrorDecoration:"redsquiggly"},t.EventType={Disposed:"disposed",ConfigurationChanged:"configurationChanged",ModelDispose:"modelDispose",ModelChanged:"modelChanged",ModelTokensChanged:"modelTokensChanged",ModelLanguageChanged:"modelLanguageChanged",ModelOptionsChanged:"modelOptionsChanged",ModelRawContentChanged:"contentChanged",ModelContentChanged2:"contentChanged2",ModelRawContentChangedFlush:"flush",ModelRawContentChangedLinesDeleted:"linesDeleted",ModelRawContentChangedLinesInserted:"linesInserted",ModelRawContentChangedLineChanged:"lineChanged",EditorTextBlur:"blur",EditorTextFocus:"focus",EditorFocus:"widgetFocus",EditorBlur:"widgetBlur",ModelDecorationsChanged:"decorationsChanged",CursorPositionChanged:"positionChanged",CursorSelectionChanged:"selectionChanged",CursorRevealRange:"revealRange",CursorScrollRequest:"scrollRequest",ViewFocusGained:"focusGained",ViewFocusLost:"focusLost",ViewFocusChanged:"focusChanged",ViewScrollChanged:"scrollChanged",ViewZonesChanged:"zonesChanged",ViewLayoutChanged:"viewLayoutChanged",ContextMenu:"contextMenu",MouseDown:"mousedown",MouseUp:"mouseup",MouseMove:"mousemove",MouseLeave:"mouseleave",KeyDown:"keydown",KeyUp:"keyup",WillType:"willType",DidType:"didType",DidPaste:"didPaste",EditorLayout:"editorLayout",DiffUpdated:"diffUpdated"},t.CursorMovePosition={Left:"left",Right:"right",Up:"up",Down:"down",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},t.CursorMoveByUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};var M=function(e){if(!n.isObject(e))return!1;var t=e;return!!n.isString(t.to)&&(!(!n.isUndefined(t.select)&&!n.isBoolean(t.select))&&(!(!n.isUndefined(t.by)&&!n.isString(t.by))&&!(!n.isUndefined(t.value)&&!n.isNumber(t.value))))};t.EditorScrollDirection={Up:"up",Down:"down"},t.EditorScrollByUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};var I=function(e){if(!n.isObject(e))return!1;var t=e;return!!n.isString(t.to)&&(!(!n.isUndefined(t.by)&&!n.isString(t.by))&&(!(!n.isUndefined(t.value)&&!n.isNumber(t.value))&&!(!n.isUndefined(t.revealCursor)&&!n.isBoolean(t.revealCursor))))};t.RevealLineAtArgument={Top:"top",Center:"center",Bottom:"bottom"};var D=function(e){if(!n.isObject(e))return!1;var t=e;return!!n.isNumber(t.lineNumber)&&!(!n.isUndefined(t.at)&&!n.isString(t.at))};t.CommandDescription={CursorMove:{description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down'\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter',\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'character', 'halfLine'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:M}]},EditorScroll:{description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory direction value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'up', 'down'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'by': Unit to move. Default is computed based on 'to' value.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'line', 'wrappedLine', 'page', 'halfPage'\n\t\t\t\t\t\t```\n\t\t\t\t\t* 'value': Number of units to move. Default is '1'.\n\t\t\t\t\t* 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n\t\t\t\t",constraint:I}]},RevealLine:{description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'lineNumber': A mandatory line number value.\n\t\t\t\t\t* 'at': Logical position at which line has to be revealed .\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'top', 'center', 'bottom'\n\t\t\t\t\t\t```\n\t\t\t\t",constraint:D}]}},t.Handler={ExecuteCommand:"executeCommand",ExecuteCommands:"executeCommands",CursorLeft:"cursorLeft",CursorLeftSelect:"cursorLeftSelect",CursorWordLeft:"cursorWordLeft",CursorWordStartLeft:"cursorWordStartLeft",CursorWordEndLeft:"cursorWordEndLeft",CursorWordLeftSelect:"cursorWordLeftSelect",CursorWordStartLeftSelect:"cursorWordStartLeftSelect",CursorWordEndLeftSelect:"cursorWordEndLeftSelect",CursorRight:"cursorRight",CursorRightSelect:"cursorRightSelect",CursorWordRight:"cursorWordRight",CursorWordStartRight:"cursorWordStartRight",CursorWordEndRight:"cursorWordEndRight",CursorWordRightSelect:"cursorWordRightSelect",CursorWordStartRightSelect:"cursorWordStartRightSelect",CursorWordEndRightSelect:"cursorWordEndRightSelect",CursorUp:"cursorUp",CursorUpSelect:"cursorUpSelect",
CursorDown:"cursorDown",CursorDownSelect:"cursorDownSelect",CursorPageUp:"cursorPageUp",CursorPageUpSelect:"cursorPageUpSelect",CursorPageDown:"cursorPageDown",CursorPageDownSelect:"cursorPageDownSelect",CursorHome:"cursorHome",CursorHomeSelect:"cursorHomeSelect",CursorEnd:"cursorEnd",CursorEndSelect:"cursorEndSelect",ExpandLineSelection:"expandLineSelection",CursorTop:"cursorTop",CursorTopSelect:"cursorTopSelect",CursorBottom:"cursorBottom",CursorBottomSelect:"cursorBottomSelect",CursorColumnSelectLeft:"cursorColumnSelectLeft",CursorColumnSelectRight:"cursorColumnSelectRight",CursorColumnSelectUp:"cursorColumnSelectUp",CursorColumnSelectPageUp:"cursorColumnSelectPageUp",CursorColumnSelectDown:"cursorColumnSelectDown",CursorColumnSelectPageDown:"cursorColumnSelectPageDown",CursorMove:"cursorMove",AddCursorDown:"addCursorDown",AddCursorUp:"addCursorUp",CursorUndo:"cursorUndo",MoveTo:"moveTo",MoveToSelect:"moveToSelect",ColumnSelect:"columnSelect",CreateCursor:"createCursor",LastCursorMoveToSelect:"lastCursorMoveToSelect",Type:"type",ReplacePreviousChar:"replacePreviousChar",CompositionStart:"compositionStart",CompositionEnd:"compositionEnd",Paste:"paste",Tab:"tab",Indent:"indent",Outdent:"outdent",DeleteLeft:"deleteLeft",DeleteRight:"deleteRight",DeleteWordLeft:"deleteWordLeft",DeleteWordStartLeft:"deleteWordStartLeft",DeleteWordEndLeft:"deleteWordEndLeft",DeleteWordRight:"deleteWordRight",DeleteWordStartRight:"deleteWordStartRight",DeleteWordEndRight:"deleteWordEndRight",RemoveSecondaryCursors:"removeSecondaryCursors",CancelSelection:"cancelSelection",Cut:"cut",Undo:"undo",Redo:"redo",WordSelect:"wordSelect",WordSelectDrag:"wordSelectDrag",LastCursorWordSelect:"lastCursorWordSelect",LineSelect:"lineSelect",LineSelectDrag:"lineSelectDrag",LastCursorLineSelect:"lastCursorLineSelect",LastCursorLineSelectDrag:"lastCursorLineSelectDrag",LineInsertBefore:"lineInsertBefore",LineInsertAfter:"lineInsertAfter",LineBreakInsert:"lineBreakInsert",SelectAll:"selectAll",EditorScroll:"editorScroll",ScrollLineUp:"scrollLineUp",ScrollLineDown:"scrollLineDown",ScrollPageUp:"scrollPageUp",ScrollPageDown:"scrollPageDown",RevealLine:"revealLine"};var R;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline"}(R=t.TextEditorCursorStyle||(t.TextEditorCursorStyle={}));var k;!function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(k=t.TextEditorCursorBlinkingStyle||(t.TextEditorCursorBlinkingStyle={})),t.cursorStyleToString=s;var O=function(){function e(e,t,n,i){this.from=0|e,this.to=0|t,this.colorId=0|n,this.position=0|i}return e}();t.ColorZone=O;var P=function(){function e(e,t,n,i,o,r){this.startLineNumber=e,this.endLineNumber=t,this.position=n,this.forceHeight=i,this._color=o,this._darkColor=r,this._colorZones=null}return e.prototype.getColor=function(e){return e?this._darkColor:this._color},e.prototype.equals=function(e){return this.startLineNumber===e.startLineNumber&&this.endLineNumber===e.endLineNumber&&this.position===e.position&&this.forceHeight===e.forceHeight&&this._color===e._color&&this._darkColor===e._darkColor},e.prototype.compareTo=function(e){return this.startLineNumber===e.startLineNumber?this.endLineNumber===e.endLineNumber?this.forceHeight===e.forceHeight?this.position===e.position?this._darkColor===e._darkColor?this._color===e._color?0:this._color<e._color?-1:1:this._darkColor<e._darkColor?-1:1:this.position-e.position:this.forceHeight-e.forceHeight:this.endLineNumber-e.endLineNumber:this.startLineNumber-e.startLineNumber},e.prototype.setColorZones=function(e){this._colorZones=e},e.prototype.getColorZones=function(){return this._colorZones},e}();t.OverviewRulerZone=P}),define(d[341],h([0,1,35,153,9,27,11,2,199,4]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=i.parse(i.stringify(e));n.mixin(t,e.light);var o=i.parse(i.stringify(e));return n.mixin(o,e.dark),{light:t,dark:o}}var d=function(e){function t(t){void 0===t&&(t=s.createStyleSheet());var n=e.call(this)||this;return n._styleSheet=t,n._decorationOptionProviders=Object.create(null),n}return m(t,e),t.prototype.registerDecorationType=function(e,t,n){var i=this._decorationOptionProviders[e];i||(i=n?new h(this._styleSheet,e,n,t):new p(this._styleSheet,e,t),this._decorationOptionProviders[e]=i),i.refCount++},t.prototype.removeDecorationType=function(e){var t=this._decorationOptionProviders[e];t&&(t.refCount--,t.refCount<=0&&(delete this._decorationOptionProviders[e],t.dispose(),this.listCodeEditors().forEach(function(t){return t.removeDecorations(e)})))},t.prototype.resolveDecorationOptions=function(e,t){var n=this._decorationOptionProviders[e];if(!n)throw new Error("Unknown decoration type key: "+e);return n.getOptions(this,t)},t}(u.AbstractCodeEditorService);t.CodeEditorServiceImpl=d;var h=function(){function e(e,t,n,i){this._parentTypeKey=n,this.refCount=0;var o=c(i);this._beforeContentClassName=f.createCSSRules(e,t,n,3,{light:f.getCSSTextForModelDecorationContentClassName(o.light.before),dark:f.getCSSTextForModelDecorationContentClassName(o.dark.before)}),this._afterContentClassName=f.createCSSRules(e,t,n,4,{light:f.getCSSTextForModelDecorationContentClassName(o.light.after),dark:f.getCSSTextForModelDecorationContentClassName(o.dark.after)}),(this._beforeContentClassName||this._afterContentClassName)&&(this._disposable=l.toDisposable(function(){s.removeCSSRulesContainingSelector(_.getDeletionSubstring(t),e)}))}return e.prototype.getOptions=function(e,t){var n=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentClassName&&(n.beforeContentClassName=this._beforeContentClassName),this._afterContentClassName&&(n.afterContentClassName=this._afterContentClassName),n},e.prototype.dispose=function(){this._disposable&&(this._disposable.dispose(),delete this._disposable)},e}(),p=function(){function e(e,t,n){this.refCount=0;var i=c(n);this.className=f.createCSSRules(e,t,null,0,{light:f.getCSSTextForModelDecorationClassName(i.light),dark:f.getCSSTextForModelDecorationClassName(i.dark)}),this.inlineClassName=f.createCSSRules(e,t,null,1,{light:f.getCSSTextForModelDecorationInlineClassName(i.light),dark:f.getCSSTextForModelDecorationInlineClassName(i.dark)}),this.beforeContentClassName=f.createCSSRules(e,t,null,3,{light:f.getCSSTextForModelDecorationContentClassName(i.light.before),dark:f.getCSSTextForModelDecorationContentClassName(i.dark.before)}),this.afterContentClassName=f.createCSSRules(e,t,null,4,{light:f.getCSSTextForModelDecorationContentClassName(i.light.after),dark:f.getCSSTextForModelDecorationContentClassName(i.dark.after)}),this.glyphMarginClassName=f.createCSSRules(e,t,null,2,{light:f.getCSSTextForModelDecorationGlyphMarginClassName(i.light),dark:f.getCSSTextForModelDecorationGlyphMarginClassName(i.dark)}),this.isWholeLine=Boolean(n.isWholeLine),"undefined"==typeof i.light.overviewRulerColor&&"undefined"==typeof i.dark.overviewRulerColor||(this.overviewRuler={color:i.light.overviewRulerColor||i.dark.overviewRulerColor,darkColor:i.dark.overviewRulerColor||i.light.overviewRulerColor,position:n.overviewRulerLane||a.OverviewRulerLane.Center}),this._disposable=l.toDisposable(function(){s.removeCSSRulesContainingSelector(_.getDeletionSubstring(t),e)})}return e.prototype.getOptions=function(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this},e.prototype.dispose=function(){this._disposable&&(this._disposable.dispose(),delete this._disposable)},e}(),f=function(){function e(){}return e.getCSSTextForModelDecorationClassName=function(t){var n=[];return e.collectCSSText(t,["backgroundColor","outline","outlineColor","outlineStyle","outlineWidth"],n),e.collectBorderSettingsCSSText(t,n),n.join("")},e.getCSSTextForModelDecorationInlineClassName=function(t){var n=[];return e.collectCSSText(t,["textDecoration","cursor","color","letterSpacing"],n),n.join("")},e.getCSSTextForModelDecorationContentClassName=function(t){var n=[];if("undefined"!=typeof t){if(e.collectBorderSettingsCSSText(t,n),"string"==typeof t.contentIconPath?n.push(o.format(this._CSS_MAP.contentIconPath,r.default.file(t.contentIconPath).toString().replace(/'/g,"%27"))):t.contentIconPath instanceof r.default&&n.push(o.format(this._CSS_MAP.contentIconPath,t.contentIconPath.toString(!0).replace(/'/g,"%27"))),"string"==typeof t.contentText){var i=t.contentText.match(/^.*$/m)[0],s=i.replace(/'\\/g,"\\$&");n.push(o.format(this._CSS_MAP.contentText,s))}e.collectCSSText(t,["textDecoration","color","backgroundColor","margin"],n),e.collectCSSText(t,["width","height"],n)&&n.push("display:inline-block;")}return n.join("")},e.getCSSTextForModelDecorationGlyphMarginClassName=function(e){var t=[];return"undefined"!=typeof e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(o.format(this._CSS_MAP.gutterIconPath,r.default.file(e.gutterIconPath).toString())):t.push(o.format(this._CSS_MAP.gutterIconPath,e.gutterIconPath.toString(!0).replace(/'/g,"%27"))),"undefined"!=typeof e.gutterIconSize&&t.push(o.format(this._CSS_MAP.gutterIconSize,e.gutterIconSize))),t.join("")},e.collectBorderSettingsCSSText=function(t,n){return!!e.collectCSSText(t,e.border_rules,n)&&(n.push(o.format("box-sizing: border-box;")),!0)},e.collectCSSText=function(e,t,n){for(var i=n.length,r=0,s=t;r<s.length;r++){var a=s[r];"undefined"!=typeof e[a]&&n.push(o.format(this._CSS_MAP[a],e[a]))}return n.length!==i},e.createCSSRules=function(e,t,n,i,o){function r(o,r){var a=_.getSelector(o,t,n,i);s.createCSSRule(a,r,e)}var a=!1;if(o.light.length>0&&(r(0,o.light),a=!0),o.dark.length>0&&(r(1,o.dark),r(2,o.dark),a=!0),a){var u=_.getClassName(t,i);return n&&(u=u+" "+_.getClassName(n,i)),u}},e}();f._CSS_MAP={color:"color:{0} !important;",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:url('{0}') center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:url('{0}');",margin:"margin:{0};",width:"width:{0};",height:"height:{0};"},f.border_rules=["border","borderColor","borderColor","borderSpacing","borderStyle","borderWidth"];var g;!function(e){e[e.Light=0]="Light",e[e.Dark=1]="Dark",e[e.HighContrastBlack=2]="HighContrastBlack"}(g||(g={}));var v;!function(e){e[e.ClassName=0]="ClassName",e[e.InlineClassName=1]="InlineClassName",e[e.GlyphMarginClassName=2]="GlyphMarginClassName",e[e.BeforeContentClassName=3]="BeforeContentClassName",e[e.AfterContentClassName=4]="AfterContentClassName"}(v||(v={}));var _=function(){function e(){}return e._getSelectorPrefixOf=function(e){return 0===e?".monaco-editor.vs":1===e?".monaco-editor.vs-dark":".monaco-editor.hc-black"},e.getClassName=function(e,t){return"ced-"+e+"-"+t},e.getSelector=function(e,t,n,i){var o=this._getSelectorPrefixOf(e)+" ."+this.getClassName(t,i);return n&&(o=o+"."+this.getClassName(n,i)),3===i?o+="::before":4===i&&(o+="::after"),o},e.getDeletionSubstring=function(e){return".ced-"+e+"-"},e}()}),define(d[342],h([0,1,15,2]),function(e,t,n,i){"use strict";var o=function(){function e(e,t,n,i){this.viewModel=e,this.triggerCursorHandler=t,this.outgoingEvents=n,this.commandService=i}return e.prototype.paste=function(e,t,n){this.commandService.executeCommand(i.Handler.Paste,{text:t,pasteOnNewLine:n})},e.prototype.type=function(e,t){this.commandService.executeCommand(i.Handler.Type,{text:t})},e.prototype.replacePreviousChar=function(e,t,n){this.commandService.executeCommand(i.Handler.ReplacePreviousChar,{text:t,replaceCharCnt:n})},e.prototype.compositionStart=function(e){this.commandService.executeCommand(i.Handler.CompositionStart,{})},e.prototype.compositionEnd=function(e){this.commandService.executeCommand(i.Handler.CompositionEnd,{})},e.prototype.cut=function(e){this.commandService.executeCommand(i.Handler.Cut,{})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new n.Position(e.lineNumber,t):e},e.prototype.dispatchMouse=function(e){e.startedOnLineNumbers?e.altKey?e.inSelectionMode?this.lastCursorLineSelect("mouse",e.position):this.createCursor("mouse",e.position,!0):e.inSelectionMode?this.lineSelectDrag("mouse",e.position):this.lineSelect("mouse",e.position):e.mouseDownCount>=4?this.selectAll("mouse"):3===e.mouseDownCount?e.altKey?e.inSelectionMode?this.lastCursorLineSelectDrag("mouse",e.position):this.lastCursorLineSelect("mouse",e.position):e.inSelectionMode?this.lineSelectDrag("mouse",e.position):this.lineSelect("mouse",e.position):2===e.mouseDownCount?e.altKey?this.lastCursorWordSelect("mouse",e.position):e.inSelectionMode?this.wordSelectDrag("mouse",e.position):this.wordSelect("mouse",e.position):e.altKey?e.ctrlKey||e.metaKey||(e.shiftKey?this.columnSelect("mouse",e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect("mouse",e.position):this.createCursor("mouse",e.position,!1)):e.inSelectionMode?this.moveToSelect("mouse",e.position):this.moveTo("mouse",e.position)},e.prototype.moveTo=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.MoveTo,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.moveToSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.MoveToSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.columnSelect=function(e,t,n){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.ColumnSelect,{position:this.convertViewToModelPosition(t),viewPosition:t,mouseColumn:n})},e.prototype.createCursor=function(e,t,n){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.CreateCursor,{position:this.convertViewToModelPosition(t),viewPosition:t,wholeLine:n})},e.prototype.lastCursorMoveToSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorMoveToSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.wordSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.WordSelect,{position:this.convertViewToModelPosition(t)})},e.prototype.wordSelectDrag=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.WordSelectDrag,{position:this.convertViewToModelPosition(t)})},e.prototype.lastCursorWordSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorWordSelect,{position:this.convertViewToModelPosition(t)})},e.prototype.lineSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LineSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.lineSelectDrag=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LineSelectDrag,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.lastCursorLineSelect=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorLineSelect,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.lastCursorLineSelectDrag=function(e,t){t=this._validateViewColumn(t),this.triggerCursorHandler(e,i.Handler.LastCursorLineSelectDrag,{position:this.convertViewToModelPosition(t),viewPosition:t})},e.prototype.selectAll=function(e){this.triggerCursorHandler(e,i.Handler.SelectAll,null)},e.prototype.convertViewToModelPosition=function(e){return this.viewModel.convertViewPositionToModelPosition(e.lineNumber,e.column)},e.prototype.emitKeyDown=function(e){this.outgoingEvents.emitKeyDown(e)},e.prototype.emitKeyUp=function(e){this.outgoingEvents.emitKeyUp(e)},e.prototype.emitContextMenu=function(e){this.outgoingEvents.emitContextMenu(e)},e.prototype.emitMouseMove=function(e){this.outgoingEvents.emitMouseMove(e)},e.prototype.emitMouseLeave=function(e){this.outgoingEvents.emitMouseLeave(e)},e.prototype.emitMouseUp=function(e){this.outgoingEvents.emitMouseUp(e)},e.prototype.emitMouseDown=function(e){this.outgoingEvents.emitMouseDown(e)},e}();t.ViewController=o}),define(d[162],h([0,1,9,3,2]),function(e,t,n,i,o){"use strict";function r(e){return e===s.IENarrator?l.EMPTY:a?d.EMPTY:c.EMPTY}var s;!function(e){e[e.IENarrator=0]="IENarrator",e[e.NVDA=1]="NVDA"}(s=t.TextAreaStrategy||(t.TextAreaStrategy={}));var a=!1;t.createTextAreaState=r;var u=function(){function e(e,t,n,i,o){this.previousState=e?e.shallowClone():null,this.value=t,this.selectionStart=n,this.selectionEnd=i,this.isInOverwriteMode=o}return e.prototype.updateComposition=function(){return this.previousState?{text:this.value,replaceCharCnt:this.previousState.selectionEnd-this.previousState.selectionStart}:{text:"",replaceCharCnt:0}},e.prototype.getSelectionStart=function(){return this.selectionStart},e.prototype.getValue=function(){return this.value},e.prototype.applyToTextArea=function(e,t,n){t.getValue()!==this.value&&t.setValue(e,this.value),n&&t.setSelectionRange(this.selectionStart,this.selectionEnd)},e.prototype.deduceInput=function(){if(!this.previousState)return{text:"",replaceCharCnt:0};var e=this.previousState.value,t=this.previousState.selectionStart,i=this.previousState.selectionEnd,o=this.value,r=this.selectionStart,s=this.selectionEnd,a=e.substring(i),u=o.substring(s),l=n.commonSuffixLength(a,u);o=o.substring(0,o.length-l),e=e.substring(0,e.length-l);var c=e.substring(0,t),d=o.substring(0,r),h=n.commonPrefixLength(c,d);if(o=o.substring(h),e=e.substring(h),r-=h,t-=h,s-=h,i-=h,r===s){if(e===o&&0===t&&i===e.length&&r===o.length&&o.indexOf("\n")===-1)return{text:"",replaceCharCnt:0};var p=c.length-h;return{text:o,replaceCharCnt:p}}var f=i-t;return{text:o,replaceCharCnt:f}},e}();t.TextAreaState=u;var l=function(e){function t(t,n,i,o,r,s){var a=e.call(this,t,n,i,o,r)||this;return a.selectionToken=s,a}return m(t,e),t.prototype.shallowClone=function(){return new t(null,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode,this.selectionToken)},t.prototype.toEmpty=function(){return t.EMPTY},t.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+", isInOverwriteMode: "+this.isInOverwriteMode+", selectionToken: "+this.selectionToken+"]"},t.prototype.toStrategy=function(e){return e===s.IENarrator?this:a?new d(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode):new c(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode)},t.prototype.equals=function(e){return e instanceof t&&(this.value===e.value&&this.selectionStart===e.selectionStart&&this.selectionEnd===e.selectionEnd&&this.isInOverwriteMode===e.isInOverwriteMode&&this.selectionToken===e.selectionToken)},t.prototype.fromTextArea=function(e){return new t(this,e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),e.isInOverwriteMode(),this.selectionToken)},t.prototype.fromEditorSelection=function(e,n){var r=100,s=0,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn,d=e.getLineMaxColumn(l);n.isEmpty()&&this.selectionToken!==a&&(u=1,c=d);var h="",p=Math.max(1,a-s);p<a&&(h=e.getValueInRange(new i.Range(p,1,a,1),o.EndOfLinePreference.LF)),h+=e.getValueInRange(new i.Range(a,1,a,u),o.EndOfLinePreference.LF),h.length>r&&(h=h.substring(h.length-r,h.length));var f="",g=Math.min(l+s,e.getLineCount());f+=e.getValueInRange(new i.Range(l,c,l,d),o.EndOfLinePreference.LF),g>l&&(f="\n"+e.getValueInRange(new i.Range(l+1,1,g,e.getLineMaxColumn(g)),o.EndOfLinePreference.LF)),f.length>r&&(f=f.substring(0,r));var m=e.getValueInRange(new i.Range(a,u,l,c),o.EndOfLinePreference.LF);return m.length>2*r&&(m=m.substring(0,r)+String.fromCharCode(8230)+m.substring(m.length-r,m.length)),new t(this,h+m+f,h.length,h.length+m.length,!1,a)},t.prototype.fromText=function(e){return new t(this,e,0,e.length,!1,0)},t.prototype.resetSelection=function(){return new t(this.previousState,this.value,this.value.length,this.value.length,this.isInOverwriteMode,this.selectionToken)},t}(u);l.EMPTY=new l(null,"",0,0,!1,0),t.IENarratorTextAreaState=l;var c=function(e){function t(t,n,i,o,r){return e.call(this,t,n,i,o,r)||this}return m(t,e),t.prototype.shallowClone=function(){return new t(null,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode)},t.prototype.toEmpty=function(){return t.EMPTY},t.prototype.toString=function(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+", isInOverwriteMode: "+this.isInOverwriteMode+"]"},t.prototype.toStrategy=function(e){return e===s.NVDA?this:new l(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode,0)},t.prototype.equals=function(e){return e instanceof t&&(this.value===e.value&&this.selectionStart===e.selectionStart&&this.selectionEnd===e.selectionEnd&&this.isInOverwriteMode===e.isInOverwriteMode)},t.prototype.fromTextArea=function(e){return new t(this,e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),e.isInOverwriteMode())},t._getPageOfLine=function(e){return Math.floor((e-1)/t._LINES_PER_PAGE)},t._getRangeForPage=function(e){var n=e*t._LINES_PER_PAGE,o=n+1,r=n+t._LINES_PER_PAGE;return new i.Range(o,1,r,1073741824)},t.prototype.fromEditorSelection=function(e,n){var r=t._getPageOfLine(n.startLineNumber),s=t._getRangeForPage(r),a=t._getPageOfLine(n.endLineNumber),u=t._getRangeForPage(a),l=s.intersectRanges(new i.Range(1,1,n.startLineNumber,n.startColumn)),c=e.getValueInRange(l,o.EndOfLinePreference.LF),d=e.getLineCount(),h=e.getLineMaxColumn(d),p=u.intersectRanges(new i.Range(n.endLineNumber,n.endColumn,d,h)),f=e.getValueInRange(p,o.EndOfLinePreference.LF),g=null;if(r===a||r+1===a)g=e.getValueInRange(n,o.EndOfLinePreference.LF);else{var m=s.intersectRanges(n),v=u.intersectRanges(n);g=e.getValueInRange(m,o.EndOfLinePreference.LF)+String.fromCharCode(8230)+e.getValueInRange(v,o.EndOfLinePreference.LF)}var _=500;return c.length>_&&(c=c.substring(c.length-_,c.length)),f.length>_&&(f=f.substring(0,_)),g.length>2*_&&(g=g.substring(0,_)+String.fromCharCode(8230)+g.substring(g.length-_,g.length)),new t(this,c+g+f,c.length,c.length+g.length,!1)},t.prototype.fromText=function(e){return new t(this,e,0,e.length,!1)},t.prototype.resetSelection=function(){return new t(this.previousState,this.value,this.value.length,this.value.length,this.isInOverwriteMode)},t}(u);c.EMPTY=new c(null,"",0,0,!1),c._LINES_PER_PAGE=10,t.NVDAPagedTextAreaState=c;var d=function(e){function t(t,n,i,o,r){return e.call(this,t,n,i,o,r)||this}return m(t,e),t.prototype.shallowClone=function(){return new t(null,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode)},t.prototype.toEmpty=function(){return t.EMPTY},t.prototype.toString=function(){return"[ <ENTIRE TEXT>, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+", isInOverwriteMode: "+this.isInOverwriteMode+"]"},t.prototype.toStrategy=function(e){return e===s.NVDA?this:new l(this.previousState,this.value,this.selectionStart,this.selectionEnd,this.isInOverwriteMode,0)},t.prototype.equals=function(e){return e instanceof t&&(this.value===e.value&&this.selectionStart===e.selectionStart&&this.selectionEnd===e.selectionEnd&&this.isInOverwriteMode===e.isInOverwriteMode)},t.prototype.fromTextArea=function(e){return new t(this,e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),e.isInOverwriteMode())},t.prototype.fromEditorSelection=function(e,n){var r=e.getValueInRange(new i.Range(1,1,n.startLineNumber,n.startColumn),o.EndOfLinePreference.LF),s=e.getValueInRange(n,o.EndOfLinePreference.LF),a=e.getLineCount(),u=e.getLineMaxColumn(a),l=e.getValueInRange(new i.Range(n.endLineNumber,n.endColumn,a,u),o.EndOfLinePreference.LF);return new t(this,r+s+l,r.length,r.length+s.length,!1)},t.prototype.fromText=function(e){return new t(this,e,0,e.length,!1)},t.prototype.resetSelection=function(){return new t(this.previousState,this.value,this.value.length,this.value.length,this.isInOverwriteMode)},t}(u);d.EMPTY=new d(null,"",0,0,!1),t.NVDAFullTextAreaState=d}),define(d[344],h([0,1,17,9,12,4,162,3,2]),function(e,t,n,i,o,r,s,a,u){"use strict";var l;!function(e){e[e.Type=0]="Type",e[e.Paste=1]="Paste"}(l||(l={}));var c=navigator.userAgent.indexOf("Chrome/55.")>=0&&navigator.userAgent.indexOf("Edge/")===-1,d=function(e){function t(t,r,u,l,d){var h=e.call(this)||this;h._onKeyDown=h._register(new o.Emitter),h.onKeyDown=h._onKeyDown.event,h._onKeyUp=h._register(new o.Emitter),h.onKeyUp=h._onKeyUp.event,h._onCut=h._register(new o.Emitter),h.onCut=h._onCut.event,h._onPaste=h._register(new o.Emitter),h.onPaste=h._onPaste.event,h._onType=h._register(new o.Emitter),h.onType=h._onType.event,h._onCompositionStart=h._register(new o.Emitter),h.onCompositionStart=h._onCompositionStart.event,h._onCompositionUpdate=h._register(new o.Emitter),h.onCompositionUpdate=h._onCompositionUpdate.event,h._onCompositionEnd=h._register(new o.Emitter),h.onCompositionEnd=h._onCompositionEnd.event,h.Browser=t,h.textArea=u,h.model=l,h.flushAnyAccumulatedEvents=d,h.selection=new a.Range(1,1,1,1),h.selections=[new a.Range(1,1,1,1)],h._nextCommand=0,h.asyncTriggerCut=new n.RunOnceScheduler(function(){return h._onCut.fire()},0),h.lastCopiedValue=null,h.lastCopiedValueIsFromEmptySelection=!1,h.textAreaState=s.createTextAreaState(r),h.hasFocus=!1,h.lastCompositionEndTime=0,h._register(h.textArea.onKeyDown(function(e){return h._onKeyDownHandler(e)})),h._register(h.textArea.onKeyUp(function(e){return h._onKeyUp.fire(e)})),h._register(h.textArea.onKeyPress(function(e){return h._onKeyPressHandler(e)})),h.textareaIsShownAtCursor=!1,h._register(h.textArea.onCompositionStart(function(e){h.textareaIsShownAtCursor||(h.textareaIsShownAtCursor=!0,h.Browser.isEdgeOrIE||h.setTextAreaState("compositionstart",h.textAreaState.toEmpty(),!1),h._onCompositionStart.fire({showAtLineNumber:h.selection.startLineNumber,showAtColumn:h.selection.startColumn}))})),h._register(h.textArea.onCompositionUpdate(function(e){c&&(e={locale:e.locale,data:h.textArea.getValue()}),h.textAreaState=h.textAreaState.fromText(e.data);var t=h.textAreaState.updateComposition();h._onType.fire(t),h._onCompositionUpdate.fire(e)}));var p=function(){var e=h.textAreaState.fromTextArea(h.textArea),t=e.deduceInput();0===t.replaceCharCnt&&1===t.text.length&&i.isHighSurrogate(t.text.charCodeAt(0))||(h.textAreaState=e,0===h._nextCommand?""!==t.text&&h._onType.fire(t):(h.executePaste(t.text),h._nextCommand=0))};return h._register(h.textArea.onCompositionEnd(function(e){h.textAreaState=h.textAreaState.fromText(e.data);var n=h.textAreaState.updateComposition();h._onType.fire(n),(t.isEdgeOrIE||t.isChrome)&&(h.textAreaState=h.textAreaState.fromTextArea(h.textArea)),h.lastCompositionEndTime=(new Date).getTime(),h.textareaIsShownAtCursor&&(h.textareaIsShownAtCursor=!1,h._onCompositionEnd.fire())})),h._register(h.textArea.onInput(function(){h.textareaIsShownAtCursor||p()})),h._register(h.textArea.onCut(function(e){h.flushAnyAccumulatedEvents(),h._ensureClipboardGetsEditorSelection(e),h.asyncTriggerCut.schedule()})),h._register(h.textArea.onCopy(function(e){h.flushAnyAccumulatedEvents(),h._ensureClipboardGetsEditorSelection(e)})),h._register(h.textArea.onPaste(function(e){e.canUseTextData()?h.executePaste(e.getTextData()):(h.textArea.getSelectionStart()!==h.textArea.getSelectionEnd()&&h.setTextAreaState("paste",h.textAreaState.toEmpty(),!1),h._nextCommand=1)})),h._writePlaceholderAndSelectTextArea("ctor",!1),h}return m(t,e),t.prototype.dispose=function(){this.asyncTriggerCut.dispose(),e.prototype.dispose.call(this)},t.prototype.setStrategy=function(e){this.textAreaState=this.textAreaState.toStrategy(e)},t.prototype.setHasFocus=function(e){this.hasFocus!==e&&(this.hasFocus=e,this.hasFocus&&this._writePlaceholderAndSelectTextArea("focusgain",!1))},t.prototype.setCursorSelections=function(e,t){this.selection=e,this.selections=[e].concat(t),this._writePlaceholderAndSelectTextArea("selection changed",!1)},t.prototype.setTextAreaState=function(e,t,n){this.hasFocus||(t=t.resetSelection()),t.applyToTextArea(e,this.textArea,this.hasFocus||n),this.textAreaState=t},t.prototype._onKeyDownHandler=function(e){e.equals(9)&&e.preventDefault(),this._onKeyDown.fire(e)},t.prototype._onKeyPressHandler=function(e){!this.hasFocus},t.prototype.executePaste=function(e){if(""!==e){var t=!1;this.Browser.enableEmptySelectionClipboard&&(t=e===this.lastCopiedValue&&this.lastCopiedValueIsFromEmptySelection),this._onPaste.fire({text:e,pasteOnNewLine:t})}},t.prototype.focusTextArea=function(){this._writePlaceholderAndSelectTextArea("focusTextArea",!0)},t.prototype._writePlaceholderAndSelectTextArea=function(e,t){this.textareaIsShownAtCursor||(this.Browser.isIPad?this.setTextAreaState(e,this.textAreaState.toEmpty(),t):this.setTextAreaState(e,this.textAreaState.fromEditorSelection(this.model,this.selection),t))},t.prototype._ensureClipboardGetsEditorSelection=function(e){var t=this._getPlainTextToCopy();if(e.canUseTextData()?e.setTextData(t):this.setTextAreaState("copy or cut",this.textAreaState.fromText(t),!1),this.Browser.enableEmptySelectionClipboard){this.Browser.isFirefox?this.lastCopiedValue=t.replace(/\r\n/g,"\n"):this.lastCopiedValue=t;var n=this.selections;this.lastCopiedValueIsFromEmptySelection=1===n.length&&n[0].isEmpty()}},t.prototype._getPlainTextToCopy=function(){var e=this.model.getEOL(),t=this.selections;if(1===t.length){var n=t[0];if(n.isEmpty()){if(this.Browser.enableEmptySelectionClipboard){var i=this.model.convertViewPositionToModelPosition(n.startLineNumber,1).lineNumber;return this.model.getModelLineContent(i)+e}return""}return this.model.getValueInRange(n,u.EndOfLinePreference.TextDefined)}t=t.slice(0).sort(a.Range.compareRangesUsingStarts);for(var o=[],r=0;r<t.length;r++)o.push(this.model.getValueInRange(t[r],u.EndOfLinePreference.TextDefined));return o.join(e)},t}(r.Disposable);t.TextAreaHandler=d}),define(d[345],h([0,1,9,2]),function(e,t,n,i){"use strict";var o=function(){function e(e,t){var o=this;this.flags=t,t.forEach(function(t){switch(t){case i.CodeEditorStateFlag.Value:var r=e.getModel();o.modelVersionId=r?n.format("{0}#{1}",r.uri.toString(),r.getVersionId()):null;break;case i.CodeEditorStateFlag.Position:o.position=e.getPosition();break;case i.CodeEditorStateFlag.Selection:o.selection=e.getSelection();break;case i.CodeEditorStateFlag.Scroll:o.scrollLeft=e.getScrollLeft(),o.scrollTop=e.getScrollTop()}})}return e.prototype._equals=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))))},e.prototype.validate=function(t){return this._equals(new e(t,this.flags))},e}();t.EditorState=o}),define(d[346],h([0,1,9,15,3,2]),function(e,t,n,i,o,r){"use strict";function s(e,t,n){if(!n)return new r.FindMatch(e,null);for(var i=[],o=0,s=t.length;o<s;o++)i[o]=t[o];return new r.FindMatch(e,i)}var a=999,u=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n,this.wholeWord=i}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t<n;t++){var i=e.charCodeAt(t);if(92===i){if(t++,t>=n)break;var o=e.charCodeAt(t);if(110===o||114===o)return!0;
}}return!1},e.prototype.parseSearchRequest=function(){if(""===this.searchString)return null;var t;t=this.isRegex?e._isMultilineRegexSource(this.searchString):this.searchString.indexOf("\n")>=0;var i=null;try{i=n.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:this.wholeWord,multiline:t,global:!0})}catch(e){return null}return i?i:null},e}();t.SearchParams=u;var l=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.multiline?this._doFindMatchesMultiline(e,n,r,i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,r){var s;if("\r\n"===e.getEOL()){for(var a=0,u=0;u<i;u++){var l=n.charCodeAt(u);10===l&&a++}s=t+i+a}else s=t+i;var c;if("\r\n"===e.getEOL()){for(var d=0,u=0,h=r.length;u<h;u++){var l=n.charCodeAt(u+i);10===l&&d++}c=s+r.length+d}else c=s+r.length;var p=e.getPositionAt(s),f=e.getPositionAt(c);return new o.Range(p.lineNumber,p.column,f.lineNumber,f.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){for(var a,u=e.getOffsetAt(t.getStartPosition()),l=e.getValueInRange(t,r.EndOfLinePreference.LF),c=[],d=0,h=0,p=0;a=n.exec(l);){var f=u+a.index,g=f+a[0].length;if(d===f&&h===g)return c;if(c[p++]=s(this._getMultilineMatchRange(e,u,l,a.index,a[0]),a,i),p>=o)return c;d=f,h=g}return c},e._doFindMatchesLineByLine=function(e,t,n,i,o){var r=[],s=0;if(t.startLineNumber===t.endLineNumber){var a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(n,a,t.startLineNumber,t.startColumn-1,s,r,i,o),r}var u=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,u,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var l=t.startLineNumber+1;l<t.endLineNumber&&s<o;l++)s=this._findMatchesInLine(n,e.getLineContent(l),l,0,s,r,i,o);if(s<o){var c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);s=this._findMatchesInLine(n,c,t.endLineNumber,0,s,r,i,o)}return r},e._findMatchesInLine=function(e,t,n,i,r,a,u,l){var c;e.lastIndex=0;do if(c=e.exec(t)){var d=new o.Range(n,c.index+1+i,n,c.index+1+c[0].length+i);if(a.length>0&&d.equalsRange(a[a.length-1].range))return r;if(a.push(s(d,c,u)),r++,r>=l)return r;if(c.index+c[0].length===t.length)return r}while(c);return r},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();return o?o.multiline?this._doFindNextMatchMultiline(e,n,o,i):this._doFindNextMatchLineByLine(e,n,o,i):null},e._doFindNextMatchMultiline=function(e,t,n,a){var u=new i.Position(t.lineNumber,1),l=e.getOffsetAt(u),c=e.getLineCount(),d=e.getValueInRange(new o.Range(u.lineNumber,u.column,c,e.getLineMaxColumn(c)),r.EndOfLinePreference.LF);n.lastIndex=t.column-1;var h=n.exec(d);return h?s(this._getMultilineMatchRange(e,l,d,h.index,h[0]),h,a):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.Position(1,1),n,a):null},e._doFindNextMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(n,s,r,t.column,i);if(a)return a;for(var u=1;u<=o;u++){var l=(r+u-1)%o,c=e.getLineContent(l+1),d=this._findFirstMatchInLine(n,c,l+1,1,i);if(d)return d}return null},e._findFirstMatchInLine=function(e,t,n,i,r){e.lastIndex=i-1;var a=e.exec(t);return a?s(new o.Range(n,a.index+1,n,a.index+1+a[0].length),a,r):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();return o?o.multiline?this._doFindPreviousMatchMultiline(e,n,o,i):this._doFindPreviousMatchLineByLine(e,n,o,i):null},e._doFindPreviousMatchMultiline=function(e,t,n,r){var s=this._doFindMatchesMultiline(e,new o.Range(1,1,t.lineNumber,t.column),n,r,10*a);if(s.length>0)return s[s.length-1];var u=e.getLineCount();return t.lineNumber!==u||t.column!==e.getLineMaxColumn(u)?this._doFindPreviousMatchMultiline(e,new i.Position(u,e.getLineMaxColumn(u)),n,r):null},e._doFindPreviousMatchLineByLine=function(e,t,n,i){var o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(n,s,r,i);if(a)return a;for(var u=1;u<=o;u++){var l=(o+r-u-1)%o,c=e.getLineContent(l+1),d=this._findLastMatchInLine(n,c,l+1,i);if(d)return d}return null},e._findLastMatchInLine=function(e,t,n,i){for(var r,a=null;r=e.exec(t);){var u=new o.Range(n,r.index+1,n,r.index+1+r[0].length);if(a&&u.equalsRange(a.range))break;if(a=s(u,r,i),r.index+r[0].length===t.length)break}return a},e}();t.TextModelSearch=l}),define(d[94],h([0,1,25,9,15,3,2,72,507,42,86,506,346]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=999;t.LONG_LINE_BOUNDARY=1e3;var f=function(e){function n(t,i){var o=this;return t.push(s.EventType.ModelRawContentChanged,s.EventType.ModelOptionsChanged,s.EventType.ModelContentChanged2),o=e.call(this,t)||this,o._shouldSimplifyMode=i.length>n.MODEL_SYNC_LIMIT,o._shouldDenyMode=i.length>n.MODEL_TOKENIZATION_LIMIT,o._options=new s.TextModelResolvedOptions(i.options),o._constructLines(i),o._setVersionId(1),o._isDisposed=!1,o._isDisposing=!1,o}return m(n,e),n.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},n.prototype.isTooLargeForHavingAMode=function(){return this._assertNotDisposed(),this._shouldDenyMode},n.prototype.isTooLargeForHavingARichMode=function(){return this._assertNotDisposed(),this._shouldSimplifyMode},n.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},n.prototype.updateOptions=function(e){this._assertNotDisposed();var t="undefined"!=typeof e.tabSize?e.tabSize:this._options.tabSize,n="undefined"!=typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i="undefined"!=typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new s.TextModelResolvedOptions({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var r=this._options.createChangeEvent(o);if(this._options=o,r.tabSize)for(var a=this._options.tabSize,u=0,l=this._lines.length;u<l;u++)this._lines[u].updateTabSize(a);this.emit(s.EventType.ModelOptionsChanged,r)}},n.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=this._lines.map(function(e){return e.text}),i=u.guessIndentation(n,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize})},n._normalizeIndentationFromWhitespace=function(e,t,n){for(var i=0,o=0;o<e.length;o++)"\t"===e.charAt(o)?i+=t:i++;var r="";if(!n){var s=Math.floor(i/t);i%=t;for(var o=0;o<s;o++)r+="\t"}for(var o=0;o<i;o++)r+=" ";return r},n.normalizeIndentation=function(e,t,o){var r=i.firstNonWhitespaceIndex(e);return r===-1&&(r=e.length),n._normalizeIndentationFromWhitespace(e.substring(0,r),t,o)+e.substring(r)},n.prototype.normalizeIndentation=function(e){return this._assertNotDisposed(),n.normalizeIndentation(e,this._options.tabSize,this._options.insertSpaces)},n.prototype.getOneIndent=function(){this._assertNotDisposed();var e=this._options.tabSize,t=this._options.insertSpaces;if(t){for(var n="",i=0;i<e;i++)n+=" ";return n}return"\t"},n.prototype.getVersionId=function(){return this._assertNotDisposed(),this._versionId},n.prototype.mightContainRTL=function(){return this._mightContainRTL},n.prototype.mightContainNonBasicASCII=function(){return this._mightContainNonBasicASCII},n.prototype.getAlternativeVersionId=function(){return this._assertNotDisposed(),this._alternativeVersionId},n.prototype._ensureLineStarts=function(){if(!this._lineStarts){for(var e=this._EOL.length,t=this._lines.length,n=new Uint32Array(t),i=0;i<t;i++)n[i]=this._lines[i].text.length+e;this._lineStarts=new c.PrefixSumComputer(n)}},n.prototype.getOffsetAt=function(e){this._assertNotDisposed();var t=this._validatePosition(e.lineNumber,e.column,!1);return this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(t.lineNumber-2)+t.column-1},n.prototype.getPositionAt=function(e){this._assertNotDisposed(),e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();var t=this._lineStarts.getIndexOf(e),n=this._lines[t.index].text.length;return new o.Position(t.index+1,Math.min(t.remainder+1,n+1))},n.prototype._increaseVersionId=function(){this._setVersionId(this._versionId+1)},n.prototype._setVersionId=function(e){this._versionId=e,this._alternativeVersionId=this._versionId},n.prototype._overwriteAlternativeVersionId=function(e){this._alternativeVersionId=e},n.prototype.isDisposed=function(){return this._isDisposed},n.prototype.dispose=function(){this._isDisposed=!0,this._lines=null,this._EOL=null,this._BOM=null,e.prototype.dispose.call(this)},n.prototype._createContentChangedFlushEvent=function(){return{changeType:s.EventType.ModelRawContentChangedFlush,detail:this.toRawText(),versionId:this._versionId,isUndoing:!1,isRedoing:!1}},n.prototype._emitContentChanged2=function(e,t,n,i,o,a,u,l){var c={range:new r.Range(e,t,n,i),rangeLength:o,text:a,eol:this._EOL,versionId:this.getVersionId(),isUndoing:u,isRedoing:l};this._isDisposing||this.emit(s.EventType.ModelContentChanged2,c)},n.prototype._resetValue=function(e){this._constructLines(e),this._increaseVersionId()},n.prototype.toRawText=function(){return this._assertNotDisposed(),{BOM:this._BOM,EOL:this._EOL,lines:this.getLinesContent(),length:this.getValueLength(),containsRTL:this._mightContainRTL,isBasicASCII:!this._mightContainNonBasicASCII,options:this._options}},n.prototype.equals=function(e){if(this._assertNotDisposed(),this._BOM!==e.BOM)return!1;if(this._EOL!==e.EOL)return!1;if(this._lines.length!==e.lines.length)return!1;for(var t=0,n=this._lines.length;t<n;t++)if(this._lines[t].text!==e.lines[t])return!1;return!0},n.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=null;t=n.toRawText(e,{tabSize:this._options.tabSize,insertSpaces:this._options.insertSpaces,trimAutoWhitespace:this._options.trimAutoWhitespace,detectIndentation:!1,defaultEOL:this._options.defaultEOL}),this.setValueFromRawText(t)}},n.prototype.setValueFromRawText=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._resetValue(e),this._emitModelContentChangedFlushEvent(this._createContentChangedFlushEvent()),this._emitContentChanged2(1,1,i,o,n,this.getValue(),!1,!1)}},n.prototype.getValue=function(e,t){void 0===t&&(t=!1),this._assertNotDisposed();var n=this.getFullModelRange(),i=this.getValueInRange(n,e);return t?this._BOM+i:i},n.prototype.getValueLength=function(e,t){void 0===t&&(t=!1),this._assertNotDisposed();var n=this.getFullModelRange(),i=this.getValueLengthInRange(n,e);return t?this._BOM.length+i:i},n.prototype.getEmptiedValueInRange=function(e,t,n){void 0===t&&(t=""),void 0===n&&(n=s.EndOfLinePreference.TextDefined),this._assertNotDisposed();var i=this.validateRange(e);if(i.isEmpty())return"";if(i.startLineNumber===i.endLineNumber)return this._repeatCharacter(t,i.endColumn-i.startColumn);var o=this._getEndOfLine(n),r=i.startLineNumber-1,a=i.endLineNumber-1,u=[];u.push(this._repeatCharacter(t,this._lines[r].text.length-i.startColumn+1));for(var l=r+1;l<a;l++)u.push(this._repeatCharacter(t,this._lines[l].text.length));return u.push(this._repeatCharacter(t,i.endColumn-1)),u.join(o)},n.prototype._repeatCharacter=function(e,t){for(var n="",i=0;i<t;i++)n+=e;return n},n.prototype.getValueInRange=function(e,t){void 0===t&&(t=s.EndOfLinePreference.TextDefined),this._assertNotDisposed();var n=this.validateRange(e);if(n.isEmpty())return"";if(n.startLineNumber===n.endLineNumber)return this._lines[n.startLineNumber-1].text.substring(n.startColumn-1,n.endColumn-1);var i=this._getEndOfLine(t),o=n.startLineNumber-1,r=n.endLineNumber-1,a=[];a.push(this._lines[o].text.substring(n.startColumn-1));for(var u=o+1;u<r;u++)a.push(this._lines[u].text);return a.push(this._lines[r].text.substring(0,n.endColumn-1)),a.join(i)},n.prototype.getValueLengthInRange=function(e,t){void 0===t&&(t=s.EndOfLinePreference.TextDefined),this._assertNotDisposed();var n=this.validateRange(e);if(n.isEmpty())return 0;if(n.startLineNumber===n.endLineNumber)return n.endColumn-n.startColumn;var i=this.getOffsetAt(new o.Position(n.startLineNumber,n.startColumn)),r=this.getOffsetAt(new o.Position(n.endLineNumber,n.endColumn));return r-i},n.prototype.isDominatedByLongLines=function(){this._assertNotDisposed();var e,n,i,o=0,r=0,s=this._lines;for(e=0,n=this._lines.length;e<n;e++)i=s[e].text.length,i>=t.LONG_LINE_BOUNDARY?r+=i:o+=i;return r>o},n.prototype.getLineCount=function(){return this._assertNotDisposed(),this._lines.length},n.prototype.getLineContent=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text},n.prototype.getIndentLevel=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].getIndentLevel()},n.prototype._resetIndentRanges=function(){this._indentRanges=null},n.prototype._getIndentRanges=function(){return this._indentRanges||(this._indentRanges=d.computeRanges(this)),this._indentRanges},n.prototype.getIndentRanges=function(){this._assertNotDisposed();var e=this._getIndentRanges();return d.IndentRange.deepCloneArr(e)},n.prototype._toValidLineIndentGuide=function(e,t){var n=this._lines[e-1].getIndentLevel();if(n===-1)return t;var i=Math.ceil(n/this._options.tabSize);return Math.min(i,t)},n.prototype.getLineIndentGuide=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");for(var t=this._getIndentRanges(),n=t.length-1;n>=0;n--){var i=t[n];if(i.startLineNumber===e)return this._toValidLineIndentGuide(e,Math.ceil(i.indent/this._options.tabSize));if(i.startLineNumber<e&&e<=i.endLineNumber)return this._toValidLineIndentGuide(e,1+Math.floor(i.indent/this._options.tabSize));if(i.endLineNumber+1===e){for(var o=i.indent;n>0;)n--,i=t[n],i.endLineNumber+1===e&&(o=i.indent);return this._toValidLineIndentGuide(e,Math.ceil(o/this._options.tabSize))}}return 0},n.prototype.getLinesContent=function(){this._assertNotDisposed();for(var e=[],t=0,n=this._lines.length;t<n;t++)e[t]=this._lines[t].text;return e},n.prototype.getEOL=function(){return this._assertNotDisposed(),this._EOL},n.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===s.EndOfLineSequence.CRLF?"\r\n":"\n";if(this._EOL!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._EOL=t,this._lineStarts=null,this._increaseVersionId(),this._emitModelContentChangedFlushEvent(this._createContentChangedFlushEvent()),this._emitContentChanged2(1,1,o,r,i,this.getValue(),!1,!1)}},n.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},n.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].text.length+1},n.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=i.firstNonWhitespaceIndex(this._lines[e-1].text);return t===-1?0:t+1},n.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");var t=i.lastNonWhitespaceIndex(this._lines[e-1].text);return t===-1?0:t+2},n.prototype.validateLineNumber=function(e){return this._assertNotDisposed(),e<1&&(e=1),e>this._lines.length&&(e=this._lines.length),e},n.prototype._validatePosition=function(e,t,n){var r=Math.floor("number"==typeof e?e:1),s=Math.floor("number"==typeof t?t:1);if(r<1)return new o.Position(1,1);if(r>this._lines.length)return new o.Position(this._lines.length,this.getLineMaxColumn(this._lines.length));if(s<=1)return new o.Position(r,1);var a=this.getLineMaxColumn(r);if(s>=a)return new o.Position(r,a);if(n){var u=this._lines[r-1].text.charCodeAt(s-2);if(i.isHighSurrogate(u))return new o.Position(r,s-1)}return new o.Position(r,s)},n.prototype.validatePosition=function(e){return this._assertNotDisposed(),this._validatePosition(e.lineNumber,e.column,!0)},n.prototype.validateRange=function(e){this._assertNotDisposed();var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),o=t.lineNumber,s=t.column,a=n.lineNumber,u=n.column,l=this._lines[o-1].text,c=this._lines[a-1].text,d=s>1?l.charCodeAt(s-2):0,h=u>1&&u<=c.length?c.charCodeAt(u-2):0,p=i.isHighSurrogate(d),f=i.isHighSurrogate(h);return p||f?o===a&&s===u?new r.Range(o,s-1,a,u-1):p&&f?new r.Range(o,s-1,a,u+1):p?new r.Range(o,s-1,a,u):new r.Range(o,s,a,u+1):new r.Range(o,s,a,u)},n.prototype.modifyPosition=function(e,t){return this._assertNotDisposed(),this.getPositionAt(this.getOffsetAt(e)+t)},n.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new r.Range(1,1,e,this.getLineMaxColumn(e))},n.prototype._emitModelContentChangedFlushEvent=function(e){this._isDisposing||this.emit(s.EventType.ModelRawContentChanged,e)},n.toRawText=function(e,t){for(var n=0,o=-1;(o=e.indexOf("\r",o+1))!==-1;)n++;var r=i.containsRTL(e),a=!r&&i.isBasicASCII(e),l=e.split(/\r\n|\r|\n/),c="";i.startsWithUTF8BOM(l[0])&&(c=i.UTF8_BOM_CHARACTER,l[0]=l[0].substr(1));var d=l.length-1,h="";h=0===d?t.defaultEOL===s.DefaultEndOfLine.LF?"\n":"\r\n":n>d/2?"\r\n":"\n";var p;if(t.detectIndentation){var f=u.guessIndentation(l,t.tabSize,t.insertSpaces);p=new s.TextModelResolvedOptions({tabSize:f.tabSize,insertSpaces:f.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}else p=new s.TextModelResolvedOptions({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL});return{BOM:c,EOL:h,lines:l,length:e.length,containsRTL:r,isBasicASCII:a,options:p}},n.prototype._constructLines=function(e){for(var t=e.options.tabSize,n=e.lines,i=[],o=0,r=n.length;o<r;o++)i[o]=new a.ModelLine(o+1,n[o],t);this._BOM=e.BOM,this._mightContainRTL=e.containsRTL,this._mightContainNonBasicASCII=!e.isBasicASCII,this._EOL=e.EOL,this._lines=i,this._lineStarts=null,this._resetIndentRanges()},n.prototype._getEndOfLine=function(e){switch(e){case s.EndOfLinePreference.LF:return"\n";case s.EndOfLinePreference.CRLF:return"\r\n";case s.EndOfLinePreference.TextDefined:return this.getEOL()}throw new Error("Unknown EOL preference")},n.prototype.findMatches=function(e,t,n,i,o,s,a){void 0===a&&(a=p),this._assertNotDisposed();var u;return u=r.Range.isIRange(t)?this.validateRange(t):this.getFullModelRange(),h.TextModelSearch.findMatches(this,new h.SearchParams(e,n,i,o),u,s,a)},n.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return h.TextModelSearch.findNextMatch(this,new h.SearchParams(e,n,i,o),s,r)},n.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);return h.TextModelSearch.findPreviousMatch(this,new h.SearchParams(e,n,i,o),s,r)},n}(n.OrderGuaranteeEventEmitter);f.MODEL_SYNC_LIMIT=5242880,f.MODEL_TOKENIZATION_LIMIT=20971520,f.DEFAULT_CREATION_OPTIONS={tabSize:l.DEFAULT_INDENTATION.tabSize,insertSpaces:l.DEFAULT_INDENTATION.insertSpaces,detectIndentation:!1,defaultEOL:s.DefaultEndOfLine.LF,trimAutoWhitespace:l.DEFAULT_TRIM_AUTO_WHITESPACE},t.TextModel=f;var g=function(){function e(){}return e.fromString=function(e,t){return f.toRawText(e,t)},e.fromStringWithModelOptions=function(e,t){var n=t.getOptions();return f.toRawText(e,{tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:n.trimAutoWhitespace,detectIndentation:!1,defaultEOL:n.defaultEOL})},e}();t.RawText=g}),define(d[41],h([0,1,9,2,94,20,3]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,t,n,i){var o=n.editor;this.tabSize=t.tabSize,this.insertSpaces=t.insertSpaces,this.oneIndent=e,this.pageSize=Math.floor(o.layoutInfo.height/o.fontInfo.lineHeight)-2,this.useTabStops=o.useTabStops,this.wordSeparators=o.wordSeparators,this.autoClosingBrackets=o.autoClosingBrackets,this.autoClosingPairsOpen=i.autoClosingPairsOpen,this.autoClosingPairsClose=i.autoClosingPairsClose,this.surroundingPairs=i.surroundingPairs,this.electricChars=i.electricChars}return e.shouldRecreate=function(e){return e.layoutInfo||e.wordSeparators||e.autoClosingBrackets||e.useTabStops},e.prototype.normalizeIndentation=function(e){return o.TextModel.normalizeIndentation(e,this.tabSize,this.insertSpaces)},e}();t.CursorConfiguration=a;var u=function(){function e(t,n,i,o){this.selectionStart=t,this.selectionStartLeftoverVisibleColumns=n,this.position=i,this.leftoverVisibleColumns=o,this.selection=e._computeSelection(this.selectionStart,this.position)}return e.prototype.equals=function(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)},e.prototype.hasSelection=function(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()},e.prototype.withSelectionStartLeftoverVisibleColumns=function(t){return new e(this.selectionStart,t,this.position,this.leftoverVisibleColumns)},e.prototype.withSelectionStart=function(t){return new e(t,0,this.position,this.leftoverVisibleColumns)},e.prototype.collapse=function(){return new e(new s.Range(this.position.lineNumber,this.position.column,this.position.lineNumber,this.position.column),0,this.position,0)},e.prototype.move=function(t,n,i){return t?new e(this.selectionStart,this.selectionStartLeftoverVisibleColumns,n,i):new e(new s.Range(n.lineNumber,n.column,n.lineNumber,n.column),i,n,i)},e._computeSelection=function(e,t){var n,i,o,s;return e.isEmpty()?(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,s=t.column):t.isBeforeOrEqual(e.getStartPosition())?(n=e.endLineNumber,i=e.endColumn,o=t.lineNumber,s=t.column):(n=e.startLineNumber,i=e.startColumn,o=t.lineNumber,s=t.column),new r.Selection(n,i,o,s)},e}();t.SingleCursorState=u;var l=function(){function e(e,t){this.command=e,this.shouldPushStackElementBefore=t.shouldPushStackElementBefore,this.shouldPushStackElementAfter=t.shouldPushStackElementAfter,this.isAutoWhitespaceCommand=!1,this.shouldRevealHorizontal=!0,this.cursorPositionChangeReason=i.CursorChangeReason.NotSet,"undefined"!=typeof t.isAutoWhitespaceCommand&&(this.isAutoWhitespaceCommand=t.isAutoWhitespaceCommand),"undefined"!=typeof t.shouldRevealHorizontal&&(this.shouldRevealHorizontal=t.shouldRevealHorizontal),"undefined"!=typeof t.cursorPositionChangeReason&&(this.cursorPositionChangeReason=t.cursorPositionChangeReason)}return e}();t.EditOperationResult=l;var c=function(){function e(){}return e.isLowSurrogate=function(e,t,i){var o=e.getLineContent(t);return!(i<0||i>=o.length)&&n.isLowSurrogate(o.charCodeAt(i))},e.isHighSurrogate=function(e,t,i){var o=e.getLineContent(t);return!(i<0||i>=o.length)&&n.isHighSurrogate(o.charCodeAt(i))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var i=e.length;i>t-1&&(i=t-1);for(var o=0,r=0;r<i;r++){var s=e.charCodeAt(r);9===s?o=this.nextTabStop(o,n):o+=1}return o},e.visibleColumnFromColumn2=function(e,t,n){return this.visibleColumnFromColumn(t.getLineContent(n.lineNumber),n.column,e.tabSize)},e.columnFromVisibleColumn=function(e,t,n){if(t<=0)return 1;for(var i=e.length,o=0,r=0;r<i;r++){var s=e.charCodeAt(r),a=void 0;if(a=9===s?this.nextTabStop(o,n):o+1,a>=t){var u=t-o,l=a-t;return l<u?r+2:r+1}o=a}return i+1},e.columnFromVisibleColumn2=function(e,t,n,i){var o=this.columnFromVisibleColumn(t.getLineContent(n),i,e.tabSize),r=t.getLineMinColumn(n);if(o<r)return r;var s=t.getLineMaxColumn(n);return o>s?s:o},e.nextTabStop=function(e,t){return e+t-e%t},e.prevTabStop=function(e,t){return e-1-(e-1)%t},e}();t.CursorColumns=c}),define(d[349],h([0,1,9,41,3,20,38]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1}return e.unshiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n),r=i.CursorColumns.prevTabStop(o,n);return r/n},e.shiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n),r=i.CursorColumns.nextTabStop(o,n);return r/n},e.prototype.getEditOperations=function(t,r){var a=this._selection.startLineNumber,u=this._selection.endLineNumber;1===this._selection.endColumn&&a!==u&&(u-=1);var l,c=this._opts.tabSize,d=this._opts.oneIndent,h=a===u,p=["",d];this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(a))&&(this._useLastEditRangeForCursorEndPosition=!0);var f=0,g=0;for(l=a;l<=u;l++,f=g){g=0;var m=t.getLineContent(l),v=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==v)&&(h||this._opts.isUnshift||0!==m.length)){if(v===-1&&(v=m.length),l>1){var _=i.CursorColumns.visibleColumnFromColumn(m,v+1,c);if(_%c!==0){var y=s.LanguageConfigurationRegistry.getRawEnterActionAtPosition(t,l-1,t.getLineMaxColumn(l-1));if(y){if(g=f,y.appendText)for(var C=0,b=y.appendText.length;C<b&&g<c&&32===y.appendText.charCodeAt(C);C++)g++;y.removeText&&(g=Math.max(0,g-y.removeText));for(var C=0;C<g&&(0!==v&&32===m.charCodeAt(v-1));C++)v--}}}if(!this._opts.isUnshift||0!==v){var w=void 0;w=this._opts.isUnshift?e.unshiftIndentCount(m,v+1,c):e.shiftIndentCount(m,v+1,c);for(var C=p.length;C<=w;C++)p[C]=p[C-1]+d;r.addEditOperation(new o.Range(l,1,l,v+1),p[w])}}}this._selectionId=r.trackSelection(this._selection)},e.prototype.computeCursorState=function(e,t){if(this._useLastEditRangeForCursorEndPosition){var n=t.getInverseEditOperations()[0];return new r.Selection(n.range.endLineNumber,n.range.endColumn,n.range.endLineNumber,n.range.endColumn)}return t.getTrackedSelection(this._selectionId)},e}();t.ShiftCommand=a}),define(d[350],h([0,1,20,15,41]),function(e,t,n,i,o){"use strict";var r=function(){function e(){}return e._columnSelect=function(e,t,r,s,a,u){for(var l=Math.abs(a-r)+1,c=r>a,d=s>u,h=s<u,p=[],f=0;f<l;f++){var g=r+(c?-f:f),m=o.CursorColumns.columnFromVisibleColumn2(e,t,g,s),v=o.CursorColumns.columnFromVisibleColumn2(e,t,g,u),_=o.CursorColumns.visibleColumnFromColumn2(e,t,new i.Position(g,m)),y=o.CursorColumns.visibleColumnFromColumn2(e,t,new i.Position(g,v));if(h){if(_>u)continue;if(y<s)continue}if(d){if(y>s)continue;if(_<u)continue}p.push(new n.Selection(g,m,g,v))}return{viewSelections:p,reversed:c,toLineNumber:a,toVisualColumn:u}},e.columnSelect=function(t,n,i,r,s){var a=o.CursorColumns.visibleColumnFromColumn2(t,n,i);return e._columnSelect(t,n,i.lineNumber,a,r,s)},e.columnSelectLeft=function(e,t,n,i,o){return o>1&&o--,this.columnSelect(e,t,n.selection.getStartPosition(),i,o)},e.columnSelectRight=function(e,t,n,r,s){for(var a=0,u=Math.min(n.position.lineNumber,r),l=Math.max(n.position.lineNumber,r),c=u;c<=l;c++){var d=t.getLineMaxColumn(c),h=o.CursorColumns.visibleColumnFromColumn2(e,t,new i.Position(c,d));a=Math.max(a,h)}return s<a&&s++,this.columnSelect(e,t,n.selection.getStartPosition(),r,s)},e.columnSelectUp=function(e,t,n,i,o,r){var s=i?e.pageSize:1;return o-=s,o<1&&(o=1),this.columnSelect(e,t,n.selection.getStartPosition(),o,r)},e.columnSelectDown=function(e,t,n,i,o,r){var s=i?e.pageSize:1;return o+=s,o>t.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection.getStartPosition(),o,r)},e}();t.ColumnSelection=r}),define(d[96],h([0,1,41,2,15,3]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}return e}();t.CursorPosition=s;var a=function(){function e(e,t,n){this.state=e,this.ensureInEditableRange=t,this.reason=n}return e.fromMove=function(t,n,i,r,s,a,u){return new e(t.move(n,new o.Position(i,r),s),a,u)},e}();t.SingleMoveOperationResult=a;var u=function(){function e(){}return e.left=function(e,t,i,o){return o>t.getLineMinColumn(i)?o-=n.CursorColumns.isLowSurrogate(t,i,o-2)?2:1:i>1&&(i-=1,o=t.getLineMaxColumn(i)),new s(i,o,0)},e.moveLeft=function(t,n,o,r,s){var u,l;if(o.hasSelection()&&!r)u=o.selection.startLineNumber,l=o.selection.startColumn;else{var c=e.left(t,n,o.position.lineNumber,o.position.column-(s-1));u=c.lineNumber,l=c.column}return a.fromMove(o,r,u,l,0,!0,i.CursorChangeReason.Explicit)},e.right=function(e,t,i,o){return o<t.getLineMaxColumn(i)?o+=n.CursorColumns.isHighSurrogate(t,i,o-1)?2:1:i<t.getLineCount()&&(i+=1,o=t.getLineMinColumn(i)),new s(i,o,0)},e.moveRight=function(t,n,o,r,s){var u,l;if(o.hasSelection()&&!r)u=o.selection.endLineNumber,l=o.selection.endColumn;else{var c=e.right(t,n,o.position.lineNumber,o.position.column+(s-1));u=c.lineNumber,l=c.column}return a.fromMove(o,r,u,l,0,!0,i.CursorChangeReason.Explicit)},e.down=function(e,t,i,o,r,a,u){var l=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+r;i+=a;var c=t.getLineCount();return i>c?(i=c,u?o=t.getLineMaxColumn(i):(o=Math.min(t.getLineMaxColumn(i),o),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1))):(o=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),r=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new s(i,o,r)},e.moveDown=function(t,n,o,r,s){var u,l;o.hasSelection()&&!r?(u=o.selection.endLineNumber,l=o.selection.endColumn):(u=o.position.lineNumber,l=o.position.column);var c=e.down(t,n,u,l,o.leftoverVisibleColumns,s,!0);return a.fromMove(o,r,c.lineNumber,c.column,c.leftoverVisibleColumns,!0,i.CursorChangeReason.Explicit)},e.translateDown=function(t,s,u){var l=u.selection,c=e.down(t,s,l.selectionStartLineNumber,l.selectionStartColumn,u.selectionStartLeftoverVisibleColumns,1,!1),d=e.down(t,s,l.positionLineNumber,l.positionColumn,u.leftoverVisibleColumns,1,!1),h=new n.SingleCursorState(new r.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new o.Position(d.lineNumber,d.column),d.leftoverVisibleColumns);return new a(h,!0,i.CursorChangeReason.Explicit)},e.up=function(e,t,i,o,r,a,u){var l=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+r;return i-=a,i<1?(i=1,u?o=t.getLineMinColumn(i):(o=Math.min(t.getLineMaxColumn(i),o),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1))):(o=n.CursorColumns.columnFromVisibleColumn2(e,t,i,l),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),r=l-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new s(i,o,r)},e.moveUp=function(t,n,o,r,s){var u,l;o.hasSelection()&&!r?(u=o.selection.startLineNumber,l=o.selection.startColumn):(u=o.position.lineNumber,l=o.position.column);var c=e.up(t,n,u,l,o.leftoverVisibleColumns,s,!0);return a.fromMove(o,r,c.lineNumber,c.column,c.leftoverVisibleColumns,!0,i.CursorChangeReason.Explicit)},e.translateUp=function(t,s,u){var l=u.selection,c=e.up(t,s,l.selectionStartLineNumber,l.selectionStartColumn,u.selectionStartLeftoverVisibleColumns,1,!1),d=e.up(t,s,l.positionLineNumber,l.positionColumn,u.leftoverVisibleColumns,1,!1),h=new n.SingleCursorState(new r.Range(c.lineNumber,c.column,c.lineNumber,c.column),c.leftoverVisibleColumns,new o.Position(d.lineNumber,d.column),d.leftoverVisibleColumns);return new a(h,!0,i.CursorChangeReason.Explicit)},e.moveToBeginningOfLine=function(e,t,n,o){var r,s=n.position.lineNumber,u=t.getLineMinColumn(s),l=t.getLineFirstNonWhitespaceColumn(s)||u,c=n.position.column;return r=c===l?u:l,a.fromMove(n,o,s,r,0,!0,i.CursorChangeReason.Explicit)},e.moveToEndOfLine=function(e,t,n,o){var r=n.position.lineNumber,s=t.getLineMaxColumn(r);return a.fromMove(n,o,r,s,0,!0,i.CursorChangeReason.Explicit)},e.moveToBeginningOfBuffer=function(e,t,n,o){return a.fromMove(n,o,1,1,0,!0,i.CursorChangeReason.Explicit)},e.moveToEndOfBuffer=function(e,t,n,o){var r=t.getLineCount(),s=t.getLineMaxColumn(r);return a.fromMove(n,o,r,s,0,!0,i.CursorChangeReason.Explicit)},e}();t.MoveOperations=u}),define(d[172],h([0,1,54,41,3,96,9]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(){}
return e.deleteRight=function(e,t,s){var a=s.selection;if(a.isEmpty()){var u=s.position,l=r.MoveOperations.right(e,t,u.lineNumber,u.column);a=new o.Range(l.lineNumber,l.column,u.lineNumber,u.column)}if(a.isEmpty())return null;var c=!1;return a.startLineNumber!==a.endLineNumber&&(c=!0),new i.EditOperationResult(new n.ReplaceCommand(a,""),{shouldPushStackElementBefore:c,shouldPushStackElementAfter:!1})},e.autoClosingPairDelete=function(e,t,r){if(!e.autoClosingBrackets)return null;if(!r.selection.isEmpty())return null;var s=r.position,a=t.getLineContent(s.lineNumber),u=a[s.column-2];if(!e.autoClosingPairsOpen.hasOwnProperty(u))return null;var l=a[s.column-1],c=e.autoClosingPairsOpen[u];if(l!==c)return null;var d=new o.Range(s.lineNumber,s.column-1,s.lineNumber,s.column+1);return new i.EditOperationResult(new n.ReplaceCommand(d,""),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})},e.deleteLeft=function(e,t,a){var u=this.autoClosingPairDelete(e,t,a);if(u)return u;var l=a.selection;if(l.isEmpty()){var c=a.position;if(e.useTabStops&&c.column>1){var d=t.getLineContent(c.lineNumber),h=s.firstNonWhitespaceIndex(d),p=h===-1?d.length+1:h+1;if(c.column<=p){var f=i.CursorColumns.visibleColumnFromColumn2(e,t,c),g=i.CursorColumns.prevTabStop(f,e.tabSize),m=i.CursorColumns.columnFromVisibleColumn2(e,t,c.lineNumber,g);l=new o.Range(c.lineNumber,m,c.lineNumber,c.column)}else l=new o.Range(c.lineNumber,c.column-1,c.lineNumber,c.column)}else{var v=r.MoveOperations.left(e,t,c.lineNumber,c.column);l=new o.Range(v.lineNumber,v.column,c.lineNumber,c.column)}}if(l.isEmpty())return null;var _=!1;return l.startLineNumber!==l.endLineNumber&&(_=!0),new i.EditOperationResult(new n.ReplaceCommand(l,""),{shouldPushStackElementBefore:_,shouldPushStackElementAfter:!1})},e.cut=function(e,t,r,s){var a=r.selection;if(a.isEmpty()){if(s){var u=r.position,l=void 0,c=void 0,d=void 0,h=void 0;u.lineNumber<t.getLineCount()?(l=u.lineNumber,c=1,d=u.lineNumber+1,h=1):u.lineNumber>1?(l=u.lineNumber-1,c=t.getLineMaxColumn(u.lineNumber-1),d=u.lineNumber,h=t.getLineMaxColumn(u.lineNumber)):(l=u.lineNumber,c=1,d=u.lineNumber,h=t.getLineMaxColumn(u.lineNumber));var p=new o.Range(l,c,d,h);return p.isEmpty()?null:new i.EditOperationResult(new n.ReplaceCommand(p,""),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}return null}return this.deleteRight(e,t,r)},e}();t.DeleteOperations=a}),define(d[353],h([0,1,10,54,41,3,2,9,349,38,65,479]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";var h=function(){function e(){}return e.indent=function(e,t,n){return new o.EditOperationResult(new u.ShiftCommand(n.selection,{isUnshift:!1,tabSize:e.tabSize,oneIndent:e.oneIndent}),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,shouldRevealHorizontal:!1})},e.outdent=function(e,t,n){return new o.EditOperationResult(new u.ShiftCommand(n.selection,{isUnshift:!0,tabSize:e.tabSize,oneIndent:e.oneIndent}),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,shouldRevealHorizontal:!1})},e.shiftIndent=function(e,t,n){n=n||1;for(var i=u.ShiftCommand.shiftIndentCount(t,t.length+n,e.tabSize),o="",r=0;r<i;r++)o+="\t";return o},e.unshiftIndent=function(e,t,n){n=n||1;for(var i=u.ShiftCommand.unshiftIndentCount(t,t.length+n,e.tabSize),o="",r=0;r<i;r++)o+="\t";return o},e.paste=function(e,t,n,a,u){var l=n.position,c=n.selection;if(u&&a.indexOf("\n")!==a.length-1&&(u=!1),u&&c.startLineNumber!==c.endLineNumber&&(u=!1),u&&c.startColumn===t.getLineMinColumn(c.startLineNumber)&&c.endColumn===t.getLineMaxColumn(c.startLineNumber)&&(u=!1),u){var d=new r.Range(l.lineNumber,1,l.lineNumber,1);return new o.EditOperationResult(new i.ReplaceCommand(d,a),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,cursorPositionChangeReason:s.CursorChangeReason.Paste})}return new o.EditOperationResult(new i.ReplaceCommand(c,a),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0,cursorPositionChangeReason:s.CursorChangeReason.Paste})},e._goodIndentForLine=function(t,n,i){var o=l.LanguageConfigurationRegistry.getGoodIndentActionForLine(n,i);if(o){if(o.action){var r=o.indentation;return o.action===c.IndentAction.Indent&&(r=e.shiftIndent(t,r)),o.action===c.IndentAction.Outdent&&(r=e.unshiftIndent(t,r)),r=t.normalizeIndentation(r),0===r.length?"":r}return o.indentation}return null},e._replaceJumpToNextIndent=function(e,t,n){var r="",s=n.getStartPosition();if(e.insertSpaces)for(var a=o.CursorColumns.visibleColumnFromColumn2(e,t,s),u=e.tabSize,l=u-a%u,c=0;c<l;c++)r+=" ";else r="\t";return new i.ReplaceCommand(n,r)},e.tab=function(e,t,n){var s=n.selection;if(s.isEmpty()){var u=t.getLineContent(s.startLineNumber);if(/^\s*$/.test(u)){var l=this._goodIndentForLine(e,t,s.startLineNumber);l=l||"\t";var c=e.normalizeIndentation(l);if(!a.startsWith(u,c)){var d=new i.ReplaceCommand(new r.Range(s.startLineNumber,1,s.startLineNumber,u.length+1),c);return new o.EditOperationResult(d,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1,isAutoWhitespaceCommand:!0})}}return new o.EditOperationResult(this._replaceJumpToNextIndent(e,t,s),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1,isAutoWhitespaceCommand:!0})}if(s.startLineNumber===s.endLineNumber){var h=t.getLineMaxColumn(s.startLineNumber);if(1!==s.startColumn||s.endColumn!==h)return new o.EditOperationResult(this._replaceJumpToNextIndent(e,t,s),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})}return this.indent(e,t,n)},e.replacePreviousChar=function(e,t,n,s,a){var u=n.position,l=Math.max(1,u.column-a),c=new r.Range(u.lineNumber,l,u.lineNumber,u.column);return new o.EditOperationResult(new i.ReplaceCommand(c,s),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})},e.typeCommand=function(e,t,n){return n?new i.ReplaceCommandWithoutChangingPosition(e,t):new i.ReplaceCommand(e,t)},e._enter=function(t,n,s,a){var u=l.LanguageConfigurationRegistry.getEnterAction(n,a),d=u.enterAction,h=u.indentation,p="";if(!u.ignoreCurrentLine){var f=this._goodIndentForLine(t,n,a.startLineNumber);if(null!==f&&f===u.indentation){d.outdentCurrentLine&&(f=e.unshiftIndent(t,f));var g=n.getLineContent(a.startLineNumber);t.normalizeIndentation(f)!==t.normalizeIndentation(h)&&(p=t.normalizeIndentation(f)+g.substring(h.length,a.startColumn-1),h=f,a=new r.Range(a.startLineNumber,1,a.endLineNumber,a.endColumn))}}d.removeText&&(h=h.substring(0,h.length-d.removeText));var m;if(d.indentAction===c.IndentAction.None)m=e.typeCommand(a,p+"\n"+t.normalizeIndentation(h+d.appendText),s);else if(d.indentAction===c.IndentAction.Indent)m=e.typeCommand(a,p+"\n"+t.normalizeIndentation(h+d.appendText),s);else if(d.indentAction===c.IndentAction.IndentOutdent){var v=t.normalizeIndentation(h),_=t.normalizeIndentation(h+d.appendText),y=p+"\n"+_+"\n"+v;m=s?new i.ReplaceCommandWithoutChangingPosition(a,y):new i.ReplaceCommandWithOffsetCursorState(a,y,-1,_.length-v.length)}else if(d.indentAction===c.IndentAction.Outdent){var C=e.unshiftIndent(t,h);m=e.typeCommand(a,p+"\n"+t.normalizeIndentation(C+d.appendText),s)}return new o.EditOperationResult(m,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1,isAutoWhitespaceCommand:!0})},e._typeInterceptorEnter=function(t,n,i,o){return"\n"!==o?null:e._enter(t,n,!1,i.selection)},e._typeInterceptorAutoClosingCloseChar=function(e,t,n,s){if(!e.autoClosingBrackets)return null;var a=n.selection;if(!a.isEmpty()||!e.autoClosingPairsClose.hasOwnProperty(s))return null;var u=n.position,l=t.getLineContent(u.lineNumber),c=l.charAt(u.column-1);if(c!==s)return null;var d=new r.Range(u.lineNumber,u.column,u.lineNumber,u.column+1);return new o.EditOperationResult(new i.ReplaceCommand(d,s),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})},e._typeInterceptorAutoClosingOpenChar=function(e,t,r,s){if(!e.autoClosingBrackets)return null;var a=r.selection;if(!a.isEmpty()||!e.autoClosingPairsOpen.hasOwnProperty(s))return null;var u=r.position,c=t.getLineContent(u.lineNumber),d=c.charAt(u.column-1);if(d){var h=!1;for(var p in e.autoClosingPairsClose)if(d===p){h=!0;break}if(!h&&!/\s/.test(d))return null}var f=t.getLineTokens(u.lineNumber,!1),g=!1;try{g=l.LanguageConfigurationRegistry.shouldAutoClosePair(s,f,u.column)}catch(e){n.onUnexpectedError(e)}if(!g)return null;var m=e.autoClosingPairsOpen[s];return new o.EditOperationResult(new i.ReplaceCommandWithOffsetCursorState(a,s+m,0,-m.length),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e._typeInterceptorSurroundSelection=function(e,t,n,i){if(!e.autoClosingBrackets)return null;var r=n.selection;if(r.isEmpty()||!e.surroundingPairs.hasOwnProperty(i))return null;for(var s=!0,a=r.startLineNumber;a<=r.endLineNumber;a++)for(var u=t.getLineContent(a),l=a===r.startLineNumber?r.startColumn-1:0,c=a===r.endLineNumber?r.endColumn-1:u.length,h=l;h<c;h++){var p=u.charCodeAt(h);9!==p&&32!==p&&(s=!1,a=r.endLineNumber+1,h=c)}if(s)return null;var f=e.surroundingPairs[i];return new o.EditOperationResult(new d.SurroundSelectionCommand(r,i,f),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e._typeInterceptorElectricChar=function(e,t,s,u){if(!e.electricChars.hasOwnProperty(u))return null;var c,d=s.position,h=t.getLineTokens(d.lineNumber,!1);try{c=l.LanguageConfigurationRegistry.onElectricCharacter(u,h,d.column)}catch(e){n.onUnexpectedError(e)}if(!c)return null;if(c.appendText)return new o.EditOperationResult(new i.ReplaceCommandWithOffsetCursorState(s.selection,u+c.appendText,0,-c.appendText.length),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0});if(c.matchOpenBracket){var p=(h.getLineContent()+u).lastIndexOf(c.matchOpenBracket)+1,f=t.findMatchingBracketUp(c.matchOpenBracket,{lineNumber:d.lineNumber,column:p});if(f){if(f.startLineNumber===d.lineNumber)return null;var g=t.getLineContent(f.startLineNumber),m=a.getLeadingWhitespace(g),v=e.normalizeIndentation(m),_=t.getLineContent(d.lineNumber),y=t.getLineFirstNonWhitespaceColumn(d.lineNumber)||d.column,C=_.substring(y-1,d.column-1),b=v+C+u,w=new r.Range(d.lineNumber,1,d.lineNumber,d.column);return new o.EditOperationResult(new i.ReplaceCommand(w,b),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null},e.typeWithInterceptors=function(e,t,n,i){var o=null;return o=o||this._typeInterceptorEnter(e,t,n,i),o=o||this._typeInterceptorAutoClosingCloseChar(e,t,n,i),o=o||this._typeInterceptorAutoClosingOpenChar(e,t,n,i),o=o||this._typeInterceptorSurroundSelection(e,t,n,i),o=o||this._typeInterceptorElectricChar(e,t,n,i),o=o||this.typeWithoutInterceptors(e,t,n,i)},e.typeWithoutInterceptors=function(t,n,i,r){return new o.EditOperationResult(e.typeCommand(i.selection,r,!1),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})},e.lineInsertBefore=function(e,t,n){var s=n.position.lineNumber;if(1===s)return new o.EditOperationResult(new i.ReplaceCommandWithoutChangingPosition(new r.Range(1,1,1,1),"\n"),{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0});s--;var a=t.getLineMaxColumn(s);return this._enter(e,t,!1,new r.Range(s,a,s,a))},e.lineInsertAfter=function(e,t,n){var i=n.position,o=t.getLineMaxColumn(i.lineNumber);return this._enter(e,t,!1,new r.Range(i.lineNumber,o,i.lineNumber,o))},e.lineBreakInsert=function(e,t,n){return this._enter(e,t,!0,n.selection)},e}();t.TypeOperations=h}),define(d[173],h([0,1,41,15,69,96,2,172,9,3,54]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e(n)),t[n]}}var h;!function(e){e[e.None=0]="None",e[e.Regular=1]="Regular",e[e.Separator=2]="Separator"}(h=t.WordType||(t.WordType={}));var p;!function(e){e[e.Regular=0]="Regular",e[e.Whitespace=1]="Whitespace",e[e.WordSeparator=2]="WordSeparator"}(p||(p={}));var f;!function(e){e[e.WordStart=0]="WordStart",e[e.WordEnd=1]="WordEnd"}(f=t.WordNavigationType||(t.WordNavigationType={}));var g=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i<o;i++)n.set(t.charCodeAt(i),2);return n.set(32,1),n.set(9,1),n}return m(t,e),t}(o.CharacterClassifier),v=d(function(e){return new g(e)}),_=function(){function e(){}return e._createWord=function(e,t,n,i){return{start:n,end:i,wordType:t}},e.findPreviousWordOnLine=function(e,t,n){var i=v(e.wordSeparators),o=t.getLineContent(n.lineNumber);return this._findPreviousWordOnLine(o,i,n)},e._findPreviousWordOnLine=function(e,t,n){for(var i=0,o=n.column-2;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1));i=2}else if(1===s&&0!==i)return this._createWord(e,i,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r<o;r++){var s=e.charCodeAt(r),a=t.get(s);if(1===a)return r;if(1===n&&2===a)return r;if(2===n&&0===a)return r}return o},e.findNextWordOnLine=function(e,t,n){var i=v(e.wordSeparators),o=t.getLineContent(n.lineNumber);return this._findNextWordOnLine(o,i,n)},e._findNextWordOnLine=function(e,t,n){for(var i=0,o=e.length,r=n.column-1;r<o;r++){var s=e.charCodeAt(r),a=t.get(s);if(0===a){if(2===i)return this._createWord(e,i,this._findStartOfWord(e,t,i,r-1),r);i=1}else if(2===a){if(1===i)return this._createWord(e,i,this._findStartOfWord(e,t,i,r-1),r);i=2}else if(1===a&&0!==i)return this._createWord(e,i,this._findStartOfWord(e,t,i,r-1),r)}return 0!==i?this._createWord(e,i,this._findStartOfWord(e,t,i,o-1),o):null},e._findStartOfWord=function(e,t,n,i){for(var o=i;o>=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(1===s)return o+1;if(1===n&&2===s)return o+1;if(2===n&&0===s)return o+1}return 0},e.moveWordLeft=function(t,n,o,a,u){var l=o.position,c=l.lineNumber,d=l.column;1===d&&c>1&&(c-=1,d=n.getLineMaxColumn(c));var h=e.findPreviousWordOnLine(t,n,new i.Position(c,d));return 0===u?d=h?h.start+1:1:(h&&d<=h.end+1&&(h=e.findPreviousWordOnLine(t,n,new i.Position(c,h.start+1))),d=h?h.end+1:1),r.SingleMoveOperationResult.fromMove(o,a,c,d,0,!0,s.CursorChangeReason.Explicit)},e.moveWordRight=function(t,n,o,a,u){var l=o.position,c=l.lineNumber,d=l.column;d===n.getLineMaxColumn(c)&&c<n.getLineCount()&&(c+=1,d=1);var h=e.findNextWordOnLine(t,n,new i.Position(c,d));return 1===u?d=h?h.end+1:n.getLineMaxColumn(c):(h&&d>=h.start+1&&(h=e.findNextWordOnLine(t,n,new i.Position(c,h.end+1))),d=h?h.start+1:n.getLineMaxColumn(c)),r.SingleMoveOperationResult.fromMove(o,a,c,d,0,!0,s.CursorChangeReason.Explicit)},e._deleteWordLeftWhitespace=function(e,t,i){var o=i.position,r=t.getLineContent(o.lineNumber),s=o.column-2,a=u.lastNonWhitespaceIndex(r,s);if(a+1<s){var d=new l.Range(o.lineNumber,a+2,o.lineNumber,o.column);return new n.EditOperationResult(new c.ReplaceCommand(d,""),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})}return null},e.deleteWordLeft=function(t,o,r,s,u){var d=a.DeleteOperations.autoClosingPairDelete(t,o,r);if(d)return d;var h=r.selection;if(h.isEmpty()){var p=r.position,f=p.lineNumber,g=p.column;if(1===f&&1===g)return null;if(s){var m=this._deleteWordLeftWhitespace(t,o,r);if(m)return m}var v=e.findPreviousWordOnLine(t,o,p);0===u?g=v?v.start+1:1:(v&&g<=v.end+1&&(v=e.findPreviousWordOnLine(t,o,new i.Position(f,v.start+1))),g=v?v.end+1:1);var _=new l.Range(f,g,f,p.column);if(!_.isEmpty())return new n.EditOperationResult(new c.ReplaceCommand(_,""),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})}return a.DeleteOperations.deleteLeft(t,o,r)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i<n;i++){var o=e.charAt(i);if(" "!==o&&"\t"!==o)return i}return n},e._deleteWordRightWhitespace=function(e,t,i){var o=i.position,r=t.getLineContent(o.lineNumber),s=o.column-1,a=this._findFirstNonWhitespaceChar(r,s);if(s+1<a){var u=new l.Range(o.lineNumber,o.column,o.lineNumber,a+1);return new n.EditOperationResult(new c.ReplaceCommand(u,""),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})}return null},e.deleteWordRight=function(t,o,r,s,u){var d=r.selection;if(d.isEmpty()){var h=r.position,p=h.lineNumber,f=h.column,g=o.getLineCount(),m=o.getLineMaxColumn(p);if(p===g&&f===m)return null;if(s){var v=this._deleteWordRightWhitespace(t,o,r);if(v)return v}var _=e.findNextWordOnLine(t,o,h);1===u?_?f=_.end+1:f<m||p===g?f=m:(p++,_=e.findNextWordOnLine(t,o,new i.Position(p,1)),f=_?_.start+1:o.getLineMaxColumn(p)):(_&&f>=_.start+1&&(_=e.findNextWordOnLine(t,o,new i.Position(p,_.end+1))),_?f=_.start+1:f<m||p===g?f=m:(p++,_=e.findNextWordOnLine(t,o,new i.Position(p,1)),f=_?_.start+1:o.getLineMaxColumn(p)));var y=new l.Range(p,f,h.lineNumber,h.column);if(!y.isEmpty())return new n.EditOperationResult(new c.ReplaceCommand(y,""),{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1})}return a.DeleteOperations.deleteRight(t,o,r)},e.word=function(t,o,a,u,c){var d=e.findPreviousWordOnLine(t,o,c),h=d&&1===d.wordType&&d.start<c.column-1&&c.column-1<=d.end,p=e.findNextWordOnLine(t,o,c),f=p&&1===p.wordType&&p.start<c.column-1&&c.column-1<=p.end;if(!u||!a.hasSelection()){var g,m;return h?(g=d.start+1,m=d.end+1):f?(g=p.start+1,m=p.end+1):(g=d?d.end+1:1,m=p?p.start+1:o.getLineMaxColumn(c.lineNumber)),new r.SingleMoveOperationResult(new n.SingleCursorState(new l.Range(c.lineNumber,g,c.lineNumber,m),0,new i.Position(c.lineNumber,m),0),!1,s.CursorChangeReason.Explicit)}var v,_;h?(v=d.start+1,_=d.end+1):f?(v=p.start+1,_=p.end+1):(v=c.column,_=c.column);var y,C=c.lineNumber;if(c.isBeforeOrEqual(a.selectionStart.getStartPosition())){y=v;var b=new i.Position(C,y);a.selectionStart.containsPosition(b)&&(y=a.selectionStart.endColumn)}else{y=_;var b=new i.Position(C,y);a.selectionStart.containsPosition(b)&&(y=a.selectionStart.startColumn)}return r.SingleMoveOperationResult.fromMove(a,a.hasSelection(),C,y,0,!1,s.CursorChangeReason.Explicit)},e}();t.WordOperations=_}),define(d[126],h([0,1,10,41,15,3,20,2,96,173]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function e(e,t,n,i){this.modelState=e,this.viewState=t,this.ensureInEditableRange=n,this.reason=i}return e}();t.MoveOperationResult=c;var d=function(){function e(e,t,n,s){var a=this;this.model=e,this.configuration=t,this.modeConfiguration=n,this.viewModelHelper=s,this.viewModel=this.viewModelHelper.viewModel,this._recreateCursorConfig(),this._modelOptionsListener=e.onDidChangeOptions(function(){return a._recreateCursorConfig()}),this._configChangeListener=this.configuration.onDidChange(function(e){i.CursorConfiguration.shouldRecreate(e)&&a._recreateCursorConfig()}),this._setState(new i.SingleCursorState(new r.Range(1,1,1,1),0,new o.Position(1,1),0),new i.SingleCursorState(new r.Range(1,1,1,1),0,new o.Position(1,1),0),!1)}return e.prototype.ensureValidState=function(){this._setState(this.modelState,this.viewState,!1)},e.prototype._recreateCursorConfig=function(){this.config=new i.CursorConfiguration(this.model.getOneIndent(),this.model.getOptions(),this.configuration,this.modeConfiguration)},e.prototype._ensureInEditableRange=function(e){var t=this.model.getEditableRange();return e.lineNumber<t.startLineNumber||e.lineNumber===t.startLineNumber&&e.column<t.startColumn?new o.Position(t.startLineNumber,t.startColumn):e.lineNumber>t.endLineNumber||e.lineNumber===t.endLineNumber&&e.column>t.endColumn?new o.Position(t.endLineNumber,t.endColumn):e},e.prototype._setState=function(e,t,n){var o=this.model.validateRange(e.selectionStart),r=e.selectionStart.equalsRange(o)?e.selectionStartLeftoverVisibleColumns:0,s=this.model.validatePosition(e.position);n&&(s=this._ensureInEditableRange(s));var a=e.position.equals(s)?e.leftoverVisibleColumns:0;e=new i.SingleCursorState(o,r,s,a);var u=this.viewModelHelper.validateViewRange(t.selectionStart,e.selectionStart),l=this.viewModelHelper.validateViewPosition(t.position,e.position);t=new i.SingleCursorState(u,r,l,a),this.modelState&&this.viewState&&this.modelState.equals(e)&&this.viewState.equals(t)||(this.modelState=e,this.viewState=t,this._selStartMarker=this._ensureMarker(this._selStartMarker,this.modelState.selection.startLineNumber,this.modelState.selection.startColumn,!0),this._selEndMarker=this._ensureMarker(this._selEndMarker,this.modelState.selection.endLineNumber,this.modelState.selection.endColumn,!1))},e.prototype._ensureMarker=function(e,t,n,i){return e?(this.model._changeMarker(e,t,n),this.model._changeMarkerStickiness(e,i),e):this.model._addMarker(0,t,n,i)},e.prototype.saveState=function(){return{selectionStart:this.modelState.selectionStart,viewSelectionStart:this.viewState.selectionStart,position:this.modelState.position,viewPosition:this.viewState.position,leftoverVisibleColumns:this.modelState.leftoverVisibleColumns,selectionStartLeftoverVisibleColumns:this.modelState.selectionStartLeftoverVisibleColumns}},e.prototype.restoreState=function(e){var t,n=this.model.validatePosition(e.position);t=e.selectionStart?this.model.validateRange(e.selectionStart):new r.Range(n.lineNumber,n.column,n.lineNumber,n.column);var s,a=this.viewModelHelper.validateViewPosition(new o.Position(e.viewPosition.lineNumber,e.viewPosition.column),n);s=e.viewSelectionStart?this.viewModelHelper.validateViewRange(new r.Range(e.viewSelectionStart.startLineNumber,e.viewSelectionStart.startColumn,e.viewSelectionStart.endLineNumber,e.viewSelectionStart.endColumn),t):this.viewModelHelper.convertModelRangeToViewRange(t),this._setState(new i.SingleCursorState(t,e.selectionStartLeftoverVisibleColumns,n,e.leftoverVisibleColumns),new i.SingleCursorState(s,e.selectionStartLeftoverVisibleColumns,a,e.leftoverVisibleColumns),!1)},e.prototype.updateModeConfiguration=function(e){this.modeConfiguration=e,this._recreateCursorConfig()},e.prototype.duplicate=function(){var t=new e(this.model,this.configuration,this.modeConfiguration,this.viewModelHelper);return t._setState(this.modelState,this.viewState,!1),t},e.prototype.dispose=function(){this._modelOptionsListener.dispose(),this._configChangeListener.dispose(),this.model._removeMarker(this._selStartMarker),this.model._removeMarker(this._selEndMarker)},e.prototype.setSelection=function(e,t){void 0===t&&(t=null);var n,s,a=this.model.validatePosition({lineNumber:e.positionLineNumber,column:e.positionColumn}),u=this.model.validatePosition({lineNumber:e.selectionStartLineNumber,column:e.selectionStartColumn});t?(n=this.viewModelHelper.validateViewPosition(new o.Position(t.positionLineNumber,t.positionColumn),a),s=this.viewModelHelper.validateViewPosition(new o.Position(t.selectionStartLineNumber,t.selectionStartColumn),u)):(n=this.viewModelHelper.convertModelPositionToViewPosition(a.lineNumber,a.column),s=this.viewModelHelper.convertModelPositionToViewPosition(u.lineNumber,u.column)),this._setState(new i.SingleCursorState(new r.Range(u.lineNumber,u.column,u.lineNumber,u.column),0,a,0),new i.SingleCursorState(new r.Range(s.lineNumber,s.column,s.lineNumber,s.column),0,n,0),!1)},e.prototype.setSelectionStart=function(e){this._setState(this.modelState.withSelectionStart(e),this.viewState.withSelectionStart(this.viewModelHelper.convertModelRangeToViewRange(e)),!1)},e.prototype.collapseSelection=function(){this._setState(this.modelState.collapse(),this.viewState.collapse(),!1)},e.prototype.moveModelPosition=function(e,t,n,i,o){var r=this.viewModelHelper.convertModelPositionToViewPosition(t,n);this._move(e,t,n,r.lineNumber,r.column,i,o)},e.prototype.moveViewPosition=function(e,t,n,i,o){var r=this.viewModelHelper.convertViewToModelPosition(t,n);this._move(e,r.lineNumber,r.column,t,n,i,o)},e.prototype._move=function(e,t,n,i,r,s,a){this._setState(this.modelState.move(e,new o.Position(t,n),s),this.viewState.move(e,new o.Position(i,r),s),a)},e.prototype.setState=function(e,t,n){this._setState(e,t,n)},e.prototype.beginRecoverSelectionFromMarkers=function(){var e=this.model._getMarker(this._selStartMarker),t=this.model._getMarker(this._selEndMarker);return this.modelState.selection.getDirection()===s.SelectionDirection.LTR?new s.Selection(e.lineNumber,e.column,t.lineNumber,t.column):new s.Selection(t.lineNumber,t.column,e.lineNumber,e.column)},e.prototype.endRecoverSelectionFromMarkers=function(e,t){e.cursorPositionChangeReason=a.CursorChangeReason.RecoverFromMarkers,e.shouldPushStackElementBefore=!0,e.shouldPushStackElementAfter=!0,e.shouldReveal=!1,e.shouldRevealHorizontal=!1;var n=new r.Range(t.selectionStartLineNumber,t.selectionStartColumn,t.selectionStartLineNumber,t.selectionStartColumn),s=new o.Position(t.positionLineNumber,t.positionColumn),u=this.viewModelHelper.convertModelRangeToViewRange(n),l=this.viewModelHelper.convertViewToModelPosition(s.lineNumber,s.column);return this._setState(new i.SingleCursorState(n,0,s,0),new i.SingleCursorState(u,0,l,0),!1),!0},e.prototype.setSelectionStartLeftoverVisibleColumns=function(e){this._setState(this.modelState.withSelectionStartLeftoverVisibleColumns(e),this.viewState.withSelectionStartLeftoverVisibleColumns(e),!1)},e.prototype.validatePosition=function(e){return this.model.validatePosition(e)},e.prototype.validateViewPosition=function(e,t,n){return this.viewModelHelper.validateViewPosition(new o.Position(e,t),n)},e.prototype.convertViewSelectionToModelSelection=function(e){return this.viewModelHelper.convertViewSelectionToModelSelection(e)},e.prototype.convertViewToModelPosition=function(e,t){return this.viewModelHelper.convertViewToModelPosition(e,t)},e.prototype.convertModelPositionToViewPosition=function(e,t){return this.viewModelHelper.convertModelPositionToViewPosition(e,t)},e.prototype.getRangeToRevealModelLinesBeforeViewPortTop=function(e){var t,n=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport();t=this.model.getLineMinColumn(n.startLineNumber)!==n.startColumn?n.startLineNumber:n.startLineNumber-1,t-=e-1,t=this.model.validateRange({startLineNumber:t,startColumn:1,endLineNumber:t,endColumn:1}).startLineNumber;var i=this.model.getLineMinColumn(t),o=this.model.getLineMaxColumn(n.startLineNumber);return new r.Range(t,i,t,o)},e.prototype.getRangeToRevealModelLinesAfterViewPortBottom=function(e){var t=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport(),n=t.endLineNumber+(e-1);n=this.model.validateRange({startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:1}).startLineNumber;var i=this.model.getLineMinColumn(n),o=this.model.getLineMaxColumn(n);return new r.Range(n,i,n,o)},e.prototype.getLineFromViewPortTop=function(e){void 0===e&&(e=1);var t=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport(),n=this.model.getLineMinColumn(t.startLineNumber),i=t.startColumn===n?t.startLineNumber:t.startLineNumber+1;return i=i+e-1,i>t.endLineNumber?t.endLineNumber:i},e.prototype.getCenterLineInViewPort=function(){return Math.round((this.getLineFromViewPortTop()+this.getLineFromViewPortBottom()-1)/2)},e.prototype.getLineFromViewPortBottom=function(e){void 0===e&&(e=1);var t=this.viewModelHelper.getCurrentCompletelyVisibleModelLinesRangeInViewport(),n=t.endLineNumber-(e-1);return n>t.startLineNumber?n:this.getLineFromViewPortTop()},e.prototype.isLastLineVisibleInViewPort=function(){return this.viewModel.getLineCount()<=this.getCompletelyVisibleViewLinesRangeInViewport().getEndPosition().lineNumber},e.prototype.getCompletelyVisibleViewLinesRangeInViewport=function(){return this.viewModelHelper.getCurrentCompletelyVisibleViewLinesRangeInViewport()},e.prototype.getRevealViewLinesRangeInViewport=function(){var e=this.getCompletelyVisibleViewLinesRangeInViewport().cloneRange();return!this.isLastLineVisibleInViewPort()&&e.endLineNumber>e.startLineNumber&&(e=new r.Range(e.startLineNumber,e.startColumn,e.endLineNumber-1,this.viewModel.getLineLastNonWhitespaceColumn(e.endLineNumber-1))),e},e.prototype.getNearestRevealViewPositionInViewport=function(){var e=this.viewState.position,t=this.getRevealViewLinesRangeInViewport();return e.lineNumber<t.startLineNumber?new o.Position(t.startLineNumber,this.viewModel.getLineFirstNonWhitespaceColumn(t.startLineNumber)):e.lineNumber>t.endLineNumber?new o.Position(t.endLineNumber,this.viewModel.getLineFirstNonWhitespaceColumn(t.endLineNumber)):e},e}();t.OneCursor=d;var h=function(){function e(){}return e.moveTo=function(e,t,n,i,o,r){var s,u=e.model.validatePosition(n);s=i?e.validateViewPosition(i.lineNumber,i.column,u):e.convertModelPositionToViewPosition(u.lineNumber,u.column);var l="mouse"===o?a.CursorChangeReason.Explicit:a.CursorChangeReason.NotSet;return"api"===o&&(r.shouldRevealVerticalInCenter=!0),l&&(r.cursorPositionChangeReason=l),e.moveViewPosition(t,s.lineNumber,s.column,0,!1),!0},e._getViewHalfLineSize=function(e,t){return Math.round((e.viewModel.getLineMaxColumn(t)-e.viewModel.getLineMinColumn(t))/2)},e.move=function(e,t,i,o){t.to||n.illegalArgument("to");var r,s=!!t.select,u=e.viewState.position,l=u.lineNumber;switch(t.to){case a.CursorMovePosition.Left:return this._moveLeft(e,s,a.CursorMoveByUnit.HalfLine===t.by?this._getViewHalfLineSize(e,l):t.value,o);case a.CursorMovePosition.Right:return this._moveRight(e,s,a.CursorMoveByUnit.HalfLine===t.by?this._getViewHalfLineSize(e,l):t.value,o);case a.CursorMovePosition.Up:return this._moveUp(e,t,o);case a.CursorMovePosition.Down:return this._moveDown(e,t,o);case a.CursorMovePosition.WrappedLineStart:r=e.viewModel.getLineMinColumn(l);break;case a.CursorMovePosition.WrappedLineFirstNonWhitespaceCharacter:r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.WrappedLineColumnCenter:r=Math.round((e.viewModel.getLineMaxColumn(l)+e.viewModel.getLineMinColumn(l))/2);break;case a.CursorMovePosition.WrappedLineEnd:r=e.viewModel.getLineMaxColumn(l);break;case a.CursorMovePosition.WrappedLineLastNonWhitespaceCharacter:r=e.viewModel.getLineLastNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortTop:l=e.convertModelPositionToViewPosition(e.getLineFromViewPortTop(t.value),1).lineNumber,r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortBottom:l=e.convertModelPositionToViewPosition(e.getLineFromViewPortBottom(t.value),1).lineNumber,r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortCenter:l=e.convertModelPositionToViewPosition(e.getCenterLineInViewPort(),1).lineNumber,r=e.viewModel.getLineFirstNonWhitespaceColumn(l);break;case a.CursorMovePosition.ViewPortIfOutside:var c=e.getNearestRevealViewPositionInViewport();l=c.lineNumber,r=c.column;break;default:return!1}return o.cursorPositionChangeReason=a.CursorChangeReason.Explicit,e.moveViewPosition(s,l,r,0,!0),!0},e._applyMoveOperationResult=function(e,t,n){return t.cursorPositionChangeReason=n.reason,e.setState(n.modelState,n.viewState,n.ensureInEditableRange),!0},e._fromModelCursorState=function(e,t){var n=e.convertModelPositionToViewPosition(t.state.selectionStart.startLineNumber,t.state.selectionStart.startColumn),o=e.convertModelPositionToViewPosition(t.state.selectionStart.endLineNumber,t.state.selectionStart.endColumn),s=new r.Range(n.lineNumber,n.column,o.lineNumber,o.column),a=e.convertModelPositionToViewPosition(t.state.position.lineNumber,t.state.position.column);return new c(t.state,new i.SingleCursorState(s,t.state.selectionStartLeftoverVisibleColumns,a,t.state.leftoverVisibleColumns),t.ensureInEditableRange,t.reason)},e._fromViewCursorState=function(e,t){var n=e.convertViewToModelPosition(t.state.selectionStart.startLineNumber,t.state.selectionStart.startColumn),o=e.convertViewToModelPosition(t.state.selectionStart.endLineNumber,t.state.selectionStart.endColumn),s=new r.Range(n.lineNumber,n.column,o.lineNumber,o.column),a=e.convertViewToModelPosition(t.state.position.lineNumber,t.state.position.column);return new c(new i.SingleCursorState(s,t.state.selectionStartLeftoverVisibleColumns,a,t.state.leftoverVisibleColumns),t.state,t.ensureInEditableRange,t.reason)},e._moveLeft=function(e,t,n,i){return void 0===n&&(n=1),this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveLeft(e.config,e.viewModel,e.viewState,t,n)))},e.moveWordLeft=function(e,t,n,i){
return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,l.WordOperations.moveWordLeft(e.config,e.model,e.modelState,t,n)))},e._moveRight=function(e,t,n,i){return void 0===n&&(n=1),this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveRight(e.config,e.viewModel,e.viewState,t,n)))},e.moveWordRight=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,l.WordOperations.moveWordRight(e.config,e.model,e.modelState,t,n)))},e._moveDown=function(e,t,n){var i=(t.isPaged?t.pageSize||e.config.pageSize:t.value)||1;return a.CursorMoveByUnit.WrappedLine===t.by?this._moveDownByViewLines(e,t.select,i,n):this._moveDownByModelLines(e,t.select,i,n)},e._moveDownByViewLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveDown(e.config,e.viewModel,e.viewState,t,n)))},e._moveDownByModelLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,u.MoveOperations.moveDown(e.config,e.model,e.modelState,t,n)))},e.translateDown=function(e,t){return this._applyMoveOperationResult(e,t,this._fromViewCursorState(e,u.MoveOperations.translateDown(e.config,e.viewModel,e.viewState)))},e._moveUp=function(e,t,n){var i=(t.isPaged?t.pageSize||e.config.pageSize:t.value)||1;return a.CursorMoveByUnit.WrappedLine===t.by?this._moveUpByViewLines(e,t.select,i,n):this._moveUpByModelLines(e,t.select,i,n)},e._moveUpByViewLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromViewCursorState(e,u.MoveOperations.moveUp(e.config,e.viewModel,e.viewState,t,n)))},e._moveUpByModelLines=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,u.MoveOperations.moveUp(e.config,e.model,e.modelState,t,n)))},e.translateUp=function(e,t){return this._applyMoveOperationResult(e,t,this._fromViewCursorState(e,u.MoveOperations.translateUp(e.config,e.viewModel,e.viewState)))},e.moveToBeginningOfLine=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromViewCursorState(e,u.MoveOperations.moveToBeginningOfLine(e.config,e.viewModel,e.viewState,t)))},e.moveToEndOfLine=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromViewCursorState(e,u.MoveOperations.moveToEndOfLine(e.config,e.viewModel,e.viewState,t)))},e.expandLineSelection=function(e,t){t.cursorPositionChangeReason=a.CursorChangeReason.Explicit;var n=e.viewState.selection,i=n.startLineNumber,o=n.startColumn,r=n.endLineNumber,s=n.endColumn,l=e.viewModel.getLineMaxColumn(r);if(1!==o||s!==l)o=1,s=l;else{var c=u.MoveOperations.down(e.config,e.viewModel,r,s,0,1,!0);r=c.lineNumber,s=e.viewModel.getLineMaxColumn(r)}return e.moveViewPosition(!1,i,o,0,!0),e.moveViewPosition(!0,r,s,0,!0),!0},e.moveToBeginningOfBuffer=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromModelCursorState(e,u.MoveOperations.moveToBeginningOfBuffer(e.config,e.model,e.modelState,t)))},e.moveToEndOfBuffer=function(e,t,n){return this._applyMoveOperationResult(e,n,this._fromModelCursorState(e,u.MoveOperations.moveToEndOfBuffer(e.config,e.model,e.modelState,t)))},e.selectAll=function(e,t){var n,i,o,r,s=!0;if(e.model.hasEditableRange()){var a=e.model.getEditableRange(),u=e.modelState.selection;u.equalsRange(a)||(s=!1,n=a.startLineNumber,i=a.startColumn,o=a.endLineNumber,r=a.endColumn)}return s&&(n=1,i=1,o=e.model.getLineCount(),r=e.model.getLineMaxColumn(o)),e.moveModelPosition(!1,n,i,0,!1),e.moveModelPosition(!0,o,r,0,!1),t.shouldReveal=!1,t.shouldRevealHorizontal=!1,!0},e.line=function(e,t,n,i,o){var s=e.validatePosition(n),u=i?e.validateViewPosition(i.lineNumber,i.column,s):e.convertModelPositionToViewPosition(s.lineNumber,s.column);if(o.cursorPositionChangeReason=a.CursorChangeReason.Explicit,o.shouldRevealHorizontal=!1,t&&e.modelState.hasSelection()){var l=e.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumber<l)e.moveViewPosition(e.modelState.hasSelection(),u.lineNumber,1,0,!1);else if(s.lineNumber>l){var c=u.lineNumber+1,d=1;c>e.viewModel.getLineCount()&&(c=e.viewModel.getLineCount(),d=e.viewModel.getLineMaxColumn(c)),e.moveViewPosition(e.modelState.hasSelection(),c,d,0,!1)}else{var h=e.modelState.selectionStart.getEndPosition();e.moveModelPosition(e.modelState.hasSelection(),h.lineNumber,h.column,0,!1)}return!0}var p=s.lineNumber+1,f=1;p>e.model.getLineCount()&&(p=e.model.getLineCount(),f=e.model.getLineMaxColumn(p));var g=new r.Range(s.lineNumber,1,p,f);return e.setSelectionStart(g),e.moveModelPosition(e.modelState.hasSelection(),g.endLineNumber,g.endColumn,0,!1),!0},e.word=function(e,t,n,i){return this._applyMoveOperationResult(e,i,this._fromModelCursorState(e,l.WordOperations.word(e.config,e.model,e.modelState,t,n)))},e.cancelSelection=function(e,t){return!!e.modelState.hasSelection()&&(e.collapseSelection(),!0)},e}();t.OneCursorOp=h}),define(d[356],h([0,1,10,126,20,38]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t,n){this.model=e,this.configuration=t,this.viewModelHelper=n,this.modeConfiguration=this.getModeConfiguration(),this.primaryCursor=new i.OneCursor(this.model,this.configuration,this.modeConfiguration,this.viewModelHelper),this.secondaryCursors=[],this.lastAddedCursorIndex=0}return e.prototype.dispose=function(){this.primaryCursor.dispose(),this.killSecondaryCursors()},e.prototype.ensureValidState=function(){this.primaryCursor.ensureValidState();for(var e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState()},e.prototype.saveState=function(){return{primary:this.primaryCursor.saveState(),secondary:this.secondaryCursors.map(function(e){return e.saveState()})}},e.prototype.restoreState=function(e){this.primaryCursor.restoreState(e.primary),this.killSecondaryCursors();for(var t=0;t<e.secondary.length;t++)this.addSecondaryCursor(null),this.secondaryCursors[t].restoreState(e.secondary[t])},e.prototype.updateMode=function(){var e=this;this.modeConfiguration=this.getModeConfiguration(),this.getAll().forEach(function(t){t.updateModeConfiguration(e.modeConfiguration)})},e.prototype.getAll=function(){var e=[];return e.push(this.primaryCursor),e=e.concat(this.secondaryCursors)},e.prototype.getPosition=function(e){return 0===e?this.primaryCursor.modelState.position:this.secondaryCursors[e-1].modelState.position},e.prototype.getViewPosition=function(e){return 0===e?this.primaryCursor.viewState.position:this.secondaryCursors[e-1].viewState.position},e.prototype.getPositions=function(){var e=[];e.push(this.primaryCursor.modelState.position);for(var t=0,n=this.secondaryCursors.length;t<n;t++)e.push(this.secondaryCursors[t].modelState.position);return e},e.prototype.getViewPositions=function(){var e=[];e.push(this.primaryCursor.viewState.position);for(var t=0,n=this.secondaryCursors.length;t<n;t++)e.push(this.secondaryCursors[t].viewState.position);return e},e.prototype.getSelection=function(e){return 0===e?this.primaryCursor.modelState.selection:this.secondaryCursors[e-1].modelState.selection},e.prototype.getSelections=function(){var e=[];e.push(this.primaryCursor.modelState.selection);for(var t=0,n=this.secondaryCursors.length;t<n;t++)e.push(this.secondaryCursors[t].modelState.selection);return e},e.prototype.getViewSelections=function(){var e=[];e.push(this.primaryCursor.viewState.selection);for(var t=0,n=this.secondaryCursors.length;t<n;t++)e.push(this.secondaryCursors[t].viewState.selection);return e},e.prototype.setSelections=function(e,t){this.primaryCursor.setSelection(e[0],t?t[0]:null),this._setSecondarySelections(e.slice(1),t?t.slice(1):null)},e.prototype.killSecondaryCursors=function(){return this._setSecondarySelections([],[])>0},e.prototype.normalize=function(){this._mergeCursorsIfNecessary()},e.prototype.addSecondaryCursor=function(e){var t=new i.OneCursor(this.model,this.configuration,this.modeConfiguration,this.viewModelHelper);e&&t.setSelection(e),this.secondaryCursors.push(t),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.duplicateCursors=function(){var e=[];e.push(this.primaryCursor.duplicate());for(var t=0,n=this.secondaryCursors.length;t<n;t++)e.push(this.secondaryCursors[t].duplicate());this.secondaryCursors=this.secondaryCursors.concat(e),this.lastAddedCursorIndex=this.secondaryCursors.length},e.prototype.getLastAddedCursor=function(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?this.primaryCursor:this.secondaryCursors[this.lastAddedCursorIndex-1]},e.prototype._setSecondarySelections=function(e,t){var n=this.secondaryCursors.length,i=e.length,o=i-n;if(n<i)for(var r=i-n,s=0;s<r;s++)this.addSecondaryCursor(null);else if(n>i)for(var a=n-i,s=0;s<a;s++)this._removeSecondaryCursor(this.secondaryCursors.length-1);for(var s=0;s<i;s++)e[s]&&this.secondaryCursors[s].setSelection(e[s],t?t[s]:null);return o},e.prototype._removeSecondaryCursor=function(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(),this.secondaryCursors.splice(e,1)},e.prototype._mergeCursorsIfNecessary=function(){if(0!==this.secondaryCursors.length){for(var e=this.getAll(),t=[],n=0;n<e.length;n++)t.push({index:n,selection:e[n].modelState.selection,viewSelection:e[n].viewState.selection});t.sort(function(e,t){return e.viewSelection.startLineNumber===t.viewSelection.startLineNumber?e.viewSelection.startColumn-t.viewSelection.startColumn:e.viewSelection.startLineNumber-t.viewSelection.startLineNumber});for(var i=0;i<t.length-1;i++){var r=t[i],s=t[i+1],a=r.viewSelection,u=s.viewSelection;if(u.getStartPosition().isBeforeOrEqual(a.getEndPosition())){var l=r.index<s.index?i:i+1,c=r.index<s.index?i+1:i,d=t[c].index,h=t[l].index,p=t[c].selection,f=t[l].selection;if(!p.equalsSelection(f)){var g,m=p.plusRange(f),v=p.selectionStartLineNumber===p.startLineNumber&&p.selectionStartColumn===p.startColumn,_=f.selectionStartLineNumber===f.startLineNumber&&f.selectionStartColumn===f.startColumn;d===this.lastAddedCursorIndex?(g=v,this.lastAddedCursorIndex=h):g=_;var y;y=g?new o.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):new o.Selection(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn),t[l].selection=y,e[h].setSelection(y)}for(var C=0;C<t.length;C++)t[C].index>d&&t[C].index--;e.splice(d,1),t.splice(c,1),this._removeSecondaryCursor(d-1),i--}}}},e.prototype.getModeConfiguration=function(){var e,t={electricChars:{},autoClosingPairsOpen:{},autoClosingPairsClose:{},surroundingPairs:{}},i=null;try{i=r.LanguageConfigurationRegistry.getElectricCharacters(this.model.getLanguageIdentifier().id)}catch(e){n.onUnexpectedError(e),i=null}if(i)for(e=0;e<i.length;e++)t.electricChars[i[e]]=!0;var o;try{o=r.LanguageConfigurationRegistry.getAutoClosingPairs(this.model.getLanguageIdentifier().id)}catch(e){n.onUnexpectedError(e),o=null}if(o)for(e=0;e<o.length;e++)t.autoClosingPairsOpen[o[e].open]=o[e].close,t.autoClosingPairsClose[o[e].close]=o[e].open;var s;try{s=r.LanguageConfigurationRegistry.getSurroundingPairs(this.model.getLanguageIdentifier().id)}catch(e){n.onUnexpectedError(e),s=null}if(s)for(e=0;e<s.length;e++)t.surroundingPairs[s[e].open]=s[e].close;return t},e}();t.CursorCollection=s}),define(d[357],h([0,1,276,9,10,25,4,54,356,126,3,20,2,41,38,173,350,172,353]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y){"use strict";var C;!function(e){e[e.Primary=0]="Primary",e[e.TopMost=1]="TopMost",e[e.BottomMost=2]="BottomMost"}(C||(C={}));var b=function(e){function t(t,n,i,o){var r=e.call(this,[h.EventType.CursorPositionChanged,h.EventType.CursorSelectionChanged,h.EventType.CursorRevealRange,h.EventType.CursorScrollRequest])||this;return r._columnSelectToLineNumber=0,r._columnSelectToVisualColumn=0,r.configuration=t,r.model=n,r.viewModelHelper=i,r.enableEmptySelectionClipboard=o,r.cursors=new u.CursorCollection(r.model,r.configuration,r.viewModelHelper),r.cursorUndoStack=[],r._isHandling=!1,r.modelUnbinds=[],r.modelUnbinds.push(r.model.onDidChangeRawContent(function(e){r._onModelContentChanged(e)})),r.modelUnbinds.push(r.model.onDidChangeLanguage(function(e){r._onModelLanguageChanged()})),r.modelUnbinds.push(f.LanguageConfigurationRegistry.onDidChange(function(){r._onModelLanguageChanged()})),r._handlers={},r._registerHandlers(),r}return m(t,e),t.prototype.dispose=function(){this.modelUnbinds=s.dispose(this.modelUnbinds),this.model=null,this.cursors.dispose(),this.cursors=null,this.configuration=null,this.viewModelHelper=null,e.prototype.dispose.call(this)},t.prototype.saveState=function(){for(var e,t=this.cursors.getSelections(),n=[],i=0;i<t.length;i++)e=t[i],n.push({inSelectionMode:!e.isEmpty(),selectionStart:{lineNumber:e.selectionStartLineNumber,column:e.selectionStartColumn},position:{lineNumber:e.positionLineNumber,column:e.positionColumn}});return n},t.prototype.restoreState=function(e){for(var t,n=this,i=[],o=0;o<e.length;o++){t=e[o];var r=1,s=1;t.position&&t.position.lineNumber&&(r=t.position.lineNumber),t.position&&t.position.column&&(s=t.position.column);var a=r,u=s;t.selectionStart&&t.selectionStart.lineNumber&&(a=t.selectionStart.lineNumber),t.selectionStart&&t.selectionStart.column&&(u=t.selectionStart.column),i.push({selectionStartLineNumber:a,selectionStartColumn:u,positionLineNumber:r,positionColumn:s})}this._onHandler("restoreState",function(e){return n.cursors.setSelections(i),!1},"restoreState",null)},t.prototype._onModelLanguageChanged=function(){this.cursors.updateMode()},t.prototype._onModelContentChanged=function(e){var t=this;if(e.changeType===h.EventType.ModelRawContentChangedFlush)this.cursors.dispose(),this.cursors=new u.CursorCollection(this.model,this.configuration,this.viewModelHelper),this.emitCursorPositionChanged("model",h.CursorChangeReason.ContentFlush),this.emitCursorSelectionChanged("model",h.CursorChangeReason.ContentFlush);else if(!this._isHandling){var n=this.cursors.getAll().map(function(e){return e.beginRecoverSelectionFromMarkers()});this._onHandler("recoverSelectionFromMarkers",function(e){var i=t._invokeForAll(e,function(e,t,i){return t.endRecoverSelectionFromMarkers(i,n[e])});return e.shouldPushStackElementBefore=!1,e.shouldPushStackElementAfter=!1,i},"modelChange",null)}},t.prototype.getSelection=function(){return this.cursors.getSelection(0)},t.prototype.getSelections=function(){return this.cursors.getSelections()},t.prototype.getPosition=function(){return this.cursors.getPosition(0)},t.prototype.setSelections=function(e,t){var n=this;this._onHandler("setSelections",function(e){return e.shouldReveal=!1,n.cursors.setSelections(t),!1},e,null)},t.prototype._createAndInterpretHandlerCtx=function(e,t,n){var i={cursorPositionChangeReason:h.CursorChangeReason.NotSet,shouldReveal:!0,shouldRevealVerticalInCenter:!1,shouldRevealHorizontal:!0,shouldRevealTarget:0,eventSource:e,eventData:t,executeCommands:[],isAutoWhitespaceCommand:[],hasExecutedCommands:!1,isCursorUndo:!1,shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1,setColumnSelectToLineNumber:0,setColumnSelectToVisualColumn:0};return n(i),this._interpretHandlerContext(i),this.cursors.normalize(),i.hasExecutedCommands},t.prototype._onHandler=function(e,t,n,i){this._isHandling=!0;var r=!1;try{var s=this.cursors.getSelections(),a=this.cursors.getViewSelections();this.cursors.ensureValidState();var u,l,c,d,h,p,f=this.cursors.saveState(),g=n,m=this._createAndInterpretHandlerCtx(g,i,function(e){r=t(e),u=e.cursorPositionChangeReason,l=e.shouldReveal,h=e.shouldRevealTarget,c=e.shouldRevealVerticalInCenter,d=e.shouldRevealHorizontal,p=e.isCursorUndo});m&&(this.cursorUndoStack=[]);var v=this.cursors.getSelections(),_=this.cursors.getViewSelections(),y=!1;if(s.length!==v.length)y=!0;else{for(var C=0,b=s.length;!y&&C<b;C++)s[C].equalsSelection(v[C])||(y=!0);for(var C=0,b=a.length;!y&&C<b;C++)a[C].equalsSelection(_[C])||(y=!0)}y&&(m||p||this.cursorUndoStack.push(f),this.cursorUndoStack.length>50&&(this.cursorUndoStack=this.cursorUndoStack.splice(0,this.cursorUndoStack.length-50)),this.emitCursorPositionChanged(g,u),l&&this.revealRange(h,c?1:0,d),this.emitCursorSelectionChanged(g,u))}catch(e){o.onUnexpectedError(e)}return this._isHandling=!1,r},t.prototype._interpretHandlerContext=function(e){e.shouldPushStackElementBefore&&(this.model.pushStackElement(),e.shouldPushStackElementBefore=!1),this._columnSelectToLineNumber=e.setColumnSelectToLineNumber,this._columnSelectToVisualColumn=e.setColumnSelectToVisualColumn,e.hasExecutedCommands=this._internalExecuteCommands(e.executeCommands,e.isAutoWhitespaceCommand)||e.hasExecutedCommands,e.executeCommands=[],e.shouldPushStackElementAfter&&(this.model.pushStackElement(),e.shouldPushStackElementAfter=!1)},t.prototype._interpretCommandResult=function(e){return!(!e||0===e.length)&&(this.cursors.setSelections(e),!0)},t.prototype._getEditOperationsFromCommand=function(e,t,i,r){var s=this,a=[],u=0,l=function(e,n){e.isEmpty()&&""===n||a.push({identifier:{major:t,minor:u++},range:e,text:n,forceMoveMarkers:!1,isAutoWhitespaceEdit:r})},c=!1,h=function(t,n){var i,o;if(t.isEmpty())if("boolean"==typeof n)i=n,o=n;else{var r=s.model.getLineMaxColumn(t.startLineNumber);t.startColumn===r?(i=!0,o=!0):(i=!1,o=!1)}else t.getDirection()===d.SelectionDirection.LTR?(i=!1,o=!0):(i=!0,o=!1);var a=e.selectionStartMarkers.length;return e.selectionStartMarkers[a]=s.model._addMarker(0,t.selectionStartLineNumber,t.selectionStartColumn,i),e.positionMarkers[a]=s.model._addMarker(0,t.positionLineNumber,t.positionColumn,o),a.toString()},p={addEditOperation:l,trackSelection:h};try{i.getEditOperations(this.model,p)}catch(e){return e.friendlyMessage=n.localize(0,null),o.onUnexpectedError(e),{operations:[],hadTrackedRange:!1}}return{operations:a,hadTrackedRange:c}},t.prototype._getEditOperations=function(e,t,n){for(var i,o,r=[],s=[],a=0;a<t.length;a++)t[a]?(i=this._getEditOperationsFromCommand(e,a,t[a],n[a]),r=r.concat(i.operations),s[a]=i.hadTrackedRange,o=o||s[a]):s[a]=!1;return{operations:r,hadTrackedRanges:s,anyoneHadTrackedRange:o}},t.prototype._getLoserCursorMap=function(e){e=e.slice(0),e.sort(function(e,t){return-c.Range.compareRangesUsingEnds(e.range,t.range)});for(var t,n,i,o={},r=1;r<e.length;r++)if(t=e[r-1],n=e[r],t.range.getStartPosition().isBefore(n.range.getEndPosition())){i=t.identifier.major>n.identifier.major?t.identifier.major:n.identifier.major,o[i.toString()]=!0;for(var s=0;s<e.length;s++)e[s].identifier.major===i&&(e.splice(s,1),s<r&&r--,s--);r>0&&r--}return o},t.prototype._collapseDeleteCommands=function(e,t){if(1!==e.length){var n=e.every(function(e){if(!(e instanceof a.ReplaceCommand))return!1;var t=e;return!(t.getText().length>0)});if(n){var i=e,o=i.map(function(e,t){return{range:i[t].getRange(),order:t}});o.sort(function(e,t){return c.Range.compareRangesUsingStarts(e.range,t.range)});for(var r=o[0],s=1;s<o.length;s++)if(r.range.endLineNumber===o[s].range.startLineNumber&&r.range.endColumn===o[s].range.startColumn){var u=new c.Range(r.range.startLineNumber,r.range.startColumn,o[s].range.endLineNumber,o[s].range.endColumn);r.range=u,i[o[s].order].setRange(u),i[r.order].setRange(u)}else r=o[s]}}},t.prototype._internalExecuteCommands=function(e,t){var n={selectionStartMarkers:[],positionMarkers:[]};this._collapseDeleteCommands(e,t);for(var i=this._innerExecuteCommands(n,e,t),o=0;o<n.selectionStartMarkers.length;o++)this.model._removeMarker(n.selectionStartMarkers[o]),this.model._removeMarker(n.positionMarkers[o]);return i},t.prototype._arrayIsEmpty=function(e){var t,n;for(t=0,n=e.length;t<n;t++)if(e[t])return!1;return!0},t.prototype._innerExecuteCommands=function(e,t,n){var i=this;if(this.configuration.editor.readOnly)return!1;if(this._arrayIsEmpty(t))return!1;var o=this.cursors.getSelections(),r=this._getEditOperations(e,t,n);if(0===r.operations.length&&!r.anyoneHadTrackedRange)return!1;for(var s=r.operations,a=this.model.getEditableRange(),u=a.getStartPosition(),l=a.getEndPosition(),c=0;c<s.length;c++){var h=s[c].range;if(!u.isBeforeOrEqual(h.getStartPosition())||!h.getEndPosition().isBeforeOrEqual(l))return!1}var p=this._getLoserCursorMap(s);if(p.hasOwnProperty("0"))return console.warn("Ignoring commands"),!1;for(var f=[],c=0;c<s.length;c++)p.hasOwnProperty(s[c].identifier.major.toString())||f.push(s[c]);var g,m=this.model.pushEditOperations(o,f,function(n){for(var s=[],a=0;a<o.length;a++)s[a]=[];for(var a=0;a<n.length;a++){var u=n[a];u.identifier&&s[u.identifier.major].push(u)}for(var l=function(e,t){return e.identifier.minor-t.identifier.minor},c=[],a=0;a<o.length;a++)s[a].length>0||r.hadTrackedRanges[a]?(s[a].sort(l),c[a]=t[a].computeCursorState(i.model,{getInverseEditOperations:function(){return s[a]},getTrackedSelection:function(t){var n=parseInt(t,10),o=i.model._getMarker(e.selectionStartMarkers[n]),r=i.model._getMarker(e.positionMarkers[n]);return new d.Selection(o.lineNumber,o.column,r.lineNumber,r.column)}})):c[a]=o[a];return c}),v=[];for(g in p)p.hasOwnProperty(g)&&v.push(parseInt(g,10));v.sort(function(e,t){return t-e});for(var c=0;c<v.length;c++)m.splice(v[c],1);return this._interpretCommandResult(m)},t.prototype.emitCursorPositionChanged=function(e,t){var n=this.cursors.getPositions(),i=n[0],o=n.slice(1),r=this.cursors.getViewPositions(),s=r[0],a=r.slice(1),u=!0;if(this.model.hasEditableRange()){var l=this.model.getEditableRange();l.containsPosition(i)||(u=!1)}var c={position:i,viewPosition:s,secondaryPositions:o,secondaryViewPositions:a,reason:t,source:e,isInEditableRange:u};this.emit(h.EventType.CursorPositionChanged,c)},t.prototype.emitCursorSelectionChanged=function(e,t){var n=this.cursors.getSelections(),i=n[0],o=n.slice(1),r=this.cursors.getViewSelections(),s=r[0],a=r.slice(1),u={selection:i,viewSelection:s,secondarySelections:o,secondaryViewSelections:a,source:e,reason:t};this.emit(h.EventType.CursorSelectionChanged,u)},t.prototype.emitCursorScrollRequest=function(e,t){var n={deltaLines:e,revealCursor:t};this.emit(h.EventType.CursorScrollRequest,n)},t.prototype.revealRange=function(e,t,n){var i=this.cursors.getPositions(),o=this.cursors.getViewPositions(),r=i[0],s=o[0];if(1===e)for(var a=1;a<i.length;a++)i[a].isBefore(r)&&(r=i[a],s=o[a]);else if(2===e)for(var a=1;a<i.length;a++)r.isBeforeOrEqual(i[a])&&(r=i[a],s=o[a]);else if(i.length>1)return;var u=new c.Range(r.lineNumber,r.column,r.lineNumber,r.column),l=new c.Range(s.lineNumber,s.column,s.lineNumber,s.column);this.emitCursorRevealRange(u,l,t,n,!1)},t.prototype.emitCursorRevealRange=function(e,t,n,i,o){var r={range:e,viewRange:t,verticalType:n,revealHorizontal:i,revealCursor:o};this.emit(h.EventType.CursorRevealRange,r)},t.prototype.trigger=function(e,t,n){if(this._handlers.hasOwnProperty(t)){var i=this._handlers[t];this._onHandler(t,i,e,n)}},t.prototype._registerHandlers=function(){var e=this,t=h.Handler;this._handlers[t.CursorMove]=function(t){return e._cursorMove(t)},this._handlers[t.MoveTo]=function(t){return e._moveTo(!1,t)},this._handlers[t.MoveToSelect]=function(t){return e._moveTo(!0,t)},this._handlers[t.ColumnSelect]=function(t){return e._columnSelectMouse(t)},this._handlers[t.AddCursorUp]=function(t){return e._addCursorUp(t)},this._handlers[t.AddCursorDown]=function(t){return e._addCursorDown(t)},this._handlers[t.CreateCursor]=function(t){return e._createCursor(t)},this._handlers[t.LastCursorMoveToSelect]=function(t){return e._lastCursorMoveTo(t)},this._handlers[t.CursorLeft]=function(t){return e._moveLeft(!1,t)},this._handlers[t.CursorLeftSelect]=function(t){return e._moveLeft(!0,t)},this._handlers[t.CursorWordLeft]=function(t){return e._moveWordLeft(!1,0,t)},this._handlers[t.CursorWordStartLeft]=function(t){return e._moveWordLeft(!1,0,t)},this._handlers[t.CursorWordEndLeft]=function(t){return e._moveWordLeft(!1,1,t)},this._handlers[t.CursorWordLeftSelect]=function(t){return e._moveWordLeft(!0,0,t)},this._handlers[t.CursorWordStartLeftSelect]=function(t){return e._moveWordLeft(!0,0,t)},this._handlers[t.CursorWordEndLeftSelect]=function(t){return e._moveWordLeft(!0,1,t)},this._handlers[t.CursorRight]=function(t){return e._moveRight(!1,t)},this._handlers[t.CursorRightSelect]=function(t){return e._moveRight(!0,t)},this._handlers[t.CursorWordRight]=function(t){return e._moveWordRight(!1,1,t)},this._handlers[t.CursorWordStartRight]=function(t){return e._moveWordRight(!1,0,t)},this._handlers[t.CursorWordEndRight]=function(t){return e._moveWordRight(!1,1,t)},this._handlers[t.CursorWordRightSelect]=function(t){return e._moveWordRight(!0,1,t)},this._handlers[t.CursorWordStartRightSelect]=function(t){return e._moveWordRight(!0,0,t)},this._handlers[t.CursorWordEndRightSelect]=function(t){return e._moveWordRight(!0,1,t)},this._handlers[t.CursorUp]=function(t){return e._moveUp(!1,!1,t)},this._handlers[t.CursorUpSelect]=function(t){return e._moveUp(!0,!1,t)},this._handlers[t.CursorDown]=function(t){return e._moveDown(!1,!1,t)},this._handlers[t.CursorDownSelect]=function(t){return e._moveDown(!0,!1,t)},this._handlers[t.CursorPageUp]=function(t){return e._moveUp(!1,!0,t)},this._handlers[t.CursorPageUpSelect]=function(t){return e._moveUp(!0,!0,t)},this._handlers[t.CursorPageDown]=function(t){return e._moveDown(!1,!0,t)},this._handlers[t.CursorPageDownSelect]=function(t){return e._moveDown(!0,!0,t)},this._handlers[t.CursorHome]=function(t){return e._moveToBeginningOfLine(!1,t)},this._handlers[t.CursorHomeSelect]=function(t){return e._moveToBeginningOfLine(!0,t)},this._handlers[t.CursorEnd]=function(t){return e._moveToEndOfLine(!1,t)},this._handlers[t.CursorEndSelect]=function(t){return e._moveToEndOfLine(!0,t)},this._handlers[t.CursorTop]=function(t){return e._moveToBeginningOfBuffer(!1,t)},this._handlers[t.CursorTopSelect]=function(t){return e._moveToBeginningOfBuffer(!0,t)},this._handlers[t.CursorBottom]=function(t){return e._moveToEndOfBuffer(!1,t)},this._handlers[t.CursorBottomSelect]=function(t){return e._moveToEndOfBuffer(!0,t)},this._handlers[t.CursorColumnSelectLeft]=function(t){return e._columnSelectLeft(t)},this._handlers[t.CursorColumnSelectRight]=function(t){return e._columnSelectRight(t)},this._handlers[t.CursorColumnSelectUp]=function(t){return e._columnSelectUp(!1,t)},this._handlers[t.CursorColumnSelectPageUp]=function(t){return e._columnSelectUp(!0,t)},this._handlers[t.CursorColumnSelectDown]=function(t){return e._columnSelectDown(!1,t)},this._handlers[t.CursorColumnSelectPageDown]=function(t){return e._columnSelectDown(!0,t)},this._handlers[t.SelectAll]=function(t){return e._selectAll(t)},this._handlers[t.LineSelect]=function(t){return e._line(!1,t)},this._handlers[t.LineSelectDrag]=function(t){return e._line(!0,t)},this._handlers[t.LastCursorLineSelect]=function(t){return e._lastCursorLine(!1,t)},this._handlers[t.LastCursorLineSelectDrag]=function(t){return e._lastCursorLine(!0,t)},this._handlers[t.LineInsertBefore]=function(t){return e._lineInsertBefore(t)},this._handlers[t.LineInsertAfter]=function(t){return e._lineInsertAfter(t)},this._handlers[t.LineBreakInsert]=function(t){return e._lineBreakInsert(t)},this._handlers[t.WordSelect]=function(t){return e._word(!1,t)},this._handlers[t.WordSelectDrag]=function(t){return e._word(!0,t)},this._handlers[t.LastCursorWordSelect]=function(t){return e._lastCursorWord(t)},this._handlers[t.CancelSelection]=function(t){return e._cancelSelection(t)},this._handlers[t.RemoveSecondaryCursors]=function(t){return e._removeSecondaryCursors(t)},this._handlers[t.Type]=function(t){return e._type(t)},this._handlers[t.ReplacePreviousChar]=function(t){return e._replacePreviousChar(t)},this._handlers[t.Tab]=function(t){return e._tab(t)},this._handlers[t.Indent]=function(t){return e._indent(t)},this._handlers[t.Outdent]=function(t){return e._outdent(t)},this._handlers[t.Paste]=function(t){return e._paste(t)},this._handlers[t.EditorScroll]=function(t){return e._editorScroll(t)},this._handlers[t.ScrollLineUp]=function(t){return e._scrollUp(!1,t)},this._handlers[t.ScrollLineDown]=function(t){return e._scrollDown(!1,t)},this._handlers[t.ScrollPageUp]=function(t){return e._scrollUp(!0,t)},this._handlers[t.ScrollPageDown]=function(t){return e._scrollDown(!0,t)},this._handlers[t.DeleteLeft]=function(t){return e._deleteLeft(t)},this._handlers[t.DeleteWordLeft]=function(t){return e._deleteWordLeft(!0,0,t)},this._handlers[t.DeleteWordStartLeft]=function(t){return e._deleteWordLeft(!1,0,t)},this._handlers[t.DeleteWordEndLeft]=function(t){return e._deleteWordLeft(!1,1,t)},this._handlers[t.DeleteRight]=function(t){return e._deleteRight(t)},this._handlers[t.DeleteWordRight]=function(t){return e._deleteWordRight(!0,1,t)},this._handlers[t.DeleteWordStartRight]=function(t){return e._deleteWordRight(!1,0,t)},this._handlers[t.DeleteWordEndRight]=function(t){return e._deleteWordRight(!1,1,t)},this._handlers[t.Cut]=function(t){return e._cut(t)},this._handlers[t.ExpandLineSelection]=function(t){return e._expandLineSelection(t)},this._handlers[t.Undo]=function(t){return e._undo(t)},this._handlers[t.CursorUndo]=function(t){return e._cursorUndo(t)},this._handlers[t.Redo]=function(t){return e._redo(t)},this._handlers[t.ExecuteCommand]=function(t){return e._externalExecuteCommand(t)},this._handlers[t.ExecuteCommands]=function(t){return e._externalExecuteCommands(t)},this._handlers[t.RevealLine]=function(t){return e._revealLine(t)}},t.prototype._invokeForAllSorted=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),this._doInvokeForAll(e,!0,t,n,i)},t.prototype._invokeForAll=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=!0),this._doInvokeForAll(e,!1,t,n,i)},t.prototype._doInvokeForAll=function(e,t,n,i,o){void 0===i&&(i=!0),void 0===o&&(o=!0);var r=!1,s=this.cursors.getAll();t&&(s=s.sort(function(e,t){return c.Range.compareRangesUsingStarts(e.modelState.selection,t.modelState.selection)}));var a;e.shouldPushStackElementBefore=i,e.shouldPushStackElementAfter=o;for(var u=0;u<s.length;u++)a={cursorPositionChangeReason:h.CursorChangeReason.NotSet,shouldReveal:!0,shouldRevealVerticalInCenter:!1,shouldRevealHorizontal:!0,executeCommand:null,isAutoWhitespaceCommand:!1,shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1},r=n(u,s[u],a)||r,0===u&&(e.cursorPositionChangeReason=a.cursorPositionChangeReason,e.shouldRevealHorizontal=a.shouldRevealHorizontal,e.shouldReveal=a.shouldReveal,e.shouldRevealVerticalInCenter=a.shouldRevealVerticalInCenter),e.shouldPushStackElementBefore=e.shouldPushStackElementBefore||a.shouldPushStackElementBefore,e.shouldPushStackElementAfter=e.shouldPushStackElementAfter||a.shouldPushStackElementAfter,e.executeCommands[u]=a.executeCommand,e.isAutoWhitespaceCommand[u]=a.isAutoWhitespaceCommand;return r},t.prototype._moveTo=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,o){return l.OneCursorOp.moveTo(i,e,t.eventData.position,t.eventData.viewPosition,t.eventSource,o)})},t.prototype._cursorMove=function(e){return this._invokeForAll(e,function(t,n,i){return l.OneCursorOp.move(n,e.eventData,e.eventSource,i)})},t.prototype._getColumnSelectToLineNumber=function(){if(!this._columnSelectToLineNumber){var e=this.cursors.getAll()[0],t=e.viewState.position;return t.lineNumber}return this._columnSelectToLineNumber},t.prototype._getColumnSelectToVisualColumn=function(){if(!this._columnSelectToVisualColumn){var e=this.cursors.getAll()[0],t=e.viewState.position;return p.CursorColumns.visibleColumnFromColumn2(e.config,e.viewModel,t)}return this._columnSelectToVisualColumn},t.prototype._columnSelectMouse=function(e){var t,n=this.cursors.getAll()[0],i=n.model.validatePosition(e.eventData.position);t=e.eventData.viewPosition?n.validateViewPosition(e.eventData.viewPosition.lineNumber,e.eventData.viewPosition.column,i):n.convertModelPositionToViewPosition(i.lineNumber,i.column);var o=v.ColumnSelection.columnSelect(n.config,n.viewModel,n.viewState.selection.getStartPosition(),t.lineNumber,e.eventData.mouseColumn-1),r=o.viewSelections.map(function(e){return n.convertViewSelectionToModelSelection(e)});return e.shouldRevealTarget=o.reversed?1:2,e.shouldReveal=!0,e.setColumnSelectToLineNumber=o.toLineNumber,e.setColumnSelectToVisualColumn=o.toVisualColumn,this.cursors.setSelections(r,o.viewSelections),
!0},t.prototype._columnSelectOp=function(e,t){var n=this.cursors.getAll()[0],i=t(n,this._getColumnSelectToLineNumber(),this._getColumnSelectToVisualColumn()),o=i.viewSelections.map(function(e){return n.convertViewSelectionToModelSelection(e)});return e.shouldRevealTarget=i.reversed?1:2,e.shouldReveal=!0,e.setColumnSelectToLineNumber=i.toLineNumber,e.setColumnSelectToVisualColumn=i.toVisualColumn,this.cursors.setSelections(o,i.viewSelections),!0},t.prototype._columnSelectLeft=function(e){return this._columnSelectOp(e,function(e,t,n){return v.ColumnSelection.columnSelectLeft(e.config,e.viewModel,e.viewState,t,n)})},t.prototype._columnSelectRight=function(e){return this._columnSelectOp(e,function(e,t,n){return v.ColumnSelection.columnSelectRight(e.config,e.viewModel,e.viewState,t,n)})},t.prototype._columnSelectUp=function(e,t){return this._columnSelectOp(t,function(t,n,i){return v.ColumnSelection.columnSelectUp(t.config,t.viewModel,t.viewState,e,n,i)})},t.prototype._columnSelectDown=function(e,t){return this._columnSelectOp(t,function(t,n,i){return v.ColumnSelection.columnSelectDown(t.config,t.viewModel,t.viewState,e,n,i)})},t.prototype._createCursor=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;this.cursors.addSecondaryCursor({selectionStartLineNumber:1,selectionStartColumn:1,positionLineNumber:1,positionColumn:1});var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,o){return i===t&&(e.eventData.wholeLine?l.OneCursorOp.line(i,!1,e.eventData.position,e.eventData.viewPosition,o):l.OneCursorOp.moveTo(i,!1,e.eventData.position,e.eventData.viewPosition,e.eventSource,o))}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._lastCursorMoveTo=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,o){return i===t&&l.OneCursorOp.moveTo(i,!0,e.eventData.position,e.eventData.viewPosition,e.eventSource,o)}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._addCursorUp=function(e){if(this.configuration.editor.readOnly)return!1;var t=this.cursors.getSelections().length;return this.cursors.duplicateCursors(),e.shouldRevealTarget=1,this._invokeForAll(e,function(e,n,i){return e>=t&&l.OneCursorOp.translateUp(n,i)})},t.prototype._addCursorDown=function(e){if(this.configuration.editor.readOnly)return!1;var t=this.cursors.getSelections().length;return this.cursors.duplicateCursors(),e.shouldRevealTarget=2,this._invokeForAll(e,function(e,n,i){return e>=t&&l.OneCursorOp.translateDown(n,i)})},t.prototype._moveLeft=function(e,t){return t.eventData=t.eventData||{},t.eventData.to=h.CursorMovePosition.Left,t.eventData.select=e,this._cursorMove(t)},t.prototype._moveWordLeft=function(e,t,n){return this._invokeForAll(n,function(n,i,o){return l.OneCursorOp.moveWordLeft(i,e,t,o)})},t.prototype._moveRight=function(e,t){return t.eventData=t.eventData||{},t.eventData.to=h.CursorMovePosition.Right,t.eventData.select=e,this._cursorMove(t)},t.prototype._moveWordRight=function(e,t,n){return this._invokeForAll(n,function(n,i,o){return l.OneCursorOp.moveWordRight(i,e,t,o)})},t.prototype._moveDown=function(e,t,n){return n.eventData=n.eventData||{},n.eventData.to=h.CursorMovePosition.Down,n.eventData.select=e,n.eventData.by=h.CursorMoveByUnit.WrappedLine,n.eventData.isPaged=t,this._cursorMove(n)},t.prototype._moveUp=function(e,t,n){return n.eventData=n.eventData||{},n.eventData.to=h.CursorMovePosition.Up,n.eventData.select=e,n.eventData.by=h.CursorMoveByUnit.WrappedLine,n.eventData.isPaged=t,this._cursorMove(n)},t.prototype._moveToBeginningOfLine=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToBeginningOfLine(n,e,i)})},t.prototype._moveToEndOfLine=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToEndOfLine(n,e,i)})},t.prototype._moveToBeginningOfBuffer=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToBeginningOfBuffer(n,e,i)})},t.prototype._moveToEndOfBuffer=function(e,t){return this._invokeForAll(t,function(t,n,i){return l.OneCursorOp.moveToEndOfBuffer(n,e,i)})},t.prototype._selectAll=function(e){return this.cursors.killSecondaryCursors(),this._invokeForAll(e,function(e,t,n){return l.OneCursorOp.selectAll(t,n)})},t.prototype._line=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,o){return l.OneCursorOp.line(i,e,t.eventData.position,t.eventData.viewPosition,o)})},t.prototype._lastCursorLine=function(e,t){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var n=this.cursors.getLastAddedCursor();return this._invokeForAll(t,function(i,o,r){return o===n&&l.OneCursorOp.line(o,e,t.eventData.position,t.eventData.viewPosition,r)}),t.shouldReveal=!1,t.shouldRevealHorizontal=!1,!0},t.prototype._expandLineSelection=function(e){return this._invokeForAll(e,function(e,t,n){return l.OneCursorOp.expandLineSelection(t,n)})},t.prototype._word=function(e,t){return this.cursors.killSecondaryCursors(),this._invokeForAll(t,function(n,i,o){return l.OneCursorOp.word(i,e,i.validatePosition(t.eventData.position),o)})},t.prototype._lastCursorWord=function(e){if(this.configuration.editor.readOnly||this.model.hasEditableRange())return!1;var t=this.cursors.getLastAddedCursor();return this._invokeForAll(e,function(n,i,o){return i===t&&l.OneCursorOp.word(i,!0,i.validatePosition(e.eventData.position),o)}),e.shouldReveal=!1,e.shouldRevealHorizontal=!1,!0},t.prototype._removeSecondaryCursors=function(e){return this.cursors.killSecondaryCursors(),!0},t.prototype._cancelSelection=function(e){return this._invokeForAll(e,function(e,t,n){return l.OneCursorOp.cancelSelection(t,n)})},t.prototype._doApplyEdit=function(e,t,n,i){var o=i(t,e);return o&&(n.executeCommand=o.command,n.shouldPushStackElementBefore=o.shouldPushStackElementBefore,n.shouldPushStackElementAfter=o.shouldPushStackElementAfter,n.isAutoWhitespaceCommand=o.isAutoWhitespaceCommand,n.shouldRevealHorizontal=o.shouldRevealHorizontal,n.cursorPositionChangeReason=o.cursorPositionChangeReason),!0},t.prototype._applyEditForAll=function(e,t){var n=this;return this._invokeForAll(e,function(e,i,o){return n._doApplyEdit(e,i,o,t)},!1,!1)},t.prototype._applyEditForAllSorted=function(e,t){var n=this;return this._invokeForAllSorted(e,function(e,i,o){return n._doApplyEdit(e,i,o,t)},!1,!1)},t.prototype._lineInsertBefore=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.lineInsertBefore(e.config,e.model,e.modelState)})},t.prototype._lineInsertAfter=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.lineInsertAfter(e.config,e.model,e.modelState)})},t.prototype._lineBreakInsert=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.lineBreakInsert(e.config,e.model,e.modelState)})},t.prototype._type=function(e){var t=this,n=e.eventData.text;if("keyboard"===e.eventSource)for(var o,r=function(r,a){var u,l=n.charCodeAt(r);i.isHighSurrogate(l)&&r+1<a?(u=n.charAt(r)+n.charAt(r+1),r++):u=n.charAt(r),e.hasExecutedCommands=s._createAndInterpretHandlerCtx(e.eventSource,e.eventData,function(n){t._applyEditForAll(n,function(e){return y.TypeOperations.typeWithInterceptors(e.config,e.model,e.modelState,u)}),e.cursorPositionChangeReason=n.cursorPositionChangeReason,e.shouldReveal=n.shouldReveal,e.shouldRevealVerticalInCenter=n.shouldRevealVerticalInCenter,e.shouldRevealHorizontal=n.shouldRevealHorizontal})||e.hasExecutedCommands,o=r},s=this,a=0,u=n.length;a<u;a++)r(a,u),a=o;else this._applyEditForAll(e,function(e){return y.TypeOperations.typeWithoutInterceptors(e.config,e.model,e.modelState,n)});return!0},t.prototype._replacePreviousChar=function(e){var t=e.eventData.text,n=e.eventData.replaceCharCnt;return this._applyEditForAll(e,function(e){return y.TypeOperations.replacePreviousChar(e.config,e.model,e.modelState,t,n)})},t.prototype._tab=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.tab(e.config,e.model,e.modelState)})},t.prototype._indent=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.indent(e.config,e.model,e.modelState)})},t.prototype._outdent=function(e){return this._applyEditForAll(e,function(e){return y.TypeOperations.outdent(e.config,e.model,e.modelState)})},t.prototype._distributePasteToCursors=function(e){if(e.eventData.pasteOnNewLine)return null;var t=this.cursors.getSelections();if(1===t.length)return null;for(var n=0;n<t.length;n++)if(t[n].startLineNumber!==t[n].endLineNumber)return null;var i=e.eventData.text.split(/\r\n|\r|\n/);return i.length!==t.length?null:i},t.prototype._paste=function(e){var t=this._distributePasteToCursors(e);return t?this._applyEditForAllSorted(e,function(e,n){return y.TypeOperations.paste(e.config,e.model,e.modelState,t[n],!1)}):this._applyEditForAll(e,function(t){return y.TypeOperations.paste(t.config,t.model,t.modelState,e.eventData.text,e.eventData.pasteOnNewLine)})},t.prototype._deleteLeft=function(e){return this._applyEditForAll(e,function(e){return _.DeleteOperations.deleteLeft(e.config,e.model,e.modelState)})},t.prototype._deleteWordLeft=function(e,t,n){return this._applyEditForAll(n,function(n){return g.WordOperations.deleteWordLeft(n.config,n.model,n.modelState,e,t)})},t.prototype._deleteRight=function(e){return this._applyEditForAll(e,function(e){return _.DeleteOperations.deleteRight(e.config,e.model,e.modelState)})},t.prototype._deleteWordRight=function(e,t,n){return this._applyEditForAll(n,function(n){return g.WordOperations.deleteWordRight(n.config,n.model,n.modelState,e,t)})},t.prototype._cut=function(e){var t=this;return this._applyEditForAll(e,function(e){return _.DeleteOperations.cut(e.config,e.model,e.modelState,t.enableEmptySelectionClipboard)})},t.prototype._revealLine=function(e){var t=e.eventData,n=t.lineNumber+1,i=this.model.validateRange({startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:1});i=new c.Range(i.startLineNumber,i.startColumn,i.endLineNumber,this.model.getLineMaxColumn(i.endLineNumber));var o=0;if(t.at)switch(t.at){case h.RevealLineAtArgument.Top:o=3;break;case h.RevealLineAtArgument.Center:o=1;break;case h.RevealLineAtArgument.Bottom:o=4}return this.emitCursorRevealRange(i,null,o,!1,!1),!0},t.prototype._editorScroll=function(e){var t=e.eventData;switch(t.value=t.value||1,t.to){case h.EditorScrollDirection.Up:case h.EditorScrollDirection.Down:return this._scrollUpOrDown(t,e)}return!0},t.prototype._scrollUpOrDown=function(e,t){if(this._scrollByReveal(e,t))return!0;var n=e.to===h.EditorScrollDirection.Up,i=this.cursors.getAll()[0],o=e.value||1;switch(e.by){case h.EditorScrollByUnit.Page:o=i.config.pageSize*o;break;case h.EditorScrollByUnit.HalfPage:o=Math.round(i.config.pageSize/2)*o}return this.emitCursorScrollRequest((n?-1:1)*o,!!e.revealCursor),!0},t.prototype._scrollByReveal=function(e,t){var n=e.to===h.EditorScrollDirection.Up,i=this.cursors.getAll()[0];if(h.EditorScrollByUnit.Line!==e.by)return!1;if(!n&&i.isLastLineVisibleInViewPort())return!1;var o=n?i.getRangeToRevealModelLinesBeforeViewPortTop(e.value):i.getRangeToRevealModelLinesAfterViewPortBottom(e.value);return this.emitCursorRevealRange(o,null,n?3:4,!1,!0),!0},t.prototype._scrollUp=function(e,t){return t.eventData={to:h.EditorScrollDirection.Up,value:1},t.eventData.by=e?h.EditorScrollByUnit.Page:h.EditorScrollByUnit.WrappedLine,this._editorScroll(t)},t.prototype._scrollDown=function(e,t){return t.eventData={to:h.EditorScrollDirection.Down,value:1},t.eventData.by=e?h.EditorScrollByUnit.Page:h.EditorScrollByUnit.WrappedLine,this._editorScroll(t)},t.prototype._undo=function(e){return e.cursorPositionChangeReason=h.CursorChangeReason.Undo,e.hasExecutedCommands=!0,this._interpretCommandResult(this.model.undo()),!0},t.prototype._cursorUndo=function(e){return 0!==this.cursorUndoStack.length&&(e.cursorPositionChangeReason=h.CursorChangeReason.Undo,e.isCursorUndo=!0,this.cursors.restoreState(this.cursorUndoStack.pop()),!0)},t.prototype._redo=function(e){return e.cursorPositionChangeReason=h.CursorChangeReason.Redo,e.hasExecutedCommands=!0,this._interpretCommandResult(this.model.redo()),!0},t.prototype._externalExecuteCommand=function(e){return this.cursors.killSecondaryCursors(),this._invokeForAll(e,function(t,n,i){return i.shouldPushStackElementBefore=!0,i.shouldPushStackElementAfter=!0,i.executeCommand=e.eventData,!1})},t.prototype._externalExecuteCommands=function(e){return this._invokeForAll(e,function(t,n,i){return i.shouldPushStackElementBefore=!0,i.shouldPushStackElementAfter=!0,i.executeCommand=e.eventData[t],!1})},t}(r.EventEmitter);t.Cursor=b}),define(d[358],h([0,1,277,10,446,2,94,511,16,63,78,74,38,73]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=function(){function e(){this._ranges=[]}return e.prototype.registerChangedTokens=function(e){var t=this._ranges,n=t.length,i=n>0?t[n-1]:null;i&&i.toLineNumber===e-1?i.toLineNumber++:t[n]={fromLineNumber:e,toLineNumber:e}},e.prototype.build=function(){return 0===this._ranges.length?null:{ranges:this._ranges}},e}(),g=function(e){function t(t,n,i){var o=this;return t.push(r.EventType.ModelTokensChanged),t.push(r.EventType.ModelLanguageChanged),o=e.call(this,t,n)||this,o._languageIdentifier=i||l.NULL_LANGUAGE_IDENTIFIER,o._tokenizationListener=u.TokenizationRegistry.onDidChange(function(e){e.languages.indexOf(o._languageIdentifier.language)!==-1&&(o._resetTokenizationState(),o.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:o.getLineCount()}]}))}),o._revalidateTokensTimeout=-1,o._resetTokenizationState(),o}return m(t,e),t.prototype.dispose=function(){this._tokenizationListener.dispose(),this._clearTimers(),this._lastState=null,e.prototype.dispose.call(this)},t.prototype._shouldAutoTokenize=function(){return!1},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._resetTokenizationState()},t.prototype._resetTokenizationState=function(){this._clearTimers();for(var e=0;e<this._lines.length;e++)this._lines[e].resetTokenizationState();if(this._tokenizationSupport=null,this.isTooLargeForHavingAMode()||(this._tokenizationSupport=u.TokenizationRegistry.get(this._languageIdentifier.language)),this._tokenizationSupport){var n=null;try{n=this._tokenizationSupport.getInitialState()}catch(e){e.friendlyMessage=t.MODE_TOKENIZATION_FAILED_MSG,i.onUnexpectedError(e),this._tokenizationSupport=null}n&&this._lines[0].setState(n)}this._colorMap=u.TokenizationRegistry.getColorMap(),this._lastState=null,this._invalidLineStartIndex=0,this._beginBackgroundTokenization()},t.prototype._clearTimers=function(){this._revalidateTokensTimeout!==-1&&(clearTimeout(this._revalidateTokensTimeout),this._revalidateTokensTimeout=-1)},t.prototype._withModelTokensChangedEventBuilder=function(e){var t=new f,n=e(t);if(!this._isDisposing){var i=t.build();i&&this.emit(r.EventType.ModelTokensChanged,i)}return n},t.prototype.getLineTokens=function(e,t){var n=this;if(void 0===t&&(t=!1),e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return t||this._withModelTokensChangedEventBuilder(function(t){n._updateTokensUntilLine(t,e,!0)}),this._getLineTokens(e)},t.prototype._getLineTokens=function(e){return this._lines[e-1].getTokens(this._languageIdentifier.id,this._colorMap)},t.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},t.prototype.getModeId=function(){return this._languageIdentifier.language},t.prototype.setMode=function(e){if(this._languageIdentifier.id!==e.id){var t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._resetTokenizationState(),this.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]}),this._emitModelModeChangedEvent(t)}},t.prototype.getLanguageIdAtPosition=function(e,t){var n=this;if(!this._tokenizationSupport)return this._languageIdentifier.id;var i=this.validatePosition({lineNumber:e,column:t}),o=i.lineNumber,r=i.column;this._withModelTokensChangedEventBuilder(function(e){n._updateTokensUntilLine(e,o,!0)});var s=this._getLineTokens(o),a=s.findTokenAtOffset(r-1);return a.languageId},t.prototype._invalidateLine=function(e){this._lines[e].isInvalid=!0,e<this._invalidLineStartIndex&&(this._invalidLineStartIndex<this._lines.length&&(this._lines[this._invalidLineStartIndex].isInvalid=!0),this._invalidLineStartIndex=e,this._beginBackgroundTokenization())},t.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&this._revalidateTokensTimeout===-1&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()},0))},t.prototype._warmUpTokens=function(){for(var e=Math.min(100,this.getLineCount()),t=e,n=1;n<=e;n++){var i=this._lines[n-1].text;if(i.length>=200){t=n-1;break}}this._revalidateTokensNow(t),this._invalidLineStartIndex<this._lines.length&&this._beginBackgroundTokenization()},t.prototype._revalidateTokensNow=function(e){var t=this;void 0===e&&(e=this._invalidLineStartIndex+1e6),this._withModelTokensChangedEventBuilder(function(n){e=Math.min(t._lines.length,e);for(var i,r=20,s=t._invalidLineStartIndex+1,a=0,u=0,l=0,c=o.StopWatch.create(!1),d=s;d<=e;d++){if(i=c.elapsed(),i>r){e=d-1;break}if(u=t._lines[d-1].text.length,a>0&&(l=i/a*u,i+l>r)){e=d-1;break}t._updateTokensUntilLine(n,d,!1),a+=u,d=Math.max(d,t._invalidLineStartIndex+1)}i=c.elapsed(),t._invalidLineStartIndex<t._lines.length&&t._beginBackgroundTokenization()})},t.prototype._updateTokensUntilLine=function(e,n,o){if(!this._tokenizationSupport)return void(this._invalidLineStartIndex=this._lines.length);for(var r=this._lines.length,s=n-1,a=this._invalidLineStartIndex;a<=s;a++){var u=a+1,c=null,d=this._lines[a].text;try{var h=this._lines[a].getState().clone();c=this._tokenizationSupport.tokenize2(this._lines[a].text,h,0)}catch(e){e.friendlyMessage=t.MODE_TOKENIZATION_FAILED_MSG,i.onUnexpectedError(e)}if(c||(c=l.nullTokenize2(this._languageIdentifier.id,d,this._lines[a].getState(),0)),this._lines[a].setTokens(this._languageIdentifier.id,c.tokens),e.registerChangedTokens(a+1),this._lines[a].isInvalid=!1,u<r)if(null!==this._lines[u].getState()&&c.endState.equals(this._lines[u].getState())){for(var p=a+1;p<r&&!this._lines[p].isInvalid;){if(p+1<r){if(null===this._lines[p+1].getState())break}else if(null===this._lastState)break;p++}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,p),a=p-1}else this._lines[u].setState(c.endState);else this._lastState=c.endState}this._invalidLineStartIndex=Math.max(this._invalidLineStartIndex,s+1)},t.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this.emit(r.EventType.ModelTokensChanged,e)},t.prototype._emitModelModeChangedEvent=function(e){this._isDisposing||this.emit(r.EventType.ModelLanguageChanged,e)},t.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var t=this.validatePosition(e),n=this.getLineContent(t.lineNumber);if(this._invalidLineStartIndex<=t.lineNumber)return p.getWordAtText(t.column,h.LanguageConfigurationRegistry.getWordDefinition(this._languageIdentifier.id),n,0);var i=this._getLineTokens(t.lineNumber),o=t.column-1,r=i.findTokenAtOffset(o),s=p.getWordAtText(t.column,h.LanguageConfigurationRegistry.getWordDefinition(r.languageId),n.substring(r.startOffset,r.endOffset),r.startOffset);if(!s&&r.hasPrev&&r.startOffset===o){var a=r.prev();s=p.getWordAtText(t.column,h.LanguageConfigurationRegistry.getWordDefinition(a.languageId),n.substring(a.startOffset,a.endOffset),a.startOffset)}return s},t.prototype.getWordUntilPosition=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}},t.prototype.tokenIterator=function(e,t){var n=new a.TokenIterator(this,this.validatePosition(e)),i=t(n);return n._invalidate(),i},t.prototype.findMatchingBracketUp=function(e,t){var n=e.toLowerCase(),i=this.validatePosition(t),o=this._getLineTokens(i.lineNumber),r=o.findTokenAtOffset(i.column-1),s=h.LanguageConfigurationRegistry.getBracketsSupport(r.languageId);if(!s)return null;var a=s.textIsBracket[n];return a?this._findMatchingBracketUp(a,i):null},t.prototype.matchBracket=function(e){return this._matchBracket(this.validatePosition(e))},t.prototype._matchBracket=function(e){var t=e.lineNumber,n=this._getLineTokens(t),i=this._lines[t-1].text,o=n.findTokenAtOffset(e.column-1);if(!o)return null;var r=h.LanguageConfigurationRegistry.getBracketsSupport(o.languageId);if(r&&!c.ignoreBracketsInToken(o.tokenType)){var s=Math.max(o.startOffset,e.column-1-r.maxBracketLength),a=Math.min(o.endOffset,e.column-1+r.maxBracketLength),u=d.BracketsUtils.findNextBracketInToken(r.forwardRegex,t,i,e.column-1,a);if(u&&u.startColumn===e.column){var l=i.substring(u.startColumn-1,u.endColumn-1);l=l.toLowerCase();var p=this._matchFoundBracket(u,r.textIsBracket[l],r.textIsOpenBracket[l]);if(p)return p}for(;;){var f=d.BracketsUtils.findNextBracketInToken(r.forwardRegex,t,i,s,a);if(!f)break;if(f.startColumn<=e.column&&e.column<=f.endColumn){var l=i.substring(f.startColumn-1,f.endColumn-1);l=l.toLowerCase();var p=this._matchFoundBracket(f,r.textIsBracket[l],r.textIsOpenBracket[l]);if(p)return p}s=f.endColumn-1}}if(o.hasPrev&&o.startOffset===e.column-1){var g=o.prev(),m=h.LanguageConfigurationRegistry.getBracketsSupport(g.languageId);if(m&&!c.ignoreBracketsInToken(g.tokenType)){var s=Math.max(g.startOffset,e.column-1-m.maxBracketLength),a=o.startOffset,u=d.BracketsUtils.findPrevBracketInToken(m.reversedRegex,t,i,s,a);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){var l=i.substring(u.startColumn-1,u.endColumn-1);l=l.toLowerCase();var p=this._matchFoundBracket(u,m.textIsBracket[l],m.textIsOpenBracket[l]);if(p)return p}}}return null},t.prototype._matchFoundBracket=function(e,t,n){if(n){var i=this._findMatchingBracketDown(t,e.getEndPosition());if(i)return[e,i]}else{var i=this._findMatchingBracketUp(t,e.getStartPosition());if(i)return[e,i]}return null},t.prototype._findMatchingBracketUp=function(e,t){for(var n=e.languageIdentifier.id,i=e.reversedRegex,o=-1,r=t.lineNumber;r>=1;r--){var s=this._getLineTokens(r),a=this._lines[r-1].text,u=void 0,l=void 0;for(r===t.lineNumber?(u=s.findTokenAtOffset(t.column-1),l=t.column-1):(u=s.lastToken(),u&&(l=u.endOffset));u;){if(u.languageId===n&&!c.ignoreBracketsInToken(u.tokenType))for(;;){var h=d.BracketsUtils.findPrevBracketInToken(i,r,a,u.startOffset,l);if(!h)break;var p=a.substring(h.startColumn-1,h.endColumn-1);if(p=p.toLowerCase(),p===e.open?o++:p===e.close&&o--,0===o)return h;l=h.startColumn-1}u=u.prev(),u&&(l=u.endOffset)}}return null},t.prototype._findMatchingBracketDown=function(e,t){for(var n=e.languageIdentifier.id,i=e.forwardRegex,o=1,r=t.lineNumber,s=this.getLineCount();r<=s;r++){var a=this._getLineTokens(r),u=this._lines[r-1].text,l=void 0,h=void 0;for(r===t.lineNumber?(l=a.findTokenAtOffset(t.column-1),h=t.column-1):(l=a.firstToken(),l&&(h=l.startOffset));l;){if(l.languageId===n&&!c.ignoreBracketsInToken(l.tokenType))for(;;){var p=d.BracketsUtils.findNextBracketInToken(i,r,u,h,l.endOffset);if(!p)break;var f=u.substring(p.startColumn-1,p.endColumn-1);if(f=f.toLowerCase(),f===e.open?o++:f===e.close&&o--,0===o)return p;h=p.endColumn-1}l=l.next(),l&&(h=l.startOffset)}}return null},t.prototype.findPrevBracket=function(e){for(var t=this.validatePosition(e),n=-1,i=null,o=t.lineNumber;o>=1;o--){var r=this._getLineTokens(o),s=this._lines[o-1].text,a=void 0,u=void 0;for(o===t.lineNumber?(a=r.findTokenAtOffset(t.column-1),u=t.column-1):(a=r.lastToken(),a&&(u=a.endOffset));a;){if(n!==a.languageId&&(n=a.languageId,i=h.LanguageConfigurationRegistry.getBracketsSupport(n)),i&&!c.ignoreBracketsInToken(a.tokenType)){var l=d.BracketsUtils.findPrevBracketInToken(i.reversedRegex,o,s,a.startOffset,u);if(l)return this._toFoundBracket(i,l)}a=a.prev(),a&&(u=a.endOffset)}}return null},t.prototype.findNextBracket=function(e){for(var t=this.validatePosition(e),n=-1,i=null,o=t.lineNumber,r=this.getLineCount();o<=r;o++){var s=this._getLineTokens(o),a=this._lines[o-1].text,u=void 0,l=void 0;for(o===t.lineNumber?(u=s.findTokenAtOffset(t.column-1),l=t.column-1):(u=s.firstToken(),u&&(l=u.startOffset));u;){if(n!==u.languageId&&(n=u.languageId,i=h.LanguageConfigurationRegistry.getBracketsSupport(n)),i&&!c.ignoreBracketsInToken(u.tokenType)){var p=d.BracketsUtils.findNextBracketInToken(i.forwardRegex,o,a,l,u.endOffset);if(p)return this._toFoundBracket(i,p)}u=u.next(),u&&(l=u.startOffset)}}return null},t.prototype._toFoundBracket=function(e,t){if(!t)return null;var n=this.getValueInRange(t);n=n.toLowerCase();var i=e.textIsBracket[n];return i?{range:t,open:i.open,close:i.close,isOpen:e.textIsOpenBracket[n]}:null},t}(s.TextModel);g.MODE_TOKENIZATION_FAILED_MSG=n.localize(0,null),t.TextModelWithTokens=g}),define(d[359],h([0,1,116,15,72,358]),function(e,t,n,i,o,r){"use strict";var s=0,a=function(e){function t(t,i,o){var r=e.call(this,t,i,o)||this;return r._markerIdGenerator=new n.IdGenerator(++s+";"),r._markerIdToMarker=Object.create(null),r}return m(t,e),t.prototype.dispose=function(){this._markerIdToMarker=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._markerIdToMarker=Object.create(null)},t.prototype._addMarker=function(e,t,n,r){var s=this.validatePosition(new i.Position(t,n)),a=new o.LineMarker(this._markerIdGenerator.nextId(),e,s,r);return this._markerIdToMarker[a.id]=a,this._lines[s.lineNumber-1].addMarker(a),a.id},t.prototype._addMarkers=function(e){if(0===e.length)return[];for(var t=[],n=0,i=e.length;n<i;n++){var r=e[n],s=new o.LineMarker(this._markerIdGenerator.nextId(),r.internalDecorationId,r.position,r.stickToPreviousCharacter);this._markerIdToMarker[s.id]=s,t[n]=s}var a=t.slice(0);a.sort(function(e,t){return e.position.lineNumber-t.position.lineNumber});for(var u=0,l=[],c=0,n=0,i=a.length;n<i;n++){var s=a[n];s.position.lineNumber!==u&&(0!==u&&this._lines[u-1].addMarkers(l),u=s.position.lineNumber,l.length=0,c=0),l[c++]=s}return this._lines[u-1].addMarkers(l),t},t.prototype._changeMarker=function(e,t,n){var o=this._markerIdToMarker[e];if(o){var r=this.validatePosition(new i.Position(t,n));r.lineNumber!==o.position.lineNumber&&(this._lines[o.position.lineNumber-1].removeMarker(o),this._lines[r.lineNumber-1].addMarker(o)),o.setPosition(r)}},t.prototype._changeMarkerStickiness=function(e,t){var n=this._markerIdToMarker[e];n&&(n.stickToPreviousCharacter=t)},t.prototype._getMarker=function(e){var t=this._markerIdToMarker[e];return t?t.position:null},t.prototype._getMarkersCount=function(){return Object.keys(this._markerIdToMarker).length},t.prototype._getLineMarkers=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value "+e+" for `lineNumber`");return this._lines[e-1].getMarkers()},t.prototype._removeMarker=function(e){var t=this._markerIdToMarker[e];t&&(this._lines[t.position.lineNumber-1].removeMarker(t),delete this._markerIdToMarker[e])},t.prototype._removeMarkers=function(e){e.sort(function(e,t){return e.position.lineNumber-t.position.lineNumber});for(var t=0,n=null,i=0,o=e.length;i<o;i++){var r=e[i];delete this._markerIdToMarker[r.id],r.position.lineNumber!==t&&(0!==t&&this._lines[t-1].removeMarkers(n),t=r.position.lineNumber,n=Object.create(null)),n[r.id]=!0}this._lines[t-1].removeMarkers(n)},t}(r.TextModelWithTokens);t.TextModelWithMarkers=a}),define(d[360],h([0,1,10,111,9,3,2,72,15,359]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(){var e=26,t=v++;return t%=2*e,t<e?String.fromCharCode(97+t):String.fromCharCode(65+t-e)}function d(e){return e.replace(/[^a-z0-9\-]/gi," ")}function h(e){return new y(e)}function p(e,t){return void 0===t&&(t=null),new b(e,t)}var f=function(){function e(){this.addedDecorations=[],this.addedDecorationsLen=0,this.changedDecorations=[],this.changedDecorationsLen=0,this.removedDecorations=[],this.removedDecorationsLen=0}return e.prototype.addNewDecoration=function(e){this.addedDecorations[this.addedDecorationsLen++]=e},e.prototype.addRemovedDecoration=function(e){this.removedDecorations[this.removedDecorationsLen++]=e},e.prototype.addMovedDecoration=function(e){this.changedDecorations[this.changedDecorationsLen++]=e},e.prototype.addUpdatedDecoration=function(e){this.changedDecorations[this.changedDecorationsLen++]=e},e}(),g=function(){function e(e,t,n,i,o,r,s){this.id=e,this.internalId=t,this.ownerId=n,this.range=i,this.startMarker=o,this.endMarker=r,this.setOptions(s)}return e.prototype.setOptions=function(e){this.options=e,this.isForValidation=this.options.className===s.ClassName.EditorErrorDecoration||this.options.className===s.ClassName.EditorWarningDecoration},e.prototype.setRange=function(e,t){if(!this.range.equalsRange(t)){var n=this.range.startLineNumber!==this.range.endLineNumber;this.range=t;var i=this.range.startLineNumber!==this.range.endLineNumber;n!==i&&(i?e[this.id]=this:delete e[this.id])}},e}();t.InternalDecoration=g;var v=0,_=function(e){function t(t,n,i){var o=this;return t.push(s.EventType.ModelDecorationsChanged),o=e.call(this,t,n,i)||this,o._instanceId=c(),o._lastDecorationId=0,o._currentDecorationsTracker=null,o._currentDecorationsTrackerCnt=0,o._currentMarkersTracker=null,o._currentMarkersTrackerCnt=0,o._decorations=Object.create(null),o._internalDecorations=Object.create(null),o._multiLineDecorationsMap=Object.create(null),o}return m(t,e),t.prototype.dispose=function(){this._decorations=null,this._internalDecorations=null,this._multiLineDecorationsMap=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._decorations=Object.create(null),this._internalDecorations=Object.create(null),this._multiLineDecorationsMap=Object.create(null)},t._shouldStartMarkerSticksToPreviousCharacter=function(e){return e===s.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges||e===s.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore},t._shouldEndMarkerSticksToPreviousCharacter=function(e){return e===s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges||e===s.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore},t.prototype._getTrackedRangesCount=function(){return Object.keys(this._decorations).length},t.prototype.changeDecorations=function(e,t){void 0===t&&(t=0),this._assertNotDisposed();try{this._beginDeferredEmit();var n=this._acquireDecorationsTracker();return this._changeDecorations(n,t,e)}finally{this._releaseDecorationsTracker(),this._endDeferredEmit()}},t.prototype._changeDecorations=function(e,t,i){var o=this,r={addDecoration:function(n,i){return o._addDecorationImpl(e,t,o.validateRange(n),h(i))},changeDecoration:function(t,n){o._changeDecorationImpl(e,t,o.validateRange(n))},changeDecorationOptions:function(t,n){o._changeDecorationOptionsImpl(e,t,h(n))},removeDecoration:function(t){o._removeDecorationImpl(e,t)},deltaDecorations:function(n,i){return o._deltaDecorationsImpl(e,t,n,o._normalizeDeltaDecorations(i))}},s=null;try{s=i(r)}catch(e){n.onUnexpectedError(e)}return r.addDecoration=null,r.changeDecoration=null,r.removeDecoration=null,r.deltaDecorations=null,s},t.prototype.deltaDecorations=function(e,t,n){return void 0===n&&(n=0),this._assertNotDisposed(),e||(e=[]),this.changeDecorations(function(n){return n.deltaDecorations(e,t)},n)},t.prototype.removeAllDecorationsWithOwnerId=function(e){var t=[];for(var n in this._decorations){var i=this._decorations[n];i.ownerId===e&&t.push(i.id)}this._removeDecorationsImpl(null,t)},t.prototype.getDecorationOptions=function(e){var t=this._decorations[e];return t?t.options:null},t.prototype.getDecorationRange=function(e){var t=this._decorations[e];return t?t.range:null},t.prototype.getLineDecorations=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=!1),e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},t.prototype._getMultiLineDecorations=function(e,t,n){var i=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=[];
for(var u in this._multiLineDecorationsMap){var l=this._multiLineDecorationsMap[u];if(!(t&&l.ownerId&&l.ownerId!==t||n&&l.isForValidation)){var c=l.range;c.startLineNumber>r||c.startLineNumber===r&&c.startColumn>s||c.endLineNumber<i||c.endLineNumber===i&&c.endColumn<o||a.push(l)}}return a},t.prototype._getDecorationsInRange=function(e,t,n){for(var i=e.startLineNumber,o=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=this._getMultiLineDecorations(e,t,n),u={},l=0,c=a.length;l<c;l++)u[a[l].id]=!0;for(var d=i;d<=r;d++)for(var h=this._getLineMarkers(d),l=0,c=h.length;l<c;l++){var p=h[l],f=p.internalDecorationId;if(0!==f){var g=this._internalDecorations[f];if(!u.hasOwnProperty(g.id)&&!(t&&g.ownerId&&g.ownerId!==t||n&&g.isForValidation)){var m=g.range;m.startLineNumber>r||m.startLineNumber===r&&m.startColumn>s||m.endLineNumber<i||m.endLineNumber===i&&m.endColumn<o||(a.push(g),u[g.id]=!0)}}}return a},t.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),a=Math.min(o,Math.max(1,t)),u=this.getLineMaxColumn(a);return this._getDecorationsInRange(new r.Range(s,1,a,u),n,i)},t.prototype.getDecorationsInRange=function(e,t,n){var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},t.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=[];for(var i in this._decorations){var o=this._decorations[i];e&&o.ownerId&&o.ownerId!==e||t&&o.isForValidation||n.push(o)}return n},t.prototype._acquireMarkersTracker=function(){return 0===this._currentMarkersTrackerCnt&&(this._currentMarkersTracker=new a.MarkersTracker),this._currentMarkersTrackerCnt++,this._currentMarkersTracker},t.prototype._releaseMarkersTracker=function(){if(this._currentMarkersTrackerCnt--,0===this._currentMarkersTrackerCnt){var e=this._currentMarkersTracker;this._currentMarkersTracker=null,this._handleTrackedMarkers(e)}},t.prototype._handleTrackedMarkers=function(e){var n=e.getDecorationIds();if(0!==n.length){n.sort();for(var i=[],o=0,r=0,s=0,a=n.length;s<a;s++){var u=n[s];if(u!==r){r=u;var l=this._internalDecorations[u];if(l){var c=l.startMarker.position,d=l.endMarker.position,h=t._createRangeFromMarkers(c,d);l.setRange(this._multiLineDecorationsMap,h),i[o++]=l.id}}}if(i.length>0){var p={addedDecorations:[],changedDecorations:i,removedDecorations:[]};this.emitModelDecorationsChangedEvent(p)}}},t._createRangeFromMarkers=function(e,t){return t.isBefore(e)?new r.Range(e.lineNumber,e.column,e.lineNumber,e.column):new r.Range(e.lineNumber,e.column,t.lineNumber,t.column)},t.prototype._acquireDecorationsTracker=function(){return 0===this._currentDecorationsTrackerCnt&&(this._currentDecorationsTracker=new f),this._currentDecorationsTrackerCnt++,this._currentDecorationsTracker},t.prototype._releaseDecorationsTracker=function(){if(this._currentDecorationsTrackerCnt--,0===this._currentDecorationsTrackerCnt){var e=this._currentDecorationsTracker;this._currentDecorationsTracker=null,this._handleTrackedDecorations(e)}},t.prototype._handleTrackedDecorations=function(e){if(0!==e.addedDecorationsLen||0!==e.changedDecorationsLen||0!==e.removedDecorationsLen){var t={addedDecorations:e.addedDecorations,changedDecorations:e.changedDecorations,removedDecorations:e.removedDecorations};this.emitModelDecorationsChangedEvent(t)}},t.prototype.emitModelDecorationsChangedEvent=function(e){this._isDisposing||this.emit(s.EventType.ModelDecorationsChanged,e)},t.prototype._normalizeDeltaDecorations=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n];t.push(new C(n,this.validateRange(o.range),h(o.options)))}return t},t.prototype._externalDecorationId=function(e){return this._instanceId+";"+e},t.prototype._addDecorationImpl=function(e,n,i,o){var r=this.validateRange(i),s=++this._lastDecorationId,a=this._externalDecorationId(s),l=this._addMarkers([{internalDecorationId:s,position:new u.Position(r.startLineNumber,r.startColumn),stickToPreviousCharacter:t._shouldStartMarkerSticksToPreviousCharacter(o.stickiness)},{internalDecorationId:s,position:new u.Position(r.endLineNumber,r.endColumn),stickToPreviousCharacter:t._shouldEndMarkerSticksToPreviousCharacter(o.stickiness)}]),c=new g(a,s,n,r,l[0],l[1],o);return this._decorations[a]=c,this._internalDecorations[s]=c,r.startLineNumber!==r.endLineNumber&&(this._multiLineDecorationsMap[a]=c),e.addNewDecoration(a),a},t.prototype._addDecorationsImpl=function(e,n,i){for(var o=[],r=[],s=[],a=0,l=i.length;a<l;a++){var c=i[a],d=c.range,h=c.options.stickiness,p=++this._lastDecorationId,f=this._externalDecorationId(p);o[a]=p,r[a]=f,s[2*a]={internalDecorationId:p,position:new u.Position(d.startLineNumber,d.startColumn),stickToPreviousCharacter:t._shouldStartMarkerSticksToPreviousCharacter(h)},s[2*a+1]={internalDecorationId:p,position:new u.Position(d.endLineNumber,d.endColumn),stickToPreviousCharacter:t._shouldEndMarkerSticksToPreviousCharacter(h)}}for(var m=this._addMarkers(s),a=0,l=i.length;a<l;a++){var c=i[a],d=c.range,p=o[a],f=r[a],v=m[2*a],_=m[2*a+1],y=new g(f,p,n,d,v,_,c.options);this._decorations[f]=y,this._internalDecorations[p]=y,d.startLineNumber!==d.endLineNumber&&(this._multiLineDecorationsMap[f]=y),e.addNewDecoration(f)}return r},t.prototype._changeDecorationImpl=function(e,t,n){var i=this._decorations[t];if(i){var o=i.startMarker;n.startLineNumber!==o.position.lineNumber&&(this._lines[o.position.lineNumber-1].removeMarker(o),this._lines[n.startLineNumber-1].addMarker(o)),o.setPosition(new u.Position(n.startLineNumber,n.startColumn));var r=i.endMarker;n.endLineNumber!==r.position.lineNumber&&(this._lines[r.position.lineNumber-1].removeMarker(r),this._lines[n.endLineNumber-1].addMarker(r)),r.setPosition(new u.Position(n.endLineNumber,n.endColumn)),i.setRange(this._multiLineDecorationsMap,n),e.addMovedDecoration(t)}},t.prototype._changeDecorationOptionsImpl=function(e,n,i){var o=this._decorations[n];o&&(o.options.stickiness!==i.stickiness&&(o.startMarker.stickToPreviousCharacter=t._shouldStartMarkerSticksToPreviousCharacter(i.stickiness),o.endMarker.stickToPreviousCharacter=t._shouldEndMarkerSticksToPreviousCharacter(i.stickiness)),o.setOptions(i),e.addUpdatedDecoration(n))},t.prototype._removeDecorationImpl=function(e,t){var n=this._decorations[t];n&&(this._removeMarkers([n.startMarker,n.endMarker]),delete this._multiLineDecorationsMap[t],delete this._decorations[t],delete this._internalDecorations[n.internalId],e&&e.addRemovedDecoration(t))},t.prototype._removeDecorationsImpl=function(e,t){for(var n=[],i=0,o=0,r=t.length;o<r;o++){var s=t[o],a=this._decorations[s];a&&(e&&e.addRemovedDecoration(s),n[i++]=a.startMarker,n[i++]=a.endMarker,delete this._multiLineDecorationsMap[s],delete this._decorations[s],delete this._internalDecorations[a.internalId])}n.length>0&&this._removeMarkers(n)},t.prototype._resolveOldDecorations=function(e){for(var t=[],n=0,i=e.length;n<i;n++){var o=e[n],r=this._decorations[o];r&&t.push(r)}return t},t.prototype._deltaDecorationsImpl=function(e,t,n,i){if(0===n.length)return this._addDecorationsImpl(e,t,i);if(0===i.length)return this._removeDecorationsImpl(e,n),[];var o=this._resolveOldDecorations(n);o.sort(function(e,t){return r.Range.compareRangesUsingStarts(e.range,t.range)}),i.sort(function(e,t){return r.Range.compareRangesUsingStarts(e.range,t.range)});for(var s=[],a=0,u=o.length,l=0,c=i.length,d=[],h=[];a<u&&l<c;){var p=o[a],f=i[l],g=r.Range.compareRangesUsingStarts(p.range,f.range);g<0?(h.push(p.id),a++):g>0?(d.push(f),l++):p.options.equals(f.options)?(s[f.index]=p.id,a++,l++):(h.push(p.id),a++)}for(;a<u;)h.push(o[a].id),a++;for(;l<c;)d.push(i[l]),l++;if(h.length>0&&this._removeDecorationsImpl(e,h),d.length>0)for(var m=this._addDecorationsImpl(e,t,d),v=0,_=d.length;v<_;v++)s[d[v].index]=m[v];return s},t}(l.TextModelWithMarkers);t.TextModelWithDecorations=_;var y=function(){function e(e){this.stickiness=e.stickiness||s.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges,this.className=e.className?d(e.className):o.empty,this.hoverMessage=e.hoverMessage||[],this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||o.empty,this.isWholeLine=e.isWholeLine||!1,this.overviewRuler=p(e.overviewRuler,e.showInOverviewRuler),this.glyphMarginClassName=e.glyphMarginClassName?d(e.glyphMarginClassName):o.empty,this.linesDecorationsClassName=e.linesDecorationsClassName?d(e.linesDecorationsClassName):o.empty,this.marginClassName=e.marginClassName?d(e.marginClassName):o.empty,this.inlineClassName=e.inlineClassName?d(e.inlineClassName):o.empty,this.beforeContentClassName=e.beforeContentClassName?d(e.beforeContentClassName):o.empty,this.afterContentClassName=e.afterContentClassName?d(e.afterContentClassName):o.empty}return e._overviewRulerEquals=function(e,t){return e.color===t.color&&e.position===t.position&&e.darkColor===t.darkColor},e.prototype.equals=function(t){return this.stickiness===t.stickiness&&this.className===t.className&&this.isWholeLine===t.isWholeLine&&this.showInOverviewRuler===t.showInOverviewRuler&&this.glyphMarginClassName===t.glyphMarginClassName&&this.linesDecorationsClassName===t.linesDecorationsClassName&&this.marginClassName===t.marginClassName&&this.inlineClassName===t.inlineClassName&&this.beforeContentClassName===t.beforeContentClassName&&this.afterContentClassName===t.afterContentClassName&&i.markedStringsEquals(this.hoverMessage,t.hoverMessage)&&i.markedStringsEquals(this.glyphMarginHoverMessage,t.glyphMarginHoverMessage)&&e._overviewRulerEquals(this.overviewRuler,t.overviewRuler)},e}();t.ModelDecorationOptions=y;var C=function(){function e(e,t,n){this.index=e,this.range=t,this.options=n}return e}(),b=function(){function e(e,t){this.color=o.empty,this.darkColor=o.empty,this.position=s.OverviewRulerLane.Center,t&&(this.color=t),e&&e.color&&(this.color=e.color),e&&e.darkColor&&(this.darkColor=e.darkColor),e&&e.hasOwnProperty("position")&&(this.position=e.position)}return e}()}),define(d[361],h([0,1,3,2,505,72,360,9,15]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(e){function t(t,n,r){var s=this;return t.push(i.EventType.ModelRawContentChanged),s=e.call(this,t,n,r)||this,s._commandManager=new o.EditStack(s),s._isUndoing=!1,s._isRedoing=!1,s._hasEditableRange=!1,s._editableRangeId=null,s._trimAutoWhitespaceLines=null,s}return m(t,e),t.prototype.onDidChangeRawContent=function(e){return this.addListener2(i.EventType.ModelRawContentChanged,e)},t.prototype.onDidChangeContent=function(e){return this.addListener2(i.EventType.ModelContentChanged2,e)},t.prototype.dispose=function(){this._commandManager=null,e.prototype.dispose.call(this)},t.prototype._resetValue=function(t){e.prototype._resetValue.call(this,t),this._commandManager=new o.EditStack(this),this._hasEditableRange=!1,this._editableRangeId=null,this._trimAutoWhitespaceLines=null},t.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},t.prototype.pushEditOperations=function(e,t,n){try{return this._beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._endDeferredEmit()}},t.prototype._pushEditOperations=function(e,t,i){var o=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var r=t.map(function(e){return{range:o.validateRange(e.range),text:e.text}}),s=!0,a=0,u=e.length;a<u;a++){for(var l=e[a],c=!1,d=0,h=r.length;d<h;d++){var p=r[d].range,f=p.startLineNumber>l.endLineNumber,g=l.startLineNumber>p.endLineNumber;if(!f&&!g){c=!0;break}}if(!c){s=!1;break}}if(s)for(var a=0,u=this._trimAutoWhitespaceLines.length;a<u;a++){for(var m=this._trimAutoWhitespaceLines[a],v=this.getLineMaxColumn(m),_=!0,d=0,h=r.length;d<h;d++){var p=r[d].range,y=r[d].text;if(!(m<p.startLineNumber||m>p.endLineNumber||m===p.startLineNumber&&p.startColumn===v&&p.isEmpty()&&y&&y.length>0&&"\n"===y.charAt(0))){_=!1;break}}_&&t.push({identifier:null,range:new n.Range(m,1,m,v),text:null,forceMoveMarkers:!1,isAutoWhitespaceEdit:!1})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,i)},t.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},t.prototype._toSingleEditOperation=function(e){for(var t=!1,i=e[0].range,o=e[e.length-1].range,r=new n.Range(i.startLineNumber,i.startColumn,o.endLineNumber,o.endColumn),s=i.startLineNumber,a=i.startColumn,u=[],l=0,c=e.length;l<c;l++){var d=e[l],h=d.range;t=t||d.forceMoveMarkers;for(var p=s;p<h.startLineNumber;p++)p===s?u.push(this._lines[p-1].text.substring(a-1)):(u.push("\n"),u.push(this._lines[p-1].text));if(h.startLineNumber===s?u.push(this._lines[h.startLineNumber-1].text.substring(a-1,h.startColumn-1)):(u.push("\n"),u.push(this._lines[h.startLineNumber-1].text.substring(0,h.startColumn-1))),d.lines)for(var f=0,g=d.lines.length;f<g;f++)0!==f&&u.push("\n"),u.push(d.lines[f]);s=d.range.endLineNumber,a=d.range.endColumn}return{sortIndex:0,identifier:e[0].identifier,range:r,rangeLength:this.getValueLengthInRange(r),lines:u.join("").split("\n"),forceMoveMarkers:t,isAutoWhitespaceEdit:!1}},t._sortOpsAscending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i},t._sortOpsDescending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i},t.prototype.applyEdits=function(e){try{this._beginDeferredEmit();var t=this._acquireMarkersTracker();return this._applyEdits(t,e)}finally{this._releaseMarkersTracker(),this._endDeferredEmit()}},t.prototype._applyEdits=function(e,n){if(0===n.length)return[];for(var i=this._mightContainRTL,o=this._mightContainNonBasicASCII,r=[],s=0;s<n.length;s++){var u=n[s],l=this.validateRange(u.range);!i&&u.text&&(i=a.containsRTL(u.text)),!o&&u.text&&(o=!a.isBasicASCII(u.text)),r[s]={sortIndex:s,identifier:u.identifier,range:l,rangeLength:this.getValueLengthInRange(l),lines:u.text?u.text.split(/\r\n|\r|\n/):null,forceMoveMarkers:u.forceMoveMarkers,isAutoWhitespaceEdit:u.isAutoWhitespaceEdit||!1}}r.sort(t._sortOpsAscending);for(var s=0,c=r.length-1;s<c;s++){var d=r[s].range.getEndPosition(),h=r[s+1].range.getStartPosition();if(h.isBefore(d))throw new Error("Overlapping ranges are not allowed!")}r=this._reduceOperations(r);for(var p=this.getEditableRange(),f=p.getStartPosition(),g=p.getEndPosition(),s=0;s<r.length;s++){var m=r[s].range;if(!f.isBeforeOrEqual(m.getStartPosition())||!m.getEndPosition().isBeforeOrEqual(g))throw new Error("Editing outside of editable range not allowed!")}for(var v=t._getInverseEditRanges(r),_=[],y=[],s=0;s<r.length;s++){var u=r[s],C=v[s];if(_[s]={identifier:u.identifier,range:C,text:this.getValueInRange(u.range),forceMoveMarkers:u.forceMoveMarkers},this._options.trimAutoWhitespace&&u.isAutoWhitespaceEdit&&u.range.isEmpty())for(var b=C.startLineNumber;b<=C.endLineNumber;b++){var w="";b===C.startLineNumber&&(w=this.getLineContent(u.range.startLineNumber),a.firstNonWhitespaceIndex(w)!==-1)||y.push({lineNumber:b,oldContent:w})}}if(this._mightContainRTL=i,this._mightContainNonBasicASCII=o,this._doApplyEdits(e,r),this._trimAutoWhitespaceLines=null,this._options.trimAutoWhitespace&&y.length>0){y.sort(function(e,t){return t.lineNumber-e.lineNumber}),this._trimAutoWhitespaceLines=[];for(var s=0,S=y.length;s<S;s++){var b=y[s].lineNumber;if(!(s>0&&y[s-1].lineNumber===b)){var E=y[s].oldContent,L=this.getLineContent(b);0!==L.length&&L!==E&&a.firstNonWhitespaceIndex(L)===-1&&this._trimAutoWhitespaceLines.push(b)}}}return _},t._getInverseEditRanges=function(e){for(var t,i,o=[],r=null,s=0,a=e.length;s<a;s++){var u=e[s],l=void 0,c=void 0;r?r.range.endLineNumber===u.range.startLineNumber?(l=t,c=i+(u.range.startColumn-r.range.endColumn)):(l=t+(u.range.startLineNumber-r.range.endLineNumber),c=u.range.startColumn):(l=u.range.startLineNumber,c=u.range.startColumn);var d=void 0;if(u.lines&&u.lines.length>0){var h=u.lines.length,p=u.lines[0],f=u.lines[h-1];d=1===h?new n.Range(l,c,l,c+p.length):new n.Range(l,c,l+h-1,f.length+1)}else d=new n.Range(l,c,l,c);t=d.endLineNumber,i=d.endColumn,o.push(d),r=u}return o},t.prototype._doApplyEdits=function(e,o){var s=this,a=this._options.tabSize;o.sort(t._sortOpsDescending);for(var l=[],c=[],d=[],h=function(e){e.startColumn===e.endColumn&&0===e.text.length||d.push(e)},p=function(){if(0!==d.length){d.reverse();for(var t=d[0].lineNumber,n=0,i=1,o=d.length;i<o;i++){var r=d[i].lineNumber;r!==t&&(s._invalidateLine(t-1),s._lines[t-1].applyEdits(e,d.slice(n,i),a),s._lineStarts&&s._lineStarts.changeValue(t-1,s._lines[t-1].text.length+s._EOL.length),l.push(s._createLineChangedEvent(t)),t=r,n=i)}s._invalidateLine(t-1),s._lines[t-1].applyEdits(e,d.slice(n,d.length),a),s._lineStarts&&s._lineStarts.changeValue(t-1,s._lines[t-1].text.length+s._EOL.length),l.push(s._createLineChangedEvent(t)),d=[]}},f=o[o.length-1].range.startLineNumber,g=o[0].range.endLineNumber+1,m=0,v=0,_=o.length;v<_;v++){var y=o[v],C=y.range.startLineNumber,b=y.range.startColumn,w=y.range.endLineNumber,S=y.range.endColumn;if(C!==w||b!==S||y.lines&&0!==y.lines.length){var E=w-C,L=y.lines?y.lines.length-1:0,N=Math.min(E,L);m+=L-E;for(var T=N;T>=0;T--){var x=C+T;h({lineNumber:x,startColumn:x===C?b:1,endColumn:x===w?S:this.getLineMaxColumn(x),text:y.lines?y.lines[T]:"",forceMoveMarkers:y.forceMoveMarkers})}if(N<E){p();var M=C+N,I=this.getLineMaxColumn(M),D=this._lines[w-1].split(e,S,!1,a);this._invalidateLine(M-1);for(var R=w-M,k=[],T=0;T<R;T++){var O=M+T;k=k.concat(this._lines[O].deleteLine())}this._lines.splice(M,R),this._lineStarts&&this._lineStarts.removeValues(M,R),this._lines[M-1].append(e,D,a),this._lineStarts&&this._lineStarts.changeValue(M-1,this._lines[M-1].text.length+this._EOL.length);for(var P=new u.Position(M,I),T=0,A=k.length;T<A;T++)k[T].updatePosition(e,P);this._lines[M-1].addMarkers(k),l.push(this._createLineChangedEvent(M)),l.push(this._createLinesDeletedEvent(M+1,M+R))}if(N<L){p();var W=C+N,F=W===C?b:1;y.lines&&(F+=y.lines[N].length);var V=this._lines[W-1].split(e,F,y.forceMoveMarkers,a);this._lineStarts&&this._lineStarts.changeValue(W-1,this._lines[W-1].text.length+this._EOL.length),l.push(this._createLineChangedEvent(W)),this._invalidateLine(W-1);for(var H=[],B=new Uint32Array(L-N),T=N+1;T<=L;T++){var U=C+T;this._lines.splice(U-1,0,new r.ModelLine(U,y.lines[T],a)),H.push(y.lines[T]),B[T-N-1]=y.lines[T].length+this._EOL.length}H[H.length-1]+=V.text,this._lineStarts&&this._lineStarts.insertValues(C+N,B),this._lines[C+L-1].append(e,V,a),this._lineStarts&&this._lineStarts.changeValue(C+L-1,this._lines[C+L-1].text.length+this._EOL.length),l.push(this._createLinesInsertedEvent(W+1,C+L,H.join("\n")))}c.push({range:new n.Range(C,b,w,S),rangeLength:y.rangeLength,text:y.lines?y.lines.join(this.getEOL()):"",eol:this._EOL,versionId:-1,isUndoing:this._isUndoing,isRedoing:this._isRedoing})}}p(),g=Math.max(1,Math.min(this.getLineCount(),g+m)),0!==m&&(g=this.getLineCount());for(var z=f;z<=g;z++)this._lines[z-1].updateLineNumber(e,z);if(0!==l.length||0!==c.length){0===l.length&&l.push(this._createLineChangedEvent(f));var K=Math.max(l.length,c.length),j=this.getVersionId()+K;this._setVersionId(j);for(var v=l.length-1,q=j;v>=0;v--,q--)l[v].versionId=q;for(var v=c.length-1,q=j;v>=0;v--,q--)c[v].versionId=q;for(var v=0,_=l.length;v<_;v++)this.emit(i.EventType.ModelRawContentChanged,l[v]);for(var v=0,_=c.length;v<_;v++)this.emit(i.EventType.ModelContentChanged2,c[v])}this._resetIndentRanges()},t.prototype._assertLineNumbersOK=function(){for(var e=0,t=0,n=this._lines.length;t<n;t++){var i=this._lines[t],o=t+1;if(i.lineNumber!==o)throw new Error("Invalid lineNumber at line: "+o+"; text is: "+this.getValue());for(var r=i.getMarkers(),s=0,a=r.length;s<a;s++){e++;var u=r[s].id,l=this._markerIdToMarker[u];if(l.position.lineNumber!==i.lineNumber)throw new Error("Misplaced marker with id "+u)}}var c=Object.keys(this._markerIdToMarker).length;if(c!==e)throw new Error("There are misplaced markers!")},t.prototype._undo=function(){this._isUndoing=!0;var e=this._commandManager.undo();return this._isUndoing=!1,e?(this._overwriteAlternativeVersionId(e.recordedVersionId),e.selections):null},t.prototype.undo=function(){try{return this._beginDeferredEmit(),this._acquireMarkersTracker(),this._undo()}finally{this._releaseMarkersTracker(),this._endDeferredEmit()}},t.prototype._redo=function(){this._isRedoing=!0;var e=this._commandManager.redo();return this._isRedoing=!1,e?(this._overwriteAlternativeVersionId(e.recordedVersionId),e.selections):null},t.prototype.redo=function(){try{return this._beginDeferredEmit(),this._acquireMarkersTracker(),this._redo()}finally{this._releaseMarkersTracker(),this._endDeferredEmit()}},t.prototype.setEditableRange=function(e){var t=this;this._commandManager.clear(),(this._hasEditableRange||e)&&this.changeDecorations(function(n){t._hasEditableRange&&(n.removeDecoration(t._editableRangeId),t._editableRangeId=null,t._hasEditableRange=!1),e&&(t._hasEditableRange=!0,t._editableRangeId=n.addDecoration(e,{stickiness:i.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges}))})},t.prototype.hasEditableRange=function(){return this._hasEditableRange},t.prototype.getEditableRange=function(){return this._hasEditableRange?this.getDecorationRange(this._editableRangeId):this.getFullModelRange()},t.prototype._createLineChangedEvent=function(e){return{changeType:i.EventType.ModelRawContentChangedLineChanged,lineNumber:e,detail:this._lines[e-1].text,versionId:-1,isUndoing:this._isUndoing,isRedoing:this._isRedoing}},t.prototype._createLinesDeletedEvent=function(e,t){return{changeType:i.EventType.ModelRawContentChangedLinesDeleted,fromLineNumber:e,toLineNumber:t,versionId:-1,isUndoing:this._isUndoing,isRedoing:this._isRedoing}},t.prototype._createLinesInsertedEvent=function(e,t,n){return{changeType:i.EventType.ModelRawContentChangedLinesInserted,fromLineNumber:e,toLineNumber:t,detail:n,versionId:-1,isUndoing:this._isUndoing,isRedoing:this._isRedoing}},t}(s.TextModelWithDecorations);t.EditableTextModel=l}),define(d[127],h([0,1,27,2,361,94]),function(e,t,n,i,o,r){"use strict";var s=0,a={},u=function(e){function t(t,o,r){void 0===r&&(r=null);var u=e.call(this,[i.EventType.ModelDispose],t,o)||this;if(s++,u.id="$model"+s,"undefined"==typeof r||null===r?u._associatedResource=n.default.parse("inmemory://model/"+s):u._associatedResource=r,a[String(u._associatedResource)])throw new Error("Cannot instantiate a second Model with the same URI");return u._attachedEditorCount=0,a[String(u._associatedResource)]=!0,u}return m(t,e),t.prototype.onDidChangeDecorations=function(e){return this.addListener2(i.EventType.ModelDecorationsChanged,e)},t.prototype.onDidChangeOptions=function(e){return this.addListener2(i.EventType.ModelOptionsChanged,e)},t.prototype.onWillDispose=function(e){return this.addListener2(i.EventType.ModelDispose,e)},t.prototype.onDidChangeLanguage=function(e){return this.addListener2(i.EventType.ModelLanguageChanged,e)},t.prototype.addBulkListener=function(t){return e.prototype.addBulkListener.call(this,t)},t.createFromString=function(e,n,i,o){void 0===n&&(n=r.TextModel.DEFAULT_CREATION_OPTIONS),void 0===i&&(i=null),void 0===o&&(o=null);var s=r.TextModel.toRawText(e,n);return new t(s,i,o)},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this._isDisposing=!0,delete a[String(this._associatedResource)],this.emit(i.EventType.ModelDispose),e.prototype.dispose.call(this),this._isDisposing=!1},t.prototype.onBeforeAttached=function(){this._attachedEditorCount++,this._warmUpTokens()},t.prototype.onBeforeDetached=function(){this._attachedEditorCount--},t.prototype._shouldAutoTokenize=function(){return this.isAttachedToEditor()},t.prototype.isAttachedToEditor=function(){return this._attachedEditorCount>0},Object.defineProperty(t.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),t}(o.EditableTextModel);t.Model=u}),define(d[363],h([0,1,4,16,2,64]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t){var n=this;this._disposables=[],this._editor=e,this._langId=o.EditorContextKeys.LanguageId.bindTo(t),this._hasCompletionItemProvider=o.ModeContextKeys.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=o.ModeContextKeys.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=o.ModeContextKeys.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=o.ModeContextKeys.hasDefinitionProvider.bindTo(t),this._hasImplementationProvider=o.ModeContextKeys.hasImplementationProvider.bindTo(t),this._hasHoverProvider=o.ModeContextKeys.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=o.ModeContextKeys.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=o.ModeContextKeys.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=o.ModeContextKeys.hasReferenceProvider.bindTo(t),this._hasRenameProvider=o.ModeContextKeys.hasRenameProvider.bindTo(t),this._hasDocumentFormattingProvider=o.ModeContextKeys.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=o.ModeContextKeys.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasSignatureHelpProvider=o.ModeContextKeys.hasSignatureHelpProvider.bindTo(t),this._isInWalkThrough=o.ModeContextKeys.isInEmbeddedEditor.bindTo(t),this._disposables.push(e.onDidChangeModel(function(){return n._update()})),this._disposables.push(e.onDidChangeModelLanguage(function(){return n._update()})),i.SuggestRegistry.onDidChange(this._update,this,this._disposables),i.CodeActionProviderRegistry.onDidChange(this._update,this,this._disposables),i.CodeLensProviderRegistry.onDidChange(this._update,this,this._disposables),i.DefinitionProviderRegistry.onDidChange(this._update,this,this._disposables),i.ImplementationProviderRegistry.onDidChange(this._update,this,this._disposables),i.HoverProviderRegistry.onDidChange(this._update,this,this._disposables),i.DocumentHighlightProviderRegistry.onDidChange(this._update,this,this._disposables),i.DocumentSymbolProviderRegistry.onDidChange(this._update,this,this._disposables),i.ReferenceProviderRegistry.onDidChange(this._update,this,this._disposables),i.RenameProviderRegistry.onDidChange(this._update,this,this._disposables),i.DocumentFormattingEditProviderRegistry.onDidChange(this._update,this,this._disposables),i.DocumentRangeFormattingEditProviderRegistry.onDidChange(this._update,this,this._disposables),i.SignatureHelpProviderRegistry.onDidChange(this._update,this,this._disposables),this._update()}return e.prototype.dispose=function(){this._disposables=n.dispose(this._disposables)},e.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasImplementationProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()},e.prototype._update=function(){var e=this._editor.getModel();return e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(i.SuggestRegistry.has(e)),this._hasCodeActionsProvider.set(i.CodeActionProviderRegistry.has(e)),this._hasCodeLensProvider.set(i.CodeLensProviderRegistry.has(e)),this._hasDefinitionProvider.set(i.DefinitionProviderRegistry.has(e)),this._hasImplementationProvider.set(i.ImplementationProviderRegistry.has(e)),this._hasHoverProvider.set(i.HoverProviderRegistry.has(e)),this._hasDocumentHighlightProvider.set(i.DocumentHighlightProviderRegistry.has(e)),this._hasDocumentSymbolProvider.set(i.DocumentSymbolProviderRegistry.has(e)),this._hasReferenceProvider.set(i.ReferenceProviderRegistry.has(e)),this._hasRenameProvider.set(i.RenameProviderRegistry.has(e)),this._hasSignatureHelpProvider.set(i.SignatureHelpProviderRegistry.has(e)),this._hasDocumentFormattingProvider.set(i.DocumentFormattingEditProviderRegistry.has(e)||i.DocumentRangeFormattingEditProviderRegistry.has(e)),this._hasDocumentSelectionFormattingProvider.set(i.DocumentRangeFormattingEditProviderRegistry.has(e)),void this._isInWalkThrough.set(e.uri.scheme===r.Schemas.walkThroughSnippet)):void this.reset()},e}();t.EditorModeContext=s}),define(d[45],h([0,1,14,2]),function(e,t,n,i){"use strict";function o(e){if(e){var t=e.getControl();if(t){if(i.isCommonCodeEditor(t))return{codeEditor:t,diffEditor:null};if(i.isCommonDiffEditor(t))return{codeEditor:null,diffEditor:t}}}return{codeEditor:null,diffEditor:null}}function r(e){var t=o(e);return t.codeEditor||t.diffEditor&&t.diffEditor.getModifiedEditor()||null}t.ICodeEditorService=n.createDecorator("codeEditorService"),t.getCodeOrDiffEditor=o,t.getCodeEditor=r}),define(d[129],h([0,1,17,4,6,156,188,2,16,44,216,38,56]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=6e4,f=3e5,g=function(){function e(e,t){var i=this;this._workerManager=new v(e);var o=u.LinkProviderRegistry.register("*",{provideLinks:function(e,t){return n.wireCancellationToken(t,i._workerManager.withWorker().then(function(t){return t.computeLinks(e.uri)}))}}),r=u.SuggestRegistry.register("*",{triggerCharacters:[],provideCompletionItems:function(e,n,o){if(t.lookup("editor.wordBasedSuggestions").value)return i._workerManager.withWorker().then(function(t){return t.textualSuggest(e.uri,n)})}});this._registrations=[o,r]}return e.prototype.dispose=function(){this._workerManager.dispose(),i.dispose(this._registrations)},e.prototype.computeDiff=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.computeDiff(e,t,n)})},e.prototype.computeDirtyDiff=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.computeDirtyDiff(e,t,n)})},e.prototype.computeMoreMinimalEdits=function(e,t,n){return Array.isArray(t)&&0!==t.length?this._workerManager.withWorker().then(function(i){return i.computeMoreMinimalEdits(e,t,n)}):o.TPromise.as(t)},e.prototype.navigateValueSet=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.navigateValueSet(e,t,n)})},e}();g=y([C(0,l.IModelService),C(1,h.IConfigurationService)],g),t.EditorWorkerServiceImpl=g;var v=function(e){function t(t){var i=e.call(this)||this;i._modelService=t,i._editorWorkerClient=null;var o=i._register(new n.IntervalTimer);return o.cancelAndSet(function(){return i._checkStopIdleWorker()},Math.round(f/2)),i._register(i._modelService.onModelRemoved(function(e){return i._checkStopEmptyWorker()})),i}return m(t,e),t.prototype.dispose=function(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),e.prototype.dispose.call(this)},t.prototype._checkStopEmptyWorker=function(){if(this._editorWorkerClient){var e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype._checkStopIdleWorker=function(){if(this._editorWorkerClient){var e=(new Date).getTime()-this._lastWorkerUsedTime;e>f&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype.withWorker=function(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new w(this._modelService,"editorWorkerService")),o.TPromise.as(this._editorWorkerClient)},t}(i.Disposable),_=function(e){function t(t,i,o){var r=e.call(this)||this;if(r._syncedModels=Object.create(null),r._syncedModelsLastUsedTime=Object.create(null),r._proxy=t,r._modelService=i,!o){var s=new n.IntervalTimer;s.cancelAndSet(function(){return r._checkStopModelSync()},Math.round(p/2)),r._register(s)}return r}return m(t,e),t.prototype.dispose=function(){for(var t in this._syncedModels)i.dispose(this._syncedModels[t]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),e.prototype.dispose.call(this)},t.prototype.esureSyncedResources=function(e){for(var t=0;t<e.length;t++){var n=e[t],i=n.toString();this._syncedModels[i]||this._beginModelSync(n),this._syncedModels[i]&&(this._syncedModelsLastUsedTime[i]=(new Date).getTime());
}},t.prototype._checkStopModelSync=function(){var e=(new Date).getTime(),t=[];for(var n in this._syncedModelsLastUsedTime){var i=e-this._syncedModelsLastUsedTime[n];i>p&&t.push(n)}for(var o=0;o<t.length;o++)this._stopModelSync(t[o])},t.prototype._beginModelSync=function(e){var t=this,n=this._modelService.getModel(e);if(n){var i=e.toString();this._proxy.acceptNewModel({url:n.uri.toString(),value:n.toRawText(),versionId:n.getVersionId()});var o=[];o.push(n.addBulkListener(function(e){for(var n=[],o=0,r=e.length;o<r;o++){var s=e[o];switch(s.getType()){case a.EventType.ModelContentChanged2:n.push(s.getData());break;case a.EventType.ModelDispose:return void t._stopModelSync(i)}}n.length>0&&t._proxy.acceptModelChanged(i.toString(),n)})),o.push({dispose:function(){t._proxy.acceptRemovedModel(i)}}),this._syncedModels[i]=o}},t.prototype._stopModelSync=function(e){var t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],i.dispose(t)},t}(i.Disposable),b=function(){function e(e){this._instance=e,this._proxyObj=o.TPromise.as(this._instance)}return e.prototype.dispose=function(){this._instance.dispose(),this._instance=null,this._proxyObj=null},e.prototype.getProxyObject=function(){return new n.ShallowCancelThenPromise(this._proxyObj)},e}(),w=function(e){function t(t,n){var i=e.call(this)||this;return i._modelService=t,i._workerFactory=new s.DefaultWorkerFactory(n),i._worker=null,i._modelManager=null,i}return m(t,e),t.prototype._getOrCreateWorker=function(){if(!this._worker)try{this._worker=this._register(new r.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker"))}catch(e){r.logOnceWebWorkerWarning(e),this._worker=new b(new c.EditorSimpleWorkerImpl)}return this._worker},t.prototype._getProxy=function(){var e=this;return new n.ShallowCancelThenPromise(this._getOrCreateWorker().getProxyObject().then(null,function(t){return r.logOnceWebWorkerWarning(t),e._worker=new b(new c.EditorSimpleWorkerImpl),e._getOrCreateWorker().getProxyObject()}))},t.prototype._getOrCreateModelManager=function(e){return this._modelManager||(this._modelManager=this._register(new _(e,this._modelService,!1))),this._modelManager},t.prototype._withSyncedResources=function(e){var t=this;return this._getProxy().then(function(n){return t._getOrCreateModelManager(n).esureSyncedResources(e),n})},t.prototype.computeDiff=function(e,t,n){return this._withSyncedResources([e,t]).then(function(i){return i.computeDiff(e.toString(),t.toString(),n)})},t.prototype.computeDirtyDiff=function(e,t,n){return this._withSyncedResources([e,t]).then(function(i){return i.computeDirtyDiff(e.toString(),t.toString(),n)})},t.prototype.computeMoreMinimalEdits=function(e,t,n){return this._withSyncedResources([e]).then(function(i){return i.computeMoreMinimalEdits(e.toString(),t,n)})},t.prototype.computeLinks=function(e){return this._withSyncedResources([e]).then(function(t){return t.computeLinks(e.toString())})},t.prototype.textualSuggest=function(e,t){var n=this;return this._withSyncedResources([e]).then(function(i){var o=n._modelService.getModel(e);if(!o)return null;var r=d.LanguageConfigurationRegistry.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"");return i.textualSuggest(e.toString(),t,s,a)})},t.prototype.navigateValueSet=function(e,t,n){var i=this;return this._withSyncedResources([e]).then(function(o){var r=i._modelService.getModel(e);if(!r)return null;var s=d.LanguageConfigurationRegistry.getWordDefinition(r.getLanguageIdentifier().id),a=s.source,u=(s.global?"g":"")+(s.ignoreCase?"i":"")+(s.multiline?"m":"");return o.navigateValueSet(e.toString(),t,n,a,u)})},t}(i.Disposable);t.EditorWorkerClient=w}),define(d[366],h([0,1,17,129]),function(e,t,n,i){"use strict";function o(e,t){return new r(e,t)}t.createWebWorker=o;var r=function(e){function t(t,n){var i=e.call(this,t,n.label)||this;return i._foreignModuleId=n.moduleId,i._foreignModuleCreateData=n.createData||null,i._foreignProxy=null,i}return m(t,e),t.prototype._getForeignProxy=function(){var e=this;return this._foreignProxy||(this._foreignProxy=new n.ShallowCancelThenPromise(this._getProxy().then(function(t){return t.loadForeignModule(e._foreignModuleId,e._foreignModuleCreateData).then(function(n){e._foreignModuleId=null,e._foreignModuleCreateData=null;for(var i=function(e,n){return t.fmr(e,n)},o=function(e,t){return function(){var n=Array.prototype.slice.call(arguments,0);return t(e,n)}},r={},s=0;s<n.length;s++)r[n[s]]=o(n[s],i);return r})}))),this._foreignProxy},t.prototype.getProxy=function(){return this._getForeignProxy()},t.prototype.withSyncedResources=function(e){var t=this;return this._withSyncedResources(e).then(function(e){return t.getProxy()})},t}(i.EditorWorkerClient)}),define(d[367],h([0,1,2]),function(e,t,n){"use strict";var i=function(){function e(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._maximumHeight=0,this._minimumHeight=0,this._useDarkColor=!1,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}return e.prototype.getId2Color=function(){return this._id2Color},e.prototype.setZones=function(e){e.sort(function(e,t){return e.compareTo(t)});for(var t=this._zones,n=0,i=this._zones.length,o=0,r=e.length,s=[];o<r;){var a=e[o];if(n>=i)s.push(a),o++;else{var u=t[n],l=u.compareTo(a);l<0?n++:l>0?(s.push(a),o++):(s.push(u),n++,o++)}}this._zones=s},e.prototype.setLineHeight=function(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setPixelRatio=function(e){this._pixelRatio=e,this._colorZonesInvalid=!0},e.prototype.getDOMWidth=function(){return this._domWidth},e.prototype.getCanvasWidth=function(){return this._domWidth*this._pixelRatio},e.prototype.setDOMWidth=function(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)},e.prototype.getDOMHeight=function(){return this._domHeight},e.prototype.getCanvasHeight=function(){return this._domHeight*this._pixelRatio},e.prototype.setDOMHeight=function(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.getOuterHeight=function(){return this._outerHeight},e.prototype.setOuterHeight=function(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setMaximumHeight=function(e){return this._maximumHeight!==e&&(this._maximumHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setMinimumHeight=function(e){return this._minimumHeight!==e&&(this._minimumHeight=e,this._colorZonesInvalid=!0,!0)},e.prototype.setUseDarkColor=function(e){return this._useDarkColor!==e&&(this._useDarkColor=e,this._colorZonesInvalid=!0,!0)},e.prototype.resolveColorZones=function(){for(var e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),n=Math.floor(this.getCanvasHeight()),i=Math.floor(this._maximumHeight*this._pixelRatio),o=Math.floor(this._minimumHeight*this._pixelRatio),r=this._useDarkColor,s=Math.floor(this._outerHeight),a=n/s,u=[],l=0,c=this._zones.length;l<c;l++){var d=this._zones[l];if(!e){var h=d.getColorZones();if(h){for(var p=0,f=h.length;p<f;p++)u.push(h[p]);continue}}var g=[];if(d.forceHeight){var m=Math.floor(d.forceHeight*this._pixelRatio),v=Math.floor(this._getVerticalOffsetForLine(d.startLineNumber));v=Math.floor(v*a);var _=v+m;g.push(this.createZone(n,v,_,m,m,d.getColor(r),d.position))}else{var v=Math.floor(this._getVerticalOffsetForLine(d.startLineNumber)),_=Math.floor(this._getVerticalOffsetForLine(d.endLineNumber))+t;v=Math.floor(v*a),_=Math.floor(_*a);var y=d.endLineNumber-d.startLineNumber+1,C=y*i;if(_-v>C)for(var b=d.startLineNumber;b<=d.endLineNumber;b++)v=Math.floor(this._getVerticalOffsetForLine(b)),_=v+t,v=Math.floor(v*a),_=Math.floor(_*a),g.push(this.createZone(n,v,_,o,i,d.getColor(r),d.position));else g.push(this.createZone(n,v,_,o,C,d.getColor(r),d.position))}d.setColorZones(g);for(var p=0,f=g.length;p<f;p++)u.push(g[p])}this._colorZonesInvalid=!1;var w=function(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId};return u.sort(w),u},e.prototype.createZone=function(e,t,i,o,r,s,a){e=Math.floor(e),t=Math.floor(t),i=Math.floor(i),o=Math.floor(o),r=Math.floor(r);var u=Math.floor((t+i)/2),l=i-u;l>r/2&&(l=r/2),l<o/2&&(l=o/2),u-l<0&&(u=l),u+l>e&&(u=e-l);var c=this._color2Id[s];return c||(c=++this._lastAssignedId,this._color2Id[s]=c,this._id2Color[c]=s),new n.ColorZone(u-l,u+l,c,a)},e}();t.OverviewZoneManager=i}),define(d[130],h([0,1,28,2,24,367]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t,n,i,s,a,u,l){var c=this;this._canvasLeftOffset=e,this._domNode=document.createElement("canvas"),this._domNode.className=t,this._domNode.style.position="absolute",this._lanesCount=3,this._canUseTranslate3d=s,this._zoneManager=new r.OverviewZoneManager(l),this._zoneManager.setMinimumHeight(a),this._zoneManager.setMaximumHeight(u),this._zoneManager.setUseDarkColor(!1),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(n),this._zoneManager.setLineHeight(i),this._zoomListener=o.onDidChangeZoomLevel(function(){c._zoneManager.setPixelRatio(o.getPixelRatio()),c._domNode.style.width=c._zoneManager.getDOMWidth()+"px",c._domNode.style.height=c._zoneManager.getDOMHeight()+"px",c._domNode.width=c._zoneManager.getCanvasWidth(),c._domNode.height=c._zoneManager.getCanvasHeight(),c.render(!0)}),this._zoneManager.setPixelRatio(o.getPixelRatio())}return e.prototype.dispose=function(){this._zoomListener.dispose(),this._zoneManager=null},e.prototype.setLayout=function(e,t){n.StyleMutator.setTop(this._domNode,e.top),n.StyleMutator.setRight(this._domNode,e.right);var i=!1;i=this._zoneManager.setDOMWidth(e.width)||i,i=this._zoneManager.setDOMHeight(e.height)||i,i&&(this._domNode.style.width=this._zoneManager.getDOMWidth()+"px",this._domNode.style.height=this._zoneManager.getDOMHeight()+"px",this._domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.height=this._zoneManager.getCanvasHeight(),t&&this.render(!0))},e.prototype.getLanesCount=function(){return this._lanesCount},e.prototype.setLanesCount=function(e,t){this._lanesCount=e,t&&this.render(!0)},e.prototype.setUseDarkColor=function(e,t){this._zoneManager.setUseDarkColor(e),t&&this.render(!0)},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPixelWidth=function(){return this._zoneManager.getCanvasWidth()},e.prototype.getPixelHeight=function(){return this._zoneManager.getCanvasHeight()},e.prototype.setScrollHeight=function(e,t){this._zoneManager.setOuterHeight(e),t&&this.render(!0)},e.prototype.setLineHeight=function(e,t){this._zoneManager.setLineHeight(e),t&&this.render(!0)},e.prototype.setCanUseTranslate3d=function(e,t){this._canUseTranslate3d=e,t&&this.render(!0)},e.prototype.setZones=function(e,t){this._zoneManager.setZones(e),t&&this.render(!1)},e.prototype.render=function(e){if(0===this._zoneManager.getOuterHeight())return!1;this._canUseTranslate3d?n.StyleMutator.setTransform(this._domNode,"translate3d(0px, 0px, 0px)"):n.StyleMutator.setTransform(this._domNode,"");var t=this._zoneManager.getCanvasWidth(),i=this._zoneManager.getCanvasHeight(),o=this._zoneManager.resolveColorZones(),r=this._zoneManager.getId2Color(),s=this._domNode.getContext("2d");if(s.clearRect(0,0,t,i),o.length>0){var a=t-this._canvasLeftOffset;this._lanesCount>=3?this._renderThreeLanes(s,o,r,a):2===this._lanesCount?this._renderTwoLanes(s,o,r,a):1===this._lanesCount&&this._renderOneLane(s,o,r,a)}return!0},e.prototype._renderOneLane=function(e,t,n,o){this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Left|i.OverviewRulerLane.Center|i.OverviewRulerLane.Right,this._canvasLeftOffset,o)},e.prototype._renderTwoLanes=function(e,t,n,o){var r=Math.floor(o/2),s=o-r,a=this._canvasLeftOffset,u=this._canvasLeftOffset+r;this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Left|i.OverviewRulerLane.Center,a,r),this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Right,u,s)},e.prototype._renderThreeLanes=function(e,t,n,o){var r=Math.floor(o/3),s=Math.floor(o/3),a=o-r-s,u=this._canvasLeftOffset,l=this._canvasLeftOffset+r,c=this._canvasLeftOffset+r+a;this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Left,u,r),this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Center,l,a),this._renderVerticalPatch(e,t,n,i.OverviewRulerLane.Right,c,s)},e.prototype._renderVerticalPatch=function(e,t,n,i,o,r){for(var s=0,a=0,u=0,l=0,c=t.length;l<c;l++){var d=t[l];if(d.position&i){var h=d.colorId,p=d.from,f=d.to;h!==s?(e.fillRect(o,a,r,u-a),s=h,e.fillStyle=n[s],a=p,u=f):u>=p?u=Math.max(u,f):(e.fillRect(o,a,r,u-a),a=p,u=f)}}e.fillRect(o,a,r,u-a)},e}();t.OverviewRulerImpl=s}),define(d[369],h([0,1,2]),function(e,t,n){"use strict";var i=function(){function e(){}return e.compute=function(e){var t=0|e.outerWidth,i=0|e.outerHeight,o=Boolean(e.showGlyphMargin),r=0|e.lineHeight,s=Boolean(e.showLineNumbers),a=0|e.lineNumbersMinChars,u=0|e.lineDecorationsWidth,l=Number(e.maxDigitWidth),c=0|e.maxLineNumber,d=0|e.verticalScrollbarWidth,h=Boolean(e.verticalScrollbarHasArrows),p=0|e.scrollbarArrowSize,f=0|e.horizontalScrollbarHeight,g=0;if(s){var m=Math.max(this.digitCount(c),a);g=Math.round(m*l)}var v=0;o&&(v=r);var _=t-v-g-u,y=0,C=y+v,b=C+g,w=b+u,S=h?p:0;return new n.EditorLayoutInfo({width:t,height:i,glyphMarginLeft:y,glyphMarginWidth:v,glyphMarginHeight:i,lineNumbersLeft:C,lineNumbersWidth:g,lineNumbersHeight:i,decorationsLeft:b,decorationsWidth:u,decorationsHeight:i,contentLeft:w,contentWidth:_,contentHeight:i,verticalScrollbarWidth:d,horizontalScrollbarHeight:f,overviewRuler:new n.OverviewRulerPosition({top:S,width:d,height:i-2*S,right:0})})},e.digitCount=function(e){for(var t=0;e;)e=Math.floor(e/10),t++;return t?t:1},e}();t.EditorLayoutProvider=i}),define(d[131],h([0,1,15,3,2,86]),function(e,t,n,i,o,r){"use strict";function s(e,t,n,i,o,r,s){var a=e.createLineMapping(t,n,i,o,r);return null===a?s?u.INSTANCE:l.INSTANCE:new c(a,s)}var a=function(){function e(e,t){this.outputLineIndex=e,this.outputOffset=t}return e}();t.OutputPosition=a;var u=function(){function e(){}return e.prototype.isVisible=function(){return!0},e.prototype.setVisible=function(e){return e?this:l.INSTANCE},e.prototype.getOutputLineCount=function(){return 1},e.prototype.getOutputLineContent=function(e,t,n){return e.getLineContent(t)},e.prototype.getOutputLineMinColumn=function(e,t,n){return e.getLineMinColumn(t)},e.prototype.getOutputLineMaxColumn=function(e,t,n){return e.getLineMaxColumn(t)},e.prototype.getOutputLineTokens=function(e,t,n){var i=e.getLineTokens(t,!0);return i.inflate()},e.prototype.getInputColumnOfOutputPosition=function(e,t){return t},e.prototype.getOutputPositionOfInputPosition=function(e,t){return new n.Position(e,t)},e}();u.INSTANCE=new u;var l=function(){function e(){}return e.prototype.isVisible=function(){return!1},e.prototype.setVisible=function(e){return e?u.INSTANCE:this},e.prototype.getOutputLineCount=function(){return 0},e.prototype.getOutputLineContent=function(e,t,n){throw new Error("Not supported")},e.prototype.getOutputLineMinColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getOutputLineMaxColumn=function(e,t,n){throw new Error("Not supported")},e.prototype.getOutputLineTokens=function(e,t,n){throw new Error("Not supported")},e.prototype.getInputColumnOfOutputPosition=function(e,t){throw new Error("Not supported")},e.prototype.getOutputPositionOfInputPosition=function(e,t){throw new Error("Not supported")},e}();l.INSTANCE=new l;var c=function(){function e(e,t){this.positionMapper=e,this.wrappedIndent=this.positionMapper.getWrappedLinesIndent(),this.wrappedIndentLength=this.wrappedIndent.length,this.outputLineCount=this.positionMapper.getOutputLineCount(),this._isVisible=t}return e.prototype.isVisible=function(){return this._isVisible},e.prototype.setVisible=function(e){return this._isVisible=e,this},e.prototype.getOutputLineCount=function(){return this._isVisible?this.outputLineCount:0},e.prototype.getInputStartOffsetOfOutputLineIndex=function(e){return this.positionMapper.getInputOffsetOfOutputPosition(e,0)},e.prototype.getInputEndOffsetOfOutputLineIndex=function(e,t,n){return n+1===this.outputLineCount?e.getLineMaxColumn(t)-1:this.positionMapper.getInputOffsetOfOutputPosition(n+1,0)},e.prototype.getOutputLineContent=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=e.getLineContent(t).substring(i,o);return n>0&&(r=this.wrappedIndent+r),r},e.prototype.getOutputLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getOutputLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getOutputLineContent(e,t,n).length+1},e.prototype.getOutputLineTokens=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),r=0;n>0&&(r=this.wrappedIndentLength);var s=e.getLineTokens(t,!0);return s.sliceAndInflate(i,o,r)},e.prototype.getInputColumnOfOutputPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");var n=t-1;return e>0&&(n<this.wrappedIndentLength?n=0:n-=this.wrappedIndentLength),this.positionMapper.getInputOffsetOfOutputPosition(e,n)+1},e.prototype.getOutputPositionOfInputPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");var i=this.positionMapper.getOutputPositionOfInputOffset(t-1),o=i.outputLineIndex,r=i.outputOffset+1;return o>0&&(r+=this.wrappedIndentLength),new n.Position(e+o,r)},e}();t.SplitLine=c;var d=function(){function e(e,t,n,i,o,r){this.model=e,this._validModelVersionId=-1,this.tabSize=n,this.wrappingColumn=i,this.columnsForFullWidthChar=o,this.wrappingIndent=r,this.linePositionMapperFactory=t,this._constructLines(!0)}return e.prototype.dispose=function(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])},e.prototype._ensureValidState=function(){var e=this.model.getVersionId();if(e!==this._validModelVersionId)throw new Error("SplitLinesCollection: attempt to access a 'newer' model")},e.prototype._constructLines=function(e){var t=this;this.lines=[],e&&(this.hiddenAreasIds=[]);for(var n=this.model.getLinesContent(),o=n.length,a=new Uint32Array(o),u=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(i.Range.compareRangesUsingStarts),l=1,c=0,d=-1,h=d+1<u.length?c+1:o+2,p=0;p<o;p++){var f=p+1;f===h&&(d++,l=u[d].startLineNumber,c=u[d].endLineNumber,h=d+1<u.length?c+1:o+2);var g=f>=l&&f<=c,m=s(this.linePositionMapperFactory,n[p],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!g);a[p]=m.getOutputLineCount(),this.lines[p]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new r.PrefixSumComputer(a)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map(function(t){return e.model.getDecorationRange(t)}).sort(i.Range.compareRangesUsingStarts)},e.prototype._reduceRanges=function(e){var t=this;if(0===e.length)return[];for(var n=e.map(function(e){return t.model.validateRange(e)}).sort(i.Range.compareRangesUsingStarts),o=[],r=n[0].startLineNumber,s=n[0].endLineNumber,a=1,u=n.length;a<u;a++){var l=n[a];l.startLineNumber>s+1?(o.push(new i.Range(r,1,s,1)),r=l.startLineNumber,s=l.endLineNumber):l.endLineNumber>s&&(s=l.endLineNumber)}return o.push(new i.Range(r,1,s,1)),o},e.prototype.setHiddenAreas=function(e,t){var n=this,r=this._reduceRanges(e),s=this.hiddenAreasIds.map(function(e){return n.model.getDecorationRange(e)}).sort(i.Range.compareRangesUsingStarts);if(r.length===s.length){for(var a=!1,u=0;u<r.length;u++)if(!r[u].equalsRange(s[u])){a=!0;break}if(!a)return!1}for(var l=[],u=0;u<r.length;u++)l.push({range:r[u],options:{}});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,l);for(var c=r,d=1,h=0,p=-1,f=p+1<c.length?h+1:this.lines.length+2,u=0;u<this.lines.length;u++){var g=u+1;g===f&&(p++,d=c[p].startLineNumber,h=c[p].endLineNumber,f=p+1<c.length?h+1:this.lines.length+2);var m=!1;if(g>=d&&g<=h?this.lines[u].isVisible()&&(this.lines[u]=this.lines[u].setVisible(!1),m=!0):this.lines[u].isVisible()||(this.lines[u]=this.lines[u].setVisible(!0),m=!0),m){var v=this.lines[u].getOutputLineCount();this.prefixSumComputer.changeValue(u,v)}}return t(o.ViewEventNames.ModelFlushedEvent,null),!0},e.prototype.inputPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e,t){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),t(o.ViewEventNames.ModelFlushedEvent,null),!0)},e.prototype.setWrappingIndent=function(e,t){return this.wrappingIndent!==e&&(this.wrappingIndent=e,this._constructLines(!1),t(o.ViewEventNames.ModelFlushedEvent,null),!0)},e.prototype.setWrappingColumn=function(e,t,n){return(this.wrappingColumn!==e||this.columnsForFullWidthChar!==t)&&(this.wrappingColumn=e,this.columnsForFullWidthChar=t,this._constructLines(!1),n(o.ViewEventNames.ModelFlushedEvent,null),!0)},e.prototype.onModelFlushed=function(e,t){this._constructLines(!0),t(o.ViewEventNames.ModelFlushedEvent,null)},e.prototype.onModelLinesDeleted=function(e,t,n,i){if(!(e<=this._validModelVersionId)){this._validModelVersionId=e;var r=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=this.prefixSumComputer.getAccumulatedValue(n-1);this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1);var a={fromLineNumber:r,toLineNumber:s};i(o.ViewEventNames.LinesDeletedEvent,a)}},e.prototype.onModelLinesInserted=function(e,t,i,r,a){if(!(e<=this._validModelVersionId)){this._validModelVersionId=e;for(var u=this.getHiddenAreas(),l=!1,c=new n.Position(t,1),d=0;d<u.length;d++)if(u[d].containsPosition(c)){l=!0;break}for(var h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,p=0,f=[],g=new Uint32Array(r.length),d=0,m=r.length;d<m;d++){var v=s(this.linePositionMapperFactory,r[d],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!l);f.push(v);var _=v.getOutputLineCount();p+=_,g[d]=_}this.lines=this.lines.slice(0,t-1).concat(f).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,g);var y={fromLineNumber:h,toLineNumber:h+p-1};a(o.ViewEventNames.LinesInsertedEvent,y)}},e.prototype.onModelLineChanged=function(e,t,n,i){if(!(e<=this._validModelVersionId)){this._validModelVersionId=e;var r=t-1,a=this.lines[r].getOutputLineCount(),u=this.lines[r].isVisible(),l=s(this.linePositionMapperFactory,n,this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,u);this.lines[r]=l;var c=this.lines[r].getOutputLineCount(),d=!1,h=0,p=-1,f=0,g=-1,m=0,v=-1;a>c?(h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,p=h+c-1,m=p+1,v=m+(a-c)-1,d=!0):a<c?(h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,p=h+a-1,f=p+1,g=f+(c-a)-1,d=!0):(h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,p=h+c-1),this.prefixSumComputer.changeValue(r,c);var _,y,C;if(h<=p)for(var b=h;b<=p;b++)_={lineNumber:b},i(o.ViewEventNames.LineChangedEvent,_);return f<=g&&(y={fromLineNumber:f,toLineNumber:g},i(o.ViewEventNames.LinesInsertedEvent,y)),m<=v&&(C={fromLineNumber:m,toLineNumber:v},i(o.ViewEventNames.LinesDeletedEvent,C)),d}},e.prototype.getOutputLineCount=function(){return this._ensureValidState(),this.prefixSumComputer.getTotalValue()},e.prototype._toValidOutputLineNumber=function(e){if(e<1)return 1;var t=this.getOutputLineCount();return e>t?t:e},e.prototype.getOutputLineContent=function(e){this._ensureValidState(),e=this._toValidOutputLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getOutputLineContent(this.model,n+1,i)},e.prototype.getOutputIndentGuide=function(e){this._ensureValidState(),e=this._toValidOutputLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1);return this.model.getLineIndentGuide(t.index+1)},e.prototype.getOutputLineMinColumn=function(e){this._ensureValidState(),e=this._toValidOutputLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getOutputLineMinColumn(this.model,n+1,i)},e.prototype.getOutputLineMaxColumn=function(e){this._ensureValidState(),e=this._toValidOutputLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getOutputLineMaxColumn(this.model,n+1,i)},e.prototype.getOutputLineTokens=function(e){this._ensureValidState(),e=this._toValidOutputLineNumber(e);var t=this.prefixSumComputer.getIndexOf(e-1),n=t.index,i=t.remainder;return this.lines[n].getOutputLineTokens(this.model,n+1,i)},e.prototype.convertOutputPositionToInputPosition=function(e,t){this._ensureValidState(),e=this._toValidOutputLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o].getInputColumnOfOutputPosition(r,t);return this.model.validatePosition(new n.Position(o+1,s))},e.prototype.convertInputPositionToOutputPosition=function(e,t){this._ensureValidState();for(var i=this.model.validatePosition(new n.Position(e,t)),o=i.lineNumber,r=i.column,s=o-1,a=!1;s>0&&!this.lines[s].isVisible();)s--,a=!0;if(0===s&&!this.lines[s].isVisible())return new n.Position(1,1);var u,l=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return u=a?this.lines[s].getOutputPositionOfInputPosition(l,this.model.getLineMaxColumn(s+1)):this.lines[o-1].getOutputPositionOfInputPosition(l,r)},e}();t.SplitLinesCollection=d}),define(d[371],h([0,1,9,2,86,131,69,83]),function(e,t,n,i,o,r,s,a){"use strict";var u;!function(e){e[e.NONE=0]="NONE",e[e.BREAK_BEFORE=1]="BREAK_BEFORE",e[e.BREAK_AFTER=2]="BREAK_AFTER",e[e.BREAK_OBTRUSIVE=3]="BREAK_OBTRUSIVE",e[e.BREAK_IDEOGRAPHIC=4]="BREAK_IDEOGRAPHIC"}(u||(u={}));var l=function(e){function t(t,n,i){for(var o=e.call(this,0)||this,r=0;r<t.length;r++)o.set(t.charCodeAt(r),1);for(var r=0;r<n.length;r++)o.set(n.charCodeAt(r),2);for(var r=0;r<i.length;r++)o.set(i.charCodeAt(r),3);return o}return m(t,e),t.prototype.get=function(t){return t>=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(s.CharacterClassifier),c=function(){function e(e,t,n){this.classifier=new l(e,t,n)}return e.nextVisibleColumn=function(e,t,n,i){return e=+e,t=+t,i=+i,n?e+(t-e%t):e+i},e.prototype.createLineMapping=function(t,r,s,u,l){if(s===-1)return null;r=+r,s=+s,u=+u,l=+l;var c=0,h="",p=-1;if(l!==i.WrappingIndent.None&&(p=n.firstNonWhitespaceIndex(t),p!==-1)){h=t.substring(0,p);for(var f=0;f<p;f++)c=e.nextVisibleColumn(c,r,9===t.charCodeAt(f),1);l===i.WrappingIndent.Indent&&(h+="\t",c=e.nextVisibleColumn(c,r,!0,1)),c>.5*s&&(h="",c=0)}for(var g=this.classifier,m=0,v=[],_=0,y=0,C=-1,b=0,w=-1,S=0,E=t.length,f=0;f<E;f++){var L=t.charCodeAt(f),N=9===L,T=g.get(L);if(1===T&&(C=f,b=c),4===T&&f>0){var x=t.charCodeAt(f-1),M=g.get(x);1!==M&&(C=f,b=c)}var I=1;if(n.isFullWidthCharacter(L)&&(I=u),y=e.nextVisibleColumn(y,r,N,I),y>s&&0!==f){var D=void 0,R=void 0;C!==-1?(D=C,R=b):w!==-1?(D=w,R=S):(D=f,R=c),v[_++]=D-m,m=D,y=e.nextVisibleColumn(R,r,N,I),C=-1,b=0,w=-1,S=0}if(C!==-1&&(b=e.nextVisibleColumn(b,r,N,I)),w!==-1&&(S=e.nextVisibleColumn(S,r,N,I)),2===T&&(l===i.WrappingIndent.None||f>=p)&&(C=f+1,b=c),4===T&&f<E-1){var k=t.charCodeAt(f+1),O=g.get(k);2!==O&&(C=f+1,b=c)}3===T&&(w=f+1,S=c)}return 0===_?null:(v[_++]=E-m,new d(new o.PrefixSumComputer(a.toUint32Array(v)),h))},e}();t.CharacterHardWrappingLineMapperFactory=c;var d=function(){function e(e,t){this._prefixSums=e,this._wrappedLinesIndent=t}return e.prototype.getOutputLineCount=function(){return this._prefixSums.getCount()},e.prototype.getWrappedLinesIndent=function(){return this._wrappedLinesIndent},e.prototype.getInputOffsetOfOutputPosition=function(e,t){return 0===e?t:this._prefixSums.getAccumulatedValue(e-1)+t},e.prototype.getOutputPositionOfInputOffset=function(e){var t=this._prefixSums.getIndexOf(e);return new r.OutputPosition(t.index,t.remainder)},e}();t.CharacterHardWrappingLineMapping=d}),define(d[51],h([0,1,2]),function(e,t,n){"use strict";var i=function(){function e(){this._shouldRender=!0}return e.prototype.shouldRender=function(){return this._shouldRender},e.prototype.setShouldRender=function(){this._shouldRender=!0},e.prototype.onDidRender=function(){this._shouldRender=!1},e.prototype.onLineMappingChanged=function(){return!1},e.prototype.onModelFlushed=function(){return!1},e.prototype.onModelDecorationsChanged=function(e){return!1},e.prototype.onModelLinesDeleted=function(e){return!1},e.prototype.onModelLineChanged=function(e){return!1},e.prototype.onModelLinesInserted=function(e){return!1},e.prototype.onModelTokensChanged=function(e){return!1},e.prototype.onCursorPositionChanged=function(e){return!1},e.prototype.onCursorSelectionChanged=function(e){return!1},e.prototype.onCursorRevealRange=function(e){return!1},e.prototype.onCursorScrollRequest=function(e){return!1},e.prototype.onConfigurationChanged=function(e){return!1},e.prototype.onLayoutChanged=function(e){return!1},e.prototype.onScrollChanged=function(e){return!1},e.prototype.onZonesChanged=function(){return!1},e.prototype.onViewFocusChanged=function(e){return!1},e.prototype.handleEvents=function(e){for(var t=!1,i=0,o=e.length;i<o;i++){var r=e[i],s=r.getData();switch(r.getType()){case n.ViewEventNames.LineMappingChangedEvent:this.onLineMappingChanged()&&(t=!0);break;case n.ViewEventNames.ModelFlushedEvent:this.onModelFlushed()&&(t=!0);break;case n.ViewEventNames.LinesDeletedEvent:this.onModelLinesDeleted(s)&&(t=!0);break;case n.ViewEventNames.LinesInsertedEvent:this.onModelLinesInserted(s)&&(t=!0);break;case n.ViewEventNames.LineChangedEvent:this.onModelLineChanged(s)&&(t=!0);break;case n.ViewEventNames.TokensChangedEvent:this.onModelTokensChanged(s)&&(t=!0);break;case n.ViewEventNames.DecorationsChangedEvent:this.onModelDecorationsChanged(s)&&(t=!0);break;case n.ViewEventNames.CursorPositionChangedEvent:this.onCursorPositionChanged(s)&&(t=!0);break;case n.ViewEventNames.CursorSelectionChangedEvent:this.onCursorSelectionChanged(s)&&(t=!0);break;case n.ViewEventNames.RevealRangeEvent:this.onCursorRevealRange(s)&&(t=!0);break;case n.ViewEventNames.ScrollRequestEvent:this.onCursorScrollRequest(s)&&(t=!0);break;case n.EventType.ConfigurationChanged:this.onConfigurationChanged(s)&&(t=!0);break;case n.EventType.ViewLayoutChanged:this.onLayoutChanged(s)&&(t=!0);break;case n.EventType.ViewScrollChanged:this.onScrollChanged(s)&&(t=!0);break;case n.EventType.ViewZonesChanged:this.onZonesChanged()&&(t=!0);break;case n.EventType.ViewFocusChanged:this.onViewFocusChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(r)}}t&&(this._shouldRender=!0)},e}();t.ViewEventHandler=i}),define(d[50],h([0,1,51]),function(e,t,n){"use strict";var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t}(n.ViewEventHandler);t.DynamicViewOverlay=i}),define(d[32],h([0,1,51]),function(e,t,n){"use strict";var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null},t}(n.ViewEventHandler);t.ViewPart=i;var o;!function(e){e[e.None=0]="None",e[e.ContentWidgets=1]="ContentWidgets",e[e.OverflowingContentWidgets=2]="OverflowingContentWidgets",e[e.OverflowGuard=3]="OverflowGuard",e[e.OverlayWidgets=4]="OverlayWidgets",e[e.ScrollableElement=5]="ScrollableElement",e[e.TextArea=6]="TextArea",e[e.ViewLines=7]="ViewLines"}(o=t.PartFingerprint||(t.PartFingerprint={}));var r=function(){function e(){}return e.write=function(e,t){e.setAttribute("data-mprt",String(t))},e.read=function(e){var t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)},e.collect=function(e,t){for(var n=[],i=0;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(n[i++]=this.read(e)),
e=e.parentElement;for(var o=new Uint8Array(i),r=0;r<i;r++)o[r]=n[i-r-1];return o},e}();t.PartFingerprints=r}),define(d[135],h([0,1,15,3,2,21,105,24,32]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(){function e(e,t,n,o,r,s){void 0===n&&(n=0),void 0===o&&(o=null),void 0===r&&(r=null),void 0===s&&(s=null),this.element=e,this.type=t,this.mouseColumn=n,this.position=o,!r&&o&&(r=new i.Range(o.lineNumber,o.column,o.lineNumber,o.column)),this.range=r,this.detail=s}return e._typeToString=function(e){return e===o.MouseTargetType.TEXTAREA?"TEXTAREA":e===o.MouseTargetType.GUTTER_GLYPH_MARGIN?"GUTTER_GLYPH_MARGIN":e===o.MouseTargetType.GUTTER_LINE_NUMBERS?"GUTTER_LINE_NUMBERS":e===o.MouseTargetType.GUTTER_LINE_DECORATIONS?"GUTTER_LINE_DECORATIONS":e===o.MouseTargetType.GUTTER_VIEW_ZONE?"GUTTER_VIEW_ZONE":e===o.MouseTargetType.CONTENT_TEXT?"CONTENT_TEXT":e===o.MouseTargetType.CONTENT_EMPTY?"CONTENT_EMPTY":e===o.MouseTargetType.CONTENT_VIEW_ZONE?"CONTENT_VIEW_ZONE":e===o.MouseTargetType.CONTENT_WIDGET?"CONTENT_WIDGET":e===o.MouseTargetType.OVERVIEW_RULER?"OVERVIEW_RULER":e===o.MouseTargetType.SCROLLBAR?"SCROLLBAR":e===o.MouseTargetType.OVERLAY_WIDGET?"OVERLAY_WIDGET":"UNKNOWN"},e.toString=function(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail},e.prototype.toString=function(){return e.toString(this)},e}();t.MouseTarget=l;var c=function(){function e(){}return e.isTextArea=function(e){return 2===e.length&&3===e[0]&&6===e[1]},e.isChildOfViewLines=function(e){return e.length>=4&&3===e[0]&&7===e[3]},e.isChildOfScrollableElement=function(e){return e.length>=2&&3===e[0]&&5===e[1]},e.isChildOfContentWidgets=function(e){return e.length>=4&&3===e[0]&&1===e[3]},e.isChildOfOverflowingContentWidgets=function(e){return e.length>=1&&2===e[0]},e.isChildOfOverlayWidgets=function(e){return e.length>=2&&3===e[0]&&4===e[1]},e}(),d=function(){function e(e,t,n){this.model=e.model,this.layoutInfo=e.configuration.editor.layoutInfo,this.viewDomNode=t.viewDomNode,this.lineHeight=e.configuration.editor.lineHeight,this.typicalHalfwidthCharacterWidth=e.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this.lastViewCursorsRenderData=n,this._context=e,this._viewHelper=t}return e.prototype.getZoneAtCoord=function(e){var t=this._viewHelper.getWhitespaceAtVerticalOffset(e);if(t){var i=t.verticalOffset+t.height/2,o=this._context.model.getLineCount(),r=null,s=void 0,a=null;return t.afterLineNumber!==o&&(a=new n.Position(t.afterLineNumber+1,1)),t.afterLineNumber>0&&(r=new n.Position(t.afterLineNumber,this._context.model.getLineMaxColumn(t.afterLineNumber))),s=null===a?r:null===r?a:e<i?r:a,{viewZoneId:t.id,afterLineNumber:t.afterLineNumber,positionBefore:r,positionAfter:a,position:s}}return null},e.prototype.getFullLineRangeAtCoord=function(e){if(this._viewHelper.isAfterLines(e)){var t=this._context.model.getLineCount(),n=this._context.model.getLineMaxColumn(t);return{range:new i.Range(t,n,t,n),isAfterLines:!0}}var o=this._viewHelper.getLineNumberAtVerticalOffset(e),r=this._context.model.getLineMaxColumn(o);return{range:new i.Range(o,1,o,r),isAfterLines:!1}},e.prototype.getLineNumberAtVerticalOffset=function(e){return this._viewHelper.getLineNumberAtVerticalOffset(e)},e.prototype.isAfterLines=function(e){return this._viewHelper.isAfterLines(e)},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewHelper.getVerticalOffsetForLineNumber(e)},e.prototype.findAttribute=function(t,n){return e._findAttribute(t,n,this._viewHelper.viewDomNode)},e._findAttribute=function(e,t,n){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===n)return null;e=e.parentNode}return null},e.prototype.getLineWidth=function(e){return this._viewHelper.getLineWidth(e)},e.prototype.visibleRangeForPosition2=function(e,t){return this._viewHelper.visibleRangeForPosition2(e,t)},e.prototype.getPositionFromDOMInfo=function(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)},e.prototype.getScrollTop=function(){return this._viewHelper.getScrollTop()},e.prototype.getScrollLeft=function(){return this._viewHelper.getScrollLeft()},e}(),h=function(){function e(e,t,n){this.editorPos=t,this.pos=n,this.mouseVerticalOffset=Math.max(0,e.getScrollTop()+n.y-t.y),this.mouseContentHorizontalOffset=e.getScrollLeft()+n.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=n.x-t.x<e.layoutInfo.contentLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,f._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}return e}(),p=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._ctx=t,o?(r.target=o,r.targetPath=u.PartFingerprints.collect(o,t.viewDomNode)):(r.target=null,r.targetPath=new Uint8Array(0)),r}return m(t,e),t.prototype.toString=function(){return"pos("+this.pos.x+","+this.pos.y+"), editorPos("+this.editorPos.x+","+this.editorPos.y+"), mouseVerticalOffset: "+this.mouseVerticalOffset+", mouseContentHorizontalOffset: "+this.mouseContentHorizontalOffset+"\n\ttarget: "+(this.target?this.target.outerHTML:null)},t.prototype.fulfill=function(e,t,n,i){return void 0===t&&(t=null),void 0===n&&(n=null),void 0===i&&(i=null),new l(this.target,e,this.mouseColumn,t,n,i)},t.prototype.withTarget=function(e){return new t(this._ctx,this.editorPos,this.pos,e)},t}(h),f=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=u.PartFingerprints.collect(t,this._viewHelper.viewDomNode);return!(!c.isChildOfContentWidgets(n)&&!c.isChildOfOverflowingContentWidgets(n))||!!c.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,r){var s=new d(this._context,this._viewHelper,t),a=new p(s,n,i,r);try{var u=e._createMouseTarget(s,a,!1);return u}catch(e){return a.fulfill(o.MouseTargetType.UNKNOWN)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(o.MouseTargetType.UNKNOWN);var r=e._doHitTest(t,n);return r.position?e.createMouseTargetFromHitTestPosition(t,n,r.position.lineNumber,r.position.column):this._createMouseTarget(t,n.withTarget(r.hitTarget),!0)}var s=null;return s=s||e._hitTestContentWidget(t,n),s=s||e._hitTestOverlayWidget(t,n),s=s||e._hitTestViewZone(t,n),s=s||e._hitTestMargin(t,n),s=s||e._hitTestViewCursor(t,n),s=s||e._hitTestTextArea(t,n),s=s||e._hitTestViewLines(t,n,i),s=s||e._hitTestScrollbar(t,n),s||n.fulfill(o.MouseTargetType.UNKNOWN)},e._hitTestContentWidget=function(e,t){if(c.isChildOfContentWidgets(t.targetPath)||c.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(o.MouseTargetType.CONTENT_WIDGET,null,null,n):t.fulfill(o.MouseTargetType.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if(c.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(o.MouseTargetType.OVERLAY_WIDGET,null,null,n):t.fulfill(o.MouseTargetType.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.isInContentArea)for(var i=e.lastViewCursorsRenderData,r=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset,a=0,u=i.length;a<u;a++){var l=i[a];if(l.contentLeft<=r&&r<=l.contentLeft+l.width&&l.contentTop<=s&&s<=l.contentTop+l.height)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,l.position)}if(t.target.getAttribute){var c=t.target.getAttribute("lineNumber");if(c){var d=t.target.getAttribute("column");if(d){var h=new n.Position(parseInt(c,10),parseInt(d,10));return t.fulfill(o.MouseTargetType.CONTENT_TEXT,h)}}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?o.MouseTargetType.CONTENT_VIEW_ZONE:o.MouseTargetType.GUTTER_VIEW_ZONE;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return c.isTextArea(t.targetPath)?t.fulfill(o.MouseTargetType.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),r=Math.abs(t.pos.x-t.editorPos.x);return r<=e.layoutInfo.glyphMarginWidth?t.fulfill(o.MouseTargetType.GUTTER_GLYPH_MARGIN,i,n.range,n.isAfterLines):(r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfill(o.MouseTargetType.GUTTER_LINE_NUMBERS,i,n.range,n.isAfterLines):(r-=e.layoutInfo.lineNumbersWidth,t.fulfill(o.MouseTargetType.GUTTER_LINE_DECORATIONS,i,n.range,n.isAfterLines)))}return null},e._hitTestViewLines=function(t,i,r){if(!c.isChildOfViewLines(i.targetPath))return null;if(t.isAfterLines(i.mouseVerticalOffset)){var s=t.model.getLineCount(),a=t.model.getLineMaxColumn(s);return i.fulfill(o.MouseTargetType.CONTENT_EMPTY,new n.Position(s,a))}if(r)return i.fulfill(o.MouseTargetType.UNKNOWN);var u=e._doHitTest(t,i);return u.position?e.createMouseTargetFromHitTestPosition(t,i,u.position.lineNumber,u.position.column):this._createMouseTarget(t,i.withTarget(u.hitTarget),!0)},e._hitTestScrollbar=function(e,t){if(c.isChildOfScrollableElement(t.targetPath)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),r=e.model.getLineMaxColumn(i);return t.fulfill(o.MouseTargetType.SCROLLBAR,new n.Position(i,r))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._viewHelper.getScrollLeft()+n.x-t.x-i.contentLeft;return e._getMouseColumn(o,this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)},e._getMouseColumn=function(e,t){if(e<0)return 1;var n=Math.round(e/t);return n+1},e.createMouseTargetFromHitTestPosition=function(e,t,r,s){var u=new n.Position(r,s),l=e.getLineWidth(r);if(t.mouseContentHorizontalOffset>l)return a.isEdge&&1===u.column?t.fulfill(o.MouseTargetType.CONTENT_EMPTY,new n.Position(r,e.model.getLineMaxColumn(r))):t.fulfill(o.MouseTargetType.CONTENT_EMPTY,u);var c=e.visibleRangeForPosition2(r,s);if(!c)return t.fulfill(o.MouseTargetType.UNKNOWN,u);var d=c.left;if(t.mouseContentHorizontalOffset===d)return t.fulfill(o.MouseTargetType.CONTENT_TEXT,u);var h;if(s>1){var p=c.left;if(h=!1,h=h||p<t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<d,h=h||d<t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<p){var f=new i.Range(r,s,r,s-1);return t.fulfill(o.MouseTargetType.CONTENT_TEXT,u,f)}}var g=e.model.getLineMaxColumn(r);if(s<g){var m=e.visibleRangeForPosition2(r,s+1);if(m){var v=m.left;if(h=!1,h=h||d<t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<v,h=h||v<t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<d){var f=new i.Range(r,s,r,s+1);return t.fulfill(o.MouseTargetType.CONTENT_TEXT,u,f)}}}return t.fulfill(o.MouseTargetType.CONTENT_TEXT,u)},e._doHitTestWithCaretRangeFromPoint=function(e,t){var n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),i=e.getVerticalOffsetForLineNumber(n),o=i+Math.floor(e.lineHeight/2),r=t.pos.y+(o-t.mouseVerticalOffset);r<=t.editorPos.y&&(r=t.editorPos.y+1),r>=t.editorPos.y+e.layoutInfo.height&&(r=t.editorPos.y+e.layoutInfo.height-1);var a=new s.PageCoordinates(t.pos.x,r),u=this._actualDoHitTestWithCaretRangeFromPoint(e,a.toClientCoordinates());return u.position?u:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())},e._actualDoHitTestWithCaretRangeFromPoint=function(e,t){var n=document.caretRangeFromPoint(t.clientX,t.clientY);if(!n||!n.startContainer)return{position:null,hitTarget:null};var i,o=n.startContainer;if(o.nodeType===o.TEXT_NODE){var s=o.parentNode,a=s?s.parentNode:null,u=a?a.parentNode:null,l=u&&u.nodeType===u.ELEMENT_NODE?u.className:null;if(l===r.ClassNames.VIEW_LINE){var c=e.getPositionFromDOMInfo(s,n.startOffset);return{position:c,hitTarget:null}}i=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){var s=o.parentNode,a=s?s.parentNode:null,d=a&&a.nodeType===a.ELEMENT_NODE?a.className:null;if(d===r.ClassNames.VIEW_LINE){var c=e.getPositionFromDOMInfo(o,o.textContent.length);return{position:c,hitTarget:null}}i=o}return{position:null,hitTarget:i}},e._doHitTestWithCaretPositionFromPoint=function(e,t){var n=document.caretPositionFromPoint(t.clientX,t.clientY);if(n.offsetNode.nodeType===n.offsetNode.TEXT_NODE){var i=n.offsetNode.parentNode,o=i?i.parentNode:null,s=o?o.parentNode:null,a=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(a===r.ClassNames.VIEW_LINE){var u=e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset);return{position:u,hitTarget:null}}return{position:null,hitTarget:n.offsetNode.parentNode}}return{position:null,hitTarget:n.offsetNode}},e._doHitTestWithMoveToPoint=function(e,t){var n=null,i=null,o=document.body.createTextRange();try{o.moveToPoint(t.clientX,t.clientY)}catch(e){return{position:null,hitTarget:null}}o.collapse(!0);var s=o?o.parentElement():null,a=s?s.parentNode:null,u=a?a.parentNode:null,l=u&&u.nodeType===u.ELEMENT_NODE?u.className:"";if(l===r.ClassNames.VIEW_LINE){var c=o.duplicate();c.moveToElementText(s),c.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(s,c.text.length),c.moveToElementText(e.viewDomNode)}else i=s;return o.moveToElementText(e.viewDomNode),{position:n,hitTarget:i}},e._doHitTest=function(e,t){return document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):document.body.createTextRange?this._doHitTestWithMoveToPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null}},e}();t.MouseTargetFactory=f}),define(d[376],h([0,1,4,18,24,11,15,20,2,51,135,17,105,36,108]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";function g(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}var v=function(e){function t(t,n){var i=e.call(this)||this;return i._destination=t,i._condition=n,i._retryTimer=i._register(new d.TimeoutTimer),i.handler=function(e){return i._handle(e)},i}return m(t,e),t.prototype.dispose=function(){this._retryValue=null,e.prototype.dispose.call(this)},t.prototype._handle=function(e){var t=this;this._condition()?(this._retryTimer.cancel(),this._retryValue=null,this._destination(e)):(this._retryValue=e,this._retryTimer.setIfNotSet(function(){var e=t._retryValue;t._retryValue=null,t._handle(e)},10))},t}(n.Disposable),_=function(){function e(e,t){this.position=e,this.mouseColumn=t}return e}(),y=function(e){function t(n,i,o){var s=e.call(this)||this;s._isFocused=!1,s._context=n,s.viewController=i,s.viewHelper=o,s.mouseTargetFactory=new c.MouseTargetFactory(s._context,o),s.listenersToRemove=[],s._mouseDownOperation=new C(s._context,s.viewController,s.viewHelper,function(e,t){return s._createMouseTarget(e,t)},function(e){return s._getMouseColumn(e)}),s.toDispose=[],s._asyncFocus=new d.RunOnceScheduler(function(){return s.viewHelper.focusTextArea()},0),s.toDispose.push(s._asyncFocus),s.lastMouseLeaveTime=-1;var a=new h.EditorMouseEventFactory(s.viewHelper.viewDomNode);s.listenersToRemove.push(a.onContextMenu(s.viewHelper.viewDomNode,function(e){return s._onContextMenu(e,!0)})),s._mouseMoveEventHandler=new v(function(e){return s._onMouseMove(e)},function(){return!s.viewHelper.isDirty()}),s.toDispose.push(s._mouseMoveEventHandler),s.listenersToRemove.push(a.onMouseMoveThrottled(s.viewHelper.viewDomNode,s._mouseMoveEventHandler.handler,g(s.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),s.listenersToRemove.push(a.onMouseUp(s.viewHelper.viewDomNode,function(e){return s._onMouseUp(e)})),s.listenersToRemove.push(a.onMouseLeave(s.viewHelper.viewDomNode,function(e){return s._onMouseLeave(e)})),s.listenersToRemove.push(a.onMouseDown(s.viewHelper.viewDomNode,function(e){return s._onMouseDown(e)}));var u=function(e){if(s._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new p.StandardMouseWheelEvent(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=f.EditorZoom.getZoomLevel(),i=t.deltaY>0?1:-1;f.EditorZoom.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}};return s.listenersToRemove.push(r.addDisposableListener(s.viewHelper.viewDomNode,"mousewheel",u,!0)),s.listenersToRemove.push(r.addDisposableListener(s.viewHelper.viewDomNode,"DOMMouseScroll",u,!0)),s._context.addEventHandler(s),s}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this.listenersToRemove=n.dispose(this.listenersToRemove),this.toDispose=n.dispose(this.toDispose),this._mouseDownOperation.dispose()},t.prototype.onLayoutChanged=function(e){return!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.onCursorSelectionChanged=function(e){return this._mouseDownOperation.onCursorSelectionChanged(e),!1},t.prototype.onViewFocusChanged=function(e){return this._isFocused=e,!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new h.ClientCoordinates(e,t),i=n.toPageCoordinates(),o=h.createEditorPagePosition(this.viewHelper.viewDomNode);if(i.y<o.y||i.y>o.y+o.height||i.x<o.x||i.x>o.x+o.width)return null;var r=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(r,o,i,null)},t.prototype._createMouseTarget=function(e,t){var n=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(n,e.editorPos,e.pos,t?e.target:null)},t.prototype._getMouseColumn=function(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)},t.prototype._onContextMenu=function(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})},t.prototype._onMouseMove=function(e){if(!this._mouseDownOperation.isActive()){var t=e.timestamp;t<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}},t.prototype._onMouseLeave=function(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})},t.prototype._onMouseUp=function(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})},t.prototype._onMouseDown=function(e){var t=this,n=this._createMouseTarget(e,!0),r=n.type===u.MouseTargetType.CONTENT_TEXT||n.type===u.MouseTargetType.CONTENT_EMPTY,s=n.type===u.MouseTargetType.GUTTER_GLYPH_MARGIN||n.type===u.MouseTargetType.GUTTER_LINE_NUMBERS||n.type===u.MouseTargetType.GUTTER_LINE_DECORATIONS,a=n.type===u.MouseTargetType.GUTTER_LINE_NUMBERS,l=this._context.configuration.editor.viewInfo.selectOnLineNumbers,c=n.type===u.MouseTargetType.CONTENT_VIEW_ZONE||n.type===u.MouseTargetType.GUTTER_VIEW_ZONE,d=n.type===u.MouseTargetType.CONTENT_WIDGET,h=e.leftButton;i.isMacintosh&&e.ctrlKey&&(h=!1);var p=function(){o.isIE&&!t._isFocused?t._asyncFocus.schedule():(e.preventDefault(),t.viewHelper.focusTextArea())};if(h&&(r||a&&l))p(),this._mouseDownOperation.start(n.type,e);else if(s)e.preventDefault();else if(c){var f=n.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(f.viewZoneId)&&(p(),this._mouseDownOperation.start(n.type,e),e.preventDefault())}else d&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(p(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:n})},t}(l.ViewEventHandler);y.MOUSE_MOVE_MINIMUM_TIME=100,t.MouseHandler=y;var C=function(e){function t(t,n,i,o,r){var s=e.call(this)||this;return s._context=t,s._viewController=n,s._viewHelper=i,s._createMouseTarget=o,s._getMouseColumn=r,s._currentSelection=new a.Selection(1,1,1,1),s._mouseState=new b,s._onScrollTimeout=s._register(new d.TimeoutTimer),s._isActive=!1,s._lastMouseEvent=null,s._mouseMoveMonitor=s._register(new h.GlobalEditorMouseMoveMonitor(s._viewHelper.viewDomNode)),s._mouseDownThenMoveEventHandler=s._register(new v(function(e){return s._onMouseDownThenMove(e)},function(){return!s._viewHelper.isDirty()})),s}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.isActive=function(){return this._isActive},t.prototype._onMouseDownThenMove=function(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);var t=this._findMousePosition(e,!0);t&&this._dispatchMouse(t,!0)},t.prototype.start=function(e,t){var n=this;this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===u.MouseTargetType.GUTTER_LINE_NUMBERS),this._mouseState.setModifiers(t);var i=this._findMousePosition(t,!0);i&&(this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(g(null),this._mouseDownThenMoveEventHandler.handler,function(){return n._stop()})))},t.prototype._stop=function(){this._isActive=!1,this._onScrollTimeout.cancel()},t.prototype.onScrollChanged=function(){var e=this;this._isActive&&this._onScrollTimeout.setIfNotSet(function(){var t=e._findMousePosition(e._lastMouseEvent,!1);t&&e._dispatchMouse(t,!0)},10)},t.prototype.onCursorSelectionChanged=function(e){this._currentSelection=e.selection},t.prototype._getPositionOutsideEditor=function(e){var t=e.editorPos,n=this._getMouseColumn(e);if(e.posy<t.y){var i=this._viewHelper.getLineNumberAtVerticalOffset(Math.max(this._viewHelper.getScrollTop()-(t.y-e.posy),0));return new _(new s.Position(i,1),n)}if(e.posy>t.y+t.height){var o=this._viewHelper.getLineNumberAtVerticalOffset(this._viewHelper.getScrollTop()+(e.posy-t.y));return new _(new s.Position(o,this._context.model.getLineMaxColumn(o)),n)}var r=this._viewHelper.getLineNumberAtVerticalOffset(this._viewHelper.getScrollTop()+(e.posy-t.y));return e.posx<t.x?new _(new s.Position(r,1),n):e.posx>t.x+t.width?new _(new s.Position(r,this._context.model.getLineMaxColumn(r)),n):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t),o=i.position;if(!o)return null;if(i.type===u.MouseTargetType.CONTENT_VIEW_ZONE||i.type===u.MouseTargetType.GUTTER_VIEW_ZONE){var r=new s.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),a=i.detail,l=a.positionBefore,c=a.positionAfter;if(l&&c)return l.isBefore(r)?new _(l,i.mouseColumn):new _(c,i.mouseColumn)}return new _(o,i.mouseColumn)},t.prototype._dispatchMouse=function(e,t){this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey})},t}(n.Disposable),b=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0}return Object.defineProperty(e.prototype,"altKey",{get:function(){return this._altKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ctrlKey",{get:function(){return this._ctrlKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"metaKey",{get:function(){return this._metaKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shiftKey",{get:function(){return this._shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startedOnLineNumbers",{get:function(){return this._startedOnLineNumbers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._lastMouseDownCount},enumerable:!0,configurable:!0}),e.prototype.setModifiers=function(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey},e.prototype.setStartedOnLineNumbers=function(e){this._startedOnLineNumbers=e},e.prototype.trySetCount=function(t,n){var i=(new Date).getTime();i-this._lastSetMouseDownCountTime>e.CLEAR_MOUSE_DOWN_COUNT_TIME&&(t=1),this._lastSetMouseDownCountTime=i,t>this._lastMouseDownCount+1&&(t=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(t,this._lastMouseDownPositionEqualCount)},e}();b.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(d[377],h([0,1,11,59,376,105]),function(e,t,n,i,o,r){"use strict";function s(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}var a=function(e){function t(t,i,o){var r=e.call(this,t,i,o)||this;return r.viewHelper.linesContentDomNode.style.msTouchAction="none",r.viewHelper.linesContentDomNode.style.msContentZooming="none",r._installGestureHandlerTimeout=window.setTimeout(function(){if(r._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=r.viewHelper.linesContentDomNode,t.target=r.viewHelper.linesContentDomNode,r.viewHelper.linesContentDomNode.addEventListener("MSPointerDown",function(n){var i=n.pointerType;return i===(n.MSPOINTER_TYPE_MOUSE||"mouse")?void(r._lastPointerType="mouse"):void(i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(r._lastPointerType="touch",e.addPointer(n.pointerId)):(r._lastPointerType="pen",t.addPointer(n.pointerId)))}),r.listenersToRemove.push(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return r._onGestureChange(e)},s)),r.listenersToRemove.push(n.addDisposableListener(r.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return r._onCaptureGestureTap(e)},!0))}},100),r._lastPointerType="mouse",r}return m(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new r.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo("mouse",i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this.viewHelper.setScrollPosition({scrollLeft:this.viewHelper.getScrollLeft()-e.translationX,scrollTop:this.viewHelper.getScrollTop()-e.translationY})},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(o.MouseHandler),u=function(e){function t(t,i,o){var r=e.call(this,t,i,o)||this;return r.viewHelper.linesContentDomNode.style.touchAction="none",r._installGestureHandlerTimeout=window.setTimeout(function(){if(r._installGestureHandlerTimeout=-1,window.MSGesture){var e=new MSGesture,t=new MSGesture;e.target=r.viewHelper.linesContentDomNode,t.target=r.viewHelper.linesContentDomNode,r.viewHelper.linesContentDomNode.addEventListener("pointerdown",function(n){var i=n.pointerType;return"mouse"===i?void(r._lastPointerType="mouse"):void("touch"===i?(r._lastPointerType="touch",e.addPointer(n.pointerId)):(r._lastPointerType="pen",t.addPointer(n.pointerId)))}),r.listenersToRemove.push(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return r._onGestureChange(e)},s)),r.listenersToRemove.push(n.addDisposableListener(r.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return r._onCaptureGestureTap(e)},!0))}},100),r._lastPointerType="mouse",r}return m(t,e),t.prototype._onMouseDown=function(t){"mouse"===this._lastPointerType&&e.prototype._onMouseDown.call(this,t)},t.prototype._onCaptureGestureTap=function(e){var t=this,n=new r.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo("mouse",i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this.viewHelper.setScrollPosition({scrollLeft:this.viewHelper.getScrollLeft()-e.translationX,scrollTop:this.viewHelper.getScrollTop()-e.translationY})},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(o.MouseHandler),l=function(e){function t(t,o,s){var a=e.call(this,t,o,s)||this;return a.gesture=new i.Gesture(a.viewHelper.linesContentDomNode),a.listenersToRemove.push(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Tap,function(e){return a.onTap(e)})),a.listenersToRemove.push(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Change,function(e){return a.onChange(e)})),a.listenersToRemove.push(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Contextmenu,function(e){return a._onContextMenu(new r.EditorMouseEvent(e,a.viewHelper.viewDomNode),!1)})),a}return m(t,e),t.prototype.dispose=function(){this.gesture.dispose(),e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new r.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo("mouse",t.position)},t.prototype.onChange=function(e){this.viewHelper.setScrollPosition({scrollLeft:this.viewHelper.getScrollLeft()-e.translationX,scrollTop:this.viewHelper.getScrollTop()-e.translationY})},t}(o.MouseHandler),c=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new a(e,t,n):window.TouchEvent?this.handler=new l(e,t,n):window.navigator.pointerEnabled?this.handler=new u(e,t,n):this.handler=new o.MouseHandler(e,t,n)}return e.prototype.getTargetAtClientPoint=function(e,t){return this.handler.getTargetAtClientPoint(e,t)},e.prototype.dispose=function(){this.handler.dispose()},e}();t.PointerHandler=c}),define(d[136],h([0,1,32,28]),function(e,t,n,i){"use strict";var o=function(){function e(e){this._lines=[],this._rendLineNumberStart=1,this._createLine=e}return e.prototype._set=function(e,t){this._lines=t,this._rendLineNumberStart=e},e.prototype._get=function(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}},e.prototype.getStartLineNumber=function(){return this._rendLineNumberStart},e.prototype.getEndLineNumber=function(){return this._rendLineNumberStart+this._lines.length-1},e.prototype.getCount=function(){return this._lines.length},e.prototype.getLine=function(e){var t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber: "+e);return this._lines[t]},e.prototype.onModelLinesDeleted=function(e,t){if(0===this.getCount())return null;for(var n=this.getStartLineNumber(),i=this.getEndLineNumber(),o=0,r=0,s=n;s<=i;s++){var a=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===r?(o=a,r=1):r++)}if(e<n){var u=0;u=t<n?t-e+1:n-e,this._rendLineNumberStart-=u}var l=this._lines.splice(o,r);return l},e.prototype.onModelLineChanged=function(e){if(0===this.getCount())return!1;for(var t=this.getStartLineNumber(),n=this.getEndLineNumber(),i=!1,o=t;o<=n;o++){var r=o-this._rendLineNumberStart;o===e&&(this._lines[r].onContentChanged(),i=!0)}return i},e.prototype.onModelLinesInserted=function(e,t){if(0===this.getCount())return null;var n=t-e+1,i=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=i)return this._rendLineNumberStart+=n,null;if(e>o)return null;if(n+e>o){var r=this._lines.splice(e-this._rendLineNumberStart,o-e+1);return r}for(var s=[],a=0;a<n;a++)s[a]=this._createLine();var u=e-this._rendLineNumberStart,l=this._lines.slice(0,u),c=this._lines.slice(u,this._lines.length-n),d=this._lines.slice(this._lines.length-n,this._lines.length);return this._lines=l.concat(s).concat(c),d},e.prototype.onModelTokensChanged=function(e){if(0===this.getCount())return!1;for(var t=this.getStartLineNumber(),n=this.getEndLineNumber(),i=!1,o=0,r=e.length;o<r;o++){var s=e[o];if(!(s.toLineNumber<t||s.fromLineNumber>n))for(var a=Math.max(t,s.fromLineNumber),u=Math.min(n,s.toLineNumber),l=a;l<=u;l++){var c=l-this._rendLineNumberStart;this._lines[c].onTokensChanged(),i=!0}}return i},e}();t.RenderedLinesCollection=o;var r=function(e){function t(t){var n=e.call(this,t)||this;return n.domNode=n._createDomNode(),n._linesCollection=new o(function(){return n._createLine();
}),n._scrollDomNode=null,n._scrollDomNodeIsAbove=!1,n._renderer=new s(function(){return n._createLine()}),n}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._linesCollection=null},t.prototype.onConfigurationChanged=function(e){for(var t=this._linesCollection.getStartLineNumber(),n=this._linesCollection.getEndLineNumber(),i=t;i<=n;i++){var o=this._linesCollection.getLine(i);o.onConfigurationChanged(e)}return!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){var e=this;return this._linesCollection=new o(function(){return e._createLine()}),this._scrollDomNode=null,!0},t.prototype.onModelLinesDeleted=function(e){var t=this._linesCollection.onModelLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var o=t[n].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0},t.prototype.onModelLineChanged=function(e){return this._linesCollection.onModelLineChanged(e.lineNumber)},t.prototype.onModelLinesInserted=function(e){var t=this._linesCollection.onModelLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;n<i;n++){var o=t[n].getDomNode();o&&this.domNode.domNode.removeChild(o)}return!0},t.prototype.onModelTokensChanged=function(e){return this._linesCollection.onModelTokensChanged(e.ranges)},t.prototype._renderLines=function(e){var t=this._linesCollection._get(),n={domNode:this.domNode.domNode,rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length,getInlineDecorationsForLineInViewport:function(t){return e.getInlineDecorationsForLineInViewport(t)},viewportTop:e.viewportTop,viewportHeight:e.viewportHeight,scrollDomNode:this._scrollDomNode,scrollDomNodeIsAbove:this._scrollDomNodeIsAbove},i=this._renderer.renderWithManyUpdates(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(i.rendLineNumberStart,i.lines),this._scrollDomNode=i.scrollDomNode,this._scrollDomNodeIsAbove=i.scrollDomNodeIsAbove},t.prototype._createDomNode=function(){var e=i.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e},t}(n.ViewPart);t.ViewLayer=r;var s=function(){function e(e){this._createLine=e}return e.prototype.renderWithManyUpdates=function(e,t,n,i){return this._render(e,t,n,i)},e.prototype._render=function(e,t,n,i){var o={domNode:e.domNode,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength,getInlineDecorationsForLineInViewport:e.getInlineDecorationsForLineInViewport,viewportTop:e.viewportTop,viewportHeight:e.viewportHeight,scrollDomNode:e.scrollDomNode,scrollDomNodeIsAbove:e.scrollDomNodeIsAbove},r=!0;if(o.scrollDomNode){var s=this._getScrollDomNodeTime(o.scrollDomNode);(new Date).getTime()-s<1e3&&(r=!1)}if(r&&(o.rendLineNumberStart+o.linesLength-1<t||n<o.rendLineNumberStart)){o.rendLineNumberStart=t,o.linesLength=n-t+1,o.lines=[];for(var a=t;a<=n;a++)o.lines[a-t]=this._createLine();return this._finishRendering(o,!0,i),o.scrollDomNode=null,o}if(this._renderUntouchedLines(o,Math.max(t-o.rendLineNumberStart,0),Math.min(n-o.rendLineNumberStart,o.linesLength-1),i,t),o.rendLineNumberStart>t){var u=t,l=Math.min(n,o.rendLineNumberStart-1);u<=l&&(this._insertLinesBefore(o,u,l,i,t),o.linesLength+=l-u+1,o.scrollDomNode&&o.scrollDomNodeIsAbove&&(o.scrollDomNode.parentNode&&o.scrollDomNode.parentNode.removeChild(o.scrollDomNode),o.scrollDomNode=null))}else if(o.rendLineNumberStart<t){var c=Math.min(o.linesLength,t-o.rendLineNumberStart);c>0&&(this._removeLinesBefore(o,c),o.linesLength-=c)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1<n){var u=o.rendLineNumberStart+o.linesLength,l=n;u<=l&&(this._insertLinesAfter(o,u,l,i,t),o.linesLength+=l-u+1,o.scrollDomNode&&!o.scrollDomNodeIsAbove&&(o.scrollDomNode.parentNode&&o.scrollDomNode.parentNode.removeChild(o.scrollDomNode),o.scrollDomNode=null))}else if(o.rendLineNumberStart+o.linesLength-1>n){var u=Math.max(0,n-o.rendLineNumberStart+1),l=o.linesLength-1,c=l-u+1;c>0&&(this._removeLinesAfter(o,c),o.linesLength-=c)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=t;r<=n;r++){var s=e.rendLineNumberStart+r,a=e.lines[r].getDomNode();a&&e.lines[r].layoutLine(s,i[s-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this._createLine();e.lines=r.concat(e.lines)},e.prototype._getScrollDomNodeTime=function(e){var t=e.getAttribute("last-scroll-time");return t?parseInt(t,10):0},e.prototype._removeIfNotScrollDomNode=function(e,t,n){var i=this._getScrollDomNodeTime(t);if(!i)return void e.domNode.removeChild(t);if(e.scrollDomNode){var o=this._getScrollDomNodeTime(e.scrollDomNode);if(o>i)return void e.domNode.removeChild(t);e.scrollDomNode.parentNode&&e.scrollDomNode.parentNode.removeChild(e.scrollDomNode),e.scrollDomNode=null}e.scrollDomNode=t,e.scrollDomNodeIsAbove=n},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n<t;n++){var i=e.lines[n].getDomNode();i&&this._removeIfNotScrollDomNode(e,i,!0)}e.lines.splice(0,t)},e.prototype._insertLinesAfter=function(e,t,n,i,o){for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this._createLine();e.lines=e.lines.concat(r)},e.prototype._removeLinesAfter=function(e,t){for(var n=e.linesLength-t,i=0;i<t;i++){var o=e.lines[n+i].getDomNode();o&&this._removeIfNotScrollDomNode(e,o,!1)}e.lines.splice(n,t)},e._resolveInlineDecorations=function(e){for(var t=[],n=0,i=e.linesLength;n<i;n++){var o=n+e.rendLineNumberStart;t[n]=e.getInlineDecorationsForLineInViewport(o)}return t},e.prototype._finishRenderingNewLines=function(e,t,n,i){var o=e.domNode.lastChild;t||!o?e.domNode.innerHTML=n.join(""):o.insertAdjacentHTML("afterend",n.join(""));for(var r=e.domNode.lastChild,s=e.linesLength-1;s>=0;s--){var a=e.lines[s];i[s]&&(a.setDomNode(r),r=r.previousSibling)}},e.prototype._finishRenderingInvalidLines=function(e,t,n){var i=document.createElement("div");i.innerHTML=t.join("");for(var o=0;o<e.linesLength;o++){var r=e.lines[o];if(n[o]){var s=i.firstChild,a=r.getDomNode();a.parentNode.replaceChild(s,a),r.setDomNode(s)}}},e.prototype._finishRendering=function(t,n,i){for(var o=e._resolveInlineDecorations(t),r=!1,s=[],a=[],u=!1,l=[],c=[],d=0,h=t.linesLength;d<h;d++){var p=t.lines[d],f=d+t.rendLineNumberStart;if(p.shouldUpdateHTML(t.rendLineNumberStart,f,o[d])){var g=p.getDomNode();g?(p.getLineOuterHTML(c,f,i[d]),l[d]=!0,u=!0):(p.getLineOuterHTML(a,f,i[d]),s[d]=!0,r=!0)}}r&&this._finishRenderingNewLines(t,n,a,s),u&&this._finishRenderingInvalidLines(t,c,l)},e}()}),define(d[379],h([0,1,25,4,2,135]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(t){var i=e.call(this)||this;return i._viewModel=t,i._actual=i._register(new n.EventEmitter),i}return m(t,e),t.prototype.getInternalEventBus=function(){return this._actual},t.prototype.deferredEmit=function(e){return this._actual.deferredEmit(e)},t.prototype.emitViewLayoutChanged=function(e){this._actual.emit(o.EventType.ViewLayoutChanged,e)},t.prototype.emitScrollChanged=function(e){this._actual.emit("scroll",e)},t.prototype.emitViewFocusGained=function(){this._actual.emit(o.EventType.ViewFocusGained,{})},t.prototype.emitViewFocusLost=function(){this._actual.emit(o.EventType.ViewFocusLost,{})},t.prototype.emitKeyDown=function(e){this._actual.emit(o.EventType.KeyDown,e)},t.prototype.emitKeyUp=function(e){this._actual.emit(o.EventType.KeyUp,e)},t.prototype.emitContextMenu=function(e){this._actual.emit(o.EventType.ContextMenu,this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this._actual.emit(o.EventType.MouseMove,this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this._actual.emit(o.EventType.MouseLeave,this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this._actual.emit(o.EventType.MouseUp,this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this._actual.emit(o.EventType.MouseDown,this._convertViewToModelMouseEvent(e))},t.prototype._convertViewToModelMouseEvent=function(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e},t.prototype._convertViewToModelMouseTarget=function(e){return new a(e.element,e.type,e.mouseColumn,e.position?this._convertViewToModelPosition(e.position):null,e.range?this._convertViewToModelRange(e.range):null,e.detail)},t.prototype._convertViewToModelPosition=function(e){return this._viewModel.convertViewPositionToModelPosition(e.lineNumber,e.column)},t.prototype._convertViewToModelRange=function(e){return this._viewModel.convertViewRangeToModelRange(e)},t}(i.Disposable);t.ViewOutgoingEvents=s;var a=function(){function e(e,t,n,i,o,r){this.element=e,this.type=t,this.mouseColumn=n,this.position=i,this.range=o,this.detail=r}return e.prototype.toString=function(){return r.MouseTarget.toString(this)},e}()}),define(d[380],h([0,1,4,11,60,2,21,32]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t,n){e.hasOwnProperty(n)&&(t[n]=e[n])}var l=function(){function e(e,t,n,l,c){var d=this;this.toDispose=[],this.configuration=e,this.privateViewEventBus=t,this.linesContent=n;var h=this.configuration.editor.viewInfo.scrollbar,p={canUseTranslate3d:this.configuration.editor.viewInfo.canUseTranslate3d,listenOnDomNode:l,vertical:h.vertical,horizontal:h.horizontal,className:s.ClassNames.SCROLLABLE_ELEMENT+" "+this.configuration.editor.viewInfo.theme,useShadows:!1,lazyRender:!0,saveLastScrollTimeOnClassName:s.ClassNames.VIEW_LINE};u(h,p,"verticalHasArrows"),u(h,p,"horizontalHasArrows"),u(h,p,"verticalScrollbarSize"),u(h,p,"verticalSliderSize"),u(h,p,"horizontalScrollbarSize"),u(h,p,"horizontalSliderSize"),u(h,p,"handleMouseWheel"),u(h,p,"arrowSize"),u(h,p,"mouseWheelScrollSensitivity"),this.scrollbar=new o.ScrollableElement(n,p),a.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.onLayoutInfoChanged(),this.toDispose.push(this.scrollbar),this.toDispose.push(this.scrollbar.onScroll(function(e){d.privateViewEventBus.emit(r.EventType.ViewScrollChanged,e)})),this.toDispose.push(this.configuration.onDidChange(function(e){if(d.scrollbar.updateClassName(s.ClassNames.SCROLLABLE_ELEMENT+" "+d.configuration.editor.viewInfo.theme),e.viewInfo.scrollbar||e.viewInfo.canUseTranslate3d){var t={canUseTranslate3d:d.configuration.editor.viewInfo.canUseTranslate3d,handleMouseWheel:d.configuration.editor.viewInfo.scrollbar.handleMouseWheel,mouseWheelScrollSensitivity:d.configuration.editor.viewInfo.scrollbar.mouseWheelScrollSensitivity};d.scrollbar.updateOptions(t)}}));var f=function(e,t,n){var i={};if(t){var o=e.scrollTop;o&&(i.scrollTop=d.getScrollTop()+o,e.scrollTop=0)}if(n){var r=e.scrollLeft;r&&(i.scrollLeft=d.getScrollLeft()+r,e.scrollLeft=0)}d.setScrollPosition(i)};this.toDispose.push(i.addDisposableListener(l,"scroll",function(e){return f(l,!0,!0)})),this.toDispose.push(i.addDisposableListener(n,"scroll",function(e){return f(n,!0,!1)})),this.toDispose.push(i.addDisposableListener(c,"scroll",function(e){return f(c,!0,!1)}))}return e.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose)},e.prototype.renderScrollbar=function(){this.scrollbar.renderNow()},e.prototype.onLayoutInfoChanged=function(){this.scrollbar.updateState({width:this.configuration.editor.layoutInfo.contentWidth,height:this.configuration.editor.layoutInfo.contentHeight})},e.prototype.getOverviewRulerLayoutInfo=function(){return this.scrollbar.getOverviewRulerLayoutInfo()},e.prototype.getScrollbarContainerDomNode=function(){return this.scrollbar.getDomNode()},e.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)},e.prototype.getWidth=function(){return this.scrollbar.getWidth()},e.prototype.getScrollWidth=function(){return this.scrollbar.getScrollWidth()},e.prototype.getScrollLeft=function(){return this.scrollbar.getScrollLeft()},e.prototype.getHeight=function(){return this.scrollbar.getHeight()},e.prototype.getScrollHeight=function(){return this.scrollbar.getScrollHeight()},e.prototype.getScrollTop=function(){return this.scrollbar.getScrollTop()},e.prototype.setScrollPosition=function(e){this.scrollbar.updateState(e)},e.prototype.setScrollHeight=function(e){this.scrollbar.updateState({scrollHeight:e})},e.prototype.setScrollWidth=function(e){this.scrollbar.updateState({scrollWidth:e})},e}();t.ScrollManager=l}),define(d[381],h([0,1,40,2,213,51,380]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n,i,r,a,u){var l=e.call(this)||this;return l.configuration=t,l.privateViewEventBus=i,l.model=n,l.scrollManager=new s.ScrollManager(t,i,r,a,u),l.configuration.setMaxLineNumber(l.model.getMaxLineNumber()),l.linesLayout=new o.LinesLayout(t,n),l._updateHeight(),l}return m(t,e),t.prototype.dispose=function(){this.scrollManager.dispose()},t.prototype.updateLineCount=function(){this.configuration.setMaxLineNumber(this.model.getMaxLineNumber())},t.prototype.onZonesChanged=function(){return this._updateHeight(),!1},t.prototype.onModelFlushed=function(){return this.linesLayout.onModelFlushed(),this.updateLineCount(),this._updateHeight(),!1},t.prototype.onModelLinesDeleted=function(e){return this.linesLayout.onModelLinesDeleted(e),this.updateLineCount(),this._updateHeight(),!1},t.prototype.onModelLinesInserted=function(e){return this.linesLayout.onModelLinesInserted(e),this.updateLineCount(),this._updateHeight(),!1},t.prototype.onConfigurationChanged=function(e){return this.linesLayout.onConfigurationChanged(e),e.layoutInfo&&(this.scrollManager.onLayoutInfoChanged(),this._emitLayoutChangedEvent()),this._updateHeight(),!1},t.prototype._updateHeight=function(){this.scrollManager.setScrollHeight(this.getTotalHeight())},t.prototype.getCurrentViewport=function(){return new i.Viewport(this.scrollManager.getScrollTop(),this.scrollManager.getScrollLeft(),this.scrollManager.getWidth(),this.scrollManager.getHeight())},t.prototype.getCenteredViewLineNumberInViewport=function(){return this.linesLayout.getCenteredLineInViewport(this.getCurrentViewport())},t.prototype._emitLayoutChangedEvent=function(){this.privateViewEventBus.emit(i.EventType.ViewLayoutChanged,this.configuration.editor.layoutInfo)},t.prototype.emitLayoutChangedEvent=function(){this._emitLayoutChangedEvent()},t.prototype._computeScrollWidth=function(e,n){var i=this.configuration.editor.wrappingInfo.isViewportWrapping;return i?Math.max(e,n):Math.max(e+t.LINES_HORIZONTAL_EXTRA_PX,n)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollManager.setScrollWidth(t),this._updateHeight()},t.prototype.saveState=function(){var e=this.scrollManager.getScrollTop(),t=this.linesLayout.getLineNumberAtOrAfterVerticalOffset(e),n=this.linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(t);return{scrollTop:e,scrollTopWithoutViewZones:e-n,scrollLeft:this.scrollManager.getScrollLeft()}},t.prototype.restoreState=function(e){var t=e.scrollTop;"number"!=typeof e.scrollTopWithoutViewZones||this.linesLayout.hasWhitespace()||(t=e.scrollTopWithoutViewZones),this.scrollManager.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:t})},t.prototype.addWhitespace=function(e,t,n){return this.linesLayout.insertWhitespace(e,t,n)},t.prototype.changeWhitespace=function(e,t,n){return this.linesLayout.changeWhitespace(e,t,n)},t.prototype.removeWhitespace=function(e){return this.linesLayout.removeWhitespace(e)},t.prototype.getVerticalOffsetForLineNumber=function(e){return this.linesLayout.getVerticalOffsetForLineNumber(e)},t.prototype.heightInPxForLine=function(e){return this.linesLayout.getHeightForLineNumber(e)},t.prototype.isAfterLines=function(e){return this.linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this.linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getTotalHeight=function(){var e=0;return this.scrollManager.getScrollWidth()>this.scrollManager.getWidth()&&this.configuration.editor.viewInfo.scrollbar.horizontal!==n.ScrollbarVisibility.Hidden&&(e=this.configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize),this.linesLayout.getTotalHeight(this.getCurrentViewport(),e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this.linesLayout.getWhitespaceAtVerticalOffset(e)},t.prototype.getLinesViewportData=function(){return this.linesLayout.getLinesViewportData(this.getCurrentViewport())},t.prototype.getWhitespaceViewportData=function(){return this.linesLayout.getWhitespaceViewportData(this.getCurrentViewport())},t.prototype.getWhitespaces=function(){return this.linesLayout.getWhitespaces()},t.prototype.getOverviewRulerInsertData=function(){var e=this.scrollManager.getOverviewRulerLayoutInfo();return{parent:e.parent,insertBefore:e.insertBefore}},t.prototype.getScrollbarContainerDomNode=function(){return this.scrollManager.getScrollbarContainerDomNode()},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.scrollManager.delegateVerticalScrollbarMouseDown(e)},t.prototype.getScrollWidth=function(){return this.scrollManager.getScrollWidth()},t.prototype.getScrollLeft=function(){return this.scrollManager.getScrollLeft()},t.prototype.getScrollHeight=function(){return this.scrollManager.getScrollHeight()},t.prototype.getScrollTop=function(){return this.scrollManager.getScrollTop()},t.prototype.setScrollPosition=function(e){this.scrollManager.setScrollPosition(e)},t.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollManager.getScrollTop()},t.prototype.renderScrollbar=function(){this.scrollManager.renderScrollbar()},t}(r.ViewEventHandler);a.LINES_HORIZONTAL_EXTRA_PX=30,t.LayoutProvider=a}),define(d[382],h([0,1,11,28,21,32]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(t,n){var i=e.call(this,t)||this;return i._viewDomNode=n,i._widgets={},i._contentWidth=0,i._contentLeft=0,i._lineHeight=i._context.configuration.editor.lineHeight,i._renderData={},i.domNode=document.createElement("div"),r.PartFingerprints.write(i.domNode,1),i.domNode.className=o.ClassNames.CONTENT_WIDGETS,i.domNode.style.position="absolute",i.domNode.style.top="0",i.overflowingContentWidgetsDomNode=document.createElement("div"),r.PartFingerprints.write(i.overflowingContentWidgetsDomNode,2),i.overflowingContentWidgetsDomNode.className=o.ClassNames.OVERFLOWING_CONTENT_WIDGETS,i}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null,this.domNode=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),!0},t.prototype.onLayoutChanged=function(e){if(this._contentLeft=e.contentLeft,this._contentWidth!==e.contentWidth){this._contentWidth=e.contentWidth;for(var t=Object.keys(this._widgets),n=0,o=t.length;n<o;n++){var r=t[n],s=this._widgets[r],a=s.widget,u=s.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth;i.StyleMutator.setMaxWidth(a.getDomNode(),u)}}return!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.addWidget=function(e){var t={allowEditorOverflow:e.allowEditorOverflow||!1,widget:e,position:null,preference:null,isVisible:!1};this._widgets[e.getId()]=t;var n=e.getDomNode();n.style.position=this._context.configuration.editor.viewInfo.fixedOverflowWidgets&&e.allowEditorOverflow?"fixed":"absolute",i.StyleMutator.setMaxWidth(n,this._contentWidth),i.StyleMutator.setVisibility(n,"hidden"),n.setAttribute("widgetId",e.getId()),t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(n):this.domNode.appendChild(n),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t,n){var i=this._widgets[e.getId()];i.position=t,i.preference=n,this.setShouldRender()},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t];delete this._widgets[t];var i=n.widget.getDomNode();i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}},t.prototype.shouldSuppressMouseDownOnWidget=function(e){if(this._widgets.hasOwnProperty(e)){var t=this._widgets[e];return t.widget.suppressMouseDown}return!1},t.prototype._layoutBoxInViewport=function(e,t,n){var i=n.visibleRangeForPosition(e);if(!i)return null;var o=t.clientWidth,r=t.clientHeight,s=i.top,a=s,u=i.top+this._lineHeight,l=n.viewportHeight-u,c=s-r,d=a>=r,h=u,p=l>=r,f=i.left;return f+o>n.viewportLeft+n.viewportWidth&&(f=n.viewportLeft+n.viewportWidth-o),f<n.viewportLeft&&(f=n.viewportLeft),{aboveTop:c,fitsAbove:d,belowTop:h,fitsBelow:p,left:f}},t.prototype._layoutBoxInPage=function(e,t,i){var o=i.visibleRangeForPosition(e);if(!o)return null;var r=o.left-i.viewportLeft,s=t.clientWidth,a=t.clientHeight;if(r+s<0||r>this._contentWidth)return null;var u=o.top-a,l=o.top+this._lineHeight,c=r+this._contentLeft,d=n.getDomNodePagePosition(this._viewDomNode),h=d.top+u-n.StandardWindow.scrollY,p=d.top+l-n.StandardWindow.scrollY,f=d.left+c-n.StandardWindow.scrollX,g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,m=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,v=22,_=22,y=h>=v,C=p+a<=m-_;if(f+s+20>g){var b=f-(g-s-20);f-=b,c-=b}if(f<0){var b=f;f-=b,c-=b}return this._context.configuration.editor.viewInfo.fixedOverflowWidgets&&(u=h,l=p,c=f),{aboveTop:u,fitsAbove:y,belowTop:l,fitsBelow:C,left:c}},t.prototype._prepareRenderWidgetAtExactPosition=function(e,t){var n=t.visibleRangeForPosition(e);return n?{top:n.top,left:n.left}:null},t.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e,t){var n=this._prepareRenderWidgetAtExactPosition(e,t);return n.left+=this._contentLeft,n},t.prototype._prepareRenderWidget=function(e,t){var n=this;if(!e.position||!e.preference)return null;var i=this._context.model.validateModelPosition(e.position);if(!this._context.model.modelPositionIsVisible(i))return null;for(var r=this._context.model.convertModelPositionToViewPosition(i.lineNumber,i.column),s=null,a=function(){if(!s){var i=e.widget.getDomNode();s=e.allowEditorOverflow?n._layoutBoxInPage(r,i,t):n._layoutBoxInViewport(r,i,t)}},u=1;u<=2;u++)for(var l=0;l<e.preference.length;l++){var c=e.preference[l];if(c===o.ContentWidgetPositionPreference.ABOVE){if(a(),!s)return null;if(2===u||s.fitsAbove)return{top:s.aboveTop,left:s.left}}else{if(c!==o.ContentWidgetPositionPreference.BELOW)return e.allowEditorOverflow?this._prepareRenderWidgetAtExactPositionOverflowing(r,t):this._prepareRenderWidgetAtExactPosition(r,t);if(a(),!s)return null;if(2===u||s.fitsBelow)return{top:s.belowTop,left:s.left}}}},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");for(var t={},n=Object.keys(this._widgets),i=0,o=n.length;i<o;i++){var r=n[i],s=this._prepareRenderWidget(this._widgets[r],e);s&&(t[r]=s)}this._renderData=t},t.prototype.render=function(e){for(var t=this._renderData,n=Object.keys(this._widgets),o=0,r=n.length;o<r;o++){var s=n[o],a=this._widgets[s],u=this._widgets[s].widget.getDomNode();t.hasOwnProperty(s)?(a.allowEditorOverflow?(i.StyleMutator.setTop(u,t[s].top),i.StyleMutator.setLeft(u,t[s].left)):(i.StyleMutator.setTop(u,t[s].top+e.viewportTop-e.bigNumbersDelta),i.StyleMutator.setLeft(u,t[s].left)),a.isVisible||(i.StyleMutator.setVisibility(u,"inherit"),u.setAttribute("monaco-visible-content-widget","true"),a.isVisible=!0)):a.isVisible&&(u.removeAttribute("monaco-visible-content-widget"),a.isVisible=!1,i.StyleMutator.setVisibility(u,"hidden"))}},t}(r.ViewPart);t.ViewContentWidgets=s}),define(d[383],h([0,1,50,329]),function(e,t,n){"use strict";var i=function(e){function t(t,n){var i=e.call(this)||this;return i._context=t,i._lineHeight=i._context.configuration.editor.lineHeight,i._readOnly=i._context.configuration.editor.readOnly,i._renderLineHighlight=i._context.configuration.editor.viewInfo.renderLineHighlight,i._layoutProvider=n,i._selectionIsEmpty=!0,i._primaryCursorIsInEditableRange=!0,i._primaryCursorLineNumber=1,i._scrollWidth=i._layoutProvider.getScrollWidth(),i._contentWidth=i._context.configuration.editor.layoutInfo.contentWidth,i._context.addEventHandler(i),i}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null},t.prototype.onModelFlushed=function(){return this._primaryCursorIsInEditableRange=!0,this._selectionIsEmpty=!0,this._primaryCursorLineNumber=1,this._scrollWidth=this._layoutProvider.getScrollWidth(),!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){var t=!1;return this._primaryCursorIsInEditableRange!==e.isInEditableRange&&(this._primaryCursorIsInEditableRange=e.isInEditableRange,t=!0),this._primaryCursorLineNumber!==e.position.lineNumber&&(this._primaryCursorLineNumber=e.position.lineNumber,t=!0),t},t.prototype.onCursorSelectionChanged=function(e){var t=e.selection.isEmpty();return this._selectionIsEmpty!==t&&(this._selectionIsEmpty=t,!0)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo.renderLineHighlight&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollWidth=e.scrollWidth,e.scrollWidthChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'<div class="current-line" style="width:'+String(Math.max(this._scrollWidth,this._contentWidth))+"px; height:"+String(this._lineHeight)+'px;"></div>':""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&this._primaryCursorIsInEditableRange},t}(n.DynamicViewOverlay);t.CurrentLineHighlightOverlay=i}),define(d[384],h([0,1,50,330]),function(e,t,n){"use strict";var i=function(e){function t(t,n){var i=e.call(this)||this;return i._context=t,i._lineHeight=i._context.configuration.editor.lineHeight,i._renderLineHighlight=i._context.configuration.editor.viewInfo.renderLineHighlight,i._layoutProvider=n,i._primaryCursorIsInEditableRange=!0,i._primaryCursorLineNumber=1,i._contentLeft=i._context.configuration.editor.layoutInfo.contentLeft,i._context.addEventHandler(i),i}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null},t.prototype.onModelFlushed=function(){return this._primaryCursorIsInEditableRange=!0,this._primaryCursorLineNumber=1,!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){var t=!1;return this._primaryCursorIsInEditableRange!==e.isInEditableRange&&(this._primaryCursorIsInEditableRange=e.isInEditableRange,t=!0),this._primaryCursorLineNumber!==e.position.lineNumber&&(this._primaryCursorLineNumber=e.position.lineNumber,t=!0),t},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.renderLineHighlight&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){return t===this._primaryCursorLineNumber&&this._shouldShowCurrentLine()?'<div class="current-line-margin" style="width:'+String(this._contentLeft)+"px; height:"+String(this._lineHeight)+'px;"></div>':""},t.prototype._shouldShowCurrentLine=function(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._primaryCursorIsInEditableRange},t}(n.DynamicViewOverlay);t.CurrentLineMarginHighlightOverlay=i}),define(d[385],h([0,1,50,3,331]),function(e,t,n,i){"use strict";var o=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");for(var t=e.getDecorationsInViewport(),n=[],o=0,r=0,s=t.length;r<s;r++){var a=t[r];a.source.options.className&&(n[o++]=a)}n=n.sort(function(e,t){var n=e.source.options.className,o=t.source.options.className;return n<o?-1:n>o?1:i.Range.compareRangesUsingStarts(e.range,t.range)});for(var u=e.visibleRange.startLineNumber,l=e.visibleRange.endLineNumber,c=[],d=u;d<=l;d++){var h=d-u;c[h]=""}this._renderWholeLineDecorations(e,n,c),this._renderNormalDecorations(e,n,c),this._renderResult=c},t.prototype._renderWholeLineDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=0,a=t.length;s<a;s++){var u=t[s];if(u.source.options.isWholeLine)for(var l='<div class="cdr '+u.source.options.className+'" style="left:0;width:100%;height:'+i+'px;"></div>',c=Math.max(u.range.startLineNumber,o),d=Math.min(u.range.endLineNumber,r),h=c;h<=d;h++){var p=h-o;n[p]+=l}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var i=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=0,s=t.length;r<s;r++){var a=t[r];if(!a.source.options.isWholeLine){var u=a.source.options.className,l=e.linesVisibleRangesForRange(a.range,"findMatch"===u);if(l)for(var c=0,d=l.length;c<d;c++)for(var h=l[c],p=h.lineNumber-o,f=0,g=h.ranges.length;f<g;f++){var m=h.ranges[f],v='<div class="cdr '+u+'" style="left:'+String(m.left)+"px;width:"+String(m.width)+"px;height:"+i+'px;"></div>';n[p]+=v}}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(n.DynamicViewOverlay);t.DecorationsOverlay=o}),define(d[101],h([0,1,50,332]),function(e,t,n){
"use strict";var i=function(){function e(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}return e}();t.DecorationToRender=i;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){var r=o-e;i[r]=[]}if(0===n.length)return i;n.sort(function(e,t){return e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1});for(var s=null,a=0,u=0,l=n.length;u<l;u++){var c=n[u],d=c.className,h=Math.max(c.startLineNumber,e)-e,p=Math.min(c.endLineNumber,t)-e;s===d?(h=Math.max(a+1,h),a=Math.max(a,p)):(s=d,a=p);for(var f=h;f<=a;f++)i[f].push(s)}return i},t}(n.DynamicViewOverlay);t.DedupOverlay=o;var r=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._glyphMargin=n._context.configuration.editor.viewInfo.glyphMargin,n._glyphMarginLeft=0,n._glyphMarginWidth=0,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.glyphMargin&&(this._glyphMargin=this._context.configuration.editor.viewInfo.glyphMargin),!0},t.prototype.onLayoutChanged=function(e){return this._glyphMarginLeft=e.glyphMarginLeft,this._glyphMarginWidth=e.glyphMarginWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),n=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.source.options.glyphMarginClassName;a&&n.push(new i(s.range.startLineNumber,s.range.endLineNumber,a))}return n},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");if(!this._glyphMargin)return void(this._renderResult=null);for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),s=this._glyphMarginWidth.toString(),a='" style="left:'+r+"px;width:"+s+"px;height:"+o+'px;"></div>',u=[],l=t;l<=n;l++){var c=l-t,d=i[c];0===d.length?u[c]="":u[c]='<div class="cgmr '+d.join(" ")+a}this._renderResult=u},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(o);t.GlyphMarginOverlay=r}),define(d[387],h([0,1,50,333]),function(e,t,n){"use strict";var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._spaceWidth=this._context.configuration.editor.fontInfo.spaceWidth),e.viewInfo.renderIndentGuides&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides),!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");if(!this._enabled)return void(this._renderResult=null);for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize(),o=i*this._spaceWidth,r=this._lineHeight,s=[],a=t;a<=n;a++){for(var u=a-t,l=this._context.model.getLineIndentGuide(a),c="",d=0,h=0;h<l;h++)c+='<div class="cigr" style="left:'+d+"px;height:"+r+'px;"></div>',d+=o;s[u]=c}this._renderResult=s},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(n.DynamicViewOverlay);t.IndentGuidesOverlay=i}),define(d[388],h([0,1,18,50,21,335]),function(e,t,n,i,o){"use strict";var r=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineNumbers=n._context.configuration.editor.viewInfo.renderLineNumbers,n._renderRelativeLineNumbers=n._context.configuration.editor.viewInfo.renderRelativeLineNumbers,n._lineNumbersLeft=0,n._lineNumbersWidth=0,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!1},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!!this._renderRelativeLineNumbers},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.renderLineNumbers&&(this._renderLineNumbers=this._context.configuration.editor.viewInfo.renderLineNumbers),e.viewInfo.renderRelativeLineNumbers&&(this._renderRelativeLineNumbers=this._context.configuration.editor.viewInfo.renderRelativeLineNumbers),!0},t.prototype.onLayoutChanged=function(e){return this._lineNumbersLeft=e.lineNumbersLeft,this._lineNumbersWidth=e.lineNumbersWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.prepareRender=function(e){if(!this._renderLineNumbers)return void(this._renderResult=null);for(var t=n.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s='<div class="'+o.ClassNames.LINE_NUMBERS+t+'" style="left:'+this._lineNumbersLeft.toString()+"px;width:"+this._lineNumbersWidth.toString()+'px;">',a=[],u=i;u<=r;u++){var l=u-i,c=this._context.model.getLineRenderLineNumber(u);c?a[l]=s+c+"</div>":a[l]=""}this._renderResult=a},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(i.DynamicViewOverlay);t.LineNumbersOverlay=r}),define(d[389],h([0,1,101,338]),function(e,t,n){"use strict";var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=0,n._decorationsWidth=0,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return!0},t.prototype.onLayoutChanged=function(e){return this._decorationsLeft=e.decorationsLeft,this._decorationsWidth=e.decorationsWidth,!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.source.options.linesDecorationsClassName;a&&i.push(new n.DecorationToRender(s.range.startLineNumber,s.range.endLineNumber,a))}return i},t.prototype.prepareRender=function(e){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=this._decorationsLeft.toString(),r=this._decorationsWidth.toString(),s='" style="left:'+o+"px;width:"+r+'px;"></div>',a=[],u=t;u<=n;u++){for(var l=u-t,c=i[l],d="",h=0,p=c.length;h<p;h++)d+='<div class="cldr '+c[h]+s;a[l]=d}this._renderResult=a},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(n.DedupOverlay);t.LinesDecorationsOverlay=i}),define(d[390],h([0,1,28,21,32]),function(e,t,n,i,o){"use strict";var r=function(e){function t(t,n){var i=e.call(this,t)||this;return i._layoutProvider=n,i._canUseTranslate3d=i._context.configuration.editor.viewInfo.canUseTranslate3d,i._contentLeft=i._context.configuration.editor.layoutInfo.contentLeft,i._glyphMarginLeft=i._context.configuration.editor.layoutInfo.glyphMarginLeft,i._glyphMarginWidth=i._context.configuration.editor.layoutInfo.glyphMarginWidth,i.domNode=i._createDomNode(),i}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._createDomNode=function(){var e=document.createElement("div");return e.className=i.ClassNames.MARGIN+" monaco-editor-background",e.style.position="absolute",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=n.createFastDomNode(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(i.ClassNames.GLYPH_MARGIN),e.appendChild(this._glyphMarginBackgroundDomNode.domNode),e},t.prototype.onConfigurationChanged=function(t){return t.viewInfo.canUseTranslate3d&&(this._canUseTranslate3d=this._context.configuration.editor.viewInfo.canUseTranslate3d),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollTopChanged},t.prototype.onLayoutChanged=function(t){return this._contentLeft=t.contentLeft,this._glyphMarginLeft=t.glyphMarginLeft,this._glyphMarginWidth=t.glyphMarginWidth,e.prototype.onLayoutChanged.call(this,t)||!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(this._canUseTranslate3d){var t="translate3d(0px, "+e.linesViewportData.visibleRangesDeltaTop+"px, 0px)";n.StyleMutator.setTransform(this.domNode,t),n.StyleMutator.setTop(this.domNode,0)}else n.StyleMutator.setTransform(this.domNode,""),n.StyleMutator.setTop(this.domNode,e.linesViewportData.visibleRangesDeltaTop);var i=Math.min(this._layoutProvider.getTotalHeight(),1e6);n.StyleMutator.setHeight(this.domNode,i),n.StyleMutator.setWidth(this.domNode,this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)},t}(o.ViewPart);t.Margin=r}),define(d[391],h([0,1,101,339]),function(e,t,n){"use strict";var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return!1},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=s.source.options.marginClassName;a&&i.push(new n.DecorationToRender(s.range.startLineNumber,s.range.endLineNumber,a))}return i},t.prototype.prepareRender=function(e){for(var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._render(t,n,this._getDecorations(e)),o=[],r=t;r<=n;r++){for(var s=r-t,a=i[s],u="",l=0,c=a.length;l<c;l++)u+='<div class="cmdr '+a[l]+'" style=""></div>';o[s]=u}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(n.DedupOverlay);t.MarginViewLineDecorationsOverlay=i}),define(d[392],h([0,1,28,21,32,340]),function(e,t,n,i,o){"use strict";var r=function(e){function t(t){var n=e.call(this,t)||this;return n._widgets={},n._verticalScrollbarWidth=0,n._horizontalScrollbarHeight=0,n._editorHeight=0,n._editorWidth=0,n.domNode=document.createElement("div"),o.PartFingerprints.write(n.domNode,4),n.domNode.className=i.ClassNames.OVERLAY_WIDGETS,n}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.onLayoutChanged=function(e){return this._verticalScrollbarWidth=e.verticalScrollbarWidth,this._horizontalScrollbarHeight=e.horizontalScrollbarHeight,this._editorHeight=e.height,this._editorWidth=e.width,!0},t.prototype.addWidget=function(e){this._widgets[e.getId()]={widget:e,preference:null};var t=e.getDomNode();t.style.position="absolute",t.setAttribute("widgetId",e.getId()),this.domNode.appendChild(t),this.setShouldRender()},t.prototype.setWidgetPosition=function(e,t){var n=this._widgets[e.getId()];return n.preference!==t&&(n.preference=t,this.setShouldRender(),!0)},t.prototype.removeWidget=function(e){var t=e.getId();if(this._widgets.hasOwnProperty(t)){var n=this._widgets[t],i=n.widget.getDomNode();delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t="data-editor-restoreStyleTop",o=e.widget.getDomNode();if(null!==e.preference)if(e.preference===i.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER)o.hasAttribute(t)||o.setAttribute(t,o.style.top),n.StyleMutator.setTop(o,0),n.StyleMutator.setRight(o,2*this._verticalScrollbarWidth);else if(e.preference===i.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER){o.hasAttribute(t)||o.setAttribute(t,o.style.top);var r=o.clientHeight;n.StyleMutator.setTop(o,this._editorHeight-r-2*this._horizontalScrollbarHeight),n.StyleMutator.setRight(o,2*this._verticalScrollbarWidth)}else e.preference===i.OverlayWidgetPositionPreference.TOP_CENTER&&(o.hasAttribute(t)||o.setAttribute(t,o.style.top),n.StyleMutator.setTop(o,0),o.style.right="50%");else if(o.hasAttribute(t)){var s=o.getAttribute(t);o.removeAttribute(t),o.style.top=s}},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!")},t.prototype.render=function(e){n.StyleMutator.setWidth(this.domNode,this._editorWidth);for(var t=Object.keys(this._widgets),i=0,o=t.length;i<o;i++){var r=t[i];this._renderWidget(this._widgets[r])}},t}(o.ViewPart);t.ViewOverlayWidgets=r}),define(d[393],h([0,1,51,130]),function(e,t,n,i){"use strict";var o=function(e){function t(t,n,o,r,s,a){var u=e.call(this)||this;return u._context=t,u._overviewRuler=new i.OverviewRulerImpl(0,n,o,u._context.configuration.editor.lineHeight,u._context.configuration.editor.viewInfo.canUseTranslate3d,r,s,a),u._context.addEventHandler(u),u}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._overviewRuler.dispose()},t.prototype.onConfigurationChanged=function(e){return e.lineHeight?(this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight,!0),!0):!!e.viewInfo.canUseTranslate3d&&(this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d,!0),!0)},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){return!0},t.prototype.onScrollChanged=function(t){return this._overviewRuler.setScrollHeight(t.scrollHeight,!0),e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype.getDomNode=function(){return this._overviewRuler.getDomNode()},t.prototype.setLayout=function(e){this._overviewRuler.setLayout(e,!0)},t.prototype.setZones=function(e){this._overviewRuler.setZones(e,!0)},t}(n.ViewEventHandler);t.OverviewRuler=o}),define(d[394],h([0,1,28,32,343]),function(e,t,n,i){"use strict";var o=function(e){function t(t,n){var i=e.call(this,t)||this;return i._layoutProvider=n,i.domNode=document.createElement("div"),i.domNode.className="view-rulers",i._rulers=i._context.configuration.editor.viewInfo.rulers,i._height=i._context.configuration.editor.layoutInfo.contentHeight,i._typicalHalfwidthCharacterWidth=i._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo.rulers||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._height=this._context.configuration.editor.layoutInfo.contentHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!")},t.prototype.render=function(e){for(var t=this.domNode.children.length,i=Math.max(t,this._rulers.length),o=0;o<i;o++)if(o>=this._rulers.length)this.domNode.removeChild(this.domNode.lastChild);else{var r=void 0;o<t?r=this.domNode.children[o]:(r=document.createElement("div"),r.className="view-ruler",this.domNode.appendChild(r)),n.StyleMutator.setHeight(r,Math.min(this._layoutProvider.getTotalHeight(),1e6)),n.StyleMutator.setLeft(r,this._rulers[o]*this._typicalHalfwidthCharacterWidth)}},t}(i.ViewPart);t.Rulers=o}),define(d[395],h([0,1,11,28,21,32,347]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(t){var n=e.call(this,t)||this;return n._scrollTop=0,n._width=0,n._shouldShow=!1,n._useShadows=n._context.configuration.editor.viewInfo.scrollbar.useShadows,n._domNode=document.createElement("div"),n}return m(t,e),t.prototype._updateShouldShow=function(){var e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return e.viewInfo.scrollbar&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),this._updateShouldShow()},t.prototype.onLayoutChanged=function(e){return this._width!==e.width&&(this._width=e.width,!0)},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!")},t.prototype.render=function(e){i.StyleMutator.setWidth(this._domNode,this._width),n.toggleClass(this._domNode,o.ClassNames.SCROLL_DECORATION,this._shouldShow)},t}(r.ViewPart);t.ScrollDecorationViewPart=s}),define(d[396],h([0,1,50,24,348]),function(e,t,n,i){"use strict";function o(e){return new a(e)}function r(e){return new u(e.lineNumber,e.ranges.map(o))}var s;!function(e){e[e.EXTERN=0]="EXTERN",e[e.INTERN=1]="INTERN",e[e.FLAT=2]="FLAT"}(s||(s={}));var a=function(){function e(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}return e}(),u=function(){function e(e,t){this.lineNumber=e,this.ranges=t}return e}(),l=i.isEdgeOrIE,c=function(e){function t(t){var n=e.call(this)||this;return n._previousFrameVisibleRangesWithStyle=[],n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._roundedSelection=n._context.configuration.editor.viewInfo.roundedSelection,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null},t.prototype.onModelFlushed=function(){return!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onCursorPositionChanged=function(e){return!1},t.prototype.onCursorSelectionChanged=function(e){return this._selections=[e.selection],this._selections=this._selections.concat(e.secondarySelections),!0},t.prototype.onCursorRevealRange=function(e){return!1},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.roundedSelection&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t<n;t++){var i=e[t];if(i.ranges.length>1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t){var n=null,i=null;if(t&&t.length>0&&e.length>0){for(var o=e[0].lineNumber,r=0;!n&&r<t.length;r++)t[r].lineNumber===o&&(n=t[r].ranges[0]);for(var s=e[e.length-1].lineNumber,r=t.length-1;!i&&r>=0;r--)t[r].lineNumber===s&&(i=t[r].ranges[0]);n&&!n.startStyle&&(n=null),i&&!i.startStyle&&(i=null)}for(var r=0,a=e.length;r<a;r++){var u=e[r].ranges[0],l=u.left,c=u.left+u.width,d={top:0,bottom:0},h={top:0,bottom:0};if(r>0){var p=e[r-1].ranges[0].left,f=e[r-1].ranges[0].left+e[r-1].ranges[0].width;l===p?d.top=2:l>p&&(d.top=1),c===f?h.top=2:p<c&&c<f&&(h.top=1)}else n&&(d.top=n.startStyle.top,h.top=n.endStyle.top);if(r+1<a){var g=e[r+1].ranges[0].left,m=e[r+1].ranges[0].left+e[r+1].ranges[0].width;l===g?d.bottom=2:g<l&&l<m&&(d.bottom=1),c===m?h.bottom=2:c<m&&(h.bottom=1)}else i&&(d.bottom=i.startStyle.bottom,h.bottom=i.endStyle.bottom);u.startStyle=d,u.endStyle=h}},t.prototype._getVisibleRangesWithStyle=function(e,t,n){var i=t.linesVisibleRangesForRange(e,!0)||[],o=i.map(r),s=this._visibleRangesHaveGaps(o);return l||s||!this._roundedSelection||this._enrichVisibleRangesWithStyle(o,n),o},t.prototype._createSelectionPiece=function(e,t,n,i,o){return'<div class="cslr '+n+'" style="top:'+e.toString()+"px;left:"+i.toString()+"px;width:"+o.toString()+"px;height:"+t+'px;"></div>'},t.prototype._actualRenderOneSelection=function(e,n,i,o){for(var r=o.length>0&&o[0].ranges[0].startStyle,s=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),u=o.length>0?o[0].lineNumber:0,l=o.length>0?o[o.length-1].lineNumber:0,c=0,d=o.length;c<d;c++){for(var h=o[c],p=h.lineNumber,f=p-n,g=i&&(p===l||p===u)?a:s,m=i&&p===u?1:0,v="",_=0,y=h.ranges.length;_<y;_++){var C=h.ranges[_];if(r){if(1===C.startStyle.top||1===C.startStyle.bottom){v+=this._createSelectionPiece(m,g,t.SELECTION_CLASS_NAME,C.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH);var b=t.EDITOR_BACKGROUND_CLASS_NAME;1===C.startStyle.top&&(b+=" "+t.SELECTION_TOP_RIGHT),1===C.startStyle.bottom&&(b+=" "+t.SELECTION_BOTTOM_RIGHT),v+=this._createSelectionPiece(m,g,b,C.left-t.ROUNDED_PIECE_WIDTH,t.ROUNDED_PIECE_WIDTH)}if(1===C.endStyle.top||1===C.endStyle.bottom){v+=this._createSelectionPiece(m,g,t.SELECTION_CLASS_NAME,C.left+C.width,t.ROUNDED_PIECE_WIDTH);var w=t.EDITOR_BACKGROUND_CLASS_NAME;1===C.endStyle.top&&(w+=" "+t.SELECTION_TOP_LEFT),1===C.endStyle.bottom&&(w+=" "+t.SELECTION_BOTTOM_LEFT),v+=this._createSelectionPiece(m,g,w,C.left+C.width,t.ROUNDED_PIECE_WIDTH)}}var S=t.SELECTION_CLASS_NAME;r&&(0===C.startStyle.top&&(S+=" "+t.SELECTION_TOP_LEFT),0===C.startStyle.bottom&&(S+=" "+t.SELECTION_BOTTOM_LEFT),0===C.endStyle.top&&(S+=" "+t.SELECTION_TOP_RIGHT),0===C.endStyle.bottom&&(S+=" "+t.SELECTION_BOTTOM_RIGHT)),v+=this._createSelectionPiece(m,g,S,C.left,C.width)}e[f]+=v}},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");for(var t=[],n=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,o=n;o<=i;o++){var r=o-n;t[r]=""}for(var s=[],a=0,u=this._selections.length;a<u;a++){var l=this._selections[a];if(l.isEmpty())s.push(null);else{var c=this._getVisibleRangesWithStyle(l,e,this._previousFrameVisibleRangesWithStyle[a]);s.push(c),this._actualRenderOneSelection(t,n,this._selections.length>1,c)}}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;if(n<0||n>=this._renderResult.length)throw new Error("Unexpected render request");return this._renderResult[n]},t}(n.DynamicViewOverlay);c.SELECTION_CLASS_NAME="selected-text",c.SELECTION_TOP_LEFT="top-left-radius",c.SELECTION_BOTTOM_LEFT="bottom-left-radius",c.SELECTION_TOP_RIGHT="top-right-radius",c.SELECTION_BOTTOM_RIGHT="bottom-right-radius",c.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",c.ROUNDED_PIECE_WIDTH=10,t.SelectionsOverlay=c}),define(d[397],h([0,1,10,28,21,32,15]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(t,n){var i=e.call(this,t)||this;return i._lineHeight=i._context.configuration.editor.lineHeight,i._contentWidth=i._context.configuration.editor.layoutInfo.contentWidth,i._contentLeft=i._context.configuration.editor.layoutInfo.contentLeft,i._whitespaceManager=n,i.domNode=document.createElement("div"),i.domNode.className=o.ClassNames.VIEW_ZONES,i.domNode.style.position="absolute",i.domNode.setAttribute("role","presentation"),i.domNode.setAttribute("aria-hidden","true"),i.marginDomNode=document.createElement("div"),i.marginDomNode.className="margin-view-zones",i.marginDomNode.style.position="absolute",i.marginDomNode.setAttribute("role","presentation"),i.marginDomNode.setAttribute("aria-hidden","true"),i._zones={},i}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._whitespaceManager=null,this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=!1,t=Object.keys(this._zones),n=0,i=t.length;n<i;n++){var o=t[n],r=this._zones[o],s=this._computeWhitespaceProps(r.delegate);this._whitespaceManager.changeWhitespace(parseInt(o,10),s.afterViewLineNumber,s.heightInPx)&&(this._safeCallOnComputedHeight(r.delegate,s.heightInPx),e=!0)}return e},t.prototype.onConfigurationChanged=function(e){return e.lineHeight?(this._lineHeight=this._context.configuration.editor.lineHeight,this._recomputeWhitespacesProps()):(e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth,this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!1)},t.prototype.onLineMappingChanged=function(){return this._recomputeWhitespacesProps()},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype._getZoneOrdinal=function(e){return"undefined"!=typeof e.afterColumn?e.afterColumn:1e4},t.prototype._computeWhitespaceProps=function(e){if(0===e.afterLineNumber)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e)};var t;if("undefined"!=typeof e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{var n=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new s.Position(n,this._context.model.getModelLineMaxColumn(n))}var i;i=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});var o=this._context.model.convertModelPositionToViewPosition(t.lineNumber,t.column),r=this._context.model.modelPositionIsVisible(i);return{afterViewLineNumber:o.lineNumber,heightInPx:r?this._heightInPixels(e):0}},t.prototype.addZone=function(e){var t=this._computeWhitespaceProps(e),n=this._whitespaceManager.addWhitespace(t.afterViewLineNumber,this._getZoneOrdinal(e),t.heightInPx),o={whitespaceId:n,delegate:e,isVisible:!1};return this._safeCallOnComputedHeight(o.delegate,t.heightInPx),o.delegate.domNode.style.position="absolute",o.delegate.domNode.style.width="100%",i.StyleMutator.setDisplay(o.delegate.domNode,"none"),o.delegate.domNode.setAttribute("monaco-view-zone",o.whitespaceId.toString()),this.domNode.appendChild(o.delegate.domNode),o.delegate.marginDomNode&&(o.delegate.marginDomNode.style.position="absolute",o.delegate.marginDomNode.style.width="100%",i.StyleMutator.setDisplay(o.delegate.marginDomNode,"none"),o.delegate.marginDomNode.setAttribute("monaco-view-zone",o.whitespaceId.toString()),this.marginDomNode.appendChild(o.delegate.marginDomNode)),this._zones[o.whitespaceId.toString()]=o,this.setShouldRender(),o.whitespaceId},t.prototype.removeZone=function(e){if(this._zones.hasOwnProperty(e.toString())){var t=this._zones[e.toString()];return delete this._zones[e.toString()],this._whitespaceManager.removeWhitespace(t.whitespaceId),t.delegate.domNode.removeAttribute("monaco-visible-view-zone"),t.delegate.domNode.removeAttribute("monaco-view-zone"),t.delegate.domNode.parentNode.removeChild(t.delegate.domNode),t.delegate.marginDomNode&&(t.delegate.marginDomNode.removeAttribute("monaco-visible-view-zone"),t.delegate.marginDomNode.removeAttribute("monaco-view-zone"),t.delegate.marginDomNode.parentNode.removeChild(t.delegate.marginDomNode)),this.setShouldRender(),!0}return!1},t.prototype.layoutZone=function(e){var t=!1;if(this._zones.hasOwnProperty(e.toString())){var n=this._zones[e.toString()],i=this._computeWhitespaceProps(n.delegate);t=this._whitespaceManager.changeWhitespace(n.whitespaceId,i.afterViewLineNumber,i.heightInPx)||t,t&&(this._safeCallOnComputedHeight(n.delegate,i.heightInPx),this.setShouldRender())}return t},t.prototype.shouldSuppressMouseDownOnViewZone=function(e){if(this._zones.hasOwnProperty(e.toString())){var t=this._zones[e.toString()];return t.delegate.suppressMouseDown}return!1},t.prototype._heightInPixels=function(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight},t.prototype._safeCallOnComputedHeight=function(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){n.onUnexpectedError(e)}},t.prototype._safeCallOnDomNodeTop=function(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){n.onUnexpectedError(e)}},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!")},t.prototype.render=function(e){for(var t=this._whitespaceManager.getWhitespaceViewportData(),n={},o=!1,r=0,s=t.length;r<s;r++)n[t[r].id.toString()]=t[r],o=!0;for(var a=Object.keys(this._zones),r=0,s=a.length;r<s;r++){var u=a[r],l=this._zones[u],c=0,d=0,h="none";n.hasOwnProperty(u)?(c=n[u].verticalOffset-e.bigNumbersDelta,
d=n[u].height,h="block",l.isVisible||(l.delegate.domNode.setAttribute("monaco-visible-view-zone","true"),l.isVisible=!0),this._safeCallOnDomNodeTop(l.delegate,e.getScrolledTopFromAbsoluteTop(n[u].verticalOffset))):(l.isVisible&&(l.delegate.domNode.removeAttribute("monaco-visible-view-zone"),l.isVisible=!1),this._safeCallOnDomNodeTop(l.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),i.StyleMutator.setTop(l.delegate.domNode,c),i.StyleMutator.setHeight(l.delegate.domNode,d),i.StyleMutator.setDisplay(l.delegate.domNode,h),l.delegate.marginDomNode&&(i.StyleMutator.setTop(l.delegate.marginDomNode,c),i.StyleMutator.setHeight(l.delegate.marginDomNode,d),i.StyleMutator.setDisplay(l.delegate.marginDomNode,h))}o&&(i.StyleMutator.setWidth(this.domNode,Math.max(e.scrollWidth,this._contentWidth)),i.StyleMutator.setWidth(this.marginDomNode,this._contentLeft))},t}(r.ViewPart);t.ViewZones=a}),define(d[398],h([0,1,3,20,2,15]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(e,t){this.configuration=e,this.converter=t,this.lastCursorPositionChangedEvent=null,this.lastCursorSelectionChangedEvent=null}return e.prototype.getSelections=function(){if(this.lastCursorSelectionChangedEvent){var e=[];e.push(this.converter.convertModelSelectionToViewSelection(this.lastCursorSelectionChangedEvent.selection));for(var t=0,n=this.lastCursorSelectionChangedEvent.secondarySelections.length;t<n;t++)e.push(this.converter.convertModelSelectionToViewSelection(this.lastCursorSelectionChangedEvent.secondarySelections[t]));return e}return[new i.Selection(1,1,1,1)]},e.prototype.onCursorPositionChanged=function(e,t){this.lastCursorPositionChangedEvent=e;var n=this.converter.validateViewPosition(e.viewPosition.lineNumber,e.viewPosition.column,e.position),i=this.configuration.editor.viewInfo.stopRenderingLineAfter;i!==-1&&n.column>i&&(n=new r.Position(n.lineNumber,i));for(var s=[],a=0,u=e.secondaryPositions.length;a<u;a++)s[a]=this.converter.validateViewPosition(e.secondaryViewPositions[a].lineNumber,e.secondaryViewPositions[a].column,e.secondaryPositions[a]),i!==-1&&s[a].column>i&&(s[a]=new r.Position(s[a].lineNumber,i));var l={position:n,secondaryPositions:s,isInEditableRange:e.isInEditableRange};t(o.ViewEventNames.CursorPositionChangedEvent,l)},e.prototype.onCursorSelectionChanged=function(e,t){this.lastCursorSelectionChangedEvent=e;for(var n=this.converter.validateViewSelection(e.viewSelection,e.selection),i=[],r=0,s=e.secondarySelections.length;r<s;r++)i[r]=this.converter.validateViewSelection(e.secondaryViewSelections[r],e.secondarySelections[r]);var a={selection:n,secondarySelections:i};t(o.ViewEventNames.CursorSelectionChangedEvent,a)},e.prototype.onCursorRevealRange=function(e,t){var i=null;if(e.viewRange){var r=this.converter.validateViewPosition(e.viewRange.startLineNumber,e.viewRange.startColumn,e.range.getStartPosition()),s=this.converter.validateViewPosition(e.viewRange.endLineNumber,e.viewRange.endColumn,e.range.getEndPosition());i=new n.Range(r.lineNumber,r.column,s.lineNumber,s.column)}else i=this.converter.convertModelRangeToViewRange(e.range);var a={range:i,verticalType:e.verticalType,revealHorizontal:e.revealHorizontal,revealCursor:e.revealCursor};t(o.ViewEventNames.RevealRangeEvent,a)},e.prototype.onCursorScrollRequest=function(e,t){var n={deltaLines:e.deltaLines,revealCursor:e.revealCursor};t(o.ViewEventNames.ScrollRequestEvent,n)},e.prototype.onLineMappingChanged=function(e){this.lastCursorPositionChangedEvent&&this.onCursorPositionChanged(this.lastCursorPositionChangedEvent,e),this.lastCursorSelectionChangedEvent&&this.onCursorSelectionChanged(this.lastCursorSelectionChangedEvent,e)},e}();t.ViewModelCursors=s}),define(d[399],h([0,1,3,2,148]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,n,i){this.editorId=e,this.model=t,this.configuration=n,this.converter=i,this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}return e.prototype._clearCachedModelDecorationsResolver=function(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null},e.prototype.dispose=function(){this._decorationsCache=null,this._clearCachedModelDecorationsResolver()},e.prototype.reset=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onModelDecorationsChanged=function(e,t){for(var n=e.changedDecorations,o=0,r=n.length;o<r;o++){var s=n[o],a=this._decorationsCache[s];a&&(a.range=null)}for(var u=e.removedDecorations,o=0,r=u.length;o<r;o++){var l=u[o];delete this._decorationsCache[l]}this._clearCachedModelDecorationsResolver(),t(i.ViewEventNames.DecorationsChangedEvent,{})},e.prototype.onLineMappingChanged=function(e){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver(),e(i.ViewEventNames.DecorationsChangedEvent,{})},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,n=this._decorationsCache[t];return n||(n=new o.ViewModelDecoration(e),this._decorationsCache[t]=n),null===n.range&&(n.range=this.converter.convertModelRangeToViewRange(e.range,e.options.isWholeLine)),n},e.prototype.getAllOverviewRulerDecorations=function(){for(var e=this.model.getAllDecorations(this.editorId,this.configuration.editor.readOnly),t=[],n=0,i=0,o=e.length;i<o;i++){var r=e[i],s=r.options;if(s.overviewRuler.color){var a=this._getOrCreateViewModelDecoration(r);t[n++]=a}}return t},e.prototype.getDecorationsViewportData=function(e){var t=!0;return t=t&&null!==this._cachedModelDecorationsResolver,t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this.converter.convertViewRangeToModelRange(e),i=e.startLineNumber,r=e.endLineNumber,s=this.model.getDecorationsInRange(t,this.editorId,this.configuration.editor.readOnly),a=[],u=0,l=[],c=i;c<=r;c++)l[c-i]=[];for(var d=0,h=s.length;d<h;d++){var p=s[d],f=p.options,g=this._getOrCreateViewModelDecoration(p),m=g.range;if(a[u++]=g,f.inlineClassName)for(var v=new o.InlineDecoration(m,f.inlineClassName,!1),_=Math.max(i,m.startLineNumber),y=Math.min(r,m.endLineNumber),c=_;c<=y;c++)l[c-i].push(v);if(f.beforeContentClassName&&i<=m.startLineNumber&&m.startLineNumber<=r){var v=new o.InlineDecoration(new n.Range(m.startLineNumber,m.startColumn,m.startLineNumber,m.startColumn+1),f.beforeContentClassName,!0);l[m.startLineNumber-i].push(v)}if(f.afterContentClassName&&i<=m.endLineNumber&&m.endLineNumber<=r&&m.endColumn>1){var v=new o.InlineDecoration(new n.Range(m.endLineNumber,m.endColumn-1,m.endLineNumber,m.endColumn),f.afterContentClassName,!0);l[m.endLineNumber-i].push(v)}}return{decorations:a,inlineDecorations:l}},e}();t.ViewModelDecorations=r}),define(d[400],h([0,1,25,4,9,15,3,20,2,398,399]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";var d=function(e){function t(t,i,o,s,a){var d=e.call(this)||this;return d.lines=t,d.editorId=i,d.configuration=o,d.model=s,d._lastCursorPosition=new r.Position(1,1),d._renderCustomLineNumbers=d.configuration.editor.viewInfo.renderCustomLineNumbers,d._renderRelativeLineNumbers=d.configuration.editor.viewInfo.renderRelativeLineNumbers,d.getCurrentCenteredModelRange=a,d.decorations=new c.ViewModelDecorations(d.editorId,d.model,d.configuration,{convertModelRangeToViewRange:function(e,t){return t?d.convertWholeLineModelRangeToViewRange(e):d.convertModelRangeToViewRange(e)},convertViewRangeToModelRange:function(e){return d.convertViewRangeToModelRange(e)}}),d.decorations.reset(),d.cursors=new l.ViewModelCursors(d.configuration,d),d.listenersToRemove=[],d._toDispose=[],d.listenersToRemove.push(d.model.addBulkListener(function(e){return d.onEvents(e)})),d._toDispose.push(d.configuration.onDidChange(function(e){d.onEvents([new n.EmitterEvent(u.EventType.ConfigurationChanged,e)])})),d}return m(t,e),t.prototype.setHiddenAreas=function(e){try{this._beginDeferredEmit(),this._setHiddenAreas(e)}finally{this._endDeferredEmit()}},t.prototype._setHiddenAreas=function(e){var t=this,n=this.lines.setHiddenAreas(e,function(e,n){return t.emit(e,n)});n&&(this.emit(u.ViewEventNames.LineMappingChangedEvent),this.decorations.onLineMappingChanged(function(e,n){return t.emit(e,n)}),this.cursors.onLineMappingChanged(function(e,n){return t.emit(e,n)}))},t.prototype.dispose=function(){this.listenersToRemove=i.dispose(this.listenersToRemove),this._toDispose=i.dispose(this._toDispose),this.decorations.dispose(),this.decorations=null,this.lines.dispose(),this.lines=null,this.configuration=null,this.model=null},t.prototype._onTabSizeChange=function(e){var t=this,n=this.lines.setTabSize(e,function(e,n){return t.emit(e,n)});return n&&(this.emit(u.ViewEventNames.LineMappingChangedEvent),this.decorations.onLineMappingChanged(function(e,n){return t.emit(e,n)}),this.cursors.onLineMappingChanged(function(e,n){return t.emit(e,n)})),n},t.prototype._onWrappingIndentChange=function(e){var t=this,n=this.lines.setWrappingIndent(e,function(e,n){return t.emit(e,n)});return n&&(this.emit(u.ViewEventNames.LineMappingChangedEvent),this.decorations.onLineMappingChanged(function(e,n){return t.emit(e,n)}),this.cursors.onLineMappingChanged(function(e,n){return t.emit(e,n)})),n},t.prototype._restoreCenteredModelRange=function(e){var t=this.convertModelRangeToViewRange(e),n={range:t,verticalType:1,revealHorizontal:!1,revealCursor:!1};this.emit(u.ViewEventNames.RevealRangeEvent,n)},t.prototype._onWrappingColumnChange=function(e,t){var n=this,i=this.lines.setWrappingColumn(e,t,function(e,t){return n.emit(e,t)});return i&&(this.emit(u.ViewEventNames.LineMappingChangedEvent),this.decorations.onLineMappingChanged(function(e,t){return n.emit(e,t)}),this.cursors.onLineMappingChanged(function(e,t){return n.emit(e,t)})),i},t.prototype.addEventSource=function(e){var t=this;this.listenersToRemove.push(e.addBulkListener2(function(e){return t.onEvents(e)}))},t.prototype.onEvents=function(e){try{this._beginDeferredEmit(),this._onEvents(e)}finally{this._endDeferredEmit()}},t.prototype._onEvents=function(e){var t,n=this,i=e.some(function(e){return e.getType()===u.EventType.ModelRawContentChanged});i||(t=this.getCurrentCenteredModelRange());var o,r,s,a,l,c=!1,d=!1,h=!1;for(o=0,r=e.length;o<r;o++)switch(s=e[o],a=s.getData(),s.getType()){case u.EventType.ModelRawContentChanged:switch(l=a,l.changeType){case u.EventType.ModelRawContentChangedFlush:this.onModelFlushed(l),c=!0;break;case u.EventType.ModelRawContentChangedLinesDeleted:this.onModelLinesDeleted(l),c=!0;break;case u.EventType.ModelRawContentChangedLinesInserted:this.onModelLinesInserted(l),c=!0;break;case u.EventType.ModelRawContentChangedLineChanged:d=this.onModelLineChanged(l);break;default:console.info("ViewModel received unknown event: "),console.info(s)}break;case u.EventType.ModelTokensChanged:this.onModelTokensChanged(a);break;case u.EventType.ModelLanguageChanged:break;case u.EventType.ModelContentChanged2:break;case u.EventType.ModelOptionsChanged:var p=this.lines.getOutputLineCount(),f=this._onTabSizeChange(this.model.getOptions().tabSize),g=this.lines.getOutputLineCount();f&&p!==g&&(h=!0);break;case u.EventType.ModelDecorationsChanged:this.onModelDecorationsChanged(a);break;case u.EventType.ModelDispose:break;case u.EventType.CursorPositionChanged:this.onCursorPositionChanged(a),this._lastCursorPosition=a.position;break;case u.EventType.CursorSelectionChanged:this.onCursorSelectionChanged(a);break;case u.EventType.CursorRevealRange:this.onCursorRevealRange(a);break;case u.EventType.CursorScrollRequest:this.onCursorScrollRequest(a);break;case u.EventType.ConfigurationChanged:h=this._onWrappingIndentChange(this.configuration.editor.wrappingInfo.wrappingIndent)||h,h=this._onWrappingColumnChange(this.configuration.editor.wrappingInfo.wrappingColumn,this.configuration.editor.fontInfo.typicalFullwidthCharacterWidth/this.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth)||h,this._renderCustomLineNumbers=this.configuration.editor.viewInfo.renderCustomLineNumbers,this._renderRelativeLineNumbers=this.configuration.editor.viewInfo.renderRelativeLineNumbers,a.readOnly&&(this.decorations.reset(),this.emit(u.ViewEventNames.DecorationsChangedEvent,{})),this.emit(s.getType(),a);break;default:console.info("View received unknown event: "),console.info(s)}!c&&d&&(this.emit(u.ViewEventNames.LineMappingChangedEvent),this.decorations.onLineMappingChanged(function(e,t){return n.emit(e,t)}),this.cursors.onLineMappingChanged(function(e,t){return n.emit(e,t)})),h&&t&&this._restoreCenteredModelRange(t)},t.prototype.onModelFlushed=function(e){var t=this;this.lines.onModelFlushed(e.versionId,function(e,n){return t.emit(e,n)}),this.decorations.reset()},t.prototype.onModelDecorationsChanged=function(e){var t=this;this.decorations.onModelDecorationsChanged(e,function(e,n){return t.emit(e,n)})},t.prototype.onModelLinesDeleted=function(e){var t=this;this.lines.onModelLinesDeleted(e.versionId,e.fromLineNumber,e.toLineNumber,function(e,n){return t.emit(e,n)})},t.prototype.onModelTokensChanged=function(e){for(var t=[],n=0,i=e.ranges.length;n<i;n++){var o=e.ranges[n],r=this.convertModelPositionToViewPosition(o.fromLineNumber,1).lineNumber,s=this.convertModelPositionToViewPosition(o.toLineNumber,this.model.getLineMaxColumn(o.toLineNumber)).lineNumber;t[n]={fromLineNumber:r,toLineNumber:s}}var e={ranges:t};this.emit(u.ViewEventNames.TokensChangedEvent,e)},t.prototype.onModelLineChanged=function(e){var t=this,n=this.lines.onModelLineChanged(e.versionId,e.lineNumber,e.detail,function(e,n){return t.emit(e,n)});return n},t.prototype.onModelLinesInserted=function(e){var t=this;this.lines.onModelLinesInserted(e.versionId,e.fromLineNumber,e.toLineNumber,e.detail.split("\n"),function(e,n){return t.emit(e,n)})},t.prototype.validateViewRange=function(e,t,n,i,o){var r=this.validateViewPosition(e,t,o.getStartPosition()),a=this.validateViewPosition(n,i,o.getEndPosition());return new s.Range(r.lineNumber,r.column,a.lineNumber,a.column)},t.prototype.validateViewPosition=function(e,t,n){e<1&&(e=1);var i=this.getLineCount();e>i&&(e=i);var o=this.getLineMinColumn(e),s=this.getLineMaxColumn(e);t<o&&(t=o),t>s&&(t=s);var a=this.convertViewPositionToModelPosition(e,t);return a.equals(n)?new r.Position(e,t):this.convertModelPositionToViewPosition(n.lineNumber,n.column)},t.prototype.validateViewSelection=function(e,t){var n=new r.Position(t.selectionStartLineNumber,t.selectionStartColumn),i=new r.Position(t.positionLineNumber,t.positionColumn),o=this.validateViewPosition(e.selectionStartLineNumber,e.selectionStartColumn,n),s=this.validateViewPosition(e.positionLineNumber,e.positionColumn,i);return new a.Selection(o.lineNumber,o.column,s.lineNumber,s.column)},t.prototype.onCursorPositionChanged=function(e){var t=this;this.cursors.onCursorPositionChanged(e,function(e,n){return t.emit(e,n)})},t.prototype.onCursorSelectionChanged=function(e){var t=this;this.cursors.onCursorSelectionChanged(e,function(e,n){return t.emit(e,n)})},t.prototype.onCursorRevealRange=function(e){var t=this;this.cursors.onCursorRevealRange(e,function(e,n){return t.emit(e,n)})},t.prototype.onCursorScrollRequest=function(e){var t=this;this.cursors.onCursorScrollRequest(e,function(e,n){return t.emit(e,n)})},t.prototype.getTabSize=function(){return this.model.getOptions().tabSize},t.prototype.getLineCount=function(){return this.lines.getOutputLineCount()},t.prototype.mightContainRTL=function(){return this.model.mightContainRTL()},t.prototype.mightContainNonBasicASCII=function(){return this.model.mightContainNonBasicASCII()},t.prototype.getLineContent=function(e){return this.lines.getOutputLineContent(e)},t.prototype.getLineIndentGuide=function(e){return this.lines.getOutputIndentGuide(e)},t.prototype.getLineMinColumn=function(e){return this.lines.getOutputLineMinColumn(e)},t.prototype.getLineMaxColumn=function(e){return this.lines.getOutputLineMaxColumn(e)},t.prototype.getLineFirstNonWhitespaceColumn=function(e){var t=o.firstNonWhitespaceIndex(this.getLineContent(e));return t===-1?0:t+1},t.prototype.getLineLastNonWhitespaceColumn=function(e){var t=o.lastNonWhitespaceIndex(this.getLineContent(e));return t===-1?0:t+2},t.prototype.getLineTokens=function(e){return this.lines.getOutputLineTokens(e)},t.prototype.getLineRenderLineNumber=function(e){var t=this.convertViewPositionToModelPosition(e,1);if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(this._renderRelativeLineNumbers){var i=Math.abs(this._lastCursorPosition.lineNumber-n);return 0===i?'<span class="relative-current-line-number">'+n+"</span>":String(i)}return String(n)},t.prototype.getMaxLineNumber=function(){return this.model.getLineCount()},t.prototype.getDecorationsViewportData=function(e,t){var n=new s.Range(e,this.getLineMinColumn(e),t,this.getLineMaxColumn(t));return this.decorations.getDecorationsViewportData(n)},t.prototype.getAllOverviewRulerDecorations=function(){return this.decorations.getAllOverviewRulerDecorations()},t.prototype.getEOL=function(){return this.model.getEOL()},t.prototype.getValueInRange=function(e,t){var n=this.convertViewRangeToModelRange(e);return this.model.getValueInRange(n,t)},t.prototype.getSelections=function(){return this.cursors.getSelections()},t.prototype.convertViewPositionToModelPosition=function(e,t){return this.lines.convertOutputPositionToInputPosition(e,t)},t.prototype.convertViewRangeToModelRange=function(e){var t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),n=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new s.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.convertViewSelectionToModelSelection=function(e){var t=this.convertViewPositionToModelPosition(e.selectionStartLineNumber,e.selectionStartColumn),n=this.convertViewPositionToModelPosition(e.positionLineNumber,e.positionColumn);return new a.Selection(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.getModelLineContent=function(e){return this.model.getLineContent(e)},t.prototype.getModelLineMaxColumn=function(e){return this.model.getLineMaxColumn(e)},t.prototype.validateModelPosition=function(e){return this.model.validatePosition(e)},t.prototype.convertModelPositionToViewPosition=function(e,t){return this.lines.convertInputPositionToOutputPosition(e,t)},t.prototype.convertModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return new s.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.convertWholeLineModelRangeToViewRange=function(e){var t=this.convertModelPositionToViewPosition(e.startLineNumber,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,this.model.getLineMaxColumn(e.endLineNumber));return new s.Range(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.convertModelSelectionToViewSelection=function(e){var t=this.convertModelPositionToViewPosition(e.selectionStartLineNumber,e.selectionStartColumn),n=this.convertModelPositionToViewPosition(e.positionLineNumber,e.positionColumn);return new a.Selection(t.lineNumber,t.column,n.lineNumber,n.column)},t.prototype.modelPositionIsVisible=function(e){return this.lines.inputPositionIsVisible(e.lineNumber,e.column)},t}(n.EventEmitter);t.ViewModel=d}),define(d[401],h([0,1,2]),function(e,t,n){"use strict";var i=function(){function e(e){this._editor=e,this._decorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}return e.prototype.dispose=function(){this._editor.deltaDecorations(this._allDecorations(),[]),this._editor=null,this._decorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=null},e.prototype.reset=function(){this._decorations=[],this._findScopeDecorationId=null,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype.getCount=function(){return this._decorations.length},e.prototype.getFindScope=function(){return this._findScopeDecorationId?this._editor.getModel().getDecorationRange(this._findScopeDecorationId):null},e.prototype.getStartPosition=function(){return this._startPosition},e.prototype.setStartPosition=function(e){this._startPosition=e,this.setCurrentFindMatch(null)},e.prototype.getCurrentMatchesPosition=function(e){for(var t=0,n=this._decorations.length;t<n;t++){var i=this._editor.getModel().getDecorationRange(this._decorations[t]);if(e.equalsRange(i))return t+1}return 1},e.prototype.setCurrentFindMatch=function(t){var n=this,i=null,o=0;if(t)for(var r=0,s=this._decorations.length;r<s;r++){var a=this._editor.getModel().getDecorationRange(this._decorations[r]);if(t.equalsRange(a)){i=this._decorations[r],o=r+1;break}}return null===this._highlightedDecorationId&&null===i||this._editor.changeDecorations(function(t){if(null!==n._highlightedDecorationId&&(t.changeDecorationOptions(n._highlightedDecorationId,e.createFindMatchDecorationOptions(!1)),n._highlightedDecorationId=null),null!==i&&(n._highlightedDecorationId=i,t.changeDecorationOptions(n._highlightedDecorationId,e.createFindMatchDecorationOptions(!0))),null!==n._rangeHighlightDecorationId&&(t.removeDecoration(n._rangeHighlightDecorationId),n._rangeHighlightDecorationId=null),null!==i){var o=n._editor.getModel().getDecorationRange(i);n._rangeHighlightDecorationId=t.addDecoration(o,e.createRangeHighlightDecoration())}}),o},e.prototype.set=function(t,n){var i=t.map(function(t){return{range:t,options:e.createFindMatchDecorationOptions(!1)}});n&&i.unshift({range:n,options:e.createFindScopeDecorationOptions()});var o=this._editor.deltaDecorations(this._allDecorations(),i);n?this._findScopeDecorationId=o.shift():this._findScopeDecorationId=null,this._decorations=o,this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null},e.prototype._allDecorations=function(){var e=[];return e=e.concat(this._decorations),this._findScopeDecorationId&&e.push(this._findScopeDecorationId),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e},e.createFindMatchDecorationOptions=function(e){return{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:e?"currentFindMatch":"findMatch",overviewRuler:{color:"rgba(246, 185, 77, 0.7)",darkColor:"rgba(246, 185, 77, 0.7)",position:n.OverviewRulerLane.Center}}},e.createRangeHighlightDecoration=function(){return{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"rangeHighlight",isWholeLine:!0}},e.createFindScopeDecorationOptions=function(){return{className:"findScope",isWholeLine:!0}},e}();t.FindDecorations=i}),define(d[102],h([0,1,17,4,224,54,15,3,2,401,223,20]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";t.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},t.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},t.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},t.ShowPreviousFindTermKeybinding={primary:528},t.ShowNextFindTermKeybinding={primary:530},t.FIND_IDS={StartFindAction:"actions.find",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",AddSelectionToNextFindMatchAction:"editor.action.addSelectionToNextFindMatch",AddSelectionToPreviousFindMatchAction:"editor.action.addSelectionToPreviousFindMatch",MoveSelectionToNextFindMatchAction:"editor.action.moveSelectionToNextFindMatch",MoveSelectionToPreviousFindMatchAction:"editor.action.moveSelectionToPreviousFindMatch",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches",ShowPreviousFindTermAction:"find.history.showPrevious",ShowNextFindTermAction:"find.history.showNext"},t.MATCHES_LIMIT=999;var h=function(){function e(e,t){var i=this;this._editor=e,this._state=t,this._toDispose=[],this._isDisposed=!1,this._decorations=new l.FindDecorations(e),this._toDispose.push(this._decorations),this._updateDecorationsScheduler=new n.RunOnceScheduler(function(){return i.research(!1)},100),this._toDispose.push(this._updateDecorationsScheduler),this._toDispose.push(this._editor.onDidChangeCursorPosition(function(e){e.reason!==u.CursorChangeReason.Explicit&&e.reason!==u.CursorChangeReason.Undo&&e.reason!==u.CursorChangeReason.Redo||i._decorations.setStartPosition(i._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.push(this._editor.onDidChangeModelRawContent(function(e){i._ignoreModelContentChanged||(e.changeType===u.EventType.ModelRawContentChangedFlush&&i._decorations.reset(),i._decorations.setStartPosition(i._editor.getPosition()),i._updateDecorationsScheduler.schedule())})),this._toDispose.push(this._state.addChangeListener(function(e){return i._onStateChanged(e)})),this.research(!1,this._state.searchScope)}return e.prototype.dispose=function(){this._isDisposed=!0,this._toDispose=i.dispose(this._toDispose)},e.prototype._onStateChanged=function(e){this._isDisposed||(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))},e._getSearchRange=function(e,t,n){var i;return i=t?e.getEditableRange():e.getFullModelRange(),n&&(i=i.intersectRanges(n)),i},e.prototype.research=function(e,n){var i=null;i="undefined"!=typeof n?n:this._decorations.getFindScope(),null!==i&&(i=new a.Range(i.startLineNumber,1,i.endLineNumber,this._editor.getModel().getLineMaxColumn(i.endLineNumber)));var o=this._findMatches(i,!1,t.MATCHES_LIMIT);this._decorations.set(o.map(function(e){return e.range}),i),this._state.changeMatchInfo(this._decorations.getCurrentMatchesPosition(this._editor.getSelection()),this._decorations.getCount(),void 0),e&&this._moveToNextMatch(this._decorations.getStartPosition())},e.prototype._hasMatches=function(){return this._state.matchesCount>0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e),!0}return!1},e.prototype._setCurrentFindMatch=function(e){var t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e)},e.prototype._moveToPrevMatch=function(t,n){if(void 0===n&&(n=!1),!this._cannotFind()){var i=this._decorations.getFindScope(),o=e._getSearchRange(this._editor.getModel(),this._state.isReplaceRevealed,i);o.getEndPosition().isBefore(t)&&(t=o.getEndPosition()),t.isBefore(o.getStartPosition())&&(t=o.getEndPosition());var r=t.lineNumber,a=t.column,u=this._editor.getModel(),l=new s.Position(r,a),c=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)){var d=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);d||1===a?(1===r?r=u.getLineCount():r--,a=u.getLineMaxColumn(r)):a--,l=new s.Position(r,a),c=u.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord,!1)}return c?n||o.containsRange(c.range)?void this._setCurrentFindMatch(c.range):this._moveToPrevMatch(c.range.getStartPosition(),!0):null}},e.prototype.moveToPrevMatch=function(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())},e.prototype._moveToNextMatch=function(e){var t=this._getNextMatch(e,!1);t&&this._setCurrentFindMatch(t.range)},e.prototype._getNextMatch=function(t,n,i){if(void 0===i&&(i=!1),this._cannotFind())return null;var o=this._decorations.getFindScope(),r=e._getSearchRange(this._editor.getModel(),this._state.isReplaceRevealed,o);r.getEndPosition().isBefore(t)&&(t=r.getStartPosition()),t.isBefore(r.getStartPosition())&&(t=r.getStartPosition());var a=t.lineNumber,u=t.column,l=this._editor.getModel(),c=new s.Position(a,u),d=l.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord,n);if(d&&d.range.isEmpty()&&d.range.getStartPosition().equals(c)){var h=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);h||u===l.getLineMaxColumn(a)?(a===l.getLineCount()?a=1:a++,u=1):u++,c=new s.Position(a,u),d=l.findNextMatch(this._state.searchString,c,this._state.isRegex,this._state.matchCase,this._state.wholeWord,n)}return d?i||r.containsRange(d.range)?d:this._getNextMatch(d.range.getEndPosition(),n,!0):null},e.prototype.moveToNextMatch=function(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())},e.prototype._getReplacePattern=function(){return this._state.isRegex?o.parseReplaceString(this._state.replaceString):o.ReplacePattern.fromStaticValue(this._state.replaceString)},e.prototype.replace=function(){if(this._hasMatches()){var e=this._getReplacePattern(),t=this._editor.getSelection(),n=this._getNextMatch(t.getStartPosition(),e.hasReplacementPatterns);if(n)if(t.equalsRange(n.range)){var i=e.buildReplaceString(n.matches),o=new r.ReplaceCommand(t,i);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new s.Position(t.startLineNumber,t.startColumn+i.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(n.range)}},e.prototype._findMatches=function(t,n,i){var o=e._getSearchRange(this._editor.getModel(),this._state.isReplaceRevealed,t);return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord,n,i)},e.prototype.replaceAll=function(){if(this._hasMatches()){for(var e=this._decorations.getFindScope(),t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns,Number.MAX_VALUE),i=[],o=0,r=n.length;o<r;o++)i[o]=t.buildReplaceString(n[o].matches);var s=new c.ReplaceAllCommand(this._editor.getSelection(),n.map(function(e){return e.range}),i);this._executeEditorCommand("replaceAll",s),this.research(!1)}},e.prototype.selectAllMatches=function(){if(this._hasMatches()){for(var e=this._decorations.getFindScope(),t=this._findMatches(e,!1,Number.MAX_VALUE),n=t.map(function(e){return new d.Selection(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)}),i=this._editor.getSelection(),o=0,r=n.length;o<r;o++){var s=n[o];if(s.equalsRange(i)){n=[i].concat(n.slice(0,o)).concat(n.slice(o+1));break}}this._editor.setSelections(n)}},e.prototype._executeEditorCommand=function(e,t){try{this._ignoreModelContentChanged=!0,this._editor.executeCommand(e,t)}finally{this._ignoreModelContentChanged=!1}},e}();t.FindModelBoundToEditorModel=h}),define(d[403],h([0,1,11,37,21,102,132,17,368]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(e){function t(t,i,o){var u=e.call(this)||this;return u._hideSoon=u._register(new a.RunOnceScheduler(function(){return u._hide()},1e3)),u._isVisible=!1,u._editor=t,u._state=i,u._keybindingService=o,u._domNode=document.createElement("div"),u._domNode.className="monaco-editor-background findOptionsWidget",u._domNode.style.display="none",u._domNode.style.top="10px",u._domNode.setAttribute("role","presentation"),u._domNode.setAttribute("aria-hidden","true"),u.caseSensitive=u._register(new s.CaseSensitiveCheckbox({appendTitle:u._keybindingLabelFor(r.FIND_IDS.ToggleCaseSensitiveCommand),
isChecked:u._state.matchCase,onChange:function(e){u._state.change({matchCase:u.caseSensitive.checked},!1)}})),u._domNode.appendChild(u.caseSensitive.domNode),u.wholeWords=u._register(new s.WholeWordsCheckbox({appendTitle:u._keybindingLabelFor(r.FIND_IDS.ToggleWholeWordCommand),isChecked:u._state.wholeWord,onChange:function(e){u._state.change({wholeWord:u.wholeWords.checked},!1)}})),u._domNode.appendChild(u.wholeWords.domNode),u._editor.addOverlayWidget(u),u._register(u._state.addChangeListener(function(e){var t=!1;e.wholeWord&&(u.wholeWords.checked=u._state.wholeWord,t=!0),e.matchCase&&(u.caseSensitive.checked=u._state.matchCase,t=!0),!u._state.isRevealed&&t&&u._revealTemporarily()})),u._register(n.addDisposableNonBubblingMouseOutListener(u._domNode,function(e){return u._onMouseOut()})),u._register(n.addDisposableListener(u._domNode,"mouseover",function(e){return u._onMouseOver()})),u}return m(t,e),t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybindings(e);return 0===t.length?"":" ("+this._keybindingService.getLabelFor(t[0])+")"},t.prototype.dispose=function(){this._editor.removeOverlayWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{preference:o.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}},t.prototype.highlightFindOptions=function(){this._revealTemporarily()},t.prototype._revealTemporarily=function(){this._show(),this._hideSoon.schedule()},t.prototype._onMouseOut=function(){this._hideSoon.schedule()},t.prototype._onMouseOver=function(){this._hideSoon.cancel()},t.prototype._show=function(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")},t.prototype._hide=function(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")},t}(i.Widget);u.ID="editor.contrib.findOptionsWidget",t.FindOptionsWidget=u}),define(d[404],h([0,1,2,3]),function(e,t,n,i){"use strict";function o(e){return(e?e.startLineNumber+"/"+e.endLineNumber:"null")+(e.isCollapsed?" (collapsed)":"")+" - "+e.indent}function r(e,t,n,i,o){var r=a(e,t,n);if(!r)return[];if(1===i)return[r];var s=p(r,e,t,i,o);return s.filter(function(e){return!e.isCollapsed})}function s(e,t,n,i){var o=a(e,t,n);if(!o)return[];if(1===i){var r=o.isCollapsed?o:u(e,t,o,n);return r?[r]:[]}var s=p(o,e,t,i,!1);return s.filter(function(e){return e.isCollapsed})}function a(e,t,n){for(var i=null,o=0,r=e.length;o<r;o++){var s=e[o],a=s.getDecorationRange(t);if(a&&(l(a,n)&&(i=s),c(a,n)))break}return i}function u(e,t,n,i){for(var o=e.indexOf(n),r=o+1;r<e.length;r++){var s=e[r],a=s.getDecorationRange(t);if(a&&c(a,i)){if(!h(n.foldingRange,a))return null;if(s.isCollapsed)return s}}return null}function l(e,t){return t>=e.startLineNumber&&t<=e.endLineNumber}function c(e,t){return t<e.startLineNumber}function d(e,t){return t>e.endLineNumber}function h(e,t){return e instanceof i.Range&&t instanceof i.Range?e.containsRange(t):e.startLineNumber<=t.startLineNumber&&e.endLineNumber>=t.endLineNumber}function p(e,t,n,i,o){var r=o?new m(e,t,n):new g(e,t,n);return r.getRegionsTill(i)}t.toString=o;var f=function(){function e(e,t,n){this.decorationIds=[],this.update(e,t,n)}return Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._isCollapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isExpanded",{get:function(){return!this._isCollapsed},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indent",{get:function(){return this._indent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"foldingRange",{get:function(){return this._lastRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startLineNumber",{get:function(){return this._lastRange?this._lastRange.startLineNumber:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endLineNumber",{get:function(){return this._lastRange?this._lastRange.endLineNumber:void 0},enumerable:!0,configurable:!0}),e.prototype.setCollapsed=function(e,t){this._isCollapsed=e,this.decorationIds.length>0&&t.changeDecorationOptions(this.decorationIds[0],this.getVisualDecorationOptions())},e.prototype.getDecorationRange=function(e){return this.decorationIds.length>0?e.getDecorationRange(this.decorationIds[1]):null},e.prototype.getVisualDecorationOptions=function(){return this._isCollapsed?{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}:{stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}},e.prototype.getRangeDecorationOptions=function(){return{stickiness:n.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore}},e.prototype.update=function(e,t,n){this._lastRange=e,this._isCollapsed=!!e.isCollapsed,this._indent=e.indent;var i=[],o=t.getLineMaxColumn(e.startLineNumber),r={startLineNumber:e.startLineNumber,startColumn:o-1,endLineNumber:e.startLineNumber,endColumn:o};i.push({range:r,options:this.getVisualDecorationOptions()});var s={startLineNumber:e.startLineNumber,startColumn:1,endLineNumber:e.endLineNumber,endColumn:t.getLineMaxColumn(e.endLineNumber)};i.push({range:s,options:this.getRangeDecorationOptions()}),this.decorationIds=n.deltaDecorations(this.decorationIds,i)},e.prototype.dispose=function(e){this._lastRange=null,this.decorationIds=e.deltaDecorations(this.decorationIds,[])},e.prototype.toString=function(){var e=this.isCollapsed?"collapsed ":"expanded ";return e+=this._lastRange?this._lastRange.startLineNumber+"/"+this._lastRange.endLineNumber:"no range"},e}();t.CollapsibleRegion=f,t.getCollapsibleRegionsToFoldAtLine=r,t.getCollapsibleRegionsToUnfoldAtLine=s,t.doesLineBelongsToCollapsibleRegion=l;var g=function(){function e(e,t,n){this.region=e,this.children=[];for(var i=t.indexOf(e)+1;i<t.length;i++){var o=t[i],r=o.getDecorationRange(n);if(r&&(h(e.foldingRange,r)&&(i=this.processChildRegion(o,t,n,i)),c(r,e.foldingRange.endLineNumber)))break}}return e.prototype.processChildRegion=function(t,n,i,o){var r=new e(t,n,i);return this.children.push(r),this.lastChildIndex=o,r.children.length>0?r.lastChildIndex:o},e.prototype.getRegionsTill=function(e){var t=[this.region];return e>1&&this.children.forEach(function(n){return t=t.concat(n.getRegionsTill(e-1))}),t},e}(),m=function(){function e(t,n,i){this.region=t;for(var o=n.indexOf(t)-1;o>=0;o--){var r=n[o],s=r.getDecorationRange(i);if(s){if(h(s,t.foldingRange)){this.parent=new e(r,n,i);break}if(d(s,t.foldingRange.endLineNumber))break}}}return e.prototype.getRegionsTill=function(e){var t=[this.region];return this.parent&&e>1&&(t=t.concat(this.parent.getRegionsTill(e-1))),t},e}()}),define(d[405],h([0,1,12,4,19,57,23]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(t,i,o,s){var a=this;this._commandService=o,this._contextKeyService=s,this._menuGroups=[],this._disposables=[],this._onDidChange=new n.Emitter,i.then(function(n){var i,o=r.MenuRegistry.getMenuItems(t),s=new Set;o.sort(e._compareMenuItems);for(var u=0,l=o;u<l.length;u++){var c=l[u],d=c.group;i&&i[0]===d||(i=[d,[]],a._menuGroups.push(i)),i[1].push(c),e._fillInKbExprKeys(c.when,s)}a._disposables.push(a._contextKeyService.onDidChangeContext(function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t];if(s.has(i))return void a._onDidChange.fire()}})),a._onDidChange.fire(a)})}return e.prototype.dispose=function(){this._disposables=i.dispose(this._disposables),this._onDidChange.dispose()},Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.getActions=function(e){for(var t=[],n=0,i=this._menuGroups;n<i.length;n++){for(var o=i[n],s=o[0],a=o[1],u=[],l=0,c=a;l<c.length;l++){var d=c[l];if(this._contextKeyService.contextMatchesRules(d.when)){var h=new r.MenuItemAction(d.command,d.alt,e,this._commandService);h.order=d.order,u.push(h)}}u.length>0&&t.push([s,u])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();n<i.length;n++){var o=i[n];t.add(o)}},e._compareMenuItems=function(e,t){var n=e.group,i=t.group;if(n!==i){if(!n)return 1;if(!i)return-1;if("navigation"===n)return-1;if("navigation"===i)return 1;var o=n.localeCompare(i);if(0!==o)return o}var r=e.order||0,s=t.order||0;return r<s?-1:r>s?1:e.command.title.localeCompare(t.command.title)},e}();a=y([C(2,s.ICommandService),C(3,o.IContextKeyService)],a),t.Menu=a}),define(d[61],h([0,1,14]),function(e,t,n){"use strict";t.IContextViewService=n.createDecorator("contextViewService"),t.IContextMenuService=n.createDecorator("contextMenuService");var i=function(){function e(e,t){this.label=e,this.entries=t}return e}();t.ContextSubMenu=i}),define(d[62],h([0,1,14]),function(e,t,n){"use strict";t.IEditorService=n.createDecorator("editorService");var i;!function(e){e[e.ONE=0]="ONE",e[e.TWO=1]="TWO",e[e.THREE=2]="THREE"}(i=t.Position||(t.Position={})),t.POSITIONS=[i.ONE,i.TWO,i.THREE];var o;!function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(o=t.Direction||(t.Direction={}))}),define(d[408],h([0,1,39,67,18,14]),function(e,t,n,i,o,r){"use strict";function s(e,t){var n=e===t;return o.isLinux||n?n:e.toLowerCase()===t.toLowerCase()}function a(e,t){return o.isLinux||(e=e.toLowerCase(),t=t.toLowerCase()),0===e.indexOf(t+n.nativeSep)}t.IFileService=r.createDecorator("fileService");var u;!function(e){e[e.CREATE=0]="CREATE",e[e.DELETE=1]="DELETE",e[e.MOVE=2]="MOVE",e[e.COPY=3]="COPY",e[e.IMPORT=4]="IMPORT"}(u=t.FileOperation||(t.FileOperation={}));var l=function(){function e(e,t,n){this._resource=e,this._operation=t,this._target=n}return Object.defineProperty(e.prototype,"resource",{get:function(){return this._resource},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"operation",{get:function(){return this._operation},enumerable:!0,configurable:!0}),e}();t.FileOperationEvent=l;var c;!function(e){e[e.UPDATED=0]="UPDATED",e[e.ADDED=1]="ADDED",e[e.DELETED=2]="DELETED"}(c=t.FileChangeType||(t.FileChangeType={}));var d=function(e){function t(t){var n=e.call(this)||this;return n._changes=t,n}return m(t,e),Object.defineProperty(t.prototype,"changes",{get:function(){return this._changes},enumerable:!0,configurable:!0}),t.prototype.contains=function(e,t){return!!e&&this._changes.some(function(n){return n.type===t&&(t===c.DELETED?s(e.fsPath,n.resource.fsPath)||a(e.fsPath,n.resource.fsPath):s(e.fsPath,n.resource.fsPath))})},t.prototype.getAdded=function(){return this.getOfType(c.ADDED)},t.prototype.gotAdded=function(){return this.hasType(c.ADDED)},t.prototype.getDeleted=function(){return this.getOfType(c.DELETED)},t.prototype.gotDeleted=function(){return this.hasType(c.DELETED)},t.prototype.getUpdated=function(){return this.getOfType(c.UPDATED)},t.prototype.gotUpdated=function(){return this.hasType(c.UPDATED)},t.prototype.getOfType=function(e){return this._changes.filter(function(t){return t.type===e})},t.prototype.hasType=function(e){return this._changes.some(function(t){return t.type===e})},t}(i.Event);t.FileChangesEvent=d,t.isEqual=s,t.isParent=a;var h;!function(e){e[e.FILE_IS_BINARY=0]="FILE_IS_BINARY",e[e.FILE_IS_DIRECTORY=1]="FILE_IS_DIRECTORY",e[e.FILE_NOT_FOUND=2]="FILE_NOT_FOUND",e[e.FILE_NOT_MODIFIED_SINCE=3]="FILE_NOT_MODIFIED_SINCE",e[e.FILE_MODIFIED_SINCE=4]="FILE_MODIFIED_SINCE",e[e.FILE_MOVE_CONFLICT=5]="FILE_MOVE_CONFLICT",e[e.FILE_READ_ONLY=6]="FILE_READ_ONLY",e[e.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",e[e.FILE_INVALID_PATH=8]="FILE_INVALID_PATH"}(h=t.FileOperationResult||(t.FileOperationResult={})),t.MAX_FILE_SIZE=52428800,t.AutoSaveConfiguration={OFF:"off",AFTER_DELAY:"afterDelay",ON_FOCUS_CHANGE:"onFocusChange",ON_WINDOW_CHANGE:"onWindowChange"},t.HotExitConfiguration={OFF:"off",ON_EXIT:"onExit",ON_EXIT_AND_WINDOW_CLOSE:"onExitAndWindowClose"},t.CONTENT_CHANGE_EVENT_BUFFER_DELAY=1e3,t.SUPPORTED_ENCODINGS={utf8:{labelLong:"UTF-8",labelShort:"UTF-8",order:1,alias:"utf8bom"},utf8bom:{labelLong:"UTF-8 with BOM",labelShort:"UTF-8 with BOM",encodeOnly:!0,order:2,alias:"utf8"},utf16le:{labelLong:"UTF-16 LE",labelShort:"UTF-16 LE",order:3},utf16be:{labelLong:"UTF-16 BE",labelShort:"UTF-16 BE",order:4},windows1252:{labelLong:"Western (Windows 1252)",labelShort:"Windows 1252",order:5},iso88591:{labelLong:"Western (ISO 8859-1)",labelShort:"ISO 8859-1",order:6},iso88593:{labelLong:"Western (ISO 8859-3)",labelShort:"ISO 8859-3",order:7},iso885915:{labelLong:"Western (ISO 8859-15)",labelShort:"ISO 8859-15",order:8},macroman:{labelLong:"Western (Mac Roman)",labelShort:"Mac Roman",order:9},cp437:{labelLong:"DOS (CP 437)",labelShort:"CP437",order:10},windows1256:{labelLong:"Arabic (Windows 1256)",labelShort:"Windows 1256",order:11},iso88596:{labelLong:"Arabic (ISO 8859-6)",labelShort:"ISO 8859-6",order:12},windows1257:{labelLong:"Baltic (Windows 1257)",labelShort:"Windows 1257",order:13},iso88594:{labelLong:"Baltic (ISO 8859-4)",labelShort:"ISO 8859-4",order:14},iso885914:{labelLong:"Celtic (ISO 8859-14)",labelShort:"ISO 8859-14",order:15},windows1250:{labelLong:"Central European (Windows 1250)",labelShort:"Windows 1250",order:16},iso88592:{labelLong:"Central European (ISO 8859-2)",labelShort:"ISO 8859-2",order:17},cp852:{labelLong:"Central European (CP 852)",labelShort:"CP 852",order:18},windows1251:{labelLong:"Cyrillic (Windows 1251)",labelShort:"Windows 1251",order:19},cp866:{labelLong:"Cyrillic (CP 866)",labelShort:"CP 866",order:20},iso88595:{labelLong:"Cyrillic (ISO 8859-5)",labelShort:"ISO 8859-5",order:21},koi8r:{labelLong:"Cyrillic (KOI8-R)",labelShort:"KOI8-R",order:22},koi8u:{labelLong:"Cyrillic (KOI8-U)",labelShort:"KOI8-U",order:23},iso885913:{labelLong:"Estonian (ISO 8859-13)",labelShort:"ISO 8859-13",order:24},windows1253:{labelLong:"Greek (Windows 1253)",labelShort:"Windows 1253",order:25},iso88597:{labelLong:"Greek (ISO 8859-7)",labelShort:"ISO 8859-7",order:26},windows1255:{labelLong:"Hebrew (Windows 1255)",labelShort:"Windows 1255",order:27},iso88598:{labelLong:"Hebrew (ISO 8859-8)",labelShort:"ISO 8859-8",order:28},iso885910:{labelLong:"Nordic (ISO 8859-10)",labelShort:"ISO 8859-10",order:29},iso885916:{labelLong:"Romanian (ISO 8859-16)",labelShort:"ISO 8859-16",order:30},windows1254:{labelLong:"Turkish (Windows 1254)",labelShort:"Windows 1254",order:31},iso88599:{labelLong:"Turkish (ISO 8859-9)",labelShort:"ISO 8859-9",order:32},windows1258:{labelLong:"Vietnamese (Windows 1258)",labelShort:"Windows 1258",order:33},gbk:{labelLong:"Chinese (GBK)",labelShort:"GBK",order:34},gb18030:{labelLong:"Chinese (GB18030)",labelShort:"GB18030",order:35},cp950:{labelLong:"Traditional Chinese (Big5)",labelShort:"Big5",order:36},big5hkscs:{labelLong:"Traditional Chinese (Big5-HKSCS)",labelShort:"Big5-HKSCS",order:37},shiftjis:{labelLong:"Japanese (Shift JIS)",labelShort:"Shift JIS",order:38},eucjp:{labelLong:"Japanese (EUC-JP)",labelShort:"EUC-JP",order:39},euckr:{labelLong:"Korean (EUC-KR)",labelShort:"EUC-KR",order:40},windows874:{labelLong:"Thai (Windows 874)",labelShort:"Windows 874",order:41},iso885911:{labelLong:"Latin/Thai (ISO 8859-11)",labelShort:"ISO 8859-11",order:42},"koi8-ru":{labelLong:"Cyrillic (KOI8-RU)",labelShort:"KOI8-RU",order:43},"koi8-t":{labelLong:"Tajik (KOI8-T)",labelShort:"KOI8-T",order:44},GB2312:{labelLong:"Simplified Chinese (GB 2312)",labelShort:"GB 2312",order:45}}}),define(d[79],h([0,1]),function(e,t){"use strict";var n=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var n=0,i=e;n<i.length;n++){var o=i[n],r=o[0],s=o[1];this.set(r,s)}}return e.prototype.set=function(e,t){var n=this._entries.get(e);return this._entries.set(e,t),n},e.prototype.forEach=function(e){this._entries.forEach(function(t,n){return e(n,t)})},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=n}),define(d[410],h([0,1,10,12,25,4,6,79,19,42,357,41,345,15,3,20,2,371,131,400,208,363]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y,C,b,w){"use strict";var S=v.EditorContextKeys,E=0,L=function(e){function t(t,n,o,r){var s=e.call(this)||this;return s.onDidChangeModelRawContent=i.fromEventEmitter(s,v.EventType.ModelRawContentChanged),s.onDidChangeModelContent=i.fromEventEmitter(s,v.EventType.ModelContentChanged2),s.onDidChangeModelLanguage=i.fromEventEmitter(s,v.EventType.ModelLanguageChanged),s.onDidChangeModelOptions=i.fromEventEmitter(s,v.EventType.ModelOptionsChanged),s.onDidChangeModelDecorations=i.fromEventEmitter(s,v.EventType.ModelDecorationsChanged),s.onDidChangeConfiguration=i.fromEventEmitter(s,v.EventType.ConfigurationChanged),s.onDidChangeModel=i.fromEventEmitter(s,v.EventType.ModelChanged),s.onDidChangeCursorPosition=i.fromEventEmitter(s,v.EventType.CursorPositionChanged),s.onDidChangeCursorSelection=i.fromEventEmitter(s,v.EventType.CursorSelectionChanged),s.onDidFocusEditorText=i.fromEventEmitter(s,v.EventType.EditorTextFocus),s.onDidBlurEditorText=i.fromEventEmitter(s,v.EventType.EditorTextBlur),s.onDidFocusEditor=i.fromEventEmitter(s,v.EventType.EditorFocus),s.onDidBlurEditor=i.fromEventEmitter(s,v.EventType.EditorBlur),s.onDidDispose=i.fromEventEmitter(s,v.EventType.Disposed),s.onWillType=i.fromEventEmitter(s,v.EventType.WillType),s.onDidType=i.fromEventEmitter(s,v.EventType.DidType),s.onDidPaste=i.fromEventEmitter(s,v.EventType.DidPaste),s.domElement=t,s.id=++E,s._lifetimeDispose=[],s._decorationTypeKeysToIds={},s._decorationTypeSubtypes={},n=n||{},"undefined"==typeof n.ariaLabel&&(n.ariaLabel=l.DefaultConfig.editor.ariaLabel),s._configuration=s._createConfiguration(n),s._lifetimeDispose.push(s._configuration.onDidChange(function(e){s.emit(v.EventType.ConfigurationChanged,e)})),s._contextKeyService=r.createScoped(s.domElement),s._lifetimeDispose.push(new N(s,s._contextKeyService)),s._lifetimeDispose.push(new w.EditorModeContext(s,s._contextKeyService)),s._instantiationService=o.createChild(new a.ServiceCollection([u.IContextKeyService,s._contextKeyService])),s._attachModel(null),s._contributions={},s._actions={},s}return m(t,e),t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return v.EditorType.ICodeEditor},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this._lifetimeDispose=r.dispose(this._lifetimeDispose);for(var t=Object.keys(this._contributions),n=0,i=t.length;n<i;n++){var o=t[n];this._contributions[o].dispose()}this._contributions={},this._actions={},this._postDetachModelCleanup(this._detachModel()),this._configuration.dispose(),this._contextKeyService.dispose(),this.emit(v.EventType.Disposed),e.prototype.dispose.call(this)},t.prototype.captureState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new h.EditorState(this,e)},t.prototype.invokeWithinContext=function(e){return this._instantiationService.invokeFunction(e)},t.prototype.updateOptions=function(e){this._configuration.updateOptions(e)},t.prototype.getConfiguration=function(){return this._configuration.editorClone},t.prototype.getRawConfiguration=function(){return this._configuration.getRawOptions()},t.prototype.getValue=function(e){if(void 0===e&&(e=null),this.model){var t=!(!e||!e.preserveBOM),n=v.EndOfLinePreference.TextDefined;return e&&e.lineEnding&&"\n"===e.lineEnding?n=v.EndOfLinePreference.LF:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(n=v.EndOfLinePreference.CRLF),this.model.getValue(n,t)}return""},t.prototype.setValue=function(e){this.model&&this.model.setValue(e)},t.prototype.getModel=function(){return this.model},t.prototype.setModel=function(e){if(void 0===e&&(e=null),this.model!==e){var t=this._detachModel();this._attachModel(e);var n={oldModelUrl:t?t.uri:null,newModelUrl:e?e.uri:null};this.emit(v.EventType.ModelChanged,n),this._postDetachModelCleanup(t)}},t.prototype.getVisibleColumnFromPosition=function(e){if(!this.model)return e.column;var t=this.model.validatePosition(e),n=this.model.getOptions().tabSize;return d.CursorColumns.visibleColumnFromColumn(this.model.getLineContent(t.lineNumber),t.column,n)+1},t.prototype.getPosition=function(){return this.cursor?this.cursor.getPosition().clone():null},t.prototype.setPosition=function(e,t,n,i){if(void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),this.cursor){if(!p.Position.isIPosition(e))throw new Error("Invalid arguments");this.cursor.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}]),t&&this.revealPosition(e,n,i)}},t.prototype._sendRevealRange=function(e,t,n){if(this.model&&this.cursor){if(!f.Range.isIRange(e))throw new Error("Invalid arguments");var i=this.model.validateRange(e),o={range:i,viewRange:null,verticalType:t,revealHorizontal:n,revealCursor:!1};this.cursor.emit(v.EventType.CursorRevealRange,o)}},t.prototype.revealLine=function(e){this._revealLine(e,0)},t.prototype.revealLineInCenter=function(e){this._revealLine(e,1)},t.prototype.revealLineInCenterIfOutsideViewport=function(e){this._revealLine(e,2)},t.prototype._revealLine=function(e,t){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new f.Range(e,1,e,1),t,!1)},t.prototype.revealPosition=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this._revealPosition(e,t?1:0,n)},t.prototype.revealPositionInCenter=function(e){this._revealPosition(e,1,!0)},t.prototype.revealPositionInCenterIfOutsideViewport=function(e){this._revealPosition(e,2,!0)},t.prototype._revealPosition=function(e,t,n){if(!p.Position.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new f.Range(e.lineNumber,e.column,e.lineNumber,e.column),t,n)},t.prototype.getSelection=function(){return this.cursor?this.cursor.getSelection().clone():null},t.prototype.getSelections=function(){if(!this.cursor)return null;for(var e=this.cursor.getSelections(),t=[],n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t},t.prototype.setSelection=function(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===i&&(i=!1);var o=g.Selection.isISelection(e),r=f.Range.isIRange(e);if(!o&&!r)throw new Error("Invalid arguments");if(o)this._setSelectionImpl(e,t,n,i);else if(r){var s={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(s,t,n,i)}},t.prototype._setSelectionImpl=function(e,t,n,i){if(this.cursor){var o=new g.Selection(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this.cursor.setSelections("api",[o]),t&&this.revealRange(o,n,i)}},t.prototype.revealLines=function(e,t){this._revealLines(e,t,0)},t.prototype.revealLinesInCenter=function(e,t){this._revealLines(e,t,1)},t.prototype.revealLinesInCenterIfOutsideViewport=function(e,t){this._revealLines(e,t,2)},t.prototype._revealLines=function(e,t,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new f.Range(e,1,t,1),n,!1)},t.prototype.revealRange=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),this._revealRange(e,t?1:0,n)},t.prototype.revealRangeInCenter=function(e){this._revealRange(e,1,!0)},t.prototype.revealRangeInCenterIfOutsideViewport=function(e){this._revealRange(e,2,!0)},t.prototype.revealRangeAtTop=function(e){this._revealRange(e,3,!0)},t.prototype._revealRange=function(e,t,n){if(!f.Range.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(f.Range.lift(e),t,n)},t.prototype.setSelections=function(e){if(this.cursor){if(!e||0===e.length)throw new Error("Invalid arguments");for(var t=0,n=e.length;t<n;t++)if(!g.Selection.isISelection(e[t]))throw new Error("Invalid arguments");this.cursor.setSelections("api",e)}},t.prototype.onVisible=function(){},t.prototype.onHide=function(){},t.prototype.getContribution=function(e){return this._contributions[e]||null},t.prototype.getActions=function(){for(var e=[],t=Object.keys(this._actions),n=0,i=t.length;n<i;n++){var o=t[n];e.push(this._actions[o])}return e},t.prototype.getSupportedActions=function(){var e=this.getActions();return e=e.filter(function(e){return e.isSupported()})},t.prototype.getAction=function(e){return this._actions[e]||null},t.prototype.trigger=function(e,t,i){if(i=i||{},t===v.Handler.Type){if(!this.cursor||"string"!=typeof i.text||0===i.text.length)return;return"keyboard"===e&&this.emit(v.EventType.WillType,i.text),this.cursor.trigger(e,t,i),void("keyboard"===e&&this.emit(v.EventType.DidType,i.text))}if(t===v.Handler.Paste){if(!this.cursor||"string"!=typeof i.text||0===i.text.length)return;var o=this.cursor.getSelection().getStartPosition();this.cursor.trigger(e,t,i);var r=this.cursor.getSelection().getStartPosition();return void("keyboard"===e&&this.emit(v.EventType.DidPaste,new f.Range(o.lineNumber,o.column,r.lineNumber,r.column)))}var a=this.getAction(t);if(null!==a)s.TPromise.as(a.run()).done(null,n.onUnexpectedError);else{if(!this.cursor)return;this.cursor.trigger(e,t,i)}},t.prototype.executeCommand=function(e,t){this.cursor&&this.cursor.trigger(e,v.Handler.ExecuteCommand,t)},t.prototype.pushUndoStop=function(){return!!this.cursor&&(!this._configuration.editor.readOnly&&(this.model.pushStackElement(),!0))},t.prototype.executeEdits=function(e,t,n){var i=this;return!!this.cursor&&(!this._configuration.editor.readOnly&&(this.model.pushEditOperations(this.cursor.getSelections(),t,function(){return n?n:i.cursor.getSelections()}),n&&this.cursor.setSelections(e,n),!0))},t.prototype.executeCommands=function(e,t){this.cursor&&this.cursor.trigger(e,v.Handler.ExecuteCommands,t)},t.prototype.changeDecorations=function(e){return this.model?this.model.changeDecorations(e,this.id):null},t.prototype.getLineDecorations=function(e){return this.model?this.model.getLineDecorations(e,this.id,this._configuration.editor.readOnly):null},t.prototype.deltaDecorations=function(e,t){return this.model?0===e.length&&0===t.length?e:this.model.deltaDecorations(e,t,this.id):[]},t.prototype.setDecorations=function(e,t){var n={},i=this._decorationTypeSubtypes[e]||{};this._decorationTypeSubtypes[e]=n;for(var o=[],r=0,s=t;r<s.length;r++){var a=s[r],u=e;if(a.renderOptions){var l=b.hash(a.renderOptions).toString(16);u=e+"-"+l,i[l]||n[l]||this._registerDecorationType(u,a.renderOptions,e),n[l]=!0}var c=this._resolveDecorationOptions(u,!!a.hoverMessage);a.hoverMessage&&(c.hoverMessage=a.hoverMessage),o.push({range:a.range,options:c})}for(var l in i)n[l]||this._removeDecorationType(e+"-"+l);var d=this._decorationTypeKeysToIds[e]||[];this._decorationTypeKeysToIds[e]=this.deltaDecorations(d,o)},t.prototype.removeDecorations=function(e){var t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]},t.prototype.getLayoutInfo=function(){return this._configuration.editor.layoutInfo},t.prototype._attachModel=function(e){var t=this;if(this.model=e?e:null,this.listenersToRemove=[],this.viewModel=null,this.cursor=null,this.model){this.domElement.setAttribute("data-mode-id",this.model.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines()),this.model.onBeforeAttached();var n=new _.CharacterHardWrappingLineMapperFactory(this._configuration.editor.wrappingInfo.wordWrapBreakBeforeCharacters,this._configuration.editor.wrappingInfo.wordWrapBreakAfterCharacters,this._configuration.editor.wrappingInfo.wordWrapBreakObtrusiveCharacters),i=new y.SplitLinesCollection(this.model,n,this.model.getOptions().tabSize,this._configuration.editor.wrappingInfo.wrappingColumn,this._configuration.editor.fontInfo.typicalFullwidthCharacterWidth/this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._configuration.editor.wrappingInfo.wrappingIndent);this.viewModel=new C.ViewModel(i,this.id,this._configuration,this.model,function(){return t.getCenteredRangeInViewport()});var o={viewModel:this.viewModel,getCurrentCompletelyVisibleViewLinesRangeInViewport:function(){return t.viewModel.convertModelRangeToViewRange(t.getCompletelyVisibleLinesRangeInViewport())},getCurrentCompletelyVisibleModelLinesRangeInViewport:function(){return t.getCompletelyVisibleLinesRangeInViewport()},convertModelPositionToViewPosition:function(e,n){return t.viewModel.convertModelPositionToViewPosition(e,n)},convertModelRangeToViewRange:function(e){return t.viewModel.convertModelRangeToViewRange(e)},convertViewToModelPosition:function(e,n){return t.viewModel.convertViewPositionToModelPosition(e,n)},convertViewSelectionToModelSelection:function(e){return t.viewModel.convertViewSelectionToModelSelection(e)},validateViewPosition:function(e,n){return t.viewModel.validateViewPosition(e.lineNumber,e.column,n)},validateViewRange:function(e,n){return t.viewModel.validateViewRange(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn,n)}};this.cursor=new c.Cursor(this._configuration,this.model,o,this._enableEmptySelectionClipboard()),this.viewModel.addEventSource(this.cursor),this._createView(),this.listenersToRemove.push(this._getViewInternalEventBus().addBulkListener2(function(e){for(var n=0,i=e.length;n<i;n++){var o=e[n].getType(),r=e[n].getData();switch(o){case v.EventType.ViewFocusGained:t.emit(v.EventType.EditorTextFocus),t.emit(v.EventType.EditorFocus,{});break;case"scroll":t.emit("scroll",r);break;case v.EventType.ViewFocusLost:t.emit(v.EventType.EditorTextBlur);break;case v.EventType.ContextMenu:t.emit(v.EventType.ContextMenu,r);break;case v.EventType.MouseDown:t.emit(v.EventType.MouseDown,r);break;case v.EventType.MouseUp:t.emit(v.EventType.MouseUp,r);break;case v.EventType.KeyUp:t.emit(v.EventType.KeyUp,r);break;case v.EventType.MouseMove:t.emit(v.EventType.MouseMove,r);break;case v.EventType.MouseLeave:t.emit(v.EventType.MouseLeave,r);break;case v.EventType.KeyDown:t.emit(v.EventType.KeyDown,r);break;case v.EventType.ViewLayoutChanged:t.emit(v.EventType.EditorLayout,r)}}})),this.listenersToRemove.push(this.model.addBulkListener(function(e){for(var n=0,i=e.length;n<i;n++){var o=e[n].getType(),r=e[n].getData();switch(o){case v.EventType.ModelDecorationsChanged:t.emit(v.EventType.ModelDecorationsChanged,r);break;case v.EventType.ModelLanguageChanged:t.domElement.setAttribute("data-mode-id",t.model.getLanguageIdentifier().language),t.emit(v.EventType.ModelLanguageChanged,r);break;case v.EventType.ModelRawContentChanged:t.emit(v.EventType.ModelRawContentChanged,r);break;case v.EventType.ModelContentChanged2:t.emit(v.EventType.ModelContentChanged2,r);break;case v.EventType.ModelOptionsChanged:t.emit(v.EventType.ModelOptionsChanged,r);break;case v.EventType.ModelDispose:t.setModel(null)}}})),this.listenersToRemove.push(this.cursor.addBulkListener2(function(e){for(var n=0,i=e.length;n<i;n++){var o=e[n].getType(),r=e[n].getData();switch(o){case v.EventType.CursorPositionChanged:t.emit(v.EventType.CursorPositionChanged,r);break;case v.EventType.CursorSelectionChanged:t.emit(v.EventType.CursorSelectionChanged,r)}}}))}else this.hasView=!1},t.prototype._postDetachModelCleanup=function(e){if(e){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(var t in this._decorationTypeSubtypes){var n=this._decorationTypeSubtypes[t];for(var i in n)this._removeDecorationType(t+"-"+i)}this._decorationTypeSubtypes={}}e.removeAllDecorationsWithOwnerId(this.id)}},t.prototype._detachModel=function(){this.model&&this.model.onBeforeDetached(),this.hasView=!1,this.listenersToRemove=r.dispose(this.listenersToRemove),this.cursor&&(this.cursor.dispose(),this.cursor=null),this.viewModel&&(this.viewModel.dispose(),this.viewModel=null);var e=this.model;return this.model=null,this.domElement.removeAttribute("data-mode-id"),e},t}(o.EventEmitter);t.CommonCodeEditor=L;var N=function(e){function t(t,n){var i=e.call(this)||this;
return i._editor=t,i._editorId=n.createKey("editorId",t.getId()),i._editorFocus=S.Focus.bindTo(n),i._editorTextFocus=S.TextFocus.bindTo(n),i._editorTabMovesFocus=S.TabMovesFocus.bindTo(n),i._editorReadonly=S.ReadOnly.bindTo(n),i._hasMultipleSelections=S.HasMultipleSelections.bindTo(n),i._hasNonEmptySelection=S.HasNonEmptySelection.bindTo(n),i._register(i._editor.onDidChangeConfiguration(function(){return i._updateFromConfig()})),i._register(i._editor.onDidChangeCursorSelection(function(){return i._updateFromSelection()})),i._register(i._editor.onDidFocusEditor(function(){return i._updateFromFocus()})),i._register(i._editor.onDidBlurEditor(function(){return i._updateFromFocus()})),i._register(i._editor.onDidFocusEditorText(function(){return i._updateFromFocus()})),i._register(i._editor.onDidBlurEditorText(function(){return i._updateFromFocus()})),i._updateFromConfig(),i._updateFromSelection(),i._updateFromFocus(),i}return m(t,e),t.prototype._updateFromConfig=function(){var e=this._editor.getConfiguration();this._editorTabMovesFocus.set(e.tabFocusMode),this._editorReadonly.set(e.readOnly)},t.prototype._updateFromSelection=function(){var e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(function(e){return!e.isEmpty()}))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())},t.prototype._updateFromFocus=function(){this._editorFocus.set(this._editor.hasWidgetFocus()),this._editorTextFocus.set(this._editor.isFocused())},t}(r.Disposable)}),define(d[411],h([0,1,6,10,22,55,488,144,14,79]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function t(e,t){void 0===e&&(e=new l.ServiceCollection),void 0===t&&(t=!1),this._services=e,this._strict=t,this._services.set(u.IInstantiationService,this)}return t.prototype.createChild=function(e){var n=this;return this._services.forEach(function(t,i){e.has(t)||(i instanceof a.SyncDescriptor&&(i=n._createAndCacheServiceInstance(t,i)),e.set(t,i))}),new t(e,this._strict)},t.prototype.invokeFunction=function(e){for(var t=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var r;try{return r={get:function(e,n){var i=t._getOrCreateServiceInstance(e);if(!i&&n!==u.optional)throw new Error("[invokeFunction] unkown service '"+e+"'");return i}},e.apply(void 0,[r].concat(n))}finally{r.get=function(){throw i.illegalState("service accessor is only valid during the invocation of its target method")}}},t.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e instanceof a.AsyncDescriptor?this._createInstanceAsync(e,t):e instanceof a.SyncDescriptor?this._createInstance(e,t):this._createInstance(new a.SyncDescriptor(e),t)},t.prototype._createInstanceAsync=function(t,o){var r,s=this;return new n.TPromise(function(n,u,l){e([t.moduleName],function(e){if(r&&u(r),!e)return u(i.illegalArgument("module not found: "+t.moduleName));var l;if(l=t.ctorName?e[t.ctorName]:e,"function"!=typeof l)return u(i.illegalArgument("not a function: "+t.ctorName||t.moduleName));try{o.unshift.apply(o,t.staticArguments()),n(s._createInstance(new a.SyncDescriptor(l),o))}catch(e){return u(e)}},u)},function(){r=i.canceled()})},t.prototype._createInstance=function(e,t){for(var n=e.staticArguments().concat(t),i=u._util.getServiceDependencies(e.ctor).sort(function(e,t){return e.index-t.index}),r=[],s=0,a=i;s<a.length;s++){var l=a[s],c=this._getOrCreateServiceInstance(l.id);if(!c&&this._strict&&!l.optional)throw new Error("[createInstance] "+e.ctor.name+" depends on UNKNOWN service "+l.id+".");r.push(c)}var d=i.length>0?i[0].index:n.length;if(n.length!==d){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(d+1)+" conflicts with "+n.length+" static arguments");var h=d-n.length;n=h>0?n.concat(new Array(h)):n.slice(0,d)}var p=[e.ctor];p.push.apply(p,n),p.push.apply(p,r);var f=o.create.apply(null,p);return e._validate(f),f},t.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof a.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},t.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=i.toString(),e}r.ok(this._services.get(e)instanceof a.SyncDescriptor);for(var i=new s.Graph(function(e){return e.id.toString()}),o=0,l=[{id:e,desc:t}];l.length;){var c=l.pop();i.lookupOrInsertNode(c),o++>100&&n();for(var d=u._util.getServiceDependencies(c.desc.ctor),h=0,p=d;h<p.length;h++){var f=p[h],g=this._services.get(f.id);if(g||console.warn("[createInstance] "+e+" depends on "+f.id+" which is NOT registered."),g instanceof a.SyncDescriptor){var m={id:f.id,desc:g};i.insertEdge(c,m),l.push(m)}}}for(;;){var v=i.roots();if(0===v.length){0!==i.length&&n();break}for(var _=0,y=v;_<y.length;_++){var C=y[_],b=this._createInstance(C.data.desc,[]);this._services.set(C.data.id,b),i.removeNode(C.data)}}return this._services.get(e)},t}();t.InstantiationService=c}),define(d[412],h([0,1,323,31,137,4,30,26,23,12]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function e(e,t,n,i){this.toDispose=[],this._contextKeyService=e,this._commandService=t,this._statusService=i,this._messageService=n,this._currentChord=0,this._currentChordStatusMessage=null,this._onDidUpdateKeybindings=new l.Emitter,this.toDispose.push(this._onDidUpdateKeybindings)}return e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose)},Object.defineProperty(e.prototype,"onDidUpdateKeybindings",{get:function(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:l.default.None},enumerable:!0,configurable:!0}),e.prototype.getLabelFor=function(e){return o.KeybindingLabels._toUSLabel(e)},e.prototype.getHTMLLabelFor=function(e){return o.KeybindingLabels._toUSHTMLLabel(e)},e.prototype.getAriaLabelFor=function(e){return o.KeybindingLabels._toUSAriaLabel(e)},e.prototype.getElectronAcceleratorFor=function(e){return o.KeybindingLabels._toElectronAccelerator(e)},e.prototype.getDefaultKeybindings=function(){return this._getResolver().getDefaultKeybindings()+"\n\n"+this._getAllCommandsAsComment()},e.prototype.customKeybindingsCount=function(){return 0},e.prototype.lookupKeybindings=function(e){return this._getResolver().lookupKeybinding(e)},e.prototype._getAllCommandsAsComment=function(){var e=u.CommandsRegistry.getCommands(),t=[],i=this._getResolver().getDefaultBoundCommands();for(var o in e)"_"!==o[0]&&0!==o.indexOf("vscode.")&&("object"!=typeof e[o].description||a.isFalsyOrEmpty(e[o].description.args))&&(i[o]||t.push(o));var r=t.sort().join("\n// - ");return"// "+n.localize(0,null)+"\n// - "+r},e.prototype.resolve=function(e,t){if(e.isModifierKey())return null;var n=this._contextKeyService.getContextValue(t);return this._getResolver().resolve(n,this._currentChord,e.value)},e.prototype._dispatch=function(e,t){var o=this,r=!1;if(e.isModifierKey())return r;var a=this.resolve(e,t);if(a&&a.enterChord){if(r=!0,this._currentChord=a.enterChord,this._statusService){var u=this.getLabelFor(new i.Keybinding(this._currentChord));this._currentChordStatusMessage=this._statusService.setStatusMessage(n.localize(1,null,u))}return r}if(this._statusService&&this._currentChord&&(!a||!a.commandId)){var u=this.getLabelFor(new i.Keybinding(this._currentChord)),l=this.getLabelFor(e);this._statusService.setStatusMessage(n.localize(2,null,u,l),1e4),r=!0}if(this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChord=0,a&&a.commandId){/^\^/.test(a.commandId)||(r=!0);var c=a.commandId.replace(/^\^/,"");this._commandService.executeCommand(c,a.commandArgs||{}).done(void 0,function(e){o._messageService.show(s.default.Warning,e)})}return r},e}();t.AbstractKeybindingService=c}),define(d[43],h([0,1,14]),function(e,t,n){"use strict";var i;!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(i=t.KeybindingSource||(t.KeybindingSource={})),t.IKeybindingService=n.createDecorator("keybindingService")}),define(d[107],h([0,1,31,137,18,19]),function(e,t,n,i,o,r){"use strict";function s(e,t){return e.length<t?e+new Array(t-e.length).join(" "):e}function a(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}var u=function(){function e(e,t,n,i,o){this.keybinding=e,this.command=t,this.commandArgs=n,this.actualCommand=this.command?this.command.replace(/^\^/,""):this.command,this.when=i,this.isDefault=o}return e.fromKeybindingItem=function(t,n){var i=null;return t.when&&(i=t.when.normalize()),new e(t.keybinding,t.command,t.commandArgs,i,n)},e}();t.NormalizedKeybindingItem=u;var l=function(){function e(t,i,o){void 0===o&&(o=!0),t=t.slice(0).sort(a),this._defaultKeybindings=t,this._shouldWarnOnConflict=o,this._defaultBoundCommands=Object.create(null);for(var r=0,s=t.length;r<s;r++)this._defaultBoundCommands[t[r].command]=!0;this._map=Object.create(null),this._lookupMap=new Map,this._lookupMapUnreachable=new Map,this._chords=Object.create(null);for(var u=e.combine(t,i),r=0,s=u.length;r<s;r++){var l=u[r];if(0!==l.keybinding){var c={when:l.when,keybinding:l.keybinding,commandId:l.command,commandArgs:l.commandArgs};if(n.BinaryKeybindings.hasChord(l.keybinding)){var d=n.BinaryKeybindings.extractFirstPart(l.keybinding),h=n.BinaryKeybindings.extractChordPart(l.keybinding);this._chords[d]=this._chords[d]||Object.create(null),this._chords[d][h]=this._chords[d][h]||[],this._chords[d][h].push(c),this._addKeyPress(d,c,l)}else this._addKeyPress(l.keybinding,c,l)}}}return e._isTargetedForRemoval=function(e,t,n,i){if(e.actualCommand!==n)return!1;if(t&&e.keybinding!==t)return!1;if(i){if(!e.when)return!1;if(!i.equals(e.when))return!1}return!0},e.combine=function(e,t){for(var n=e.map(function(e){return u.fromKeybindingItem(e,!0)}),i=[],o=0,r=t.length;o<r;o++){var s=u.fromKeybindingItem(t[o],!1);if(s.command&&0!==s.command.length&&"-"===s.command.charAt(0))for(var a=s.command.substr(1),l=s.keybinding,c=s.when,d=n.length-1;d>=0;d--)this._isTargetedForRemoval(n[d],l,a,c)&&n.splice(d,1);else i.push(s)}return n.concat(i)},e.prototype._addKeyPress=function(t,o,r){if(!this._map[t])return this._map[t]=[o],void this._addToLookupMap(r);for(var s=this._map[t],a=s.length-1;a>=0;a--){var u=s[a];u.commandId!==r.command&&(n.BinaryKeybindings.hasChord(u.keybinding)&&n.BinaryKeybindings.hasChord(o.keybinding)&&u.keybinding!==o.keybinding||e.whenIsEntirelyIncluded(!0,u.when,r.when)&&(this._shouldWarnOnConflict&&r.isDefault&&console.warn("Conflict detected, command `"+u.commandId+"` cannot be triggered by "+i.KeybindingLabels.toUserSettingsLabel(t)+" due to "+r.command),e._push(this._lookupMapUnreachable,u.commandId,u.keybinding)))}s.push(o),this._addToLookupMap(r)},e.whenIsEntirelyIncluded=function(e,t,n){if(e||(t=t?t.normalize():null,n=n?n.normalize():null),!n)return!0;if(!t)return!1;for(var i=t.serialize().split(" && "),o=n.serialize().split(" && "),r=Object.create(null),s=0,a=i.length;s<a;s++)r[i[s]]=!0;for(var s=0,a=o.length;s<a;s++)if(!r[o[s]])return!1;return!0},e._push=function(e,t,n){var i=e.get(t);if("undefined"==typeof i){var o=new Uint32Array(1);o[0]=n,e.set(t,o.buffer)}else{var r=new Uint32Array(i),s=new Uint32Array(r.length+1);s.set(r,0),s[s.length-1]=n,e.set(t,s.buffer)}},e._read=function(e,t){var n=e.get(t);if("undefined"==typeof n)return null;for(var i=new Uint32Array(n),o=[],r=0,s=i.length;r<s;r++)o[r]=i[r];return o},e.prototype._addToLookupMap=function(t){t.command&&e._push(this._lookupMap,t.command,t.keybinding)},e.prototype.getDefaultBoundCommands=function(){return this._defaultBoundCommands},e.prototype.getDefaultKeybindings=function(){var e=new c;e.writeLine("[");var t=this._defaultKeybindings.length-1;return this._defaultKeybindings.forEach(function(n,i){d.writeKeybindingItem(e,n),i!==t?e.writeLine(","):e.writeLine()}),e.writeLine("]"),e.toString()},e.prototype.lookupKeybinding=function(t){var i=e._read(this._lookupMap,t);if(!i)return[];var o=e._read(this._lookupMapUnreachable,t);o&&(i=i.filter(function(e){return o.indexOf(e)===-1}));var r=[],s=i.filter(function(e){return!(r.indexOf(e)>=0)&&(r.push(e),!0)});return s.map(function(e){return new n.Keybinding(e)}).reverse()},e.prototype.resolve=function(e,t,i){var o=null;if(0!==t){var r=this._chords[t];if(!r)return null;o=r[i]}else o=this._map[i];var s=this._findCommand(e,o);return s?0===t&&n.BinaryKeybindings.hasChord(s.keybinding)?{enterChord:i,commandId:null,commandArgs:null}:{enterChord:0,commandId:s.commandId,commandArgs:s.commandArgs}:null},e.prototype._findCommand=function(t,n){if(!n)return null;for(var i=n.length-1;i>=0;i--){var o=n[i];if(e.contextMatchesRules(t,o.when))return o}return null},e.contextMatchesRules=function(e,t){return!t||t.evaluate(e)},e}();t.KeybindingResolver=l;var c=function(){function e(){this._lines=[],this._currentLine=""}return e.prototype.write=function(e){this._currentLine+=e},e.prototype.writeLine=function(e){void 0===e&&(e=""),this._lines.push(this._currentLine+e),this._currentLine=""},e.prototype.toString=function(){return this.writeLine(),this._lines.join("\n")},e}();t.OutputBuilder=c;var d=function(){function e(){}return e.writeKeybindingItem=function(t,n){var i=JSON.stringify(e.writeKeybinding(n.keybinding));t.write('{ "key": '+s(i+",",25)+' "command": ');var o=n.when?n.when.serialize():"",r=JSON.stringify(n.command);o.length>0?(t.write(r+","),t.writeLine(),t.write(' "when": "'+o+'" ')):t.write(r+" "),t.write("}")},e.readKeybindingItem=function(t,n){var i=0;"string"==typeof t.key&&(i=e.readKeybinding(t.key));var o=null;"string"==typeof t.when&&(o=e.readKeybindingWhen(t.when));var r=null;"string"==typeof t.command&&(r=t.command);var s=null;return"undefined"!=typeof t.args&&(s=t.args),{keybinding:i,command:r,commandArgs:s,when:o,weight1:1e3,weight2:n}},e.writeKeybinding=function(e,t){return void 0===t&&(t=o),i.KeybindingLabels.toUserSettingsLabel(e,t)},e.readKeybinding=function(e,t){return void 0===t&&(t=o),i.KeybindingLabels.fromUserSettingsLabel(e,t)},e.readKeybindingWhen=function(e){return r.ContextKeyExpr.deserialize(e)},e}();t.IOSupport=d}),define(d[415],h([0,1,4,23,107,19,56,12]),function(e,t,n,i,o,r,s,a){"use strict";function u(e){for(;e;){if(e.hasAttribute(l))return parseInt(e.getAttribute(l),10);e=e.parentElement}return 0}var l="data-keybinding-context",c=function(){function e(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}return e.prototype.setValue=function(e,t){if(this._value[e]!==t)return this._value[e]=t,!0},e.prototype.removeValue=function(e){return delete this._value[e]},e.prototype.getValue=function(e){var t=this._value[e];return"undefined"==typeof t&&this._parent?this._parent.getValue(e):t},e.prototype.fillInContext=function(e){this._parent&&this._parent.fillInContext(e);for(var t in this._value)e[t]=this._value[t]},e}();t.ContextValuesContainer=c;var d=function(e){function t(t,n,i){var o=e.call(this,t,null)||this;return o._emitter=i,o._subscription=n.onDidUpdateConfiguration(function(e){return o._updateConfigurationContext(e.config)}),o._updateConfigurationContext(n.getConfiguration()),o}return m(t,e),t.prototype.dispose=function(){this._subscription.dispose()},t.prototype._updateConfigurationContext=function(e){var t=this;for(var n in this._value)0===n.indexOf("config.")&&delete this._value[n];var i=function(e,n){for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){n.push(o);var r=e[o];if("boolean"==typeof r){var s=n.join(".");t._value[s]=r,t._emitter.fire(s)}else"object"==typeof r&&i(r,n);n.pop()}};i(e,["config"])},t}(c),h=function(){function e(e,t,n){this._parent=e,this._key=t,this._defaultValue=n,this.reset()}return e.prototype.set=function(e){this._parent.setContext(this._key,e)},e.prototype.reset=function(){"undefined"==typeof this._defaultValue?this._parent.removeContext(this._key):this._parent.setContext(this._key,this._defaultValue)},e.prototype.get=function(){return this._parent.getContextKeyValue(this._key)},e}(),p=function(){function e(e){this._myContextId=e,this._onDidChangeContextKey=new a.Emitter}return e.prototype.createKey=function(e,t){return new h(this,e,t)},Object.defineProperty(e.prototype,"onDidChangeContext",{get:function(){return this._onDidChangeContext||(this._onDidChangeContext=a.debounceEvent(this._onDidChangeContextKey.event,function(e,t){return e?e.indexOf(t)<0&&e.push(t):e=[t],e},25)),this._onDidChangeContext},enumerable:!0,configurable:!0}),e.prototype.createScoped=function(e){return new g(this,this._onDidChangeContextKey,e)},e.prototype.contextMatchesRules=function(e){var t=Object.create(null);this.getContextValuesContainer(this._myContextId).fillInContext(t);var n=o.KeybindingResolver.contextMatchesRules(t,e);return n},e.prototype.getContextKeyValue=function(e){return this.getContextValuesContainer(this._myContextId).getValue(e)},e.prototype.setContext=function(e,t){this.getContextValuesContainer(this._myContextId).setValue(e,t)&&this._onDidChangeContextKey.fire(e)},e.prototype.removeContext=function(e){this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContextKey.fire(e)},e.prototype.getContextValue=function(e){var t=Object.create(null);return this.getContextValuesContainer(u(e)).fillInContext(t),t},e}();t.AbstractContextKeyService=p;var f=function(e){function t(t){var n=e.call(this,0)||this;n._toDispose=[],n._lastContextId=0,n._contexts=Object.create(null);var i=new d(n._myContextId,t,n._onDidChangeContextKey);return n._contexts[String(n._myContextId)]=i,n._toDispose.push(i),n}return m(t,e),t.prototype.dispose=function(){this._toDispose=n.dispose(this._toDispose)},t.prototype.getContextValuesContainer=function(e){return this._contexts[String(e)]},t.prototype.createChildContext=function(e){void 0===e&&(e=this._myContextId);var t=++this._lastContextId;return this._contexts[String(t)]=new c(t,this.getContextValuesContainer(e)),t},t.prototype.disposeContext=function(e){delete this._contexts[String(e)]},t}(p);f=y([C(0,s.IConfigurationService)],f),t.ContextKeyService=f;var g=function(e){function t(t,n,i){var o=e.call(this,t.createChildContext())||this;return o._parent=t,o._onDidChangeContextKey=n,i&&(o._domNode=i,o._domNode.setAttribute(l,String(o._myContextId))),o}return m(t,e),t.prototype.dispose=function(){this._parent.disposeContext(this._myContextId),this._domNode&&this._domNode.removeAttribute(l)},Object.defineProperty(t.prototype,"onDidChangeContext",{get:function(){return this._parent.onDidChangeContext},enumerable:!0,configurable:!0}),t.prototype.getContextValuesContainer=function(e){return this._parent.getContextValuesContainer(e)},t.prototype.createChildContext=function(e){return void 0===e&&(e=this._myContextId),this._parent.createChildContext(e)},t.prototype.disposeContext=function(e){this._parent.disposeContext(e)},t}(p);i.CommandsRegistry.registerCommand(r.SET_CONTEXT_COMMAND_ID,function(e,t,n){e.get(r.IContextKeyService).createKey(String(t),n)})}),define(d[416],h([0,1,26,64,22,12,30]),function(e,t,n,i,o,r,s){"use strict";var a;!function(e){function t(e,t,n){if(e[t])return e[t][n]}function n(e,t,n,i){e[t]||(e[t]=Object.create(null)),e[t][n]=i}function i(e,t,n){return!(!e[t]||!e[t][n])&&(delete e[t][n],o.isEmptyObject(e[t])&&delete e[t],!0)}e.get=t,e.set=n,e.remove=i}(a||(a={}));var u=function(){function e(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=Object.create(null),this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}return e.prototype.dispose=function(){this._subscription.dispose(),this._data=void 0},e.prototype._update=function(e){for(var t=0,n=e;t<n.length;t++){var i=n[t],o=i.toString(),r=this._data[o];r&&this._substract(r);var s=this._resourceStats(i);this._add(s),this._data[o]=s}},e.prototype._resourceStats=function(e){var t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===i.Schemas.inMemory||e.scheme===i.Schemas.walkThrough||e.scheme===i.Schemas.walkThroughSnippet)return t;for(var n=0,o=this._service.read({resource:e});n<o.length;n++){var r=o[n].severity;r===s.default.Error?t.errors+=1:r===s.default.Warning?t.warnings+=1:r===s.default.Info?t.infos+=1:t.unknowns+=1}return t},e.prototype._substract=function(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns},e.prototype._add=function(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns},e}(),l=function(){function e(){this._onMarkerChanged=new r.Emitter,this._onMarkerChangedEvent=r.debounceEvent(this._onMarkerChanged.event,e._debouncer,0),this._byResource=Object.create(null),this._byOwner=Object.create(null),this._stats=new u(this)}return e.prototype.dispose=function(){this._stats.dispose()},Object.defineProperty(e.prototype,"onMarkerChanged",{get:function(){return this._onMarkerChangedEvent},enumerable:!0,configurable:!0}),e.prototype.getStatistics=function(){return this._stats},e.prototype.remove=function(e,t){if(!n.isFalsyOrEmpty(t))for(var i=0,o=t;i<o.length;i++){var r=o[i];this.changeOne(e,r,void 0)}},e.prototype.changeOne=function(t,i,o){if(n.isFalsyOrEmpty(o)){var r=a.remove(this._byResource,i.toString(),t),s=a.remove(this._byOwner,t,i.toString());if(r!==s)throw new Error("invalid marker service state");r&&s&&this._onMarkerChanged.fire([i])}else{for(var u=[],l=0,c=o;l<c.length;l++){var d=c[l],h=e._toMarker(t,i,d);h&&u.push(h)}a.set(this._byResource,i.toString(),t,u),a.set(this._byOwner,t,i.toString(),u),this._onMarkerChanged.fire([i])}},e._toMarker=function(e,t,n){var i=n.code,o=n.severity,r=n.message,s=n.source,a=n.startLineNumber,u=n.startColumn,l=n.endLineNumber,c=n.endColumn;if(r)return i=i||null,a=a>0?a:1,u=u>0?u:1,l=l>=a?l:a,c=c>0?c:u,{resource:t,owner:e,code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:u,endLineNumber:l,endColumn:c}},e.prototype.changeAll=function(t,i){var o=[],r=this._byOwner[t];if(r){delete this._byOwner[t];for(var s in r){var u=a.get(this._byResource,s,t)[0];u&&o.push(u.resource),a.remove(this._byResource,s,t)}}if(!n.isFalsyOrEmpty(i)){for(var l=Object.create(null),c=0,d=i;c<d.length;c++){var h=d[c],s=h.resource,p=h.marker,f=e._toMarker(t,s,p);if(f){var g=l[s.toString()];g?g.push(f):(l[s.toString()]=[f],o.push(s))}}for(var s in l)a.set(this._byResource,s,t,l[s]),a.set(this._byOwner,t,s,l[s])}o.length>0&&this._onMarkerChanged.fire(o)},e.prototype.read=function(e){void 0===e&&(e=Object.create(null));var t=e.owner,n=e.resource,i=e.take;if((!i||i<0)&&(i=-1),t&&n){var o=a.get(this._byResource,n.toString(),t);return o?o.slice(0,i>0?i:void 0):[]}if(t||n){var r=t?this._byOwner[t]:this._byResource[n.toString()];if(!r)return[];var o=[];for(var s in r)for(var u=0,l=r[s];u<l.length;u++){var c=l[u],d=o.push(c);if(i>0&&d===i)return o}return o}var o=[];for(var h in this._byResource)for(var p in this._byResource[h])for(var f=0,g=this._byResource[h][p];f<g.length;f++){var c=g[f],d=o.push(c);if(i>0&&d===i)return o}return o},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,o=n;i<o.length;i++){var r=o[i];void 0===e._dedupeMap[r.toString()]&&(e._dedupeMap[r.toString()]=!0,t.push(r))}return t},e}();t.MarkerService=l}),define(d[81],h([0,1,14]),function(e,t,n){"use strict";t.IMarkerService=n.createDecorator("markerService")}),define(d[52],h([0,1,324,6,30,14,49]),function(e,t,n,i,o,r,s){"use strict";t.CloseAction=new s.Action("close.message",n.localize(0,null),null,!0,function(){return i.TPromise.as(!0)}),t.LaterAction=new s.Action("later.message",n.localize(1,null),null,!0,function(){return i.TPromise.as(!0)}),t.CancelAction=new s.Action("cancel.message",n.localize(2,null),null,!0,function(){return i.TPromise.as(!0)}),t.IMessageService=r.createDecorator("messageService"),t.IChoiceService=r.createDecorator("choiceService"),t.Severity=o.default}),define(d[419],h([0,1,27,153,64,6,62,39,23]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(){function e(e,t){this._editorService=e,this._commandService=t}return e.prototype.open=function(e,t){var s,l=e.scheme,c=e.path,d=e.query,h=e.fragment;if(l===o.Schemas.http||l===o.Schemas.https)window.open(e.toString(!0));else if("command"===l&&u.CommandsRegistry.getCommand(c)){var p=[];try{p=i.parse(d),Array.isArray(p)||(p=[p])}catch(e){}s=(m=this._commandService).executeCommand.apply(m,[c].concat(p))}else{var f=void 0,g=/^L?(\d+)(?:,(\d+))?/.exec(h);if(g&&(f={startLineNumber:parseInt(g[1]),startColumn:g[2]?parseInt(g[2]):1},e=e.with({fragment:""})),!e.scheme)return r.TPromise.as(void 0);e.scheme===o.Schemas.file&&(e=n.default.file(a.normalize(e.fsPath))),s=this._editorService.openEditor({resource:e,options:{selection:f}},t&&t.openToSide)}return r.TPromise.as(s);var m},e}();l=y([C(0,s.IEditorService),C(1,u.ICommandService)],l),t.OpenerService=l}),define(d[66],h([0,1,6,14]),function(e,t,n,i){"use strict";t.IOpenerService=i.createDecorator("openerService"),t.NullOpenerService=Object.freeze({_serviceBrand:void 0,open:function(){return n.TPromise.as(void 0)}})}),define(d[421],h([0,1,154,155,11,104,66,27,10,139]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function e(e){this._editor=e,this._lineNumber=-1}return e.prototype.setLineNumber=function(e){this._lineNumber=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeSync=function(){for(var e=function(e){return e&&(!Array.isArray(e)||e.length>0)},t=function(e){return{value:e}},n=this._editor.getLineDecorations(this._lineNumber),i=[],o=0,r=n.length;o<r;o++){var s=n[o];if(s.options.glyphMarginClassName){var a=s.options.glyphMarginHoverMessage;e(a)&&(Array.isArray(a)?i=i.concat(a.map(t)):i.push(t(a)))}}return i},e.prototype.onResult=function(e,t){this._result=this._result.concat(e)},e.prototype.getResult=function(){return this._result},e.prototype.getResultWithLoadingMessage=function(){return this.getResult()},e}(),d=function(e){function t(i,o,r){var a=e.call(this,t.ID,i)||this;return a.openerService=o,a.modeService=r,a.openerService=o||s.NullOpenerService,a._lastLineNumber=-1,a._computer=new c(a._editor),a._hoverOperation=new n.HoverOperation(a._computer,function(e){return a._withResult(e)},null,function(e){return a._withResult(e)}),a}return m(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start())},t.prototype.startShowingAt=function(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start())},t.prototype.hide=function(){this._lastLineNumber=-1,this._hoverOperation.cancel(),e.prototype.hide.call(this)},t.prototype._withResult=function(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var n=this,i=document.createDocumentFragment();t.forEach(function(e){var t=r.renderMarkedString(e.value,{actionCallback:function(e){return n.openerService.open(a.default.parse(e)).then(void 0,u.onUnexpectedError)},codeBlockRenderer:function(e,t){var i=n.modeService.getModeIdForLanguageName(e);return n.modeService.getOrCreateMode(i).then(function(e){return'<div class="code">'+l.tokenizeToString(t,i)+"</div>"})}});i.appendChild(o.$("div.hover-row",null,t))}),this.updateContents(i),this.showAt(e)},t}(i.GlyphHoverWidget);d.ID="editor.contrib.modesGlyphHoverWidget",t.ModesGlyphHoverWidget=d}),define(d[33],h([0,1,22,55]),function(e,t,n,i){"use strict";var o=function(){function e(){this.data={}}return e.prototype.add=function(e,t){i.ok(n.isString(e)),i.ok(n.isObject(t)),i.ok(!this.data.hasOwnProperty(e),"There is already an extension with this id"),this.data[e]=t},e.prototype.knows=function(e){return this.data.hasOwnProperty(e)},e.prototype.as=function(e){return this.data[e]||null},e}();t.Registry=new o;var r=function(){function e(){this.toBeInstantiated=[],this.instances=[]}return e.prototype.setInstantiationService=function(e){for(this.instantiationService=e;this.toBeInstantiated.length>0;){var t=this.toBeInstantiated.shift();this.instantiate(t)}},e.prototype.instantiate=function(e){var t=this.instantiationService.createInstance(e);this.instances.push(t)},e.prototype._register=function(e){this.instantiationService?this.instantiate(e):this.toBeInstantiated.push(e)},e.prototype._getInstances=function(){return this.instances.slice(0)},e.prototype._setInstances=function(e){this.instances=e},e}();t.BaseRegistry=r}),define(d[29],h([0,1,33]),function(e,t,n){"use strict";function i(e){s.INSTANCE.registerEditorBrowserContribution(e)}t.editorContribution=i;var o;!function(e){function t(){return s.INSTANCE.getEditorBrowserContributions()}e.getEditorContributions=t}(o=t.EditorBrowserRegistry||(t.EditorBrowserRegistry={}));var r={EditorContributions:"editor.contributions"},s=function(){function e(){this.editorContributions=[]}return e.prototype.registerEditorBrowserContribution=function(e){this.editorContributions.push(e)},e.prototype.getEditorBrowserContributions=function(){return this.editorContributions.slice(0)},e}();s.INSTANCE=new s,n.Registry.add(r.EditorContributions,s.INSTANCE)}),define(d[113],h([0,1,278,12,33,38,16]),function(e,t,n,i,o,r,s){"use strict";t.Extensions={ModesRegistry:"editor.modesRegistry"};var a=function(){function e(){this._onDidAddLanguages=new i.Emitter,this.onDidAddLanguages=this._onDidAddLanguages.event,this._languages=[]}return e.prototype.registerLanguage=function(e){this._languages.push(e),this._onDidAddLanguages.fire([e])},e.prototype.registerLanguages=function(e){this._languages=this._languages.concat(e),this._onDidAddLanguages.fire(e)},e.prototype.getLanguages=function(){return this._languages.slice(0)},e}();t.EditorModesRegistry=a,t.ModesRegistry=new a,o.Registry.add(t.Extensions.ModesRegistry,t.ModesRegistry),t.PLAINTEXT_MODE_ID="plaintext",t.PLAINTEXT_LANGUAGE_IDENTIFIER=new s.LanguageIdentifier(t.PLAINTEXT_MODE_ID,1),t.ModesRegistry.registerLanguage({id:t.PLAINTEXT_MODE_ID,extensions:[".txt",".gitignore"],aliases:[n.localize(0,null),"text"],mimetypes:["text/plain"]}),r.LanguageConfigurationRegistry.register(t.PLAINTEXT_LANGUAGE_IDENTIFIER,{brackets:[["(",")"],["[","]"],["{","}"]]})}),define(d[150],h([0,1,279,9,33]),function(e,t,n,i,o){"use strict";function r(e,t){for(var n=100,i=e.getLineContent(t.lineNumber).substr(0,t.column-1),o=Math.max(0,i.length-n),r=i.length-1;r>=o;r--){var s=i.charAt(r);if(/\s/.test(s))return i.substr(r+1)}return 0===o?i:""}t.Extensions={Snippets:"base.contributions.snippets"};var s=function(){function e(){this._snippets=[]}return e.prototype.registerSnippets=function(e,t,n){void 0===n&&(n="");var i=this._snippets[e.id];i||(this._snippets[e.id]=i={}),i[n]=t},e.prototype.visitSnippets=function(e,t){var n=this._snippets[e];if(n)for(var i in n){var o=n[i].every(t);if(!o)return}},e.prototype.getSnippetCompletions=function(t,o){var s=t.getLanguageIdAtPosition(o.lineNumber,o.column);if(this._snippets[s]){var a=[],u=t.getWordAtPosition(o),l=u?u.word.substring(0,o.column-u.startColumn).toLowerCase():"",c=r(t,o).toLowerCase();this.visitSnippets(s,function(e){var t;if(0===l.length&&0===c.length)t=0;else{var o=e.prefix.toLowerCase();if(l.length>0&&i.startsWith(o,l))t=l.length;else{if(!(c.length>l.length&&i.startsWith(o,c)))return!0;t=c.length}}return a.push({type:"snippet",label:e.prefix,get disambiguateLabel(){return n.localize(0,null,e.prefix,e.name)},detail:e.owner,documentation:e.description,insertText:e.codeSnippet,noAutoAccept:!0,snippetType:"textmate",overwriteBefore:t}),!0});for(var d,h=0,p=a.sort(e._compareSuggestionsByLabel);h<p.length;h++){var f=p[h];d&&d.label===f.label&&(d.label=d.disambiguateLabel,f.label=f.disambiguateLabel),d=f}return a}},e._compareSuggestionsByLabel=function(e,t){return i.compare(e.label,t.label)},e}();t.getNonWhitespacePrefix=r;var a=new s;
o.Registry.add(t.Extensions.Snippets,a)}),define(d[426],h([0,1,283,64,12,30,6,81,3,2,127,18,56,42,113]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";function g(e){return e.toString()}var m=function(){function e(e,t){var n=this;this.model=e,this._markerDecorations=[],this._modelEventsListener=e.addBulkListener(function(e){return t(n,e)})}return e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventsListener.dispose(),this._modelEventsListener=null,this.model=null},e.prototype.getModelId=function(){return g(this.model.uri)},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e)},e}(),v=function(){function e(){}return e.setMarkers=function(e,t){var n=this,i=t.read({resource:e.model.uri,take:500}),o=i.map(function(t){return{range:n._createDecorationRange(e.model,t),options:n._createDecorationOption(t)}});e.acceptMarkerDecorations(o)},e._createDecorationRange=function(e,t){var n=e.validateRange(new u.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn)),i=new u.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn);if(i.isEmpty()){var o=e.getWordAtPosition(i.getStartPosition());if(o)i=new u.Range(i.startLineNumber,o.startColumn,i.endLineNumber,o.endColumn);else{var r=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===r||(i=i.endColumn>=r?new u.Range(i.startLineNumber,r-1,i.endLineNumber,r):new u.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){var s=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);s<i.endColumn&&(i=new u.Range(i.startLineNumber,s,i.endLineNumber,i.endColumn),t.startColumn=s)}return i},e._createDecorationOption=function(e){var t,i,o;switch(e.severity){case r.default.Ignore:break;case r.default.Warning:case r.default.Info:t=l.ClassName.EditorWarningDecoration,i="rgba(18,136,18,0.7)",o="rgba(18,136,18,0.7)";break;case r.default.Error:default:t=l.ClassName.EditorErrorDecoration,i="rgba(255,18,18,0.7)",o="rgba(255,18,18,0.7)"}var s=null,a=e.message,u=e.source;return"string"==typeof a&&(a=a.trim(),u&&(a=/\n/g.test(a)?n.localize(0,null,u,a):n.localize(1,null,u,a)),s=[{language:"_",value:a}]),{stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:t,hoverMessage:s,overviewRuler:{color:i,darkColor:o,position:l.OverviewRulerLane.Right}}},e}(),_=function(){function e(e,t){var n=this;this._modelCreationOptions={tabSize:p.DEFAULT_INDENTATION.tabSize,insertSpaces:p.DEFAULT_INDENTATION.insertSpaces,detectIndentation:p.DEFAULT_INDENTATION.detectIndentation,defaultEOL:d.isLinux||d.isMacintosh?l.DefaultEndOfLine.LF:l.DefaultEndOfLine.CRLF,trimAutoWhitespace:p.DEFAULT_TRIM_AUTO_WHITESPACE},this._markerService=e,this._configurationService=t,this._models={},this._onModelAdded=new o.Emitter,this._onModelRemoved=new o.Emitter,this._onModelModeChanged=new o.Emitter,this._markerService&&(this._markerServiceSubscription=this._markerService.onMarkerChanged(this._handleMarkerChange,this));var i=function(e){var t=p.DEFAULT_INDENTATION.tabSize;if(e.editor&&"undefined"!=typeof e.editor.tabSize){var i=parseInt(e.editor.tabSize,10);isNaN(i)||(t=i)}var o=p.DEFAULT_INDENTATION.insertSpaces;e.editor&&"undefined"!=typeof e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));var r=n._modelCreationOptions.defaultEOL,s=e.files&&e.files.eol;"\r\n"===s?r=l.DefaultEndOfLine.CRLF:"\n"===s&&(r=l.DefaultEndOfLine.LF);var a=n._modelCreationOptions.trimAutoWhitespace;e.editor&&"undefined"!=typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));var u=p.DEFAULT_INDENTATION.detectIndentation;e.editor&&"undefined"!=typeof e.editor.detectIndentation&&(u="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation)),n._setModelOptions({tabSize:t,insertSpaces:o,detectIndentation:u,defaultEOL:r,trimAutoWhitespace:a})};this._configurationServiceSubscription=this._configurationService.onDidUpdateConfiguration(function(e){i(e.config)}),i(this._configurationService.getConfiguration())}return e.prototype.getCreationOptions=function(){return this._modelCreationOptions},e.prototype._setModelOptions=function(e){if(this._modelCreationOptions.detectIndentation===e.detectIndentation&&this._modelCreationOptions.insertSpaces===e.insertSpaces&&this._modelCreationOptions.tabSize===e.tabSize&&this._modelCreationOptions.trimAutoWhitespace===e.trimAutoWhitespace)return void(this._modelCreationOptions=e);this._modelCreationOptions=e;for(var t=Object.keys(this._models),n=0,i=t.length;n<i;n++){var o=t[n],r=this._models[o];this._modelCreationOptions.detectIndentation?(r.model.detectIndentation(this._modelCreationOptions.insertSpaces,this._modelCreationOptions.tabSize),r.model.updateOptions({trimAutoWhitespace:this._modelCreationOptions.trimAutoWhitespace})):r.model.updateOptions({insertSpaces:this._modelCreationOptions.insertSpaces,tabSize:this._modelCreationOptions.tabSize,trimAutoWhitespace:this._modelCreationOptions.trimAutoWhitespace})}},e.prototype.dispose=function(){this._markerServiceSubscription&&this._markerServiceSubscription.dispose(),this._configurationServiceSubscription.dispose()},e.prototype._handleMarkerChange=function(e){var t=this;e.forEach(function(e){var n=g(e),i=t._models[n];i&&v.setMarkers(i,t._markerService)})},e.prototype._cleanUp=function(e){var t=this;e.uri.scheme!==i.Schemas.inMemory&&e.uri.scheme!==i.Schemas.internal&&e.uri.scheme!==i.Schemas.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(function(e){return e.owner}).forEach(function(n){return t._markerService.remove(n,[e.uri])})},e.prototype._createModelData=function(e,t,n){var i,o=this;i="string"==typeof e?c.Model.createFromString(e,this._modelCreationOptions,t,n):new c.Model(e,t,n);var r=g(i.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");var s=new m(i,function(e,t){return o._onModelEvents(e,t)});return this._models[r]=s,s},e.prototype.createModel=function(e,t,n){var i;return!t||s.TPromise.is(t)?(i=this._createModelData(e,f.PLAINTEXT_LANGUAGE_IDENTIFIER,n),this.setMode(i.model,t)):i=this._createModelData(e,t.getLanguageIdentifier(),n),this._markerService&&v.setMarkers(i,this._markerService),this._onModelAdded.fire(i.model),i.model},e.prototype.setMode=function(e,t){t&&(s.TPromise.is(t)?t.then(function(t){e.isDisposed()||e.setMode(t.getLanguageIdentifier())}):e.setMode(t.getLanguageIdentifier()))},e.prototype.destroyModel=function(e){var t=this._models[g(e)];t&&t.model.dispose()},e.prototype.getModels=function(){for(var e=[],t=Object.keys(this._models),n=0,i=t.length;n<i;n++){var o=t[n];e.push(this._models[o].model)}return e},e.prototype.getModel=function(e){var t=g(e),n=this._models[t];return n?n.model:null},Object.defineProperty(e.prototype,"onModelAdded",{get:function(){return this._onModelAdded?this._onModelAdded.event:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelRemoved",{get:function(){return this._onModelRemoved?this._onModelRemoved.event:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onModelModeChanged",{get:function(){return this._onModelModeChanged?this._onModelModeChanged.event:null},enumerable:!0,configurable:!0}),e.prototype._onModelDisposing=function(e){var t=g(e.uri),n=this._models[t];delete this._models[t],n.dispose(),this._cleanUp(e),this._onModelRemoved.fire(e)},e.prototype._onModelEvents=function(e,t){for(var n=0,i=t.length;n<i;n++){var o=t[n];if(o.getType()===l.EventType.ModelDispose)return void this._onModelDisposing(e.model)}for(var n=0,i=t.length;n<i;n++){var o=t[n];o.getType()===l.EventType.ModelLanguageChanged&&this._onModelModeChanged.fire({model:e.model,oldModeId:o.getData().oldLanguage})}},e}();_=y([C(0,a.IMarkerService),C(1,h.IConfigurationService)],_),t.ModelServiceImpl=_}),define(d[427],h([0,1,4,24,11,21,29,378]),function(e,t,n,i,o,r,s){"use strict";var a=l=function(){function e(e){var t=this;this.editor=e,this.toDispose=[],i.isIPad&&(this.toDispose.push(e.onDidChangeConfiguration(function(){return t.update()})),this.update())}return e.prototype.update=function(){var e=!!this.widget,t=!this.editor.getConfiguration().readOnly;!e&&t?this.widget=new u(this.editor):e&&!t&&(this.widget.dispose(),this.widget=null)},e.prototype.getId=function(){return l.ID},e.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose),this.widget&&(this.widget.dispose(),this.widget=null)},e}();a.ID="editor.contrib.iPadShowKeyboard",a=l=y([s.editorContribution],a),t.IPadShowKeyboard=a;var u=function(){function e(e){var t=this;this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._toDispose=[],this._toDispose.push(o.addDisposableListener(this._domNode,"touchstart",function(e){t.editor.focus()})),this._toDispose.push(o.addDisposableListener(this._domNode,"focus",function(e){t.editor.focus()})),this.editor.addOverlayWidget(this)}return e.prototype.dispose=function(){this.editor.removeOverlayWidget(this),this._toDispose=n.dispose(this._toDispose)},e.prototype.getId=function(){return e.ID},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return{preference:r.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER}},e}();u.ID="editor.contrib.ShowKeyboardWidget";var l}),define(d[428],h([0,1,4,29]),function(e,t,n,i){"use strict";var o=r=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._altListeningMouse=!1,n._altMouseTriggered=!1,n._register(n._editor.onMouseDown(function(e){n._altListeningMouse&&(n._altMouseTriggered=!0)})),n._register(n._editor.onKeyDown(function(e){e.equals(512)&&(n._altListeningMouse||(n._altMouseTriggered=!1),n._altListeningMouse=!0)})),n._register(n._editor.onKeyUp(function(e){e.equals(512)&&(n._altMouseTriggered&&e.preventDefault(),n._altListeningMouse=!1,n._altMouseTriggered=!1)})),n}return m(t,e),t.prototype.getId=function(){return r.ID},t}(n.Disposable);o.ID="editor.contrib.menuPreventer",o=r=y([i.editorContribution],o),t.MenuPreventer=o;var r}),define(d[151],h([0,1,33,25]),function(e,t,n,i){"use strict";function o(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}t.Extensions={JSONContribution:"base.contributions.json"};var r=function(){function e(){this.schemasById={},this.eventEmitter=new i.EventEmitter}return e.prototype.addRegistryChangedListener=function(e){return this.eventEmitter.addListener2("registryChanged",e)},e.prototype.registerSchema=function(e,t){this.schemasById[o(e)]=t,this.eventEmitter.emit("registryChanged",{})},e.prototype.getSchemaContributions=function(){return{schemas:this.schemasById}},e}(),s=new r;n.Registry.add(t.Extensions.JSONContribution,s)}),define(d[152],h([0,1,322,10,30,151,33]),function(e,t,n,i,o,r,s){"use strict";var a=Object.hasOwnProperty,u=s.Registry.as(r.Extensions.JSONContribution),l=function(){function e(e,t){this._messageHandler=e,this._source=t}return e.prototype._msg=function(e,t){this._messageHandler({type:e,message:t,source:this._source})},e.prototype.error=function(e){this._msg(o.default.Error,e)},e.prototype.warn=function(e){this._msg(o.default.Warning,e)},e.prototype.info=function(e){this._msg(o.default.Info,e)},e}();t.ExtensionMessageCollector=l;var c=function(){function e(e){this.name=e,this._handler=null,this._users=null,this._done=!1}return e.prototype.setHandler=function(e){if(null!==this._handler||this._done)throw new Error("Handler already set!");this._handler=e,this._handle()},e.prototype.acceptUsers=function(e){if(null!==this._users||this._done)throw new Error("Users already set!");this._users=e,this._handle()},e.prototype._handle=function(){if(null!==this._handler&&null!==this._users){this._done=!0;var e=this._handler;this._handler=null;var t=this._users;this._users=null;try{e(t)}catch(e){i.onUnexpectedError(e)}}},e}();t.ExtensionPoint=c;var d="vscode://schemas/vscode-extensions",h={properties:{engines:{type:"object",properties:{vscode:{type:"string",description:n.localize(0,null),default:"^0.10.0"}}},publisher:{description:n.localize(1,null),type:"string"},displayName:{description:n.localize(2,null),type:"string"},categories:{description:n.localize(3,null),type:"array",uniqueItems:!0,items:{type:"string",enum:["Languages","Snippets","Linters","Themes","Debuggers","Other","Keymaps","Formatters","Extension Packs"]}},galleryBanner:{type:"object",description:n.localize(4,null),properties:{color:{description:n.localize(5,null),type:"string"},theme:{description:n.localize(6,null),type:"string",enum:["dark","light"]}}},contributes:{description:n.localize(7,null),type:"object",properties:{},default:{}},preview:{type:"boolean",description:n.localize(8,null)},activationEvents:{description:n.localize(9,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onLanguage",body:"onLanguage:${1:languageId}"},{label:"onCommand",body:"onCommand:${2:commandId}"},{label:"onDebug",body:"onDebug:${3:type}"},{label:"workspaceContains",body:"workspaceContains:${4:fileName}"}]}},badges:{type:"array",description:n.localize(10,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:n.localize(11,null)},href:{type:"string",description:n.localize(12,null)},description:{type:"string",description:n.localize(13,null)}}}},extensionDependencies:{description:n.localize(14,null),type:"array",uniqueItems:!0,items:{type:"string"}},scripts:{type:"object",properties:{"vscode:prepublish":{description:n.localize(15,null),type:"string"}}},icon:{type:"string",description:n.localize(16,null)}}},p=function(){function e(){this._extensionPoints={}}return e.prototype.registerExtensionPoint=function(e,t,n){if(a.call(this._extensionPoints,e))throw new Error("Duplicate extension point: "+e);var i=new c(e);return this._extensionPoints[e]=i,h.properties.contributes.properties[e]=n,u.registerSchema(d,h),i},e.prototype.getExtensionPoints=function(){var e=this;return Object.keys(this._extensionPoints).map(function(t){return e._extensionPoints[t]})},e}();t.ExtensionsRegistryImpl=p;var f={ExtensionsRegistry:"ExtensionsRegistry"};s.Registry.add(f.ExtensionsRegistry,new p),t.ExtensionsRegistry=s.Registry.as(f.ExtensionsRegistry),u.registerSchema(d,h)}),define(d[114],h([0,1,321,12,33,35,22,152,151]),function(e,t,n,i,o,r,s,a,u){"use strict";function l(e){var t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}t.Extensions={Configuration:"base.contributions.configuration"};var c="vscode://schemas/settings",d=o.Registry.as(u.Extensions.JSONContribution),h=function(){function e(){this.overrideIdentifiers=[],this.configurationContributors=[],this.configurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown configuration setting"},this._onDidRegisterConfiguration=new i.Emitter,this.configurationProperties={},this.computeOverridePropertyPattern(),d.registerSchema(c,this.configurationSchema),this.registerOverrideSettingsConfiguration()}return Object.defineProperty(e.prototype,"onDidRegisterConfiguration",{get:function(){return this._onDidRegisterConfiguration.event},enumerable:!0,configurable:!0}),e.prototype.registerConfiguration=function(e){this.registerConfigurations([e])},e.prototype.registerConfigurations=function(e){var t=this;e.forEach(function(e){t.registerProperties(e),t.configurationContributors.push(e),t.registerJSONConfiguration(e),t.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidRegisterConfiguration.fire(this)},e.prototype.registerOverrideIdentifiers=function(e){(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey();var t},e.prototype.registerProperties=function(e,t){void 0===t&&(t=!1),t=e.overridable||t;var n=e.properties;if(n)for(var i in n){var o=n[i],r=o.default;s.isUndefined(r)&&(o.default=l(o.type)),t&&(o.overridable=!0),this.configurationProperties[i]=n[i]}var a=e.allOf;if(a)for(var u=0,c=a;u<c.length;u++){var d=c[u];this.registerProperties(d,t)}},e.prototype.getConfigurations=function(){return this.configurationContributors},e.prototype.getConfigurationProperties=function(){return this.configurationProperties},e.prototype.registerJSONConfiguration=function(e){function t(e){var i=e.properties;if(i)for(var o in i)n.properties[o]=i[o];var r=e.allOf;r&&r.forEach(t)}var n=this.configurationSchema;e.id===p?n.patternProperties[this.overridePropertyPattern]=r.clone(e.properties["[]"]):t(e),d.registerSchema(c,n)},e.prototype.updateSchemaForOverrideSettingsConfiguration=function(e){if(e.id!==p){var t=this.configurationSchema.patternProperties[this.overridePropertyPattern];t&&(t.properties||(t.properties={}),this.update(e,t),d.registerSchema(c,this.configurationSchema))}},e.prototype.updateOverridePropertyPatternKey=function(){var e=this.configurationSchema.patternProperties[this.overridePropertyPattern];e&&(delete this.configurationSchema.patternProperties[this.overridePropertyPattern],this.computeOverridePropertyPattern(),this.configurationSchema.patternProperties[this.overridePropertyPattern]=e,d.registerSchema(c,this.configurationSchema))},e.prototype.update=function(e,t){var n=this,i=e.properties;if(i)for(var o in i)i[o].overridable&&(t.properties[o]=this.getConfigurationProperties()[o]);var r=e.allOf;r&&r.forEach(function(e){return n.update(e,t)})},e.prototype.computeOverridePropertyPattern=function(){this.overridePropertyPattern=this.overrideIdentifiers.length?g.replace("${0}",this.overrideIdentifiers.join("|")):f},e.prototype.registerOverrideSettingsConfiguration=function(){var e={"[]":{type:"object",description:n.localize(0,null),additionalProperties:!1,errorMessage:"Unknown Identifier. Use language identifiers"}};this.registerConfiguration({id:p,type:"object",title:n.localize(1,null),properties:e})},e}(),p="override",f="\\[.*\\]$",g="\\[(${0})\\]$";t.OVERRIDE_PROPERTY_PATTERN=new RegExp(f);var m=new h;o.Registry.add(t.Extensions.Configuration,m);var v=a.ExtensionsRegistry.registerExtensionPoint("configuration",[],{description:n.localize(2,null),type:"object",defaultSnippets:[{body:{title:"",properties:{}}}],properties:{title:{description:n.localize(3,null),type:"string"},properties:{description:n.localize(4,null),type:"object",additionalProperties:{anyOf:[{$ref:"http://json-schema.org/draft-04/schema#"},{type:"object",properties:{isExecutable:{type:"boolean"}}}]}}}});v.setHandler(function(e){for(var t=[],i=0;i<e.length;i++){var o=e[i].value,s=e[i].collector;if(o.type&&"object"!==o.type?s.warn(n.localize(5,null)):o.type="object",o.title&&"string"!=typeof o.title&&s.error(n.localize(6,null)),o.properties&&"object"!=typeof o.properties)return void s.error(n.localize(7,null));var a=r.clone(o);a.id=e[i].description.id,t.push(a)}m.registerConfigurations(t)})}),define(d[115],h([0,1,272,12,4,35,18,114,33,42,2,369,40,109,108]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";function g(e){return"false"!==e&&Boolean(e)}function v(e,t){return"undefined"==typeof e?t:g(e)}function _(e,t){var n=parseFloat(e);return isNaN(n)&&(n=t),n}function y(e,t,n){void 0===t&&(t=-1073741824),void 0===n&&(n=1073741824);var i=parseInt(e,10);return isNaN(i)&&(i=0),i=Math.max(t,i),i=Math.min(n,i),0|i}function C(e){if(!Array.isArray(e))return[];var t=e,n=t.map(function(e){return y(e)});return n.sort(),n}function b(e){return"indent"===e?c.WrappingIndent.Indent:"same"===e?c.WrappingIndent.Same:c.WrappingIndent.None}function w(e){return"line"===e?c.TextEditorCursorStyle.Line:"block"===e?c.TextEditorCursorStyle.Block:"underline"===e?c.TextEditorCursorStyle.Underline:c.TextEditorCursorStyle.Line}function S(e){switch(e){case"blink":return c.TextEditorCursorBlinkingStyle.Blink;case"smooth":return c.TextEditorCursorBlinkingStyle.Smooth;case"phase":return c.TextEditorCursorBlinkingStyle.Phase;case"expand":return c.TextEditorCursorBlinkingStyle.Expand;case"visible":case"solid":return c.TextEditorCursorBlinkingStyle.Solid}return c.TextEditorCursorBlinkingStyle.Blink}function E(e,t){return"undefined"==typeof e?t:y(e)}t.TabFocus=new(function(){function e(){this._tabFocus=!1,this._onDidChangeTabFocus=new i.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}return e.prototype.getTabFocusMode=function(){return this._tabFocus},e.prototype.setTabFocusMode=function(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))},e}());var L=function(){function e(){}return e.getValue=function(){return this._value},e.setValue=function(e){this._value!==e&&(this._value=e,this._onChange.fire(this._value))},e}();L._value=!1,L._onChange=new i.Emitter,L.onChange=L._onChange.event,t.GlobalScreenReaderNVDA=L;var N=function(){function e(e){this._editor=r.clone(l.DefaultConfig.editor),this._mergeOptionsIn(e)}return e.prototype.getEditorOptions=function(){return this._editor},e.prototype._mergeOptionsIn=function(e){this._editor=r.mixin(this._editor,e||{})},e.prototype.updateOptions=function(e){this._mergeOptionsIn(e)},e}();t.ConfigurationWithDefaults=N;var T=function(){function e(){}return e.createInternalEditorOptions=function(e,n,i,o,r,s,a,u){var l,h=y(i.wrappingColumn,-1),p=g(i.wordWrap);l="undefined"!=typeof i.stopRenderingLineAfter?y(i.stopRenderingLineAfter,-1):h>=0?-1:1e4;var f,m=_(i.mouseWheelScrollSensitivity,1),v=this._sanitizeScrollbarOpts(i.scrollbar,m),E=g(i.glyphMargin),L=i.lineNumbers,N=y(i.lineNumbersMinChars,1);if("string"==typeof i.lineDecorationsWidth&&/^\d+(\.\d+)?ch$/.test(i.lineDecorationsWidth)){var T=parseFloat(i.lineDecorationsWidth.substr(0,i.lineDecorationsWidth.length-2));f=T*o.typicalHalfwidthCharacterWidth}else f=y(i.lineDecorationsWidth,0);i.folding&&(f+=16);var x,M,I;L===!0?L="on":L===!1&&(L="off"),"function"==typeof L?(x=!0,M=L,I=!1):"relative"===L?(x=!0,M=null,I=!0):"on"===L?(x=!0,M=null,I=!1):(x=!1,M=null,I=!1);var D=d.EditorLayoutProvider.compute({outerWidth:e,outerHeight:n,showGlyphMargin:E,lineHeight:o.lineHeight,showLineNumbers:x,lineNumbersMinChars:N,lineDecorationsWidth:f,maxDigitWidth:o.maxDigitWidth,maxLineNumber:a,verticalScrollbarWidth:v.verticalScrollbarSize,horizontalScrollbarHeight:v.horizontalScrollbarSize,scrollbarArrowSize:v.arrowSize,verticalScrollbarHasArrows:v.verticalHasArrows});s&&h>0&&(h=0);var R;R=0===h?{isViewportWrapping:!0,wrappingColumn:Math.max(1,Math.floor((D.contentWidth-D.verticalScrollbarWidth)/o.typicalHalfwidthCharacterWidth))}:h>0&&p===!0?{isViewportWrapping:!0,wrappingColumn:Math.min(h,Math.floor((D.contentWidth-D.verticalScrollbarWidth)/o.typicalHalfwidthCharacterWidth))}:h>0?{isViewportWrapping:!1,wrappingColumn:h}:{isViewportWrapping:!1,wrappingColumn:-1};var k=new c.EditorWrappingInfo({isViewportWrapping:R.isViewportWrapping,wrappingColumn:R.wrappingColumn,wrappingIndent:b(i.wrappingIndent),wordWrapBreakBeforeCharacters:String(i.wordWrapBreakBeforeCharacters),wordWrapBreakAfterCharacters:String(i.wordWrapBreakAfterCharacters),wordWrapBreakObtrusiveCharacters:String(i.wordWrapBreakObtrusiveCharacters)}),O=g(i.readOnly),P=t.TabFocus.getTabFocusMode();O&&(P=!0);var A=i.renderWhitespace;A===!0?A="boundary":A===!1&&(A="none");var W=i.renderLineHighlight;W===!0?W="line":W===!1&&(W="none");var F=new c.InternalEditorViewOptions({theme:i.theme,canUseTranslate3d:u,disableMonospaceOptimizations:g(i.disableMonospaceOptimizations),experimentalScreenReader:g(i.experimentalScreenReader),rulers:C(i.rulers),ariaLabel:String(i.ariaLabel),renderLineNumbers:x,renderCustomLineNumbers:M,renderRelativeLineNumbers:I,selectOnLineNumbers:g(i.selectOnLineNumbers),glyphMargin:E,revealHorizontalRightPadding:y(i.revealHorizontalRightPadding,0),roundedSelection:g(i.roundedSelection),overviewRulerLanes:y(i.overviewRulerLanes,0,3),cursorBlinking:S(i.cursorBlinking),mouseWheelZoom:g(i.mouseWheelZoom),cursorStyle:w(i.cursorStyle),hideCursorInOverviewRuler:g(i.hideCursorInOverviewRuler),scrollBeyondLastLine:g(i.scrollBeyondLastLine),editorClassName:r,stopRenderingLineAfter:l,renderWhitespace:A,renderControlCharacters:g(i.renderControlCharacters),renderIndentGuides:g(i.renderIndentGuides),renderLineHighlight:W,scrollbar:v,fixedOverflowWidgets:g(i.fixedOverflowWidgets)}),V=new c.EditorContribOptions({selectionClipboard:g(i.selectionClipboard),hover:g(i.hover),contextmenu:g(i.contextmenu),quickSuggestions:g(i.quickSuggestions),quickSuggestionsDelay:y(i.quickSuggestionsDelay),parameterHints:g(i.parameterHints),iconsInSuggestions:g(i.iconsInSuggestions),formatOnType:g(i.formatOnType),formatOnPaste:g(i.formatOnPaste),suggestOnTriggerCharacters:g(i.suggestOnTriggerCharacters),acceptSuggestionOnEnter:g(i.acceptSuggestionOnEnter),acceptSuggestionOnCommitCharacter:g(i.acceptSuggestionOnCommitCharacter),snippetSuggestions:i.snippetSuggestions,emptySelectionClipboard:i.emptySelectionClipboard,tabCompletion:i.tabCompletion,wordBasedSuggestions:i.wordBasedSuggestions,suggestFontSize:i.suggestFontSize,suggestLineHeight:i.suggestLineHeight,selectionHighlight:g(i.selectionHighlight),codeLens:i.referenceInfos&&i.codeLens,folding:g(i.folding)});return new c.InternalEditorOptions({lineHeight:o.lineHeight,readOnly:O,wordSeparators:String(i.wordSeparators),autoClosingBrackets:g(i.autoClosingBrackets),useTabStops:g(i.useTabStops),tabFocusMode:P,layoutInfo:D,fontInfo:o,viewInfo:F,wrappingInfo:k,contribInfo:V})},e._sanitizeScrollbarOpts=function(e,t){var n=function(e){switch(e){case"hidden":return h.ScrollbarVisibility.Hidden;case"visible":return h.ScrollbarVisibility.Visible;default:return h.ScrollbarVisibility.Auto}},i=E(e.horizontalScrollbarSize,10),o=E(e.verticalScrollbarSize,14);return new c.InternalEditorScrollbarOptions({vertical:n(e.vertical),horizontal:n(e.horizontal),arrowSize:E(e.arrowSize,11),useShadows:v(e.useShadows,!0),verticalHasArrows:v(e.verticalHasArrows,!1),horizontalHasArrows:v(e.horizontalHasArrows,!1),horizontalScrollbarSize:i,horizontalSliderSize:E(e.horizontalSliderSize,i),verticalScrollbarSize:o,verticalSliderSize:E(e.verticalSliderSize,o),handleMouseWheel:v(e.handleMouseWheel,!0),mouseWheelScrollSensitivity:t})},e}(),x=function(e){function n(n,o){void 0===o&&(o=null);var r=e.call(this)||this;return r._onDidChange=r._register(new i.Emitter),r.onDidChange=r._onDidChange.event,r._configWithDefaults=new N(n),r._elementSizeObserver=o,r._isDominatedByLongLines=!1,r._maxLineNumber=1,r.editor=r._computeInternalOptions(),r.editorClone=r.editor.clone(),r._register(f.EditorZoom.onDidChangeZoomLevel(function(e){return r._recomputeOptions()})),r._register(t.TabFocus.onDidChangeTabFocus(function(e){return r._recomputeOptions()})),r}return m(n,e),n.prototype.dispose=function(){e.prototype.dispose.call(this)},n.prototype._recomputeOptions=function(){this._setOptions(this._computeInternalOptions())},n.prototype._setOptions=function(e){if(!this.editor||!this.editor.equals(e)){var t=this.editor.createChangeEvent(e);this.editor=e,this.editorClone=this.editor.clone(),this._onDidChange.fire(t)}},n.prototype.getRawOptions=function(){return this._configWithDefaults.getEditorOptions()},n.prototype._computeInternalOptions=function(){var e=this._configWithDefaults.getEditorOptions(),t=this._getEditorClassName(e.theme,g(e.fontLigatures)),n=g(e.disableTranslate3d),i=this._getCanUseTranslate3d();n&&(i=!1);var o=p.BareFontInfo.createFromRawSettings(e);return T.createInternalEditorOptions(this.getOuterWidth(),this.getOuterHeight(),e,this.readConfiguration(o),t,this._isDominatedByLongLines,this._maxLineNumber,i)},n.prototype.updateOptions=function(e){this._configWithDefaults.updateOptions(e),this._recomputeOptions()},n.prototype.setIsDominatedByLongLines=function(e){this._isDominatedByLongLines=e,this._recomputeOptions()},n.prototype.setMaxLineNumber=function(e){this._maxLineNumber=e,this._recomputeOptions()},n}(o.Disposable);t.CommonEditorConfiguration=x;var M=u.Registry.as(a.Extensions.Configuration),I={id:"editor",order:5,type:"object",title:n.localize(0,null),overridable:!0,properties:{"editor.fontFamily":{type:"string",default:l.DefaultConfig.editor.fontFamily,description:n.localize(1,null)},"editor.fontWeight":{type:"string",enum:["normal","bold","100","200","300","400","500","600","700","800","900"],default:l.DefaultConfig.editor.fontWeight,description:n.localize(2,null)},"editor.fontSize":{type:"number",default:l.DefaultConfig.editor.fontSize,description:n.localize(3,null)},"editor.lineHeight":{type:"number",default:l.DefaultConfig.editor.lineHeight,description:n.localize(4,null)},"editor.lineNumbers":{type:"string",enum:["off","on","relative"],default:l.DefaultConfig.editor.lineNumbers,description:n.localize(5,null)},"editor.rulers":{type:"array",items:{type:"number"},default:l.DefaultConfig.editor.rulers,description:n.localize(6,null)},"editor.wordSeparators":{type:"string",default:l.DefaultConfig.editor.wordSeparators,description:n.localize(7,null)},"editor.tabSize":{type:"number",default:l.DEFAULT_INDENTATION.tabSize,minimum:1,description:n.localize(8,null),errorMessage:n.localize(9,null)},"editor.insertSpaces":{type:"boolean",default:l.DEFAULT_INDENTATION.insertSpaces,description:n.localize(10,null),errorMessage:n.localize(11,null)},"editor.detectIndentation":{type:"boolean",default:l.DEFAULT_INDENTATION.detectIndentation,description:n.localize(12,null)},"editor.roundedSelection":{type:"boolean",default:l.DefaultConfig.editor.roundedSelection,description:n.localize(13,null)},"editor.scrollBeyondLastLine":{type:"boolean",default:l.DefaultConfig.editor.scrollBeyondLastLine,description:n.localize(14,null)},"editor.wrappingColumn":{type:"integer",default:l.DefaultConfig.editor.wrappingColumn,minimum:-1,description:n.localize(15,null)},"editor.wordWrap":{type:"boolean",default:l.DefaultConfig.editor.wordWrap,description:n.localize(16,null)},"editor.wrappingIndent":{type:"string",enum:["none","same","indent"],default:l.DefaultConfig.editor.wrappingIndent,description:n.localize(17,null)},"editor.mouseWheelScrollSensitivity":{type:"number",default:l.DefaultConfig.editor.mouseWheelScrollSensitivity,description:n.localize(18,null)},"editor.quickSuggestions":{type:"boolean",default:l.DefaultConfig.editor.quickSuggestions,description:n.localize(19,null)},"editor.quickSuggestionsDelay":{type:"integer",default:l.DefaultConfig.editor.quickSuggestionsDelay,minimum:0,description:n.localize(20,null)},"editor.parameterHints":{type:"boolean",default:l.DefaultConfig.editor.parameterHints,description:n.localize(21,null)},"editor.autoClosingBrackets":{type:"boolean",default:l.DefaultConfig.editor.autoClosingBrackets,description:n.localize(22,null)},"editor.formatOnType":{type:"boolean",default:l.DefaultConfig.editor.formatOnType,description:n.localize(23,null)},"editor.formatOnPaste":{type:"boolean",default:l.DefaultConfig.editor.formatOnPaste,description:n.localize(24,null)},"editor.suggestOnTriggerCharacters":{type:"boolean",default:l.DefaultConfig.editor.suggestOnTriggerCharacters,description:n.localize(25,null)},"editor.acceptSuggestionOnEnter":{type:"boolean",default:l.DefaultConfig.editor.acceptSuggestionOnEnter,description:n.localize(26,null)},"editor.acceptSuggestionOnCommitCharacter":{type:"boolean",default:l.DefaultConfig.editor.acceptSuggestionOnCommitCharacter,description:n.localize(27,null)},"editor.snippetSuggestions":{type:"string",enum:["top","bottom","inline","none"],default:l.DefaultConfig.editor.snippetSuggestions,description:n.localize(28,null)},"editor.emptySelectionClipboard":{type:"boolean",default:l.DefaultConfig.editor.emptySelectionClipboard,description:n.localize(29,null)},"editor.wordBasedSuggestions":{type:"boolean",default:l.DefaultConfig.editor.wordBasedSuggestions,description:n.localize(30,null)},"editor.suggestFontSize":{type:"integer",default:0,minimum:0,description:n.localize(31,null)},"editor.suggestLineHeight":{
type:"integer",default:0,minimum:0,description:n.localize(32,null)},"editor.tabCompletion":{type:"boolean",default:l.DefaultConfig.editor.tabCompletion,description:n.localize(33,null)},"editor.selectionHighlight":{type:"boolean",default:l.DefaultConfig.editor.selectionHighlight,description:n.localize(34,null)},"editor.overviewRulerLanes":{type:"integer",default:3,description:n.localize(35,null)},"editor.cursorBlinking":{type:"string",enum:["blink","smooth","phase","expand","solid"],default:l.DefaultConfig.editor.cursorBlinking,description:n.localize(36,null)},"editor.mouseWheelZoom":{type:"boolean",default:l.DefaultConfig.editor.mouseWheelZoom,description:n.localize(37,null)},"editor.cursorStyle":{type:"string",enum:["block","line","underline"],default:l.DefaultConfig.editor.cursorStyle,description:n.localize(38,null)},"editor.fontLigatures":{type:"boolean",default:l.DefaultConfig.editor.fontLigatures,description:n.localize(39,null)},"editor.hideCursorInOverviewRuler":{type:"boolean",default:l.DefaultConfig.editor.hideCursorInOverviewRuler,description:n.localize(40,null)},"editor.renderWhitespace":{type:"string",enum:["none","boundary","all"],default:l.DefaultConfig.editor.renderWhitespace,description:n.localize(41,null)},"editor.renderControlCharacters":{type:"boolean",default:l.DefaultConfig.editor.renderControlCharacters,description:n.localize(42,null)},"editor.renderIndentGuides":{type:"boolean",default:l.DefaultConfig.editor.renderIndentGuides,description:n.localize(43,null)},"editor.renderLineHighlight":{type:"string",enum:["none","gutter","line","all"],default:l.DefaultConfig.editor.renderLineHighlight,description:n.localize(44,null)},"editor.codeLens":{type:"boolean",default:l.DefaultConfig.editor.codeLens,description:n.localize(45,null)},"editor.folding":{type:"boolean",default:l.DefaultConfig.editor.folding,description:n.localize(46,null)},"editor.glyphMargin":{type:"boolean",default:l.DefaultConfig.editor.glyphMargin,description:n.localize(47,null)},"editor.useTabStops":{type:"boolean",default:l.DefaultConfig.editor.useTabStops,description:n.localize(48,null)},"editor.trimAutoWhitespace":{type:"boolean",default:l.DEFAULT_TRIM_AUTO_WHITESPACE,description:n.localize(49,null)},"editor.stablePeek":{type:"boolean",default:!1,description:n.localize(50,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:n.localize(51,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:n.localize(52,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:n.localize(53,null)}}};s.isLinux&&(I.properties["editor.selectionClipboard"]={type:"boolean",default:l.DefaultConfig.editor.selectionClipboard,description:n.localize(54,null)}),M.registerConfiguration(I)}),define(d[58],h([0,1,12,4,18,24,115,109,431,430]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){return h.INSTANCE.readConfiguration(e)}var d=function(){function e(){this._keys=Object.create(null),this._values=Object.create(null)}return e.prototype._itemId=function(e){return r.getZoomLevel()+"-"+e.getId()},e.prototype.has=function(e){var t=this._itemId(e);return!!this._values[t]},e.prototype.get=function(e){var t=this._itemId(e);return this._values[t]},e.prototype.put=function(e,t){var n=this._itemId(e);this._keys[n]=e,this._values[n]=t},e.prototype.getKeys=function(){var e=this;return Object.keys(this._keys).map(function(t){return e._keys[t]})},e}();t.readFontInfo=c;var h=function(e){function t(){var t=e.call(this)||this;return t._changeMonitorTimeout=-1,t._onDidChange=t._register(new n.Emitter),t.onDidChange=t._onDidChange.event,t._cache=new d,t}return m(t,e),t.prototype.dispose=function(){this._changeMonitorTimeout!==-1&&(clearTimeout(this._changeMonitorTimeout),this._changeMonitorTimeout=-1),e.prototype.dispose.call(this)},t.prototype.readConfiguration=function(e){if(!this._cache.has(e)){var n=t._actualReadConfiguration(e);(n.typicalHalfwidthCharacterWidth<=2||n.typicalFullwidthCharacterWidth<=2||n.spaceWidth<=2||n.maxDigitWidth<=2)&&(n=new a.FontInfo({fontFamily:n.fontFamily,fontWeight:n.fontWeight,fontSize:n.fontSize,lineHeight:n.lineHeight,isMonospace:n.isMonospace,typicalHalfwidthCharacterWidth:Math.max(n.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(n.typicalFullwidthCharacterWidth,5),spaceWidth:Math.max(n.spaceWidth,5),maxDigitWidth:Math.max(n.maxDigitWidth,5)}),this._installChangeMonitor()),this._cache.put(e,n)}return this._cache.get(e)},t.prototype._installChangeMonitor=function(){var e=this;this._changeMonitorTimeout===-1&&(this._changeMonitorTimeout=setTimeout(function(){e._changeMonitorTimeout=-1,e._monitorForChanges()},500))},t.prototype._monitorForChanges=function(){for(var e=!1,n=this._cache.getKeys(),i=0;i<n.length;i++){var o=n[i],r=t._actualReadConfiguration(o);r.typicalHalfwidthCharacterWidth<=2||r.typicalFullwidthCharacterWidth<=2||r.maxDigitWidth<=2?e=!0:(this._cache.put(o,r),this._onDidChange.fire())}e&&this._installChangeMonitor()},t.createRequest=function(e,t,n,i){var o=new l.CharWidthRequest(e,t);return n.push(o),i&&i.push(o),o},t._actualReadConfiguration=function(e){var t=[],n=[],i=this.createRequest("n",0,t,n),o=this.createRequest("m",0,t,null),r=this.createRequest(" ",0,t,n),s=this.createRequest("0",0,t,n),u=this.createRequest("1",0,t,n),c=this.createRequest("2",0,t,n),d=this.createRequest("3",0,t,n),h=this.createRequest("4",0,t,n),p=this.createRequest("5",0,t,n),f=this.createRequest("6",0,t,n),g=this.createRequest("7",0,t,n),m=this.createRequest("8",0,t,n),v=this.createRequest("9",0,t,n);this.createRequest("→",0,t,n),this.createRequest("·",0,t,n),this.createRequest("|",0,t,n),this.createRequest("/",0,t,n),this.createRequest("-",0,t,n),this.createRequest("_",0,t,n),this.createRequest("i",0,t,n),this.createRequest("l",0,t,n),this.createRequest("m",0,t,n),this.createRequest("|",1,t,n),this.createRequest("_",1,t,n),this.createRequest("i",1,t,n),this.createRequest("l",1,t,n),this.createRequest("m",1,t,n),this.createRequest("n",1,t,n),this.createRequest("|",2,t,n),this.createRequest("_",2,t,n),this.createRequest("i",2,t,n),this.createRequest("l",2,t,n),this.createRequest("m",2,t,n),this.createRequest("n",2,t,n),l.readCharWidths(e,t);for(var _=Math.max(s.width,u.width,c.width,d.width,h.width,p.width,f.width,g.width,m.width,v.width),y=!0,C=n[0].width,b=1,w=n.length;b<w;b++){var S=C-n[b].width;if(S<-.001||S>.001){y=!1;break}}return new a.FontInfo({fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,isMonospace:y,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width,spaceWidth:r.width,maxDigitWidth:_})},t}(i.Disposable);h.INSTANCE=new h;var p=function(e){function t(t,n){void 0===n&&(n=null);var i=e.call(this,t,new u.ElementSizeObserver(n,function(){return i._onReferenceDomElementSizeChanged()}))||this;return i._register(h.INSTANCE.onDidChange(function(){return function(){return i._onCSSBasedConfigurationChanged()}})),i._configWithDefaults.getEditorOptions().automaticLayout&&i._elementSizeObserver.startObserving(),i._register(r.onDidChangeZoomLevel(function(e){return i._recomputeOptions()})),i}return m(t,e),t.applyFontInfoSlow=function(e,t){e.style.fontFamily=t.fontFamily,e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.lineHeight=t.lineHeight+"px"},t.applyFontInfo=function(e,t){e.setFontFamily(t.fontFamily),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setLineHeight(t.lineHeight)},t.prototype._onReferenceDomElementSizeChanged=function(){this._recomputeOptions()},t.prototype._onCSSBasedConfigurationChanged=function(){this._recomputeOptions()},t.prototype.observeReferenceElement=function(e){this._elementSizeObserver.observe(e)},t.prototype.dispose=function(){this._elementSizeObserver.dispose(),e.prototype.dispose.call(this)},t.prototype._getEditorClassName=function(e,t){var n="";return r.isIE?n+="ie ":r.isFirefox?n+="ff ":r.isEdge&&(n+="edge "),o.isMacintosh&&(n+="mac "),t&&(n+="enable-ligatures "),"monaco-editor "+n+e},t.prototype.getOuterWidth=function(){return this._elementSizeObserver.getWidth()},t.prototype.getOuterHeight=function(){return this._elementSizeObserver.getHeight()},t.prototype._getCanUseTranslate3d=function(){return r.canUseTranslate3d&&0===r.getZoomLevel()},t.prototype.readConfiguration=function(e){return h.INSTANCE.readConfiguration(e)},t}(s.CommonEditorConfiguration);t.Configuration=p}),define(d[434],h([0,1,4,24,11,28,115,344,162,3,2,51,58,432]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=function(e){function t(t,n,u){var d=e.call(this)||this;return d._lastCursorSelectionChanged=null,d._context=t,d.viewController=n,d.textArea=new p.TextAreaWrapper(u.textArea),h.Configuration.applyFontInfoSlow(d.textArea.actual,d._context.configuration.editor.fontInfo),d.viewHelper=u,d.contentLeft=0,d.contentWidth=0,d.scrollLeft=0,d.textAreaHandler=new a.TextAreaHandler(i,d._getStrategy(),d.textArea,d._context.model,function(){return d.viewHelper.flushAnyAccumulatedEvents()}),d._toDispose=[],d._toDispose.push(d.textAreaHandler.onKeyDown(function(e){return d.viewController.emitKeyDown(e._actual)})),d._toDispose.push(d.textAreaHandler.onKeyUp(function(e){return d.viewController.emitKeyUp(e._actual)})),d._toDispose.push(d.textAreaHandler.onPaste(function(e){return d.viewController.paste("keyboard",e.text,e.pasteOnNewLine)})),d._toDispose.push(d.textAreaHandler.onCut(function(e){return d.viewController.cut("keyboard")})),d._toDispose.push(d.textAreaHandler.onType(function(e){e.replaceCharCnt?d.viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):d.viewController.type("keyboard",e.text)})),d._toDispose.push(d.textAreaHandler.onCompositionStart(function(e){var t=e.showAtLineNumber,n=e.showAtColumn,i={range:new l.Range(t,n,t,n),verticalType:0,revealHorizontal:!0,revealCursor:!1};d._context.privateViewEventBus.emit(c.ViewEventNames.RevealRangeEvent,i),d.visibleRange=d.viewHelper.visibleRangeForPositionRelativeToEditor(t,n),d.visibleRange&&(r.StyleMutator.setTop(d.textArea.actual,d.visibleRange.top),r.StyleMutator.setLeft(d.textArea.actual,d.contentLeft+d.visibleRange.left-d.scrollLeft)),r.StyleMutator.setHeight(d.textArea.actual,d._context.configuration.editor.lineHeight),o.addClass(d.viewHelper.viewDomNode,"ime-input"),d.viewController.compositionStart("keyboard")})),d._toDispose.push(d.textAreaHandler.onCompositionUpdate(function(e){if(i.isEdgeOrIE)r.StyleMutator.setWidth(d.textArea.actual,0);else{var t=document.createElement("canvas"),n=t.getContext("2d"),s=o.getComputedStyle(d.textArea.actual);if(i.isFirefox){n.font=s.fontStyle+" "+s.fontVariant+" "+s.fontWeight+" "+s.fontStretch+" "+s.fontSize+" / "+s.lineHeight+" "+s.fontFamily;var a=n.measureText(e.data);r.StyleMutator.setWidth(d.textArea.actual,a.width+2)}else{n.font=s.font;var a=n.measureText(e.data);r.StyleMutator.setWidth(d.textArea.actual,a.width)}}})),d._toDispose.push(d.textAreaHandler.onCompositionEnd(function(e){d.textArea.actual.style.height="",d.textArea.actual.style.width="",r.StyleMutator.setLeft(d.textArea.actual,0),r.StyleMutator.setTop(d.textArea.actual,0),o.removeClass(d.viewHelper.viewDomNode,"ime-input"),d.visibleRange=null,d.viewController.compositionEnd("keyboard")})),d._toDispose.push(s.GlobalScreenReaderNVDA.onChange(function(e){d.textAreaHandler.setStrategy(d._getStrategy())})),d._context.addEventHandler(d),d}return m(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this.textAreaHandler.dispose(),this.textArea.dispose(),this._toDispose=n.dispose(this._toDispose)},t.prototype._getStrategy=function(){return s.GlobalScreenReaderNVDA.getValue()?u.TextAreaStrategy.NVDA:this._context.configuration.editor.viewInfo.experimentalScreenReader?u.TextAreaStrategy.NVDA:u.TextAreaStrategy.IENarrator},t.prototype.focusTextArea=function(){this.textAreaHandler.focusTextArea()},t.prototype.onConfigurationChanged=function(e){return e.fontInfo&&h.Configuration.applyFontInfoSlow(this.textArea.actual,this._context.configuration.editor.fontInfo),e.viewInfo.experimentalScreenReader&&this.textAreaHandler.setStrategy(this._getStrategy()),!1},t.prototype.onScrollChanged=function(e){return this.scrollLeft=e.scrollLeft,this.visibleRange&&(r.StyleMutator.setTop(this.textArea.actual,this.visibleRange.top),r.StyleMutator.setLeft(this.textArea.actual,this.contentLeft+this.visibleRange.left-this.scrollLeft)),!1},t.prototype.onViewFocusChanged=function(e){return this.textAreaHandler.setHasFocus(e),!1},t.prototype.onCursorSelectionChanged=function(e){return this._lastCursorSelectionChanged=e,!1},t.prototype.onLayoutChanged=function(e){return this.contentLeft=e.contentLeft,this.contentWidth=e.contentWidth,!1},t.prototype.writeToTextArea=function(){if(this._lastCursorSelectionChanged){var e=this._lastCursorSelectionChanged;this._lastCursorSelectionChanged=null,this.textAreaHandler.setCursorSelections(e.selection,e.secondarySelections)}},t}(d.ViewEventHandler);t.KeyboardHandler=f}),define(d[435],h([0,1,28,21,136,58]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(t,n){var i=e.call(this,t)||this;return i._dynamicOverlays=[],i._isFocused=!1,i._layoutProvider=n,i.domNode.setClassName("view-overlays"),i}return m(t,e),t.prototype.shouldRender=function(){if(e.prototype.shouldRender.call(this))return!0;for(var t=0,n=this._dynamicOverlays.length;t<n;t++){var i=this._dynamicOverlays[t];if(i.shouldRender())return!0}return!1},t.prototype.dispose=function(){e.prototype.dispose.call(this),this._layoutProvider=null;for(var t=0,n=this._dynamicOverlays.length;t<n;t++){var i=this._dynamicOverlays[t];i.dispose()}this._dynamicOverlays=null},t.prototype.getDomNode=function(){return this.domNode.domNode},t.prototype.addDynamicOverlay=function(e){this._dynamicOverlays.push(e)},t.prototype.onViewFocusChanged=function(e){return this._isFocused=e,!0},t.prototype._createLine=function(){return new a(this._context,this._dynamicOverlays)},t.prototype.prepareRender=function(e){for(var t=this._dynamicOverlays.filter(function(e){return e.shouldRender()}),n=0,i=t.length;n<i;n++){var o=t[n];o.prepareRender(e),o.onDidRender()}return null},t.prototype.render=function(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)},t.prototype._viewOverlaysRender=function(t){e.prototype._renderLines.call(this,t.linesViewportData)},t}(o.ViewLayer);t.ViewOverlays=s;var a=function(){function e(e,t){this._context=e,this._lineHeight=this._context.configuration.editor.lineHeight,this._dynamicOverlays=t,this._domNode=null,this._renderPieces=null}return e.prototype.getDomNode=function(){return this._domNode?this._domNode.domNode:null},e.prototype.setDomNode=function(e){this._domNode=n.createFastDomNode(e)},e.prototype.onContentChanged=function(){},e.prototype.onTokensChanged=function(){},e.prototype.onConfigurationChanged=function(e){e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight)},e.prototype.shouldUpdateHTML=function(e,t,n){for(var i="",o=0,r=this._dynamicOverlays.length;o<r;o++){var s=this._dynamicOverlays[o];i+=s.render(e,t)}var a=this._renderPieces===i;return a||(this._renderPieces=i),!a},e.prototype.getLineOuterHTML=function(e,t,n){e.push('<div lineNumber="'+t+'" style="position:absolute;top:'+n+"px;width:100%;height:"+this._lineHeight+'px;">'),e.push(this.getLineInnerHTML(t)),e.push("</div>")},e.prototype.getLineInnerHTML=function(e){return this._renderPieces},e.prototype.layoutLine=function(e,t){this._domNode.setLineNumber(String(e)),this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight)},e}();t.ViewOverlayLine=a;var u=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i._scrollWidth=i._layoutProvider.getScrollWidth(),i._contentWidth=i._context.configuration.editor.layoutInfo.contentWidth,i.domNode.setWidth(i._scrollWidth),i.domNode.setHeight(0),i}return m(t,e),t.prototype.onConfigurationChanged=function(t){return t.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),e.prototype.onConfigurationChanged.call(this,t)},t.prototype.onScrollChanged=function(t){return this._scrollWidth=t.scrollWidth,e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(this._scrollWidth,this._contentWidth))},t}(s);t.ContentViewOverlays=u;var l=function(e){function t(t,n){var o=e.call(this,t,n)||this;return o._contentLeft=t.configuration.editor.layoutInfo.contentLeft,o._canUseTranslate3d=t.configuration.editor.viewInfo.canUseTranslate3d,o.domNode.setClassName(i.ClassNames.MARGIN_VIEW_OVERLAYS),o.domNode.setWidth(1),r.Configuration.applyFontInfo(o.domNode,o._context.configuration.editor.fontInfo),o}return m(t,e),t.prototype.onScrollChanged=function(t){return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype.onLayoutChanged=function(t){return this._contentLeft=t.contentLeft,e.prototype.onLayoutChanged.call(this,t)||!0},t.prototype.onConfigurationChanged=function(t){return t.fontInfo&&r.Configuration.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),t.viewInfo.canUseTranslate3d&&(this._canUseTranslate3d=this._context.configuration.editor.viewInfo.canUseTranslate3d),e.prototype.onConfigurationChanged.call(this,t)},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(this._layoutProvider.getTotalHeight(),1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(s);t.MarginViewOverlays=l}),define(d[436],h([0,1,17,28,3,15,2,21,136,209,58,85,32,337]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=function(){function e(){this._currentVisibleRange=new o.Range(1,1,1,1),this._bigNumbersDelta=0}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange},e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e.prototype.getBigNumbersDelta=function(){return this._bigNumbersDelta},e.prototype.setBigNumbersDelta=function(e){this._bigNumbersDelta=e},e}(),f=function(e){function t(t,i){var o=e.call(this,t)||this;return o._lineHeight=o._context.configuration.editor.lineHeight,o._isViewportWrapping=o._context.configuration.editor.wrappingInfo.isViewportWrapping,o._revealHorizontalRightPadding=o._context.configuration.editor.viewInfo.revealHorizontalRightPadding,o._canUseTranslate3d=t.configuration.editor.viewInfo.canUseTranslate3d,o._layoutProvider=i,h.PartFingerprints.write(o.domNode.domNode,7),o.domNode.setClassName(a.ClassNames.VIEW_LINES),c.Configuration.applyFontInfo(o.domNode,o._context.configuration.editor.fontInfo),o._maxLineWidth=0,o._asyncUpdateLineWidths=new n.RunOnceScheduler(function(){o._updateLineWidths()},200),o._lastRenderedData=new p,o._lastCursorRevealRangeHorizontallyEvent=null,o._textRangeRestingSpot=document.createElement("div"),o._textRangeRestingSpot.className="textRangeRestingSpot",o}return m(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),this._layoutProvider=null,e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode.domNode},t.prototype.onConfigurationChanged=function(t){var n=e.prototype.onConfigurationChanged.call(this,t);return t.wrappingInfo&&(this._maxLineWidth=0),t.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),t.wrappingInfo&&(this._isViewportWrapping=this._context.configuration.editor.wrappingInfo.isViewportWrapping),t.viewInfo.revealHorizontalRightPadding&&(this._revealHorizontalRightPadding=this._context.configuration.editor.viewInfo.revealHorizontalRightPadding),t.viewInfo.canUseTranslate3d&&(this._canUseTranslate3d=this._context.configuration.editor.viewInfo.canUseTranslate3d),t.fontInfo&&c.Configuration.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n},t.prototype.onLayoutChanged=function(t){var n=e.prototype.onLayoutChanged.call(this,t);return this._maxLineWidth=0,n},t.prototype.onModelFlushed=function(){var t=e.prototype.onModelFlushed.call(this);return this._maxLineWidth=0,t},t.prototype.onModelDecorationsChanged=function(t){for(var n=e.prototype.onModelDecorationsChanged.call(this,t),i=this._linesCollection.getStartLineNumber(),o=this._linesCollection.getEndLineNumber(),r=i;r<=o;r++)this._linesCollection.getLine(r).onModelDecorationsChanged();return n||!0},t.prototype.onCursorRevealRange=function(e){var t=this._computeScrollTopToRevealRange(this._layoutProvider.getCurrentViewport(),e.range,e.verticalType);return e.revealHorizontal&&(this._lastCursorRevealRangeHorizontallyEvent=e),this._layoutProvider.setScrollPosition({scrollTop:t}),!0},t.prototype.onCursorScrollRequest=function(e){var t=this._layoutProvider.getScrollTop(),n=t+e.deltaLines*this._lineHeight;return this._layoutProvider.setScrollPosition({scrollTop:n}),!0},t.prototype.onScrollChanged=function(t){return this.domNode.setWidth(t.scrollWidth),e.prototype.onScrollChanged.call(this,t)||!0},t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getLineNumberFromDOMInfo(e);if(n===-1)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new r.Position(n,1);var i=this._linesCollection.getStartLineNumber(),o=this._linesCollection.getEndLineNumber();if(n<i||n>o)return null;var s=this._linesCollection.getLine(n).getColumnOfNodeOffset(n,e,t),a=this._context.model.getLineMinColumn(n);return s<a&&(s=a),new r.Position(n,s)},t.prototype._getLineNumberFromDOMInfo=function(e){for(;e&&1===e.nodeType;){if(e.className===a.ClassNames.VIEW_LINE)return parseInt(e.getAttribute("lineNumber"),10);e=e.parentElement}return-1},t.prototype.getLineWidth=function(e){var t=this._linesCollection.getStartLineNumber(),n=this._linesCollection.getEndLineNumber();return e<t||e>n?-1:this._linesCollection.getLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,n){if(this.shouldRender())return null;var i=e.endLineNumber;if(e=o.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange()),!e)return null;var r,s=[],a=new l.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);n&&(r=this._context.model.convertViewPositionToModelPosition(e.startLineNumber,1).lineNumber);for(var u=this._linesCollection.getStartLineNumber(),c=this._linesCollection.getEndLineNumber(),h=e.startLineNumber;h<=e.endLineNumber;h++)if(!(h<u||h>c)){var p=h===e.startLineNumber?e.startColumn:1,f=h===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(h),g=this._linesCollection.getLine(h).getVisibleRangesForRange(p,f,a);if(g&&0!==g.length){if(n&&h<i){var m=r;r=this._context.model.convertViewPositionToModelPosition(h+1,1).lineNumber,m!==r&&(g[g.length-1].width+=t.LINE_FEED_WIDTH)}s.push(new d.LineVisibleRanges(h,g))}}return 0===s.length?null:s},t.prototype.visibleRangesForRange2=function(e,t){if(this.shouldRender())return null;if(e=o.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange()),!e)return null;for(var n=[],i=new l.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),r=this._lastRenderedData.getBigNumbersDelta(),s=this._linesCollection.getStartLineNumber(),a=this._linesCollection.getEndLineNumber(),u=e.startLineNumber;u<=e.endLineNumber;u++)if(!(u<s||u>a)){var c=u===e.startLineNumber?e.startColumn:1,h=u===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(u),p=this._linesCollection.getLine(u).getVisibleRangesForRange(c,h,i);if(p&&0!==p.length)for(var f=this._layoutProvider.getVerticalOffsetForLineNumber(u)-r+t,g=0,m=p.length;g<m;g++)n.push(new d.VisibleRange(f,p[g].left,p[g].width))}return 0===n.length?null:n},t.prototype._createLine=function(){return new l.ViewLine(this._context)},t.prototype._updateLineWidths=function(){for(var e=this._linesCollection.getStartLineNumber(),t=this._linesCollection.getEndLineNumber(),n=1,i=e;i<=t;i++){var o=this._linesCollection.getLine(i).getWidth();n=Math.max(n,o)}this._ensureMaxLineWidth(n)},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(t,n){if(!this.shouldRender())throw new Error("I did not ask to render!");if(e.prototype._renderLines.call(this,t),this._lastRenderedData.setBigNumbersDelta(t.bigNumbersDelta),this._lastRenderedData.setCurrentVisibleRange(t.visibleRange),this.domNode.setWidth(this._layoutProvider.getScrollWidth()),this.domNode.setHeight(Math.min(this._layoutProvider.getTotalHeight(),1e6)),n(),this._lastCursorRevealRangeHorizontallyEvent){var o=this._lastCursorRevealRangeHorizontallyEvent.range;this._lastCursorRevealRangeHorizontallyEvent=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(o),s=this._isViewportWrapping;s||this._ensureMaxLineWidth(r.maxHorizontalOffset),this._layoutProvider.setScrollPosition({scrollLeft:r.scrollLeft})}if(this._canUseTranslate3d){var a="translate3d("+-this._layoutProvider.getScrollLeft()+"px, "+t.visibleRangesDeltaTop+"px, 0px)";i.StyleMutator.setTransform(this.domNode.domNode.parentNode,a),i.StyleMutator.setTop(this.domNode.domNode.parentNode,0),i.StyleMutator.setLeft(this.domNode.domNode.parentNode,0)}else i.StyleMutator.setTransform(this.domNode.domNode.parentNode,""),i.StyleMutator.setTop(this.domNode.domNode.parentNode,t.visibleRangesDeltaTop),i.StyleMutator.setLeft(this.domNode.domNode.parentNode,-this._layoutProvider.getScrollLeft());this._asyncUpdateLineWidths.schedule()},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._layoutProvider.onMaxLineWidthChanged(this._maxLineWidth))},t.prototype._computeScrollTopToRevealRange=function(e,t,n){var i,o,r=e.top,s=e.height,a=r+s;i=this._layoutProvider.getVerticalOffsetForLineNumber(t.startLineNumber),o=this._layoutProvider.getVerticalOffsetForLineNumber(t.endLineNumber)+this._layoutProvider.heightInPxForLine(t.endLineNumber),0!==n&&4!==n||(o+=this._lineHeight);var u;if(1===n||2===n)if(2===n&&r<=i&&o<=a)u=r;else{var l=(i+o)/2;u=Math.max(0,l-s/2)}else u=this._computeMinimumScrolling(r,a,i,o,3===n,4===n);return u},t.prototype._computeScrollLeftToRevealRange=function(e){var n=0;if(e.startLineNumber!==e.endLineNumber)return{scrollLeft:0,maxHorizontalOffset:n};var i=this._layoutProvider.getCurrentViewport(),o=i.left,r=o+i.width,s=this.visibleRangesForRange2(e,0),a=Number.MAX_VALUE,u=0;if(!s)return{scrollLeft:o,maxHorizontalOffset:n};for(var l=0;l<s.length;l++){var c=s[l];c.left<a&&(a=c.left),c.left+c.width>u&&(u=c.left+c.width)}n=u,a=Math.max(0,a-t.HORIZONTAL_EXTRA_PX),u+=this._revealHorizontalRightPadding;var d=this._computeMinimumScrolling(o,r,a,u);return{scrollLeft:d,maxHorizontalOffset:n}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){e|=0,t|=0,n|=0,i|=0,o=!!o,r=!!r;var s=t-e,a=i-n;return a<s?o?n:r?Math.max(0,i-s):n<e?n:i>t?Math.max(0,i-s):e:n},t}(u.ViewLayer);f.LINE_FEED_WIDTH=10,f.HORIZONTAL_EXTRA_PX=30,t.ViewLines=f}),define(d[437],h([0,1,28,15,3,2,58]),function(e,t,n,i,o,r,s){"use strict";var a=function(){function e(e,t,n,i){this.top=e,this.left=t,this.width=n,this.textContent=i}return e}();t.ViewCursorRenderData=a;var u=function(){function e(e,t){this._context=e,this._isSecondary=t,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._isVisible=!0,this._domNode=n.createFastDomNode(document.createElement("div")),this._isSecondary?this._domNode.setClassName("cursor secondary"):this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new i.Position(1,1)),this._isInEditableRange=!0,this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode.domNode},e.prototype.getIsInEditableRange=function(){return this._isInEditableRange},e.prototype.getPosition=function(){return this._position},e.prototype.show=function(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)},e.prototype.hide=function(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)},e.prototype.onModelFlushed=function(){return this.updatePosition(new i.Position(1,1)),this._isInEditableRange=!0,!0},e.prototype.onCursorPositionChanged=function(e,t){return this.updatePosition(e),this._isInEditableRange=t,!0},e.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo.cursorStyle&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),e.fontInfo&&(s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},e.prototype._prepareRender=function(e){if(this._cursorStyle===r.TextEditorCursorStyle.Line){var t=e.visibleRangeForPosition(this._position);if(!t)return null;var n=this._isSecondary?1:2;return new a(t.top,t.left,n,"")}var i=e.linesVisibleRangesForRange(new o.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!i||0===i.length||0===i[0].ranges.length)return null;var s=i[0].ranges[0],u=e.getViewportVerticalOffsetForLineNumber(this._position.lineNumber),l=s.width<1?this._typicalHalfwidthCharacterWidth:s.width,c="";if(this._cursorStyle===r.TextEditorCursorStyle.Block){var d=this._context.model.getLineContent(this._position.lineNumber);c=d.charAt(this._position.column-1)}return new a(u,s.left,l,c)},e.prototype.prepareRender=function(e){this._renderData=this._prepareRender(e)},e.prototype.render=function(e){if(!this._renderData)return this._domNode.setDisplay("none"),null;this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent);var t=this._renderData.top+e.viewportTop-e.bigNumbersDelta;return this._domNode.setDisplay("block"),this._domNode.setTop(t),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._lineHeight),this._domNode.setHeight(this._lineHeight),{position:this._position,contentTop:t,contentLeft:this._renderData.left,height:this._lineHeight,width:2}},e.prototype.updatePosition=function(e){this._position=e,this._domNode.domNode.setAttribute("lineNumber",this._position.lineNumber.toString()),this._domNode.domNode.setAttribute("column",this._position.column.toString())},e}();t.ViewCursor=u}),define(d[438],h([0,1,2,21,32,437,28,17,351]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(e){function t(t){var n=e.call(this,t)||this;return n._readOnly=n._context.configuration.editor.readOnly,n._cursorBlinking=n._context.configuration.editor.viewInfo.cursorBlinking,n._cursorStyle=n._context.configuration.editor.viewInfo.cursorStyle,n._selectionIsEmpty=!0,n._primaryCursor=new r.ViewCursor(n._context,!1),n._secondaryCursors=[],n._renderData=[],n._domNode=s.createFastDomNode(document.createElement("div")),n._updateDomClassName(),n._domNode.domNode.appendChild(n._primaryCursor.getDomNode()),n._startCursorBlinkAnimation=new a.TimeoutTimer,n._blinkingEnabled=!1,n._editorHasFocus=!1,n._updateBlinking(),n}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._startCursorBlinkAnimation.dispose()},t.prototype.getDomNode=function(){return this._domNode.domNode},t.prototype.onModelFlushed=function(){this._primaryCursor.onModelFlushed();for(var e=0,t=this._secondaryCursors.length;e<t;e++){
var n=this._secondaryCursors[e].getDomNode();n.parentNode.removeChild(n)}return this._secondaryCursors=[],!0},t.prototype.onModelDecorationsChanged=function(e){return!0},t.prototype.onModelLinesDeleted=function(e){return!0},t.prototype.onModelLineChanged=function(e){return!0},t.prototype.onModelLinesInserted=function(e){return!0},t.prototype.onModelTokensChanged=function(e){var t=function(t){for(var n=0,i=e.ranges.length;n<i;n++)if(e.ranges[n].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(var n=0;n<this._secondaryCursors.length;n++)if(t(this._secondaryCursors[n].getPosition()))return!0;return!1},t.prototype.onCursorPositionChanged=function(e){if(this._primaryCursor.onCursorPositionChanged(e.position,e.isInEditableRange),this._updateBlinking(),this._secondaryCursors.length<e.secondaryPositions.length)for(var t=e.secondaryPositions.length-this._secondaryCursors.length,n=0;n<t;n++){var i=new r.ViewCursor(this._context,!0);this._primaryCursor.getDomNode().parentNode.insertBefore(i.getDomNode(),this._primaryCursor.getDomNode().nextSibling),this._secondaryCursors.push(i)}else if(this._secondaryCursors.length>e.secondaryPositions.length)for(var o=this._secondaryCursors.length-e.secondaryPositions.length,n=0;n<o;n++)this._secondaryCursors[0].getDomNode().parentNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1);for(var n=0;n<e.secondaryPositions.length;n++)this._secondaryCursors[n].onCursorPositionChanged(e.secondaryPositions[n],e.isInEditableRange);return!0},t.prototype.onCursorSelectionChanged=function(e){var t=e.selection.isEmpty();return this._selectionIsEmpty!==t&&(this._selectionIsEmpty=t,this._updateDomClassName()),!1},t.prototype.onConfigurationChanged=function(e){e.readOnly&&(this._readOnly=this._context.configuration.editor.readOnly),e.viewInfo.cursorBlinking&&(this._cursorBlinking=this._context.configuration.editor.viewInfo.cursorBlinking),e.viewInfo.cursorStyle&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle),this._primaryCursor.onConfigurationChanged(e),this._updateBlinking(),(e.viewInfo.cursorStyle||e.viewInfo.cursorBlinking)&&this._updateDomClassName();for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].onConfigurationChanged(e);return!0},t.prototype.onLayoutChanged=function(e){return!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onViewFocusChanged=function(e){return this._editorHasFocus=e,this._updateBlinking(),!1},t.prototype.getPosition=function(){return this._primaryCursor.getPosition()},t.prototype._getCursorBlinking=function(){return this._editorHasFocus?this._readOnly||!this._primaryCursor.getIsInEditableRange()?n.TextEditorCursorBlinkingStyle.Solid:this._cursorBlinking:n.TextEditorCursorBlinkingStyle.Hidden},t.prototype._updateBlinking=function(){var e=this;this._startCursorBlinkAnimation.cancel();var i=this._getCursorBlinking(),o=i===n.TextEditorCursorBlinkingStyle.Hidden,r=i===n.TextEditorCursorBlinkingStyle.Solid;o?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),o||r||this._startCursorBlinkAnimation.setIfNotSet(function(){e._blinkingEnabled=!0,e._updateDomClassName()},t.BLINK_INTERVAL)},t.prototype._updateDomClassName=function(){this._domNode.setClassName(this._getClassName())},t.prototype._getClassName=function(){var e=i.ClassNames.VIEW_CURSORS_LAYER;switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case n.TextEditorCursorStyle.Line:e+=" cursor-line-style";break;case n.TextEditorCursorStyle.Block:e+=" cursor-block-style";break;case n.TextEditorCursorStyle.Underline:e+=" cursor-underline-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case n.TextEditorCursorBlinkingStyle.Blink:e+=" cursor-blink";break;case n.TextEditorCursorBlinkingStyle.Smooth:e+=" cursor-smooth";break;case n.TextEditorCursorBlinkingStyle.Phase:e+=" cursor-phase";break;case n.TextEditorCursorBlinkingStyle.Expand:e+=" cursor-expand";break;case n.TextEditorCursorBlinkingStyle.Solid:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return e},t.prototype._show=function(){this._primaryCursor.show();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0},t.prototype._hide=function(){this._primaryCursor.hide();for(var e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!");this._primaryCursor.prepareRender(e);for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._secondaryCursors[t].prepareRender(e)},t.prototype.render=function(e){this._renderData=[],this._renderData.push(this._primaryCursor.render(e));for(var t=0,n=this._secondaryCursors.length;t<n;t++)this._renderData.push(this._secondaryCursors[t].render(e));this._renderData=this._renderData.filter(function(e){return!!e})},t.prototype.getLastRenderData=function(){return this._renderData},t}(o.ViewPart);u.BLINK_INTERVAL=500,t.ViewCursors=u}),define(d[439],h([0,1,10,12,504,9,33,113,16,63,114]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";var d=Object.prototype.hasOwnProperty,h=function(){function e(e){void 0===e&&(e=!0);var t=this;this._onDidAddModes=new i.Emitter,this.onDidAddModes=this._onDidAddModes.event,this._nextLanguageId=1,this._languages={},this.mime2LanguageId={},this.name2LanguageId={},this.lowerName2Id={},this.languageIds=[],e&&(this._registerLanguages(a.ModesRegistry.getLanguages()),a.ModesRegistry.onDidAddLanguages(function(e){return t._registerLanguages(e)}))}return e.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=[],i=0;i<e.length;i++)this._registerLanguage(e[i]),n.push(e[i].id);this.mime2LanguageId={},this.name2LanguageId={},this.lowerName2Id={},Object.keys(this._languages).forEach(function(e){var n=t._languages[e];n.name&&(t.name2LanguageId[n.name]=e),n.aliases.forEach(function(n){t.lowerName2Id[n.toLowerCase()]=e}),n.mimetypes.forEach(function(n){t.mime2LanguageId[n]=e})}),s.Registry.as(c.Extensions.Configuration).registerOverrideIdentifiers(a.ModesRegistry.getLanguages().map(function(e){return e.id})),this._onDidAddModes.fire(n)}},e.prototype._registerLanguage=function(t){var n=t.id,i=null;if(d.call(this._languages,n))i=this._languages[n];else{var o=this._nextLanguageId++;i={id:o,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this.languageIds[o]=n,this._languages[n]=i}e._mergeLanguage(i,t)},e._mergeLanguage=function(e,t){var i=t.id,s=null;if("undefined"!=typeof t.mimetypes&&Array.isArray(t.mimetypes))for(var a=0;a<t.mimetypes.length;a++)s||(s=t.mimetypes[a]),e.mimetypes.push(t.mimetypes[a]);if(s||(s="text/x-"+i,e.mimetypes.push(s)),Array.isArray(t.extensions))for(var u=0,l=t.extensions;u<l.length;u++){var c=l[u];o.registerTextMime({id:i,mime:s,extension:c}),e.extensions.push(c)}if(Array.isArray(t.filenames))for(var d=0,h=t.filenames;d<h.length;d++){var p=h[d];o.registerTextMime({id:i,mime:s,filename:p}),e.filenames.push(p)}if(Array.isArray(t.filenamePatterns))for(var f=0,g=t.filenamePatterns;f<g.length;f++){var m=g[f];o.registerTextMime({id:i,mime:s,filepattern:m})}if("string"==typeof t.firstLine&&t.firstLine.length>0){var v=t.firstLine;"^"!==v.charAt(0)&&(v="^"+v);try{var _=new RegExp(v);r.regExpLeadsToEndlessLoop(_)||o.registerTextMime({id:i,mime:s,firstline:_})}catch(e){n.onUnexpectedError(e)}}e.aliases.push(i);var y=null;if("undefined"!=typeof t.aliases&&Array.isArray(t.aliases)&&(y=0===t.aliases.length?[null]:t.aliases),null!==y)for(var a=0;a<y.length;a++)y[a]&&0!==y[a].length&&e.aliases.push(y[a]);var C=null!==y&&y.length>0;if(C&&null===y[0]);else{var b=(C?y[0]:null)||i;!C&&e.name||(e.name=b)}"string"==typeof t.configuration&&e.configurationFiles.push(t.configuration)},e.prototype.isRegisteredMode=function(e){return!!d.call(this.mime2LanguageId,e)||d.call(this._languages,e)},e.prototype.getRegisteredModes=function(){return Object.keys(this._languages)},e.prototype.getRegisteredLanguageNames=function(){return Object.keys(this.name2LanguageId)},e.prototype.getLanguageName=function(e){return d.call(this._languages,e)?this._languages[e].name:null},e.prototype.getModeIdForLanguageNameLowercase=function(e){return this.lowerName2Id[e]||null},e.prototype.getConfigurationFiles=function(e){return d.call(this._languages,e)?this._languages[e].configurationFiles||[]:[]},e.prototype.getMimeForMode=function(e){for(var t=Object.keys(this.mime2LanguageId),n=0,i=t.length;n<i;n++){var o=t[n],r=this.mime2LanguageId[o];if(r===e)return o}return null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim()}).map(function(e){return t.mime2LanguageId[e]||e}).filter(function(e){return d.call(t._languages,e)}):[]},e.prototype.getLanguageIdentifier=function(e){if(e===l.NULL_MODE_ID||0===e)return l.NULL_LANGUAGE_IDENTIFIER;var t;if("string"==typeof e)t=e;else if(t=this.languageIds[e],!t)return null;return d.call(this._languages,t)?new u.LanguageIdentifier(t,this._languages[t].id):null},e.prototype.getModeIdsFromLanguageName=function(e){return e&&d.call(this.name2LanguageId,e)?[this.name2LanguageId[e]]:[]},e.prototype.getModeIdsFromFilenameOrFirstLine=function(e,t){if(!e&&!t)return[];var n=o.guessMimeTypes(e,t);return this.extractModeIds(n.join(","))},e.prototype.getExtensions=function(e){var t=this.name2LanguageId[e];return t&&d.call(this._languages,t)?this._languages[t].extensions:[]},e.prototype.getFilenames=function(e){var t=this.name2LanguageId[e];return t&&d.call(this._languages,t)?this._languages[t].filenames:[]},e}();t.LanguagesRegistry=h}),define(d[440],h([0,1,282,10,12,6,152,180,439]),function(e,t,n,i,o,r,s,a,u){"use strict";t.languagesExtPoint=s.ExtensionsRegistry.registerExtensionPoint("languages",[],{description:n.localize(0,null),type:"array",items:{type:"object",defaultSnippets:[{body:{id:"${1:languageId}",aliases:["${2:label}"],extensions:["${3:extension}"],configuration:"./language-configuration.json"}}],properties:{id:{description:n.localize(1,null),type:"string"},aliases:{description:n.localize(2,null),type:"array",items:{type:"string"}},extensions:{description:n.localize(3,null),default:[".foo"],type:"array",items:{type:"string"}},filenames:{description:n.localize(4,null),type:"array",items:{type:"string"}},filenamePatterns:{description:n.localize(5,null),type:"array",items:{type:"string"}},mimetypes:{description:n.localize(6,null),type:"array",items:{type:"string"}},firstLine:{description:n.localize(7,null),type:"string"},configuration:{description:n.localize(8,null),type:"string",default:"./language-configuration.json"}}}});var l=function(){function e(){var e=this;this._onDidAddModes=new o.Emitter,this.onDidAddModes=this._onDidAddModes.event,this._onDidCreateMode=new o.Emitter,this.onDidCreateMode=this._onDidCreateMode.event,this._instantiatedModes={},this._registry=new u.LanguagesRegistry,this._registry.onDidAddModes(function(t){return e._onDidAddModes.fire(t)})}return e.prototype._onReady=function(){return r.TPromise.as(!0)},e.prototype.isRegisteredMode=function(e){return this._registry.isRegisteredMode(e)},e.prototype.getRegisteredModes=function(){return this._registry.getRegisteredModes()},e.prototype.getRegisteredLanguageNames=function(){return this._registry.getRegisteredLanguageNames()},e.prototype.getExtensions=function(e){return this._registry.getExtensions(e)},e.prototype.getFilenames=function(e){return this._registry.getFilenames(e)},e.prototype.getMimeForMode=function(e){return this._registry.getMimeForMode(e)},e.prototype.getLanguageName=function(e){return this._registry.getLanguageName(e)},e.prototype.getModeIdForLanguageName=function(e){return this._registry.getModeIdForLanguageNameLowercase(e)},e.prototype.getModeIdByFilenameOrFirstLine=function(e,t){var n=this._registry.getModeIdsFromFilenameOrFirstLine(e,t);return n.length>0?n[0]:null},e.prototype.getModeId=function(e){var t=this._registry.extractModeIds(e);return t.length>0?t[0]:null},e.prototype.getLanguageIdentifier=function(e){return this._registry.getLanguageIdentifier(e)},e.prototype.getConfigurationFiles=function(e){return this._registry.getConfigurationFiles(e)},e.prototype.lookup=function(e){for(var t=[],n=this._registry.extractModeIds(e),i=0;i<n.length;i++){var o=n[i];t.push({modeId:o,isInstantiated:this._instantiatedModes.hasOwnProperty(o)})}return t},e.prototype.getMode=function(e){for(var t=this._registry.extractModeIds(e),n=!1,o=0;o<t.length;o++){if(this._instantiatedModes.hasOwnProperty(t[o]))return this._instantiatedModes[t[o]];n=n||"plaintext"===t[o]}if(n){var r=null;return this.getOrCreateMode(e).then(function(e){r=e}).done(null,i.onUnexpectedError),r}},e.prototype.getOrCreateMode=function(e){var t=this;return this._onReady().then(function(){var n=t.getModeId(e);return t._getOrCreateMode(n||"plaintext")})},e.prototype.getOrCreateModeByLanguageName=function(e){var t=this;return this._onReady().then(function(){var n=t._getModeIdByLanguageName(e);return t._getOrCreateMode(n||"plaintext")})},e.prototype._getModeIdByLanguageName=function(e){var t=this._registry.getModeIdsFromLanguageName(e);return t.length>0?t[0]:null},e.prototype.getOrCreateModeByFilenameOrFirstLine=function(e,t){var n=this;return this._onReady().then(function(){var i=n.getModeIdByFilenameOrFirstLine(e,t);return n._getOrCreateMode(i||"plaintext")})},e.prototype._getOrCreateMode=function(e){if(!this._instantiatedModes.hasOwnProperty(e)){var t=this.getLanguageIdentifier(e);this._instantiatedModes[e]=new a.FrankensteinMode(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]},e}();t.ModeServiceImpl=l}),define(d[441],h([0,1,33,22,178,35,26,114]),function(e,t,n,i,o,r,s,a){"use strict";function u(){var e=Object.create(null),t=n.Registry.as(a.Extensions.Configuration).getConfigurationProperties();for(var i in t){var o=t[i].default;c(e,i,o,function(e){return console.error("Conflict in default settings: "+e)})}return e}function l(e,t){var n=Object.create(null);for(var i in e)c(n,i,e[i],t);return n}function c(e,t,n,i){for(var o=t.split("."),r=o.pop(),s=e,a=0;a<o.length;a++){var u=o[a],l=s[u];switch(typeof l){case"undefined":l=s[u]=Object.create(null);break;case"object":break;default:return void i("Ignoring "+t+" as "+o.slice(0,a+1).join(".")+" is "+JSON.stringify(l))}s=l}"object"==typeof s?s[r]=n:i("Ignoring "+t+" as "+o.join(".")+" is "+JSON.stringify(s))}function d(){var e=n.Registry.as(a.Extensions.Configuration).getConfigurationProperties();return Object.keys(e)}function h(e,t,n){Object.keys(t).forEach(function(o){o in e?i.isObject(e[o])&&i.isObject(t[o])?h(e[o],t[o],n):n&&(e[o]=t[o]):e[o]=t[o]})}function p(e){return e.substring(1,e.length-1)}function f(e){return"["+e+"]"}t.getDefaultValues=u,t.toValuesTree=l,t.getConfigurationKeys=d,t.merge=h;var g=function(){function e(e,t){void 0===t&&(t=""),this.name=t,this._overrides=[],this._raw={},this._unfilteredRaw={},this._parseErrors=[],e&&this.update(e)}return Object.defineProperty(e.prototype,"contents",{get:function(){return this._contents||{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overrides",{get:function(){return this._overrides},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return Object.keys(this._raw)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"raw",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unfilteredRaw",{get:function(){return this._unfilteredRaw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._parseErrors},enumerable:!0,configurable:!0}),e.prototype.merge=function(t,n){void 0===n&&(n=!0);var i=new e(null);return this.doMerge(i,this,n),this.doMerge(i,t,n),i},e.prototype.doMerge=function(e,t,n){void 0===n&&(n=!0),e._contents=r.clone(this.contents),h(e.contents,t.contents,n);for(var i=r.clone(e.overrides),o=function(e){var t=i.filter(function(t){return s.equals(t.identifiers,e.identifiers)})[0];t?h(t.contents,e.contents,n):i.push(e)},a=0,u=t.overrides;a<u.length;a++){var l=u[a];o(l)}e._overrides=i},e.prototype.config=function(t){var n=new e(null);return n._contents=r.clone(this.contents[t]),n},e.prototype.configWithOverrides=function(t){var n=new e(null),i=r.clone(this.contents);if(this.overrides)for(var o=0,s=this.overrides;o<s.length;o++){var a=s[o];a.identifiers.indexOf(t)!==-1&&h(i,a.contents,!0)}return n._contents=i,n},e.prototype.update=function(e){function t(e){Array.isArray(c)?c.push(e):u&&(c[u]=e),a.OVERRIDE_PROPERTY_PATTERN.test(u)&&i(u,e)}function i(e,t){s.push({identifiers:[p(e).trim()],raw:t,contents:null})}var r=this,s=[],u=null,c=[],d=[],h=[],f={onObjectBegin:function(){var e={};t(e),d.push(c),c=e,u=null},onObjectProperty:function(e){u=e},onObjectEnd:function(){c=d.pop()},onArrayBegin:function(){var e=[];t(e),d.push(c),c=e,u=null},onArrayEnd:function(){c=d.pop()},onLiteralValue:t,onError:function(e){h.push({error:e})}};try{o.visit(e,f),this._raw=c[0]}catch(e){console.error("Error while parsing settings file "+this.name+": "+e),this._raw={},this._parseErrors=[e]}this._unfilteredRaw=this._raw,this._raw=this.filterRaw(this._unfilteredRaw),this._contents=l(this._raw,function(e){return console.error("Conflict in settings file "+r.name+": "+e)});var g=n.Registry.as(a.Extensions.Configuration).getConfigurationProperties();this._overrides=s.map(function(e){var t={};for(var n in e.raw)g[n]&&g[n].overridable&&(t[n]=e.raw[n]);return{identifiers:e.identifiers,contents:l(t,function(e){return console.error("Conflict in settings file "+r.name+": "+e)})}})},e.prototype.filterRaw=function(e){return e},e.prototype.refilter=function(){var e=this;this._unfilteredRaw&&(this._raw=this.filterRaw(this._unfilteredRaw),this._contents=l(this._raw,function(t){return console.error("Conflict in settings file "+e.name+": "+t)}))},e}();t.ConfigModel=g;var v=function(e){function t(){var t=e.call(this,null)||this;return t.update(),t}return m(t,e),Object.defineProperty(t.prototype,"keys",{get:function(){return this._keys},enumerable:!0,configurable:!0}),t.prototype.update=function(){this._contents=u(),this._keys=d()},t}(g);t.DefaultConfigModel=v,t.overrideIdentifierFromKey=p,t.keyFromOverrideIdentifier=f}),define(d[70],h([0,1,31,18,23,33]),function(e,t,n,i,o,r){"use strict";var s=function(){function e(){this.WEIGHT={editorCore:function(e){return void 0===e&&(e=0),0+e},editorContrib:function(e){return void 0===e&&(e=0),100+e},workbenchContrib:function(e){return void 0===e&&(e=0),200+e},builtinExtension:function(e){return void 0===e&&(e=0),300+e},externalExtension:function(e){return void 0===e&&(e=0),400+e}},this._keybindings=[]}return e.bindToCurrentPlatform=function(e){if(i.isWindows){if(e&&e.win)return e.win}else if(i.isMacintosh){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t){var n=this,i=e.bindToCurrentPlatform(t);i&&i.primary&&this.registerDefaultKeybinding(i.primary,t.id,t.weight,0,t.when),i&&Array.isArray(i.secondary)&&i.secondary.forEach(function(e,i){return n.registerDefaultKeybinding(e,t.id,t.weight,-i-1,t.when)})},e.prototype.registerCommandAndKeybindingRule=function(e){this.registerKeybindingRule(e),o.CommandsRegistry.registerCommand(e.id,e)},e.prototype.registerDefaultKeybinding=function(e,t,o,r,s){i.isWindows&&n.BinaryKeybindings.hasCtrlCmd(e)&&!n.BinaryKeybindings.hasShift(e)&&n.BinaryKeybindings.hasAlt(e)&&!n.BinaryKeybindings.hasWinCtrl(e)&&/^[A-Z0-9\[\]\|\;\'\,\.\/\`]$/.test(n.KeyCodeUtils.toString(n.BinaryKeybindings.extractKeyCode(e)))&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t),this._keybindings.push({keybinding:e,command:t,commandArgs:null,when:s,weight1:o,weight2:r})},e.prototype.getDefaultKeybindings=function(){return this._keybindings},e}();t.KeybindingsRegistry=new s,t.Extensions={EditorModes:"platform.keybindingsRegistry"},r.Registry.add(t.Extensions.EditorModes,t.KeybindingsRegistry)}),define(d[118],h([0,1,64,30,6,56,23,412,107,43,2,12,441,4,11,53,70,91,57,405]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y,C){"use strict";var b=function(){function e(e){this._widget=e}return e.prototype.getId=function(){return"editor"},e.prototype.getControl=function(){return this._widget},e.prototype.getSelection=function(){return this._widget.getSelection()},e.prototype.focus=function(){this._widget.focus()},e.prototype.isVisible=function(){return!0},e.prototype.withTypedEditor=function(e,t){return this._widget.getEditorType()===c.EditorType.ICodeEditor?e(this._widget):t(this._widget)},e}();t.SimpleEditor=b;var w=function(){function e(e){this.model=e,this._onDispose=new d.Emitter}return Object.defineProperty(e.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!0,configurable:!0}),e.prototype.load=function(){return o.TPromise.as(this)},Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}();t.SimpleModel=w;var S=function(){function e(){this.openEditorDelegate=null}return e.prototype.setEditor=function(e){this.editor=new b(e)},e.prototype.setOpenEditorDelegate=function(e){this.openEditorDelegate=e},e.prototype.openEditor=function(e,t){var n=this;return o.TPromise.as(this.editor.withTypedEditor(function(t){return n.doOpenEditor(t,e)},function(t){return n.doOpenEditor(t.getOriginalEditor(),e)||n.doOpenEditor(t.getModifiedEditor(),e)}))},e.prototype.doOpenEditor=function(e,t){var i=this.findModel(e,t);if(!i){if(t.resource){if(this.openEditorDelegate)return this.openEditorDelegate(t.resource.toString()),null;var o=t.resource.scheme;if(o===n.Schemas.http||o===n.Schemas.https)return window.open(t.resource.toString()),this.editor}return null}var r=t.options.selection;if(r)if("number"==typeof r.endLineNumber&&"number"==typeof r.endColumn)e.setSelection(r),e.revealRangeInCenter(r);else{var s={lineNumber:r.startLineNumber,column:r.startColumn};e.setPosition(s),e.revealPositionInCenter(s)}return this.editor},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.resource.toString()?null:n},e}();t.SimpleEditorService=S;var E=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=new b(e)},e.prototype.createModelReference=function(e){var t,n=this;return t=this.editor.withTypedEditor(function(t){return n.findModel(t,e)},function(t){return n.findModel(t.getOriginalEditor(),e)||n.findModel(t.getModifiedEditor(),e)}),t?o.TPromise.as(new p.ImmortalReference(new w(t))):o.TPromise.as(new p.ImmortalReference(null))},e.prototype.registerTextModelContentProvider=function(e,t){return{dispose:function(){}}},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.toString()?null:n},e}();t.SimpleEditorModelResolverService=E;var L=function(){function e(){}return e.prototype.show=function(){return e.NULL_PROGRESS_RUNNER},e.prototype.showWhile=function(e,t){return null},e}();L.NULL_PROGRESS_RUNNER={done:function(){},total:function(){},worked:function(){}},t.SimpleProgressService=L;var N=function(){function e(){}return e.prototype.show=function(t,n){switch(t){case i.default.Error:console.error(n);break;case i.default.Warning:console.warn(n);break;default:console.log(n)}return e.Empty},e.prototype.hideAll=function(){},e.prototype.confirm=function(e){var t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),window.confirm(t)},e}();N.Empty=function(){},t.SimpleMessageService=N;var T=function(){function e(e){this._onWillExecuteCommand=new d.Emitter,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e,t){var n=this;return this._dynamicCommands[e]=t,{dispose:function(){delete n._dynamicCommands[e]}}},e.prototype.executeCommand=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=s.CommandsRegistry.getCommand(e)||this._dynamicCommands[e];if(!i)return o.TPromise.wrapError(new Error("command '"+e+"' not found"));try{this._onWillExecuteCommand.fire({commandId:e});var r=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler].concat(t));return o.TPromise.as(r)}catch(e){return o.TPromise.wrapError(e)}},e}();t.StandaloneCommandService=T;var x=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._cachedResolver=null,r._dynamicKeybindings=[],r.toDispose.push(f.addDisposableListener(o,f.EventType.KEY_DOWN,function(e){var t=new g.StandardKeyboardEvent(e),n=r._dispatch(t.toKeybinding(),t.target);n&&t.preventDefault()})),r}return m(t,e),t.prototype.addDynamicKeybinding=function(e,t,n,i){var o=this,r=[];this._dynamicKeybindings.push({keybinding:t,command:e,when:i,weight1:1e3,weight2:0}),r.push({dispose:function(){for(var t=0;t<o._dynamicKeybindings.length;t++){var n=o._dynamicKeybindings[t];if(n.command===e)return o._dynamicKeybindings.splice(t,1),void o.updateResolver({source:l.KeybindingSource.Default})}}});var s=this._commandService;if(!(s instanceof T))throw new Error("Unknown command service!");return r.push(s.addCommand(e,{handler:n})),this.updateResolver({source:l.KeybindingSource.Default}),p.combinedDisposable(r)},t.prototype.updateResolver=function(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)},t.prototype._getResolver=function(){return this._cachedResolver||(this._cachedResolver=new u.KeybindingResolver(v.KeybindingsRegistry.getDefaultKeybindings(),this._getExtraKeybindings())),this._cachedResolver},t.prototype._getExtraKeybindings=function(){return this._dynamicKeybindings},t}(a.AbstractKeybindingService);t.StandaloneKeybindingService=x;var M=function(){function e(){this._onDidUpdateConfiguration=new d.Emitter,this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this._config=h.getDefaultValues()}return e.prototype.getConfiguration=function(e){return this._config},e.prototype.reloadConfiguration=function(e){return o.TPromise.as(this.getConfiguration(e))},e.prototype.lookup=function(e){return{value:r.getConfigurationValue(this.getConfiguration(),e),default:r.getConfigurationValue(this.getConfiguration(),e),user:r.getConfigurationValue(this.getConfiguration(),e)}},e.prototype.keys=function(){return{default:[],user:[]}},e}();t.SimpleConfigurationService=M;var I=function(){function e(e){this._commandService=e}return e.prototype.createMenu=function(e,t){return new C.Menu(e,o.TPromise.as(!0),this._commandService,t)},e.prototype.getCommandActions=function(){return _.values(y.MenuRegistry.commands)},e}();t.SimpleMenuService=I;var D=function(){function e(){this.isOptedIn=!1}return e.prototype.publicLog=function(e,t){return o.TPromise.as(null)},e.prototype.getTelemetryInfo=function(){return null},e.prototype.getExperiments=function(){return null},e}();t.StandaloneTelemetryService=D}),define(d[158],h([0,1,62,19,70,2,45,23]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t,n){var i=t.get(s.ICodeEditorService).getFocusedCodeEditor();return i?i:(n&&console.warn("Cannot execute "+e+" because no code editor is focused."),null)}function l(e,t,n){var i=u(e,t,!0);i&&n(i)}function c(e){var t=e.get(n.IEditorService),i=t.getActiveEditor&&t.getActiveEditor();return s.getCodeEditor(i)}function d(e,t,n){l(e,t,function(t){t.trigger("keyboard",e,n)})}function h(e){o.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(C))}function p(e,t){a.CommandsRegistry.registerCommand(e,{handler:d.bind(null,e),description:t})}function f(e,t){a.CommandsRegistry.registerCommand(e,t),a.CommandsRegistry.registerCommand("default:"+e,t)}function g(e){f(e,d.bind(null,e))}var v=r.Handler,_=r.CommandDescription,y=r.EditorContextKeys,C=o.KeybindingsRegistry.WEIGHT.editorCore(),b=function(){function e(e){this.id=e.id,this.precondition=e.precondition,this.kbOpts=e.kbOpts,this.description=e.description}return e.prototype.toCommandAndKeybindingRule=function(e){var t=this,n=this.kbOpts||{primary:0},o=n.kbExpr;return this.precondition&&(o=o?i.ContextKeyExpr.and(o,this.precondition):this.precondition),{id:this.id,handler:function(e,n){return t.runCommand(e,n)},weight:n.weight||e,when:o,primary:n.primary,secondary:n.secondary,win:n.win,linux:n.linux,mac:n.mac,description:this.description}},e}();t.Command=b;var w=function(e){function t(t){return e.call(this,t)||this}return m(t,e),t.bindToContribution=function(e){return function(t){function n(e){var n=t.call(this,e)||this;return n._callback=e.handler,n}return m(n,t),n.prototype.runEditorCommand=function(t,n,i){var o=e(n);o&&this._callback(e(n))},n}(t)},t.prototype.runCommand=function(e,t){var n=this,o=u(this.id,e,!1);if(o||(o=c(e)),o)return o.invokeWithinContext(function(e){var r=e.get(i.IContextKeyService);if(r.contextMatchesRules(n.precondition))return n.runEditorCommand(e,o,t)})},t}(b);t.EditorCommand=w,t.findFocusedEditor=u;var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.runCommand=function(e,t){d(this.id,e,t)},t}(b),E=function(e){function t(t,n){return void 0===n&&(n=null),e.call(this,{id:t,precondition:n})||this}return m(t,e),t}(S);g(v.Type),g(v.ReplacePreviousChar),g(v.Paste),g(v.Cut),f(v.CompositionStart,function(){}),f(v.CompositionEnd,function(){});var L=function(e){function t(n,i,o,r){return void 0===r&&(r=null),e.call(this,{id:n,precondition:r,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:t.getWordNavigationKB(i,o),mac:{primary:t.getMacWordNavigationKB(i,o)}}})||this}return m(t,e),t.getMacWordNavigationKB=function(e,t){return e?1536|t:512|t},t.getWordNavigationKB=function(e,t){return e?3072|t:2048|t},t}(S);p(v.CursorMove,_.CursorMove),h(new S({id:v.CursorLeft,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:15,mac:{primary:15,secondary:[288]}}})),h(new S({id:v.CursorLeftSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1039}})),h(new S({id:v.CursorRight,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:17,mac:{primary:17,secondary:[292]}}})),h(new S({id:v.CursorRightSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1041}})),h(new S({id:v.CursorUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:16,mac:{primary:16,secondary:[302]}}})),h(new S({id:v.CursorUpSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1040,secondary:[L.getWordNavigationKB(!0,16)],mac:{primary:1040},linux:{primary:1040}}})),h(new S({id:v.CursorDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:18,mac:{primary:18,secondary:[300]}}})),h(new S({id:v.CursorDownSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1042,secondary:[L.getWordNavigationKB(!0,18)],mac:{primary:1042},linux:{primary:1042}}})),h(new S({id:v.CursorPageUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:11}})),h(new S({id:v.CursorPageUpSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1035}})),h(new S({id:v.CursorPageDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:12}})),h(new S({id:v.CursorPageDownSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1036}})),h(new S({id:v.CursorHome,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:14,mac:{primary:14,secondary:[2063,287]}}})),h(new S({id:v.CursorHomeSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}})),h(new S({id:v.CursorEnd,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:13,mac:{primary:13,secondary:[2065,291]}}})),h(new S({id:v.CursorEndSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1037,mac:{primary:1037,
secondary:[3089]}}})),h(new S({id:v.ExpandLineSelection,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2087}})),p(v.EditorScroll,_.EditorScroll),h(new S({id:v.ScrollLineUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2064,mac:{primary:267}}})),h(new S({id:v.ScrollLineDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2066,mac:{primary:268}}})),h(new S({id:v.ScrollPageUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2059,win:{primary:523},linux:{primary:523}}})),h(new S({id:v.ScrollPageDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2060,win:{primary:524},linux:{primary:524}}})),p(v.RevealLine,_.RevealLine),h(new S({id:v.CursorColumnSelectLeft,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3599,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectRight,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3601,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3600,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectPageUp,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3595,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3602,linux:{primary:0}}})),h(new S({id:v.CursorColumnSelectPageDown,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3596,linux:{primary:0}}})),h(new S({id:v.Tab,precondition:y.Writable,kbOpts:{weight:C,kbExpr:i.ContextKeyExpr.and(y.TextFocus,y.TabDoesNotMoveFocus),primary:2}})),h(new S({id:v.Outdent,precondition:y.Writable,kbOpts:{weight:C,kbExpr:i.ContextKeyExpr.and(y.TextFocus,y.TabDoesNotMoveFocus),primary:1026}})),h(new S({id:v.DeleteLeft,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})),h(new S({id:v.DeleteRight,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})),h(new L(v.CursorWordStartLeft,!1,15)),h(new E(v.CursorWordEndLeft)),h(new E(v.CursorWordLeft)),h(new L(v.CursorWordStartLeftSelect,!0,15)),h(new E(v.CursorWordEndLeftSelect)),h(new E(v.CursorWordLeftSelect)),h(new L(v.CursorWordEndRight,!1,17)),h(new E(v.CursorWordStartRight)),h(new E(v.CursorWordRight)),h(new L(v.CursorWordEndRightSelect,!0,17)),h(new E(v.CursorWordStartRightSelect)),h(new E(v.CursorWordRightSelect)),h(new L(v.DeleteWordLeft,!1,1,y.Writable)),h(new E(v.DeleteWordStartLeft,y.Writable)),h(new E(v.DeleteWordEndLeft,y.Writable)),h(new L(v.DeleteWordRight,!1,20,y.Writable)),h(new E(v.DeleteWordStartRight,y.Writable)),h(new E(v.DeleteWordEndRight,y.Writable)),h(new S({id:v.CancelSelection,precondition:y.HasNonEmptySelection,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:9,secondary:[1033]}})),h(new S({id:v.RemoveSecondaryCursors,precondition:y.HasMultipleSelections,kbOpts:{weight:C+1,kbExpr:y.TextFocus,primary:9,secondary:[1033]}})),h(new S({id:v.CursorTop,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2062,mac:{primary:2064}}})),h(new S({id:v.CursorTopSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3086,mac:{primary:3088}}})),h(new S({id:v.CursorBottom,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2061,mac:{primary:2066}}})),h(new S({id:v.CursorBottomSelect,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:3085,mac:{primary:3090}}})),h(new S({id:v.LineBreakInsert,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:null,mac:{primary:301}}})),h(new S({id:v.CursorUndo,precondition:null,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2099}}));var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.runCommand=function(e,t){var n=this.getEditorHandler(),i=u(n,e,!1);if(i&&i.isFocused())return void i.trigger("keyboard",n,t);var o=document.activeElement;if(o&&["input","textarea"].indexOf(o.tagName.toLowerCase())>=0)return void document.execCommand(this.getInputHandler());var r=c(e);return r?(r.focus(),void r.trigger("keyboard",n,t)):void 0},t}(b),T=function(e){function t(){return e.call(this,{id:"editor.action.selectAll",precondition:null,kbOpts:{weight:C,kbExpr:null,primary:2079}})||this}return m(t,e),t.prototype.getEditorHandler=function(){return r.Handler.SelectAll},t.prototype.getInputHandler=function(){return"selectAll"},t}(N);h(new T);var x=function(e){function t(){return e.call(this,{id:v.Undo,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2104}})||this}return m(t,e),t.prototype.getEditorHandler=function(){return v.Undo},t.prototype.getInputHandler=function(){return"undo"},t}(N);h(new x);var M=function(e){function t(){return e.call(this,{id:v.Redo,precondition:y.Writable,kbOpts:{weight:C,kbExpr:y.TextFocus,primary:2103,secondary:[3128],mac:{primary:3128}}})||this}return m(t,e),t.prototype.getEditorHandler=function(){return v.Redo},t.prototype.getInputHandler=function(){return"redo"},t}(N);h(new M)}),define(d[159],h([0,1,14]),function(e,t,n){"use strict";t.IProgressService=n.createDecorator("progressService"),t.emptyProgress=Object.freeze({report:function(){}});var i=function(){function e(e){this._callback=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),e.prototype.report=function(e){this._value=e,this._callback()},e}();t.Progress=i,t.IProgressService2=n.createDecorator("progressService2")}),define(d[160],h([0,1,14]),function(e,t,n){"use strict";t.ID="storageService",t.IStorageService=n.createDecorator(t.ID);var i;!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(i=t.StorageScope||(t.StorageScope={})),t.NullStorageService={_serviceBrand:void 0,store:function(){},swap:function(){},remove:function(){},get:function(e,t,n){return n},getInteger:function(e,t,n){return n},getBoolean:function(e,t,n){return n}}}),define(d[47],h([0,1,14]),function(e,t,n){"use strict";t.ITelemetryService=n.createDecorator("telemetryService")}),define(d[13],h([0,1,10,27,23,70,33,47,158,15,44,57]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";function h(e){v.registerEditorAction(new e)}function p(e){y.INSTANCE.registerEditorContribution(e)}t.Command=u.Command,t.EditorCommand=u.EditorCommand;var f=function(e){function t(t){var n=e.call(this,t)||this;return n.label=t.label,n.alias=t.alias,n.menuOpts=t.menuOpts,n}return m(t,e),t.prototype.toMenuItem=function(){return this.menuOpts?{command:{id:this.id,title:this.label},when:this.precondition,group:this.menuOpts.group,order:this.menuOpts.order}:null},t.prototype.runEditorCommand=function(e,t,n){return this.reportTelemetry(e),this.run(e,t,n)},t.prototype.reportTelemetry=function(e){e.get(a.ITelemetryService).publicLog("editorActionInvoked",{name:this.label,id:this.id})},t}(u.EditorCommand);t.EditorAction=f;var g=function(e){function t(t){var n=e.call(this,t)||this;return n._handlerId=t.handlerId,n}return m(t,e),t.prototype.run=function(e,t){t.trigger(this.id,this._handlerId,null)},t}(f);t.HandlerEditorAction=g,t.editorAction=h,t.commonEditorContribution=p;var v;!function(e){function t(e){y.INSTANCE.registerEditorAction(e)}function s(){return y.INSTANCE.getEditorActions()}function a(){return y.INSTANCE.getEditorContributions()}function u(e){return void 0===e&&(e=0),r.KeybindingsRegistry.WEIGHT.editorContrib(e)}function d(e){r.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(r.KeybindingsRegistry.WEIGHT.editorContrib()))}function h(e,t){o.CommandsRegistry.registerCommand(e,function(e,n){return t(e,n||{})})}function p(e,t){h(e,function(e,o){var r=o.resource,s=o.position;if(!(r instanceof i.default))throw n.illegalArgument("resource");if(!l.Position.isIPosition(s))throw n.illegalArgument("position");var a=e.get(c.IModelService).getModel(r);if(!a)throw n.illegalArgument("Can not find open model for "+r);var u=l.Position.lift(s);return t(a,u,o)})}e.registerEditorAction=t,e.getEditorActions=s,e.getEditorContributions=a,e.commandWeight=u,e.registerEditorCommand=d,e.registerLanguageCommand=h,e.registerDefaultLanguageCommand=p}(v=t.CommonEditorRegistry||(t.CommonEditorRegistry={}));var _={EditorCommonContributions:"editor.commonContributions"},y=function(){function e(){this.editorContributions=[],this.editorActions=[]}return e.prototype.registerEditorContribution=function(e){this.editorContributions.push(e)},e.prototype.registerEditorAction=function(e){var t=e.toMenuItem();t&&d.MenuRegistry.appendMenuItem(d.MenuId.EditorContext,t),r.KeybindingsRegistry.registerCommandAndKeybindingRule(e.toCommandAndKeybindingRule(r.KeybindingsRegistry.WEIGHT.editorContrib())),this.editorActions.push(e)},e.prototype.getEditorContributions=function(){return this.editorContributions.slice(0)},e.prototype.getEditorActions=function(){return this.editorActions.slice(0)},e}();y.INSTANCE=new y,s.Registry.add(_.EditorCommonContributions,y.INSTANCE)}),define(d[449],h([0,1,284,4,15,17,2,13]),function(e,t,n,i,o,r,s,a){"use strict";var u=s.EditorContextKeys,l=function(e){function t(){return e.call(this,{id:"editor.action.jumpToBracket",label:n.localize(0,null),alias:"Go to Bracket",precondition:null,kbOpts:{kbExpr:u.TextFocus,primary:3160}})||this}return m(t,e),t.prototype.run=function(e,t){var n=d.get(t);n&&n.jumpToBracket()},t}(a.EditorAction);l=y([a.editorAction],l);var c=function(){function e(e,t){this.position=e,this.brackets=t}return e}(),d=h=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._lastBracketsData=[],n._lastVersionId=0,n._decorations=[],n._updateBracketsSoon=n._register(new r.RunOnceScheduler(function(){return n._updateBrackets()},50)),n._updateBracketsSoon.schedule(),n._register(t.onDidChangeCursorPosition(function(e){return n._updateBracketsSoon.schedule()})),n._register(t.onDidChangeModel(function(e){n._decorations=[],n._updateBracketsSoon.schedule()})),n}return m(t,e),t.get=function(e){return e.getContribution(h.ID)},t.prototype.getId=function(){return h.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelection();if(t.isEmpty()){var n=t.getStartPosition(),i=e.matchBracket(n);if(i){var o=null;i[0].containsPosition(n)?o=i[1].getStartPosition():i[1].containsPosition(n)&&(o=i[0].getStartPosition()),o&&(this._editor.setPosition(o),this._editor.revealPosition(o))}}}},t.prototype._updateBrackets=function(){this._recomputeBrackets();for(var e=[],t=0,n=0,i=this._lastBracketsData.length;n<i;n++){var o=this._lastBracketsData[n].brackets;o&&(e[t++]={range:o[0],options:h._DECORATION_OPTIONS},e[t++]={range:o[1],options:h._DECORATION_OPTIONS})}this._decorations=this._editor.deltaDecorations(this._decorations,e)},t.prototype._recomputeBrackets=function(){var e=this._editor.getModel();if(!e)return this._lastBracketsData=[],void(this._lastVersionId=0);var t=e.getVersionId(),n=[];this._lastVersionId===t&&(n=this._lastBracketsData);for(var i=this._editor.getSelections(),r=[],s=0,a=0,u=i.length;a<u;a++){var l=i[a];l.isEmpty()&&(r[s++]=l.getStartPosition())}r.length>1&&r.sort(o.Position.compare);for(var d=[],h=0,p=0,f=n.length,a=0,u=r.length;a<u;a++){for(var g=r[a];p<f&&n[p].position.isBefore(g);)p++;if(p<f&&n[p].position.equals(g))d[h++]=n[p];else{var m=e.matchBracket(g);d[h++]=new c(g,m)}}this._lastBracketsData=d,this._lastVersionId=t},t}(i.Disposable);d.ID="editor.contrib.bracketMatchingController",d._DECORATION_OPTIONS={stickiness:s.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"bracket-match"},d=h=y([a.commonEditorContribution],d),t.BracketMatchingController=d;var h}),define(d[450],h([0,1,285,2,13,218]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(t,n){var i=e.call(this,n)||this;return i.left=t,i}return m(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;o<i.length;o++)n.push(new r.MoveCaretCommand(i[o],this.left));t.executeCommands(this.id,n)},t}(o.EditorAction),a=function(e){function t(){return e.call(this,!0,{id:"editor.action.moveCarretLeftAction",label:n.localize(0,null),alias:"Move Caret Left",precondition:i.EditorContextKeys.Writable})||this}return m(t,e),t}(s);a=y([o.editorAction],a);var u=function(e){function t(){return e.call(this,!1,{id:"editor.action.moveCarretRightAction",label:n.localize(1,null),alias:"Move Caret Right",precondition:i.EditorContextKeys.Writable})||this}return m(t,e),t}(s);u=y([o.editorAction],u)}),define(d[451],h([0,1,286,3,2,13,54]),function(e,t,n,i,o,r,s){"use strict";var a=function(e){function t(){return e.call(this,{id:"editor.action.transposeLetters",label:n.localize(0,null),alias:"Transpose Letters",precondition:o.EditorContextKeys.Writable,kbOpts:{kbExpr:o.EditorContextKeys.TextFocus,primary:0,mac:{primary:306}}})||this}return m(t,e),t.prototype.run=function(e,t){for(var n=t.getModel(),o=[],r=t.getSelections(),a=0;a<r.length;a++){var u=r[a];if(u.isEmpty()){var l=u.startLineNumber,c=u.startColumn;if(1!==c){var d=n.getLineMaxColumn(l);if(c!==d){var h=n.getLineContent(l),p=h.charAt(c-2),f=h.charAt(c-1),g=new i.Range(l,c-1,l,c+1);o.push(new s.ReplaceCommand(g,f+p))}}}}o.length>0&&t.executeCommands(this.id,o)},t}(r.EditorAction);a=y([r.editorAction],a)}),define(d[452],h([0,1,287,24,158,2,13,364]),function(e,t,n,i,o,r,s){"use strict";function a(e){return i.supportsExecCommand(e)?s.editorAction:function(){}}var u=r.EditorContextKeys,l="9_cutcopypaste",c=function(e){function t(t,n){var i=e.call(this,n)||this;return i.browserCommand=t,i}return m(t,e),t.prototype.runCommand=function(e,t){var n=o.findFocusedEditor(this.id,e,!1);return n&&n.isFocused()?void n.trigger("keyboard",this.id,t):void document.execCommand(this.browserCommand)},t.prototype.run=function(e,t){t.focus(),document.execCommand(this.browserCommand)},t}(s.EditorAction),d=function(e){function t(){return e.call(this,"cut",{id:"editor.action.clipboardCutAction",label:n.localize(0,null),alias:"Cut",precondition:u.Writable,kbOpts:{kbExpr:u.TextFocus,primary:2102,win:{primary:2102,secondary:[1044]}},menuOpts:{group:l,order:1}})||this}return m(t,e),t.prototype.run=function(t,n){var o=n.getConfiguration().contribInfo.emptySelectionClipboard&&i.enableEmptySelectionClipboard;!o&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(c);d=y([a("cut")],d);var h=function(e){function t(){return e.call(this,"copy",{id:"editor.action.clipboardCopyAction",label:n.localize(1,null),alias:"Copy",precondition:null,kbOpts:{kbExpr:u.TextFocus,primary:2081,win:{primary:2081,secondary:[2067]}},menuOpts:{group:l,order:2}})||this}return m(t,e),t.prototype.run=function(t,n){var o=n.getConfiguration().contribInfo.emptySelectionClipboard&&i.enableEmptySelectionClipboard;!o&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(c);h=y([a("copy")],h);var p=function(e){function t(){return e.call(this,"paste",{id:"editor.action.clipboardPasteAction",label:n.localize(2,null),alias:"Paste",precondition:u.Writable,kbOpts:{kbExpr:u.TextFocus,primary:2100,win:{primary:2100,secondary:[1043]}},menuOpts:{group:l,order:3}})||this}return m(t,e),t}(c);p=y([a("paste")],p)}),define(d[453],h([0,1,10,27,6,13,16,44,17]),function(e,t,n,i,o,r,s,a,u){"use strict";function l(e){var t=[],i=s.CodeLensProviderRegistry.ordered(e),r=i.map(function(i){return u.asWinJsPromise(function(t){return i.provideCodeLenses(e,t)}).then(function(e){if(Array.isArray(e))for(var n=0,o=e;n<o.length;n++){var r=o[n];t.push({symbol:r,provider:i})}},n.onUnexpectedExternalError)});return o.TPromise.join(r).then(function(){return t.sort(function(e,t){return e.symbol.range.startLineNumber<t.symbol.range.startLineNumber?-1:e.symbol.range.startLineNumber>t.symbol.range.startLineNumber?1:i.indexOf(e.provider)<i.indexOf(t.provider)?-1:i.indexOf(e.provider)>i.indexOf(t.provider)?1:e.symbol.range.startColumn<t.symbol.range.startColumn?-1:e.symbol.range.startColumn>t.symbol.range.startColumn?1:0})})}t.getCodeLensData=l,r.CommonEditorRegistry.registerLanguageCommand("_executeCodeLensProvider",function(e,t){var o=t.resource;if(!(o instanceof i.default))throw n.illegalArgument();var r=e.get(a.IModelService).getModel(o);if(!r)throw n.illegalArgument();return l(r)})}),define(d[454],h([0,1,17,10,4,30,9,6,11,23,52,3,2,16,21,29,453,365]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m){"use strict";var v=function(){function e(e){this.afterLineNumber=e,this.heightInLines=1,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}return e.prototype.setAfterLineNumber=function(e){this.afterLineNumber=e},e}(),_=function(){function e(t,n,i,o){var s=this;this._commands=Object.create(null),this._id="codeLensWidget"+ ++e.ID,this._editor=t,this.suppressMouseDown=!0,this.setSymbolRange(n),this._domNode=document.createElement("span"),this._domNode.style.height=t.getConfiguration().lineHeight+"px",this._domNode.innerHTML="&nbsp;",u.addClass(this._domNode,"codelens-decoration"),u.addClass(this._domNode,"invisible-cl"),this._subscription=u.addDisposableListener(this._domNode,"click",function(e){var n=e.target;if("A"===n.tagName&&n.id){var a=s._commands[n.id];a&&(t.focus(),i.executeCommand.apply(i,[a.id].concat(a.arguments)).done(void 0,function(e){o.show(r.default.Error,e)}))}}),this.updateVisibility()}return e.prototype.dispose=function(){this._subscription.dispose(),this._symbolRange=null},e.prototype.updateVisibility=function(){this.isVisible()&&(u.removeClass(this._domNode,"invisible-cl"),u.addClass(this._domNode,"fadein"))},e.prototype.withCommands=function(e){if(this._commands=Object.create(null),!e||!e.length)return void(this._domNode.innerHTML="no commands");for(var t=[],n=0;n<e.length;n++){var i=e[n].command,o=s.escape(i.title),r=void 0;i.id?(r=s.format("<a id={0}>{1}</a>",n,o),this._commands[n]=i):r=s.format("<span>{0}</span>",o),t.push(r)}this._domNode.innerHTML=t.join("<span>&nbsp;|&nbsp;</span>"),this._editor.layoutContentWidget(this)},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){this._symbolRange=e;var t=e.startLineNumber,n=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:n},preference:[f.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e}();_.ID=0;var b=function(){function e(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}return e.prototype.addDecoration=function(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)},e.prototype.removeDecoration=function(e){this._removeDecorations.push(e)},e.prototype.commit=function(e){for(var t=e.deltaDecorations(this._removeDecorations,this._addDecorations),n=0,i=t.length;n<i;n++)this._addDecorationsCallbacks[n](t[n])},e}(),w=function(){function e(e,t,n,i,o,r){var s=this;this._editor=t,this._data=e,this._decorationIds=new Array(this._data.length);var a;this._data.forEach(function(e,t){n.addDecoration({range:e.symbol.range,options:{}},function(e){return s._decorationIds[t]=e}),a=a?d.Range.plusRange(a,e.symbol.range):e.symbol.range}),this._viewZone=new v(a.startLineNumber-1),this._contentWidget=new _(t,d.Range.lift(a),o,r),this._viewZoneId=i.addZone(this._viewZone),this._editor.addContentWidget(this._contentWidget)}return e.prototype.dispose=function(e,t){for(;this._decorationIds.length;)e.removeDecoration(this._decorationIds.pop());t&&t.removeZone(this._viewZoneId),this._editor.removeContentWidget(this._contentWidget),this._contentWidget.dispose()},e.prototype.isValid=function(){var e=this;return this._decorationIds.some(function(t,n){var i=e._editor.getModel().getDecorationRange(t),o=e._data[n].symbol;return i&&d.Range.isEmpty(o.range)===i.isEmpty()})},e.prototype.updateCodeLensSymbols=function(e,t){for(var n=this;this._decorationIds.length;)t.removeDecoration(this._decorationIds.pop());this._data=e,this._decorationIds=new Array(this._data.length),this._data.forEach(function(e,i){t.addDecoration({range:e.symbol.range,options:{}},function(e){return n._decorationIds[i]=e})})},e.prototype.computeIfNecessary=function(e){if(this._contentWidget.updateVisibility(),!this._contentWidget.isVisible())return null;for(var t=0;t<this._decorationIds.length;t++)this._data[t].symbol.range=e.getDecorationRange(this._decorationIds[t]);return this._data},e.prototype.updateCommands=function(e){this._contentWidget.withCommands(e)},e.prototype.getLineNumber=function(){var e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1},e.prototype.update=function(e){if(this.isValid()){var t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);this._viewZone.setAfterLineNumber(t.startLineNumber-1),e.layoutZone(this._viewZoneId),this._contentWidget.setSymbolRange(t),this._editor.layoutContentWidget(this._contentWidget)}},e}(),S=E=function(){function e(e,t,n){var i=this;this._editor=e,this._commandService=t,this._messageService=n,this._isEnabled=this._editor.getConfiguration().contribInfo.codeLens,this._globalToDispose=[],this._localToDispose=[],this._lenses=[],this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter=0,this._globalToDispose.push(this._editor.onDidChangeModel(function(){return i.onModelChange()})),this._globalToDispose.push(this._editor.onDidChangeModelLanguage(function(){return i.onModelChange()})),this._globalToDispose.push(this._editor.onDidChangeConfiguration(function(e){var t=i._isEnabled;i._isEnabled=i._editor.getConfiguration().contribInfo.codeLens,t!==i._isEnabled&&i.onModelChange()})),this._globalToDispose.push(p.CodeLensProviderRegistry.onDidChange(this.onModelChange,this)),this.onModelChange()}return e.prototype.dispose=function(){this.localDispose(),this._globalToDispose=o.dispose(this._globalToDispose)},e.prototype.localDispose=function(){this._currentFindCodeLensSymbolsPromise&&(this._currentFindCodeLensSymbolsPromise.cancel(),this._currentFindCodeLensSymbolsPromise=null,this._modelChangeCounter++),this._currentFindOccPromise&&(this._currentFindOccPromise.cancel(),this._currentFindOccPromise=null),this._localToDispose=o.dispose(this._localToDispose)},e.prototype.getId=function(){return E.ID},e.prototype.onModelChange=function(){var e=this;this.localDispose();var t=this._editor.getModel();if(t&&this._isEnabled&&p.CodeLensProviderRegistry.has(t)){var r=new o.Disposables;this._localToDispose.push(r);var s=function(){r.dispose(),l.schedule()},a=function(e){for(var t=new Set,n=0,i=e;n<i.length;n++){var o=i[n].provider;o.onDidChange&&!t.has(o)&&(r.add(o.onDidChange(s)),t.add(o))}},u=new n.RunOnceScheduler(function(){e._onViewportChanged(t.getLanguageIdentifier().language)},500),l=new n.RunOnceScheduler(function(){e._currentFindCodeLensSymbolsPromise&&e._currentFindCodeLensSymbolsPromise.cancel(),e._currentFindCodeLensSymbolsPromise=m.getCodeLensData(t);var n=++e._modelChangeCounter;e._currentFindCodeLensSymbolsPromise.then(function(t){n===e._modelChangeCounter&&(e.renderCodeLensSymbols(t),a(t),u.schedule())},function(e){i.onUnexpectedError(e)})},250);this._localToDispose.push(l),this._localToDispose.push(u),this._localToDispose.push(t.addBulkListener(function(t){for(var n=!1,i=0;i<t.length;i++){var o=t[i].getType();if(o===h.EventType.ModelRawContentChanged){n=!0;break}}n&&(e._editor.changeDecorations(function(t){e._editor.changeViewZones(function(n){var i=[];e._lenses.forEach(function(e){e.isValid()?e.update(n):i.push(e)});var o=new b;i.forEach(function(t){t.dispose(o,n),e._lenses.splice(e._lenses.indexOf(t),1)}),o.commit(t)})}),u.schedule(),l.schedule())})),this._localToDispose.push(this._editor.onDidScrollChange(function(e){e.scrollTopChanged&&u.schedule()})),this._localToDispose.push({dispose:function(){e._editor.getModel()?e._editor.changeDecorations(function(t){e._editor.changeViewZones(function(n){e._disposeAllLenses(t,n)})}):e._disposeAllLenses(null,null)}}),l.schedule()}},e.prototype._disposeAllLenses=function(e,t){var n=new b;this._lenses.forEach(function(e){return e.dispose(n,t)}),e&&n.commit(e),this._lenses=[]},e.prototype.renderCodeLensSymbols=function(e){var t=this;if(this._editor.getModel()){for(var n,i=this._editor.getModel().getLineCount(),o=[],r=0,s=e;r<s.length;r++){var a=s[r],u=a.symbol.range.startLineNumber;u<1||u>i||(n&&n[n.length-1].symbol.range.startLineNumber===u?n.push(a):(n=[a],o.push(n)))}var l=this._editor.getCenteredRangeInViewport(),c=o.length!==this._lenses.length&&0!==this._editor.getScrollTop();this._editor.changeDecorations(function(e){t._editor.changeViewZones(function(n){for(var i=0,r=0,s=new b;r<o.length&&i<t._lenses.length;){var a=o[r][0].symbol.range.startLineNumber,u=t._lenses[i].getLineNumber();u<a?(t._lenses[i].dispose(s,n),t._lenses.splice(i,1)):u===a?(t._lenses[i].updateCodeLensSymbols(o[r],s),r++,i++):(t._lenses.splice(i,0,new w(o[r],t._editor,s,n,t._commandService,t._messageService)),i++,r++)}for(;i<t._lenses.length;)t._lenses[i].dispose(s,n),t._lenses.splice(i,1);for(;r<o.length;)t._lenses.push(new w(o[r],t._editor,s,n,t._commandService,t._messageService)),r++;s.commit(e)})}),c&&this._editor.revealRangeInCenter(l)}},e.prototype._onViewportChanged=function(e){var t=this;this._currentFindOccPromise&&(this._currentFindOccPromise.cancel(),this._currentFindOccPromise=null);var i=this._editor.getModel();if(i){var o=[],r=[];if(this._lenses.forEach(function(e){var t=e.computeIfNecessary(i);t&&(o.push(t),r.push(e))}),0!==o.length){var s=o.map(function(e,t){var o=new Array(e.length),s=e.map(function(e,t){return n.asWinJsPromise(function(t){return e.provider.resolveCodeLens(i,e.symbol,t)}).then(function(e){o[t]=e})});return a.TPromise.join(s).then(function(){r[t].updateCommands(o)})});this._currentFindOccPromise=a.TPromise.join(s).then(function(){t._currentFindOccPromise=null})}}},e}();S.ID="css.editor.codeLens",S=E=y([g.editorContribution,C(1,l.ICommandService),C(2,c.IMessageService)],S),t.CodeLensContribution=S;var E}),define(d[455],h([0,1,288,31,2,13,149,220]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(e){function t(t,n){var i=e.call(this,n)||this;return i._type=t,i}return m(t,e),t.prototype.run=function(e,t){var n=t.getModel();if(n){for(var i=[],o=t.getSelections(),r=n.getOptions(),s=0;s<o.length;s++)i.push(new a.LineCommentCommand(o[s],r.tabSize,this._type));t.executeCommands(this.id,i)}},t}(r.EditorAction),l=function(e){function t(){return e.call(this,0,{id:"editor.action.commentLine",label:n.localize(0,null),alias:"Toggle Line Comment",precondition:o.EditorContextKeys.Writable,kbOpts:{kbExpr:o.EditorContextKeys.TextFocus,primary:2133}})||this}return m(t,e),t}(u);l=y([r.editorAction],l);var c=function(e){function t(){return e.call(this,1,{id:"editor.action.addCommentLine",label:n.localize(1,null),alias:"Add Line Comment",precondition:o.EditorContextKeys.Writable,kbOpts:{kbExpr:o.EditorContextKeys.TextFocus,primary:i.KeyChord(2089,2081)}})||this}return m(t,e),t}(u);c=y([r.editorAction],c);var d=function(e){function t(){return e.call(this,2,{id:"editor.action.removeCommentLine",label:n.localize(2,null),alias:"Remove Line Comment",precondition:o.EditorContextKeys.Writable,kbOpts:{kbExpr:o.EditorContextKeys.TextFocus,primary:i.KeyChord(2089,2099)}})||this}return m(t,e),t}(u);d=y([r.editorAction],d);var h=function(e){function t(){return e.call(this,{id:"editor.action.blockComment",label:n.localize(3,null),alias:"Toggle Block Comment",precondition:o.EditorContextKeys.Writable,kbOpts:{kbExpr:o.EditorContextKeys.TextFocus,primary:1567,linux:{primary:3103}}})||this}return m(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;o<i.length;o++)n.push(new s.BlockCommentCommand(i[o]));t.executeCommands(this.id,n)},t}(r.EditorAction);h=y([r.editorAction],h)}),define(d[456],h([0,1,289,4,6,11,71,61,43,19,57,2,13,29]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=v=function(){function e(e,t,n,i,o,r){var s=this;this._contextMenuService=t,this._contextViewService=n,this._contextKeyService=i,this._keybindingService=o,this._menuService=r,this._toDispose=[],this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.push(this._editor.onContextMenu(function(e){return s._onContextMenu(e)})),this._toDispose.push(this._editor.onDidScrollChange(function(e){s._contextMenuIsBeingShownCount>0&&s._contextViewService.hideContextView()})),this._toDispose.push(this._editor.onKeyDown(function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())}))}return e.get=function(e){return e.getContribution(v.ID)},e.prototype._onContextMenu=function(e){if(!this._editor.getConfiguration().contribInfo.contextmenu)return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(e.target.type!==d.MouseTargetType.OVERLAY_WIDGET&&(e.event.preventDefault(),e.target.type===d.MouseTargetType.CONTENT_TEXT||e.target.type===d.MouseTargetType.CONTENT_EMPTY||e.target.type===d.MouseTargetType.TEXTAREA)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);var t;e.target.type!==d.MouseTargetType.TEXTAREA&&(t={x:e.event.posx,y:e.event.posy+1}),this.showContextMenu(t)}},e.prototype.showContextMenu=function(e){if(this._editor.getConfiguration().contribInfo.contextmenu){if(!this._contextMenuService)return void this._editor.focus();var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(c.MenuId.EditorContext,this._contextKeyService),n=t.getActions(this._editor.getModel().uri);t.dispose();for(var i=0,o=n;i<o.length;i++){var r=o[i],a=r[1];e.push.apply(e,a),e.push(new s.Separator)}return e.pop(),e},e.prototype._doShowContextMenu=function(e,t){var n=this;void 0===t&&(t=null);var i=this._editor.getConfiguration().contribInfo.hover;this._editor.updateOptions({hover:!1});var a=t;if(!a){this._editor.revealPosition(this._editor.getPosition()),this._editor.render();var u=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),l=r.getDomNodePagePosition(this._editor.getDomNode()),c=l.left+u.left,d=l.top+u.top+u.height;a={x:c,y:d}}this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({getAnchor:function(){return a},getActions:function(){return o.TPromise.as(e)},getActionItem:function(e){var t=n._keybindingFor(e);if(t)return new s.ActionItem(e,e,{label:!0,keybinding:n._keybindingService.getLabelFor(t)});var i=e;return"function"==typeof i.getActionItem?i.getActionItem():null},getKeyBinding:function(e){return n._keybindingFor(e)},onHide:function(e){n._contextMenuIsBeingShownCount--,n._editor.focus(),n._editor.updateOptions({hover:i})}})},e.prototype._keybindingFor=function(e){var t=this._keybindingService.lookupKeybindings(e.id);return t.length>0?t[0]:null},e.prototype.getId=function(){return v.ID},e.prototype.dispose=function(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose=i.dispose(this._toDispose)},e}();f.ID="editor.contrib.contextmenu",f=v=y([p.editorContribution,C(1,a.IContextMenuService),C(2,a.IContextViewService),C(3,l.IContextKeyService),C(4,u.IKeybindingService),C(5,c.IMenuService)],f),t.ContextMenuController=f;var g=function(e){function t(){return e.call(this,{id:"editor.action.showContextMenu",label:n.localize(0,null),alias:"Show Editor Context Menu",precondition:null,kbOpts:{kbExpr:d.EditorContextKeys.TextFocus,primary:1092}})||this}return m(t,e),t.prototype.run=function(e,t){var n=f.get(t);n.showContextMenu()},t}(h.EditorAction);g=y([h.editorAction],g);var v}),define(d[163],h([0,1,291,445,31,4,19,3,20,9,2,13,102,222,16,17]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g){"use strict";function v(e,t){var n=w.get(e);if(!n)return null;var i,o,r=n.getState(),s=r.wholeWord,a=r.matchCase;if(!e.isFocused()&&r.isRevealed&&r.searchString.length>0)i=r.searchString;else{
var l=e.getSelection();if(l.startLineNumber!==l.endLineNumber&&!t.allowMultiline)return null;if(l.isEmpty()){var c=e.getModel().getWordAtPosition(l.getStartPosition());if(!c)return null;i=c.word,o=new u.Selection(l.startLineNumber,c.startColumn,l.startLineNumber,c.endColumn)}else i=e.getModel().getValueInRange(l);t.changeFindSearchString&&n.setSearchString(i)}return t.highlightFindOptions&&n.highlightFindOptions(),{searchText:i,matchCase:a,wholeWord:s,currentMatch:o}}var _,b=c.EditorContextKeys;!function(e){e[e.NoFocusChange=0]="NoFocusChange",e[e.FocusFindInput=1]="FocusFindInput",e[e.FocusReplaceInput=2]="FocusReplaceInput"}(_=t.FindStartFocusAction||(t.FindStartFocusAction={})),t.CONTEXT_FIND_WIDGET_VISIBLE=new s.RawContextKey("findWidgetVisible",!1),t.CONTEXT_FIND_WIDGET_NOT_VISIBLE=t.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),t.CONTEXT_FIND_INPUT_FOCUSSED=new s.RawContextKey("findInputFocussed",!1);var w=function(e){function n(n,o){var r=e.call(this)||this;return r._editor=n,r._findWidgetVisible=t.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(o),r._updateHistoryDelayer=new g.Delayer(500),r._currentHistoryNavigator=new i.HistoryNavigator,r._state=r._register(new p.FindReplaceState),r._register(r._state.addChangeListener(function(e){return r._onStateChanged(e)})),r._model=null,r._register(r._editor.onDidChangeModel(function(){var e=r._editor.getModel()&&r._state.isRevealed;r.disposeModel(),r._state.change({searchScope:null},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,shouldFocus:0,shouldAnimate:!1})})),r}return m(n,e),n.get=function(e){return e.getContribution(n.ID)},n.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},n.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},n.prototype.getId=function(){return n.ID},n.prototype._onStateChanged=function(e){e.updateHistory&&e.searchString&&this._delayedUpdateHistory(),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel()))},n.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},n.prototype._updateHistory=function(){this._state.searchString&&this._currentHistoryNavigator.add(this._state.searchString)},n.prototype.getState=function(){return this._state},n.prototype.getHistory=function(){return this._currentHistoryNavigator},n.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},n.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},n.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},n.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},n.prototype.setSearchString=function(e){this._state.change({searchString:e},!1)},n.prototype.highlightFindOptions=function(){},n.prototype.getSelectionSearchString=function(){var e=this._editor.getSelection();if(e.startLineNumber===e.endLineNumber){if(!e.isEmpty())return this._editor.getModel().getValueInRange(e);var t=this._editor.getModel().getWordAtPosition(e.getStartPosition());if(t)return t.word}return null},n.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t={isRevealed:!0};if(e.seedSearchStringFromSelection){var n=this.getSelectionSearchString();n&&(this._state.isRegex?t.searchString=l.escapeRegExpCharacters(n):t.searchString=n)}e.forceRevealReplace&&(t.isReplaceRevealed=!0),this._state.change(t,!1),this._model||(this._model=new h.FindModelBoundToEditorModel(this._editor,this._state))}},n.prototype.start=function(e){this._start(e)},n.prototype.moveToNextMatch=function(){return!!this._model&&(this._model.moveToNextMatch(),!0)},n.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},n.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},n.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},n.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},n.prototype.showPreviousFindTerm=function(){var e=this._currentHistoryNavigator.previous();return e&&this._state.change({searchString:e},!1,!1),!0},n.prototype.showNextFindTerm=function(){var e=this._currentHistoryNavigator.next();return e&&this._state.change({searchString:e},!1,!1),!0},n}(r.Disposable);w.ID="editor.contrib.findController",w=y([C(1,s.IContextKeyService)],w),t.CommonFindController=w;var S=function(e){function t(){return e.call(this,{id:h.FIND_IDS.StartFindAction,label:n.localize(0,null),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,mac:{primary:2084,secondary:[2083]}}})||this}return m(t,e),t.prototype.run=function(e,t){var n=w.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,shouldFocus:1,shouldAnimate:!0})},t}(d.EditorAction);S=y([d.editorAction],S),t.StartFindAction=S;var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){var n=w.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length,shouldFocus:0,shouldAnimate:!0}),this._run(n))},t}(d.EditorAction);t.MatchFindAction=E;var L=function(e){function t(){return e.call(this,{id:h.FIND_IDS.NextMatchFindAction,label:n.localize(1,null),alias:"Find Next",precondition:null,kbOpts:{kbExpr:b.Focus,primary:61,mac:{primary:2085,secondary:[61]}}})||this}return m(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(E);L=y([d.editorAction],L),t.NextMatchFindAction=L;var N=function(e){function t(){return e.call(this,{id:h.FIND_IDS.PreviousMatchFindAction,label:n.localize(2,null),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:b.Focus,primary:1085,mac:{primary:3109,secondary:[1085]}}})||this}return m(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(E);N=y([d.editorAction],N),t.PreviousMatchFindAction=N;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){var n=w.get(t);if(n){var i=n.getSelectionSearchString();i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,shouldFocus:0,shouldAnimate:!0}),this._run(n))}},t}(d.EditorAction);t.SelectionMatchFindAction=T;var x=function(e){function t(){return e.call(this,{id:h.FIND_IDS.NextSelectionMatchFindAction,label:n.localize(3,null),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:b.Focus,primary:2109}})||this}return m(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(T);x=y([d.editorAction],x),t.NextSelectionMatchFindAction=x;var M=function(e){function t(){return e.call(this,{id:h.FIND_IDS.PreviousSelectionMatchFindAction,label:n.localize(4,null),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:b.Focus,primary:3133}})||this}return m(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(T);M=y([d.editorAction],M),t.PreviousSelectionMatchFindAction=M;var I=function(e){function t(){return e.call(this,{id:h.FIND_IDS.StartFindReplaceAction,label:n.localize(5,null),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596}}})||this}return m(t,e),t.prototype.run=function(e,t){if(!t.getConfiguration().readOnly){var n=w.get(t);n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:!0,shouldFocus:2,shouldAnimate:!0})}},t}(d.EditorAction);I=y([d.editorAction],I),t.StartFindReplaceAction=I;var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._getNextMatch=function(e){var t=v(e,{changeFindSearchString:!0,allowMultiline:!0,highlightFindOptions:!0});if(!t)return null;if(t.currentMatch)return t.currentMatch;var n=e.getSelections(),i=n[n.length-1],o=e.getModel().findNextMatch(t.searchText,i.getEndPosition(),!1,t.matchCase,t.wholeWord,!1);return o?new u.Selection(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn):null},t}(d.EditorAction);t.SelectNextFindMatchAction=D;var R=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._getPreviousMatch=function(e){var t=v(e,{changeFindSearchString:!0,allowMultiline:!0,highlightFindOptions:!0});if(!t)return null;if(t.currentMatch)return t.currentMatch;var n=e.getSelections(),i=n[n.length-1],o=e.getModel().findPreviousMatch(t.searchText,i.getStartPosition(),!1,t.matchCase,t.wholeWord,!1);return o?new u.Selection(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn):null},t}(d.EditorAction);t.SelectPreviousFindMatchAction=R;var k=function(e){function t(){return e.call(this,{id:h.FIND_IDS.AddSelectionToNextFindMatchAction,label:n.localize(6,null),alias:"Add Selection To Next Find Match",precondition:null,kbOpts:{kbExpr:b.Focus,primary:2082}})||this}return m(t,e),t.prototype.run=function(e,t){var n=this._getNextMatch(t);if(n){var i=t.getSelections();t.setSelections(i.concat(n)),t.revealRangeInCenterIfOutsideViewport(n)}},t}(D);k=y([d.editorAction],k),t.AddSelectionToNextFindMatchAction=k;var O=function(e){function t(){return e.call(this,{id:h.FIND_IDS.AddSelectionToPreviousFindMatchAction,label:n.localize(7,null),alias:"Add Selection To Previous Find Match",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var n=this._getPreviousMatch(t);if(n){var i=t.getSelections();t.setSelections(i.concat(n)),t.revealRangeInCenterIfOutsideViewport(n)}},t}(R);O=y([d.editorAction],O),t.AddSelectionToPreviousFindMatchAction=O;var P=function(e){function t(){return e.call(this,{id:h.FIND_IDS.MoveSelectionToNextFindMatchAction,label:n.localize(8,null),alias:"Move Last Selection To Next Find Match",precondition:null,kbOpts:{kbExpr:b.Focus,primary:o.KeyChord(2089,2082)}})||this}return m(t,e),t.prototype.run=function(e,t){var n=this._getNextMatch(t);if(n){var i=t.getSelections();t.setSelections(i.slice(0,i.length-1).concat(n)),t.revealRangeInCenterIfOutsideViewport(n)}},t}(D);P=y([d.editorAction],P),t.MoveSelectionToNextFindMatchAction=P;var A=function(e){function t(){return e.call(this,{id:h.FIND_IDS.MoveSelectionToPreviousFindMatchAction,label:n.localize(9,null),alias:"Move Last Selection To Previous Find Match",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var n=this._getPreviousMatch(t);if(n){var i=t.getSelections();t.setSelections(i.slice(0,i.length-1).concat(n)),t.revealRangeInCenterIfOutsideViewport(n)}},t}(R);A=y([d.editorAction],A),t.MoveSelectionToPreviousFindMatchAction=A;var W=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){var n=v(t,{changeFindSearchString:!0,allowMultiline:!0,highlightFindOptions:!0});if(n){var i=t.getModel().findMatches(n.searchText,!0,!1,n.matchCase,n.wholeWord,!1).map(function(e){return e.range});if(i.length>0){for(var o=t.getSelection(),r=0,s=i.length;r<s;r++){var a=i[r],l=a.intersectRanges(o);if(l){i.splice(r,1),i.unshift(a);break}}t.setSelections(i.map(function(e){return new u.Selection(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn)}))}}},t}(d.EditorAction);t.AbstractSelectHighlightsAction=W;var F=function(e){function t(){return e.call(this,{id:"editor.action.selectHighlights",label:n.localize(10,null),alias:"Select All Occurrences of Find Match",precondition:null,kbOpts:{kbExpr:b.Focus,primary:3114}})||this}return m(t,e),t}(W);F=y([d.editorAction],F),t.SelectHighlightsAction=F;var V=function(e){function t(){return e.call(this,{id:"editor.action.changeAll",label:n.localize(11,null),alias:"Change All Occurrences",precondition:b.Writable,kbOpts:{kbExpr:b.TextFocus,primary:2108},menuOpts:{group:"1_modification",order:1.2}})||this}return m(t,e),t}(W);V=y([d.editorAction],V),t.CompatChangeAll=V;var H=U=function(e){function t(t){var n=e.call(this)||this;return n.editor=t,n.decorations=[],n.updateSoon=n._register(new g.RunOnceScheduler(function(){return n._update()},300)),n.lastWordUnderCursor=null,n._register(t.onDidChangeCursorSelection(function(e){e.selection.isEmpty()?e.reason===c.CursorChangeReason.Explicit?(n.lastWordUnderCursor&&n.lastWordUnderCursor.containsPosition(e.selection.getStartPosition())||n.removeDecorations(),n.updateSoon.schedule()):n.removeDecorations():n._update()})),n._register(t.onDidChangeModel(function(e){n.removeDecorations()})),n._register(w.get(t).getState().addChangeListener(function(e){n._update()})),n}return m(t,e),t.prototype.getId=function(){return U.ID},t.prototype.removeDecorations=function(){this.lastWordUnderCursor=null,this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},t.prototype._update=function(){var e=this.editor.getModel();if(e&&(this.lastWordUnderCursor=null,this.editor.getConfiguration().contribInfo.selectionHighlight)){var t=v(this.editor,{changeFindSearchString:!1,allowMultiline:!1,highlightFindOptions:!1});if(!t)return void this.removeDecorations();var n=f.DocumentHighlightProviderRegistry.has(e);if(t.currentMatch){if(n)return void this.removeDecorations();this.lastWordUnderCursor=t.currentMatch}if(/^[ \t]+$/.test(t.searchText))return void this.removeDecorations();if(t.searchText.length>200)return void this.removeDecorations();for(var i=this.editor.getSelections(),o=e.getValueInRange(i[0]),r=1;r<i.length;r++){var s=e.getValueInRange(i[r]);if(o!==s)return void this.removeDecorations()}var u=e.findMatches(t.searchText,!0,!1,t.matchCase,t.wholeWord,!1).map(function(e){return e.range});u.sort(a.Range.compareRangesUsingStarts),i.sort(a.Range.compareRangesUsingStarts);for(var l=[],r=0,d=0,h=u.length,p=i.length;r<h;){var g=u[r];if(d>=p)l.push(g),r++;else{var m=a.Range.compareRangesUsingStarts(g,i[d]);m<0?(l.push(g),r++):m>0?d++:(r++,d++)}}var _=l.map(function(e){return{range:e,options:{stickiness:c.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:n?void 0:{color:"#A0A0A0",darkColor:"#A0A0A0",position:c.OverviewRulerLane.Center}}}});this.decorations=this.editor.deltaDecorations(this.decorations,_)}},t.prototype.dispose=function(){this.removeDecorations(),e.prototype.dispose.call(this)},t}(r.Disposable);H.ID="editor.contrib.selectionHighlighter",H=U=y([d.commonEditorContribution],H),t.SelectionHighlighter=H;var B=d.EditorCommand.bindToContribution(w.get);d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.CloseFindWidgetCommand,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:9,secondary:[1033]}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:h.ToggleCaseSensitiveKeybinding.primary,mac:h.ToggleCaseSensitiveKeybinding.mac,win:h.ToggleCaseSensitiveKeybinding.win,linux:h.ToggleCaseSensitiveKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:h.ToggleWholeWordKeybinding.primary,mac:h.ToggleWholeWordKeybinding.mac,win:h.ToggleWholeWordKeybinding.win,linux:h.ToggleWholeWordKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:h.ToggleRegexKeybinding.primary,mac:h.ToggleRegexKeybinding.mac,win:h.ToggleRegexKeybinding.win,linux:h.ToggleRegexKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ReplaceOneAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replace()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:3094}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ReplaceAllAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replaceAll()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:2563}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.SelectAllMatchesAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:b.Focus,primary:515}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ShowPreviousFindTermAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.showPreviousFindTerm()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:s.ContextKeyExpr.and(t.CONTEXT_FIND_INPUT_FOCUSSED,b.Focus),primary:h.ShowPreviousFindTermKeybinding.primary,mac:h.ShowPreviousFindTermKeybinding.mac,win:h.ShowPreviousFindTermKeybinding.win,linux:h.ShowPreviousFindTermKeybinding.linux}})),d.CommonEditorRegistry.registerEditorCommand(new B({id:h.FIND_IDS.ShowNextFindTermAction,precondition:t.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.showNextFindTerm()},kbOpts:{weight:d.CommonEditorRegistry.commandWeight(5),kbExpr:s.ContextKeyExpr.and(t.CONTEXT_FIND_INPUT_FOCUSSED,b.Focus),primary:h.ShowNextFindTermKeybinding.primary,mac:h.ShowNextFindTermKeybinding.mac,win:h.ShowNextFindTermKeybinding.win,linux:h.ShowNextFindTermKeybinding.linux}}));var U}),define(d[458],h([0,1,290,10,9,11,256,100,37,21,102,3,163,370]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=n.localize(0,null),f=n.localize(1,null),g=n.localize(2,null),v=n.localize(3,null),_=n.localize(4,null),y=n.localize(5,null),C=n.localize(6,null),b=n.localize(7,null),w=n.localize(8,null),S=n.localize(9,null),E=n.localize(10,null),L=n.localize(11,null),N=n.localize(12,null),T=n.localize(13,null),x=69,M=342,I=function(e){function t(t,n,i,o,s,a){var u=e.call(this)||this;u._codeEditor=t,u._controller=n,u._state=i,u._contextViewProvider=o,u._keybindingService=s,u._isVisible=!1,u._isReplaceVisible=!1,u._register(u._state.addChangeListener(function(e){return u._onStateChanged(e)})),u._buildDomNode(),u._updateButtons();var l=function(){var e=u._codeEditor.getConfiguration().layoutInfo.width,t=!1,n=!1,i=!1;M+28>=e+50&&(t=!0),M+28>=e&&(i=!0),M+x+28>=e&&(n=!0),r.toggleClass(u._domNode,"collapsed-find-widget",t),r.toggleClass(u._domNode,"reduced-find-widget",n),r.toggleClass(u._domNode,"narrow-find-widget",i)};return l(),u._register(u._codeEditor.onDidChangeConfiguration(function(e){e.readOnly&&(u._codeEditor.getConfiguration().readOnly&&u._state.change({isReplaceRevealed:!1},!1),u._updateButtons()),e.layoutInfo&&l()})),u._register(u._codeEditor.onDidChangeCursorSelection(function(){u._isVisible&&u._updateToggleSelectionFindButton()})),u._findInputFocussed=h.CONTEXT_FIND_INPUT_FOCUSSED.bindTo(a),u._focusTracker=u._register(r.trackFocus(u._findInput.inputBox.inputElement)),u._focusTracker.addFocusListener(function(){if(u._findInputFocussed.set(!0),u._toggleSelectionFind.checked){var e=u._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=u._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(d.Range.equalsRange(e,t)||u._state.change({searchScope:e},!0))}}),u._focusTracker.addBlurListener(function(){u._findInputFocussed.set(!1)}),u._codeEditor.addOverlayWidget(u),u}return m(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:l.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER}:null},t.prototype._onStateChanged=function(e){if(e.searchString&&(this._findInput.setValue(this._state.searchString),this._updateButtons()),e.replaceString&&(this._replaceInputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal(!0):this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getConfiguration().readOnly||this._isReplaceVisible||(this._isReplaceVisible=!0,this._updateButtons()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){var t=this._state.searchString.length>0&&0===this._state.matchesCount;r.toggleClass(this._domNode,"no-results",t),this._updateMatchesCount()}},t.prototype._updateMatchesCount=function(){this._matchesCount.style.minWidth=x+"px",this._state.matchesCount>=c.MATCHES_LIMIT?this._matchesCount.title=L:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);var e;if(this._state.matchesCount>0){var t=String(this._state.matchesCount);this._state.matchesCount>=c.MATCHES_LIMIT&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=o.format(N,n,t)}else e=T;this._matchesCount.appendChild(document.createTextNode(e)),x=Math.max(x,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&e.startLineNumber!==e.endLineNumber,n=this._toggleSelectionFind.checked;this._toggleSelectionFind.setEnabled(this._isVisible&&(n||t))},t.prototype._updateButtons=function(){this._findInput.setEnabled(this._isVisible),this._replaceInputBox.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);var e=this._state.searchString.length>0;this._prevBtn.setEnabled(this._isVisible&&e),this._nextBtn.setEnabled(this._isVisible&&e),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),r.toggleClass(this._domNode,"replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);var t=!this._codeEditor.getConfiguration().readOnly;this._toggleReplaceBtn.setEnabled(this._isVisible&&t)},t.prototype._reveal=function(e){var t=this;this._isVisible||(this._isVisible=!0,this._updateButtons(),setTimeout(function(){r.addClass(t._domNode,"visible"),e||(r.addClass(t._domNode,"noanimation"),setTimeout(function(){r.removeClass(t._domNode,"noanimation")},200))},0),this._codeEditor.layoutOverlayWidget(this))},t.prototype._hide=function(e){this._isVisible&&(this._isVisible=!1,this._updateButtons(),r.removeClass(this._domNode,"visible"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this))},t.prototype.focusFindInput=function(){this._findInput.select(),this._findInput.focus()},t.prototype.focusReplaceInput=function(){this._replaceInputBox.select(),this._replaceInputBox.focus()},t.prototype.highlightFindOptions=function(){this._findInput.highlightFindOptions()},t.prototype._onFindInputKeyDown=function(e){switch(e.toKeybinding().value){case 3:return this._codeEditor.getAction(c.FIND_IDS.NextMatchFindAction).run().done(null,i.onUnexpectedError),void e.preventDefault();case 1027:return this._codeEditor.getAction(c.FIND_IDS.PreviousMatchFindAction).run().done(null,i.onUnexpectedError),void e.preventDefault();case 2:return this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault();case 2066:return this._codeEditor.focus(),void e.preventDefault()}},t.prototype._onReplaceInputKeyDown=function(e){switch(e.toKeybinding().value){case 3:return this._controller.replace(),void e.preventDefault();case 2051:return this._controller.replaceAll(),void e.preventDefault();case 2:return this._findInput.focusOnCaseSensitive(),void e.preventDefault();case 1026:return this._findInput.focus(),void e.preventDefault();case 2066:return this._codeEditor.focus(),void e.preventDefault()}},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybindings(e);return 0===t.length?"":" ("+this._keybindingService.getLabelFor(t[0])+")"},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new s.FindInput(null,this._contextViewProvider,{width:t.FIND_INPUT_AREA_WIDTH,label:p,placeholder:f,appendCaseSensitiveLabel:this._keybindingLabelFor(c.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(c.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(c.FIND_IDS.ToggleRegexCommand),validation:function(t){if(0===t.length)return null;if(!e._findInput.getRegex())return null;try{return new RegExp(t),null}catch(e){return{content:e.message}}}})),this._register(this._findInput.onKeyDown(function(t){return e._onFindInputKeyDown(t)})),this._register(this._findInput.onInput(function(){e._state.change({searchString:e._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(function(){e._state.change({isRegex:e._findInput.getRegex(),wholeWord:e._findInput.getWholeWords(),matchCase:e._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(function(t){t.equals(1026)&&e._isReplaceVisible&&(e._replaceInputBox.focus(),t.preventDefault())})),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new R({label:g+this._keybindingLabelFor(c.FIND_IDS.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(c.FIND_IDS.PreviousMatchFindAction).run().done(null,i.onUnexpectedError)},onKeyDown:function(e){}})),this._nextBtn=this._register(new R({label:v+this._keybindingLabelFor(c.FIND_IDS.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(c.FIND_IDS.NextMatchFindAction).run().done(null,i.onUnexpectedError)},onKeyDown:function(e){}}));var n=document.createElement("div");return n.className="find-part",n.appendChild(this._findInput.domNode),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new D({parent:n,title:_,onChange:function(){if(e._toggleSelectionFind.checked){var t=e._codeEditor.getSelection();1===t.endColumn&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,1)),t.isEmpty()||e._state.change({searchScope:t},!0)}else e._state.change({searchScope:null},!0)}})),this._closeBtn=this._register(new R({label:y+this._keybindingLabelFor(c.FIND_IDS.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1},!1)},onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),n.appendChild(this._closeBtn.domNode),n},t.prototype._buildReplacePart=function(){var e=this,n=document.createElement("div");n.className="replace-input",n.style.width=t.REPLACE_INPUT_AREA_WIDTH+"px",this._replaceInputBox=this._register(new a.InputBox(n,null,{ariaLabel:C,placeholder:b})),this._register(r.addStandardDisposableListener(this._replaceInputBox.inputElement,"keydown",function(t){return e._onReplaceInputKeyDown(t)})),this._register(r.addStandardDisposableListener(this._replaceInputBox.inputElement,"input",function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)})),this._replaceBtn=this._register(new R({label:w+this._keybindingLabelFor(c.FIND_IDS.ReplaceOneAction),className:"replace",onTrigger:function(){e._controller.replace()},onKeyDown:function(t){t.equals(1026)&&(e._closeBtn.focus(),t.preventDefault())}})),this._replaceAllBtn=this._register(new R({label:S+this._keybindingLabelFor(c.FIND_IDS.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()},onKeyDown:function(e){}}));var i=document.createElement("div");return i.className="replace-part",i.appendChild(n),i.appendChild(this._replaceBtn.domNode),i.appendChild(this._replaceAllBtn.domNode),i},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),n=this._buildReplacePart();this._toggleReplaceBtn=this._register(new R({label:E,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1)},onKeyDown:function(e){}})),this._toggleReplaceBtn.toggleClass("expand",this._isReplaceVisible),this._toggleReplaceBtn.toggleClass("collapse",!this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","false"),this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(n)},t}(u.Widget);I.ID="editor.contrib.findWidget",I.PART_WIDTH=275,I.FIND_INPUT_AREA_WIDTH=I.PART_WIDTH-54,I.REPLACE_INPUT_AREA_WIDTH=I.FIND_INPUT_AREA_WIDTH,t.FindWidget=I;var D=function(e){function t(n){var i=e.call(this)||this;return i._opts=n,i._domNode=document.createElement("div"),i._domNode.className="monaco-checkbox",i._domNode.title=i._opts.title,i._checkbox=document.createElement("input"),i._checkbox.type="checkbox",i._checkbox.className="checkbox",i._checkbox.id="checkbox-"+t._COUNTER++,i._label=document.createElement("label"),i._label.className="label",i._label.htmlFor=i._checkbox.id,i._domNode.appendChild(i._checkbox),i._domNode.appendChild(i._label),i._opts.parent.appendChild(i._domNode),i.onchange(i._checkbox,function(e){i._opts.onChange()}),i}return m(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this._checkbox.checked},set:function(e){this._checkbox.checked=e},enumerable:!0,configurable:!0}),t.prototype.focus=function(){this._checkbox.focus()},t.prototype.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?this.enable():this.disable()},t}(u.Widget);D._COUNTER=0;var R=function(e){function t(t){var n=e.call(this)||this;return n._opts=t,n._domNode=document.createElement("div"),n._domNode.title=n._opts.label,n._domNode.tabIndex=0,n._domNode.className="button "+n._opts.className,n._domNode.setAttribute("role","button"),n._domNode.setAttribute("aria-label",n._opts.label),n.onclick(n._domNode,function(e){n._opts.onTrigger(),e.preventDefault()}),n.onkeydown(n._domNode,function(e){return e.equals(10)||e.equals(3)?(n._opts.onTrigger(),void e.preventDefault()):void n._opts.onKeyDown(e)}),n}return m(t,e),Object.defineProperty(t.prototype,"domNode",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),t.prototype.isEnabled=function(){return this._domNode.tabIndex>=0},t.prototype.focus=function(){this._domNode.focus()},t.prototype.setEnabled=function(e){r.toggleClass(this._domNode,"disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1},t.prototype.setExpanded=function(e){this._domNode.setAttribute("aria-expanded",String(e))},t.prototype.toggleClass=function(e,t){r.toggleClass(this._domNode,e,t)},t}(u.Widget)}),define(d[459],h([0,1,61,43,19,29,458,403,163]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(e){function t(t,n,i,o){var r=e.call(this,t,i)||this;return r._widget=r._register(new s.FindWidget(t,r,r._state,n,o,i)),r._findOptionsWidget=r._register(new a.FindOptionsWidget(t,r._state,o)),r}return m(t,e),
t.prototype._start=function(t){e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t}(u.CommonFindController);l=y([r.editorContribution,C(1,n.IContextViewService),C(2,o.IContextKeyService),C(3,i.IKeybindingService)],l),t.FindController=l}),define(d[460],h([0,1,292,22,17,31,4,2,3,13,29,404,226,225,372]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e){if(!i.isUndefined(e)){if(!i.isObject(e))return!1;var t=e;if(!i.isUndefined(t.levels)&&!i.isNumber(t.levels))return!1;if(!i.isUndefined(t.direction)&&!i.isString(t.direction))return!1}return!0}var g=a.EditorContextKeys,v=x=function(){function e(e){var t=this;this.editor=e,this._isEnabled=this.editor.getConfiguration().contribInfo.folding,this.globalToDispose=[],this.localToDispose=[],this.decorations=[],this.computeToken=0,this.globalToDispose.push(this.editor.onDidChangeModel(function(){return t.onModelChanged()})),this.globalToDispose.push(this.editor.onDidChangeConfiguration(function(e){var n=t._isEnabled;t._isEnabled=t.editor.getConfiguration().contribInfo.folding,n!==t._isEnabled&&t.onModelChanged()})),this.onModelChanged()}return e.get=function(e){return e.getContribution(p.ID)},e.prototype.getId=function(){return p.ID},e.prototype.dispose=function(){this.cleanState(),this.globalToDispose=s.dispose(this.globalToDispose)},e.prototype.saveViewState=function(){var e=this.editor.getModel();if(!e)return{};var t=[];return this.decorations.forEach(function(n){if(n.isCollapsed){var i=n.getDecorationRange(e);i&&t.push({startLineNumber:i.startLineNumber,endLineNumber:i.endLineNumber,indent:n.indent,isCollapsed:!0})}}),{collapsedRegions:t,lineCount:e.getLineCount()}},e.prototype.restoreViewState=function(e){var t=this.editor.getModel();t&&this._isEnabled&&e&&Array.isArray(e.collapsedRegions)&&0!==e.collapsedRegions.length&&e.lineCount===t.getLineCount()&&(this.cleanState(),this.applyRegions(e.collapsedRegions),this.onModelChanged())},e.prototype.cleanState=function(){this.localToDispose=s.dispose(this.localToDispose)},e.prototype.applyRegions=function(e){var t=this,n=this.editor.getModel();if(n){var i=!1;e=h.limitByIndent(e,x.MAX_FOLDING_REGIONS).sort(function(e,t){return e.startLineNumber-t.startLineNumber}),this.editor.changeDecorations(function(o){for(var r=[],s=0,a=0;a<t.decorations.length&&s<e.length;){var u=t.decorations[a],l=u.getDecorationRange(n);if(l){for(;s<e.length&&l.startLineNumber>e[s].startLineNumber;){var c=e[s];i=i||c.isCollapsed,r.push(new d.CollapsibleRegion(c,n,o)),s++}if(s<e.length){var h=e[s];l.startLineNumber<h.startLineNumber?(i=i||u.isCollapsed,u.dispose(o),a++):l.startLineNumber===h.startLineNumber&&(!u.isCollapsed||u.startLineNumber===h.startLineNumber&&u.endLineNumber===h.endLineNumber||(i=!0),h.isCollapsed=u.isCollapsed,u.update(h,n,o),r.push(u),a++,s++)}}else i=i||u.isCollapsed,u.dispose(o),a++}for(;a<t.decorations.length;){var u=t.decorations[a];i=i||u.isCollapsed,u.dispose(o),a++}for(;s<e.length;){var c=e[s];i=i||c.isCollapsed,r.push(new d.CollapsibleRegion(c,n,o)),s++}t.decorations=r}),i&&this.updateHiddenAreas()}},e.prototype.onModelChanged=function(){var e=this;this.cleanState();var t=this.editor.getModel();this._isEnabled&&t&&(this.computeAndApplyCollapsibleRegions(),this.contentChangedScheduler=new o.RunOnceScheduler(function(){return e.computeAndApplyCollapsibleRegions()},200),this.cursorChangedScheduler=new o.RunOnceScheduler(function(){return e.revealCursor()},200),this.localToDispose.push(this.contentChangedScheduler),this.localToDispose.push(this.cursorChangedScheduler),this.localToDispose.push(this.editor.onDidChangeModelContent(function(t){return e.contentChangedScheduler.schedule()})),this.localToDispose.push(this.editor.onDidChangeCursorPosition(function(t){return e.cursorChangedScheduler.schedule()})),this.localToDispose.push(this.editor.onMouseDown(function(t){return e.onEditorMouseDown(t)})),this.localToDispose.push(this.editor.onMouseUp(function(t){return e.onEditorMouseUp(t)})),this.localToDispose.push({dispose:function(){return e.disposeDecorations()}}))},e.prototype.computeAndApplyCollapsibleRegions=function(){var e=this.editor.getModel();this.applyRegions(e?h.computeRanges(e):[])},e.prototype.disposeDecorations=function(){var e=this;this.editor.changeDecorations(function(t){e.decorations.forEach(function(e){return e.dispose(t)})}),this.decorations=[],this.editor.setHiddenAreas([])},e.prototype.revealCursor=function(){var e=this,t=this.editor.getModel();if(t){var n=!1,i=this.editor.getSelections();this.editor.changeDecorations(function(o){return e.decorations.forEach(function(e){if(e.isCollapsed){var r=e.getDecorationRange(t);if(r)for(var s=0,a=i;s<a.length;s++){var u=a[s];if(r.startLineNumber<u.selectionStartLineNumber&&u.selectionStartLineNumber<=r.endLineNumber){e.setCollapsed(!1,o),n=!0;break}}}})}),n&&this.updateHiddenAreas(this.editor.getPosition().lineNumber)}},e.prototype.onEditorMouseDown=function(e){if(this.mouseDownInfo=null,0!==this.decorations.length){var t=e.target.range;if(t&&t.isEmpty&&e.event.leftButton){var n=this.editor.getModel(),i=!1;switch(e.target.type){case a.MouseTargetType.GUTTER_LINE_DECORATIONS:i=!0;break;case a.MouseTargetType.CONTENT_TEXT:if(t.isEmpty&&t.startColumn===n.getLineMaxColumn(t.startLineNumber))break;return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}}},e.prototype.onEditorMouseUp=function(e){var t=this;if(this.mouseDownInfo){var n=this.mouseDownInfo.lineNumber,i=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.isEmpty&&o.startLineNumber===n){var r=this.editor.getModel();if(i){if(e.target.type!==a.MouseTargetType.GUTTER_LINE_DECORATIONS)return}else if(o.startColumn!==r.getLineMaxColumn(n))return;this.editor.changeDecorations(function(e){for(var o=0;o<t.decorations.length;o++){var s=t.decorations[o],a=s.getDecorationRange(r);if(a&&a.startLineNumber===n)return void((i||s.isCollapsed)&&(s.setCollapsed(!s.isCollapsed,e),t.updateHiddenAreas(n)))}})}}},e.prototype.updateHiddenAreas=function(e){var t=this.editor.getModel(),n=this.editor.getSelections(),i=!1,o=[];this.decorations.filter(function(e){return e.isCollapsed}).forEach(function(e){var r=e.getDecorationRange(t);r&&(o.push({startLineNumber:r.startLineNumber+1,startColumn:1,endLineNumber:r.endLineNumber,endColumn:1}),n.forEach(function(e,o){u.Range.containsPosition(r,e.getStartPosition())&&(n[o]=e=e.setStartPosition(r.startLineNumber,t.getLineMaxColumn(r.startLineNumber)),i=!0),u.Range.containsPosition(r,e.getEndPosition())&&(n[o]=e.setEndPosition(r.startLineNumber,t.getLineMaxColumn(r.startLineNumber)),i=!0)}))}),i&&this.editor.setSelections(n),this.editor.setHiddenAreas(o),e&&this.editor.revealPositionInCenterIfOutsideViewport({lineNumber:e,column:1})},e.prototype.unfold=function(e){var t=this,n=this.editor.getModel(),i=!1,o=this.editor.getSelections(),r=!1;o.forEach(function(s,a){var u=d.getCollapsibleRegionsToUnfoldAtLine(t.decorations,n,s.startLineNumber,e);if(u.length>0&&(u.forEach(function(e,n){t.editor.changeDecorations(function(t){e.setCollapsed(!1,t),i=!0})}),!d.doesLineBelongsToCollapsibleRegion(u[0].foldingRange,s.startLineNumber))){var l=u[0].startLineNumber,c=n.getLineMaxColumn(u[0].startLineNumber);o[a]=s.setEndPosition(l,c).setStartPosition(l,c),r=!0}}),r&&this.editor.setSelections(o),i&&this.updateHiddenAreas(o[0].startLineNumber)},e.prototype.fold=function(e,t){var n=this,i=!1,o=this.editor.getSelections();o.forEach(function(o){var r=o.startLineNumber,s=d.getCollapsibleRegionsToFoldAtLine(n.decorations,n.editor.getModel(),r,e,t);s.forEach(function(e){return n.editor.changeDecorations(function(t){e.setCollapsed(!0,t),i=!0})})}),i&&this.updateHiddenAreas(o[0].startLineNumber)},e.prototype.foldUnfoldRecursively=function(e){var t=this,n=!1,i=this.editor.getModel(),o=this.editor.getSelections();o.forEach(function(o){for(var r,s=o.startLineNumber,a=[],u=0,l=t.decorations.length;u<l;u++){var c=t.decorations[u],d=c.getDecorationRange(i);if(d&&d.startLineNumber>=s&&(d.endLineNumber<=r||"undefined"==typeof r)){if(d.startLineNumber!==s&&"undefined"==typeof r)return;r=r||d.endLineNumber,a.push(c)}}a.length>0&&a.forEach(function(i){t.editor.changeDecorations(function(t){i.setCollapsed(e,t),n=!0})})}),n&&this.updateHiddenAreas(o[0].startLineNumber)},e.prototype.foldAll=function(){this.changeAll(!0)},e.prototype.unfoldAll=function(){this.changeAll(!1)},e.prototype.changeAll=function(e){var t=this;if(this.decorations.length>0){var n=!0;this.editor.changeDecorations(function(i){t.decorations.forEach(function(t){e!==t.isCollapsed&&(t.setCollapsed(e,i),n=!0)})}),n&&this.updateHiddenAreas(this.editor.getPosition().lineNumber)}},e.prototype.foldLevel=function(e,t){var n=this,i=this.editor.getModel(),o=[i.getFullModelRange()],r=!1;this.editor.changeDecorations(function(s){n.decorations.forEach(function(n){var a=n.getDecorationRange(i);if(a){for(;!u.Range.containsRange(o[o.length-1],a);)o.pop();o.push(a),o.length!==e+1||n.isCollapsed||t.some(function(e){return a.startLineNumber<e&&e<=a.endLineNumber})||(n.setCollapsed(!0,s),r=!0)}})}),r&&this.updateHiddenAreas(t[0])},e}();v.MAX_FOLDING_REGIONS=5e3,v=x=y([c.editorContribution],v),t.FoldingController=v;var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=v.get(t);i&&(this.reportTelemetry(e),this.invoke(i,t,n))},t.prototype.run=function(e,t){},t}(l.EditorAction),C=function(e){function t(){return e.call(this,{id:"editor.unfold",label:n.localize(0,null),alias:"Unfold",precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:3161,mac:{primary:2649}},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'level': Number of levels to unfold\n\t\t\t\t\t\t",constraint:f}]}})||this}return m(t,e),t.prototype.invoke=function(e,t,n){e.unfold(n?n.levels||1:1)},t}(_);C=y([l.editorAction],C);var b=function(e){function t(){return e.call(this,{id:"editor.unfoldRecursively",label:n.localize(1,null),alias:"Unfold Recursively",precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:r.KeyChord(2089,2137)}})||this}return m(t,e),t.prototype.invoke=function(e,t,n){e.foldUnfoldRecursively(!1)},t}(_);b=y([l.editorAction],b);var w=function(e){function t(){return e.call(this,{id:"editor.fold",label:n.localize(2,null),alias:"Fold",precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:3159,mac:{primary:2647}},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold\n\t\t\t\t\t\t\t* 'up': If 'true' folds given number of levels up otherwise folds down\n\t\t\t\t\t\t",constraint:f}]}})||this}return m(t,e),t.prototype.invoke=function(e,t,n){n=n?n:{levels:1,direction:"up"},e.fold(n.levels||1,"up"===n.direction)},t}(_);w=y([l.editorAction],w);var S=function(e){function t(){return e.call(this,{id:"editor.foldRecursively",label:n.localize(3,null),alias:"Fold Recursively",precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:r.KeyChord(2089,2135)}})||this}return m(t,e),t.prototype.invoke=function(e,t){e.foldUnfoldRecursively(!0)},t}(_);S=y([l.editorAction],S);var E=function(e){function t(){return e.call(this,{id:"editor.foldAll",label:n.localize(4,null),alias:"Fold All",precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:r.KeyChord(2089,2069)}})||this}return m(t,e),t.prototype.invoke=function(e,t){e.foldAll()},t}(_);E=y([l.editorAction],E);var L=function(e){function t(){return e.call(this,{id:"editor.unfoldAll",label:n.localize(5,null),alias:"Unfold All",precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:r.KeyChord(2089,2088)}})||this}return m(t,e),t.prototype.invoke=function(e,t){e.unfoldAll()},t}(_);L=y([l.editorAction],L);var N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.getFoldingLevel=function(){return parseInt(this.id.substr(t.ID_PREFIX.length))},t.prototype.getSelectedLines=function(e){return e.getSelections().map(function(e){return e.startLineNumber})},t.prototype.invoke=function(e,t){e.foldLevel(this.getFoldingLevel(),this.getSelectedLines(t))},t}(_);N.ID_PREFIX="editor.foldLevel",N.ID=function(e){return N.ID_PREFIX+e};for(var T=1;T<=9;T++)l.CommonEditorRegistry.registerEditorAction(new N({id:N.ID(T),label:n.localize(6,null,T),alias:"Fold Level "+T,precondition:null,kbOpts:{kbExpr:g.TextFocus,primary:r.KeyChord(2089,2048|21+T)}}));var x}),define(d[461],h([0,1,10,27,26,6,3,13,16,44,17]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";function d(e,t,i){var s=u.DocumentRangeFormattingEditProviderRegistry.ordered(e);if(0===s.length)return r.TPromise.as(void 0);var a;return c.sequence(s.map(function(r){if(o.isFalsyOrEmpty(a))return function(){return c.asWinJsPromise(function(n){return r.provideDocumentRangeFormattingEdits(e,t,i,n)}).then(function(e){a=e},n.onUnexpectedExternalError)}})).then(function(){return a})}function h(e,t){var i=u.DocumentFormattingEditProviderRegistry.ordered(e);if(0===i.length)return d(e,e.getFullModelRange(),t);var r;return c.sequence(i.map(function(i){if(o.isFalsyOrEmpty(r))return function(){return c.asWinJsPromise(function(n){return i.provideDocumentFormattingEdits(e,t,n)}).then(function(e){r=e},n.onUnexpectedExternalError)}})).then(function(){return r})}function p(e,t,i,o){var s=u.OnTypeFormattingEditProviderRegistry.ordered(e)[0];return s?s.autoFormatTriggerCharacters.indexOf(i)<0?r.TPromise.as(void 0):c.asWinJsPromise(function(n){return s.provideOnTypeFormattingEdits(e,t,i,o,n)}).then(function(e){return e},n.onUnexpectedExternalError):r.TPromise.as(void 0)}t.getDocumentRangeFormattingEdits=d,t.getDocumentFormattingEdits=h,t.getOnTypeFormattingEdits=p,a.CommonEditorRegistry.registerLanguageCommand("_executeFormatRangeProvider",function(e,t){var o=t.resource,r=t.range,a=t.options;if(!(o instanceof i.default&&s.Range.isIRange(r)))throw n.illegalArgument();var u=e.get(l.IModelService).getModel(o);if(!u)throw n.illegalArgument("resource");return d(u,s.Range.lift(r),a)}),a.CommonEditorRegistry.registerLanguageCommand("_executeFormatDocumentProvider",function(e,t){var o=t.resource,r=t.options;if(!(o instanceof i.default))throw n.illegalArgument("resource");var s=e.get(l.IModelService).getModel(o);if(!s)throw n.illegalArgument("resource");return h(s,r)}),a.CommonEditorRegistry.registerDefaultLanguageCommand("_executeFormatOnTypeProvider",function(e,t,i){var o=i.ch,r=i.options;if("string"!=typeof o)throw n.illegalArgument("ch");return p(e,t,o,r)})}),define(d[462],h([0,1,293,26,31,4,6,2,19,13,16,461,227,23,45,48,69]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v){"use strict";var _=a.ModeContextKeys,b=a.EditorContextKeys,w=T=function(){function e(e,t){var n=this;this.editor=e,this.workerService=t,this.callOnDispose=[],this.callOnModel=[],this.callOnDispose.push(e.onDidChangeConfiguration(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModel(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModelLanguage(function(){return n.update()})),this.callOnDispose.push(c.OnTypeFormattingEditProviderRegistry.onDidChange(this.update,this))}return e.prototype.update=function(){var e=this;if(this.callOnModel=r.dispose(this.callOnModel),this.editor.getConfiguration().contribInfo.formatOnType&&this.editor.getModel()){var t=this.editor.getModel(),n=c.OnTypeFormattingEditProviderRegistry.ordered(t)[0];if(n&&n.autoFormatTriggerCharacters){for(var i=new v.CharacterSet,o=0,s=n.autoFormatTriggerCharacters;o<s.length;o++){var a=s[o];i.add(a.charCodeAt(0))}this.callOnModel.push(this.editor.onDidType(function(t){var n=t.charCodeAt(t.length-1);i.has(n)&&e.trigger(String.fromCharCode(n))}))}}},e.prototype.trigger=function(e){var t=this;if(!(this.editor.getSelections().length>1)){var n=this.editor.getModel(),o=this.editor.getPosition(),r=!1,s=this.editor.onDidChangeModelRawContent(function(e){if(e.changeType===a.EventType.ModelRawContentChangedFlush)r=!0;else if(e.changeType===a.EventType.ModelRawContentChangedLineChanged){var t=e.lineNumber;r=t<=o.lineNumber}else if(e.changeType===a.EventType.ModelRawContentChangedLinesInserted){var n=e.fromLineNumber;r=n<=o.lineNumber}else if(e.changeType===a.EventType.ModelRawContentChangedLinesDeleted){var i=e.toLineNumber;r=i<=o.lineNumber}r&&s.dispose()}),u=n.getOptions();d.getOnTypeFormattingEdits(n,o,e,{tabSize:u.tabSize,insertSpaces:u.insertSpaces}).then(function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e,[])}).then(function(e){s.dispose(),r||i.isFalsyOrEmpty(e)||t.editor.executeCommand(t.getId(),new h.EditOperationsCommand(e,t.editor.getSelection()))},function(e){throw s.dispose(),e})}},e.prototype.getId=function(){return T.ID},e.prototype.dispose=function(){this.callOnDispose=r.dispose(this.callOnDispose),this.callOnModel=r.dispose(this.callOnModel)},e}();w.ID="editor.contrib.autoFormat",w=T=y([l.commonEditorContribution,C(1,g.IEditorWorkerService)],w);var S=x=function(){function e(e,t){var n=this;this.editor=e,this.workerService=t,this.callOnDispose=[],this.callOnModel=[],this.callOnDispose.push(e.onDidChangeConfiguration(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModel(function(){return n.update()})),this.callOnDispose.push(e.onDidChangeModelLanguage(function(){return n.update()})),this.callOnDispose.push(c.DocumentRangeFormattingEditProviderRegistry.onDidChange(this.update,this))}return e.prototype.update=function(){var e=this;if(this.callOnModel=r.dispose(this.callOnModel),this.editor.getConfiguration().contribInfo.formatOnPaste&&this.editor.getModel()){var t=this.editor.getModel(),n=c.DocumentRangeFormattingEditProviderRegistry.ordered(t)[0];n&&n.provideDocumentRangeFormattingEdits&&this.callOnModel.push(this.editor.onDidPaste(function(t){e.trigger(t)}))}},e.prototype.trigger=function(e){var t=this;if(!(this.editor.getSelections().length>1)){var n=this.editor.getModel(),o=n.getOptions(),r=o.tabSize,s=o.insertSpaces,u=this.editor.captureState(a.CodeEditorStateFlag.Value,a.CodeEditorStateFlag.Position);d.getDocumentRangeFormattingEdits(n,e,{tabSize:r,insertSpaces:s}).then(function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e,[])}).then(function(e){if(u.validate(t.editor)&&!i.isFalsyOrEmpty(e)){var n=new h.EditOperationsCommand(e,t.editor.getSelection());t.editor.executeCommand(t.getId(),n)}})}},e.prototype.getId=function(){return x.ID},e.prototype.dispose=function(){this.callOnDispose=r.dispose(this.callOnDispose),this.callOnModel=r.dispose(this.callOnModel)},e}();S.ID="editor.contrib.formatOnPaste",S=x=y([l.commonEditorContribution,C(1,g.IEditorWorkerService)],S);var E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){var n=this,o=e.get(g.IEditorWorkerService),r=this._getFormattingEdits(t);if(!r)return s.TPromise.as(void 0);var u=t.captureState(a.CodeEditorStateFlag.Value,a.CodeEditorStateFlag.Position);return r.then(function(e){return o.computeMoreMinimalEdits(t.getModel().uri,e,t.getSelections())}).then(function(e){if(u.validate(t)&&!i.isFalsyOrEmpty(e)){var o=new h.EditOperationsCommand(e,t.getSelection());t.executeCommand(n.id,o),t.focus()}})},t}(l.EditorAction);t.AbstractFormatAction=E;var L=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:n.localize(0,null),alias:"Format Document",precondition:u.ContextKeyExpr.and(b.Writable,_.hasDocumentFormattingProvider),kbOpts:{kbExpr:b.TextFocus,primary:1572,linux:{primary:3111}},menuOpts:{group:"1_modification",order:1.3}})||this}return m(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return d.getDocumentFormattingEdits(t,{tabSize:i,insertSpaces:o})},t}(E);L=y([l.editorAction],L),t.FormatDocumentAction=L;var N=function(e){function t(){return e.call(this,{id:"editor.action.formatSelection",label:n.localize(1,null),alias:"Format Code",precondition:u.ContextKeyExpr.and(b.Writable,_.hasDocumentSelectionFormattingProvider,b.HasNonEmptySelection),kbOpts:{kbExpr:b.TextFocus,primary:o.KeyChord(2089,2084)},menuOpts:{group:"1_modification",order:1.31}})||this}return m(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return d.getDocumentRangeFormattingEdits(t,e.getSelection(),{tabSize:i,insertSpaces:o})},t}(E);N=y([l.editorAction],N),t.FormatSelectionAction=N,p.CommandsRegistry.registerCommand("editor.action.format",function(e){var t=e.get(f.ICodeEditorService).getFocusedCodeEditor();if(t)return(new(function(e){function t(){return e.call(this,{})||this}return m(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=e.getSelection(),i=t.getOptions(),o=i.tabSize,r=i.insertSpaces;return n.isEmpty()?d.getDocumentFormattingEdits(t,{tabSize:o,insertSpaces:r}):d.getDocumentRangeFormattingEdits(t,n,{tabSize:o,insertSpaces:r})},t}(E))).run(e,t)});var T,x}),define(d[463],h([0,1,10,6,13,16,17]),function(e,t,n,i,o,r,s){"use strict";function a(e){return i.TPromise.join(e).then(function(e){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n];Array.isArray(o)?t.push.apply(t,o):o&&t.push(o)}return t})}function u(e,t){var i=r.DefinitionProviderRegistry.ordered(e),o=i.map(function(i,o){return s.asWinJsPromise(function(n){return i.provideDefinition(e,t,n)}).then(function(e){return e},function(e){n.onUnexpectedExternalError(e)})});return a(o)}function l(e,t){var i=r.ImplementationProviderRegistry.ordered(e),o=i.map(function(i,o){return s.asWinJsPromise(function(n){return i.provideImplementation(e,t,n)}).then(function(e){return e},function(e){n.onUnexpectedExternalError(e)})});return a(o)}t.getDeclarationsAtPosition=u,t.getImplementationAtPosition=l,o.CommonEditorRegistry.registerDefaultLanguageCommand("_executeDefinitionProvider",u),o.CommonEditorRegistry.registerDefaultLanguageCommand("_executeImplementationProvider",l)}),define(d[464],h([0,1,295,12,4,30,11,23,19,81,47,15,3,2,13,29,161,374]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v){"use strict";var _=p.EditorContextKeys,b=function(){function e(e,t){var n=this;this._editor=e,this._markers=null,this._nextIdx=-1,this._toUnbind=[],this._ignoreSelectionChange=!1,this._onCurrentMarkerChanged=new i.Emitter,this._onMarkerSetChanged=new i.Emitter,this.setMarkers(t),this._toUnbind.push(this._editor.onDidDispose(function(){return n.dispose()})),this._toUnbind.push(this._editor.onDidChangeCursorPosition(function(){n._ignoreSelectionChange||(n._nextIdx=-1)}))}return Object.defineProperty(e.prototype,"onCurrentMarkerChanged",{get:function(){return this._onCurrentMarkerChanged.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMarkerSetChanged",{get:function(){return this._onMarkerSetChanged.event},enumerable:!0,configurable:!0}),e.prototype.setMarkers=function(e){this._markers=e||[],this._markers.sort(function(e,t){return r.default.compare(e.severity,t.severity)||h.Range.compareRangesUsingStarts(e,t)}),this._nextIdx=-1,this._onMarkerSetChanged.fire(this)},e.prototype.withoutWatchingEditorPosition=function(e){this._ignoreSelectionChange=!0;try{e()}finally{this._ignoreSelectionChange=!1}},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0;i<this._markers.length;i++)if(h.Range.containsPosition(this._markers[i],n)){this._nextIdx=i+(e?0:-1),t=!0;break}t||(this._nextIdx=e?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)},e.prototype.move=function(e){if(!this.canNavigate())return void this._onCurrentMarkerChanged.fire(void 0);this._nextIdx===-1?this._initIdx(e):e?(this._nextIdx+=1,this._nextIdx>=this._markers.length&&(this._nextIdx=0)):(this._nextIdx-=1,this._nextIdx<0&&(this._nextIdx=this._markers.length-1));var t=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(t)},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.next=function(){this.move(!0)},e.prototype.previous=function(){this.move(!1)},e.prototype.findMarkerAtPosition=function(e){for(var t=0,n=this._markers;t<n.length;t++){var i=n[t];if(h.Range.containsPosition(i,e))return i}},Object.defineProperty(e.prototype,"total",{get:function(){return this._markers.length},enumerable:!0,configurable:!0}),e.prototype.indexOf=function(e){return 1+this._markers.indexOf(e)},e.prototype.reveal=function(){var e=this;this._nextIdx!==-1&&this.withoutWatchingEditorPosition(function(){var t=new d.Position(e._markers[e._nextIdx].startLineNumber,e._markers[e._nextIdx].startColumn);e._editor.setPosition(t),e._editor.revealPositionInCenter(t)})},e.prototype.dispose=function(){this._toUnbind=o.dispose(this._toUnbind)},e}(),w=function(){function e(e){this.lines=0,this.domNode=document.createElement("div"),this.domNode.className="block descriptioncontainer",this.domNode.setAttribute("aria-live","assertive"),this.domNode.setAttribute("role","alert"),e.appendChild(this.domNode)}return e.prototype.update=function(e){var t=this,n=e.source,i=e.message;if(this.lines=1,n){var o=new Array(n.length+3+1).join(" ");i="["+n+"] "+i.replace(/\r\n|\r|\n/g,function(){return t.lines+=1,"\n"+o})}this.domNode.innerText=i},e}(),S=function(e){function t(t,n,i){var o=e.call(this,t,{showArrow:!0,showFrame:!0,isAccessible:!0})||this;return o._model=n,o._commandService=i,o._callOnDispose=[],o.create(),o._wireModelAndView(),o}return m(t,e),t.prototype.dispose=function(){this._callOnDispose=o.dispose(this._callOnDispose),e.prototype.dispose.call(this)},t.prototype.focus=function(){this._parentContainer.focus()},t.prototype._fillContainer=function(e){this._parentContainer=e,s.addClass(e,"marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._title=document.createElement("div"),this._title.className="block title",this._container.appendChild(this._title),this._message=new w(this._container),this.editor.applyFontInfo(this._message.domNode)},t.prototype.show=function(t,n){e.prototype.show.call(this,t,n),this.focus()},t.prototype._wireModelAndView=function(){this._model.onCurrentMarkerChanged(this.showAtMarker,this,this._callOnDispose),this._model.onMarkerSetChanged(this._onMarkersChanged,this,this._callOnDispose)},t.prototype.showAtMarker=function(e){var t=this;e&&(this._container.classList.remove("stale"),this._title.innerHTML=n.localize(0,null,this._model.indexOf(e),this._model.total),this._message.update(e),this._model.withoutWatchingEditorPosition(function(){switch(e.severity){case r.default.Error:t.options.frameColor="#ff5a5a";break;case r.default.Warning:case r.default.Info:t.options.frameColor="#5aac5a"}t.show({lineNumber:e.startLineNumber,column:e.startColumn},t.computeRequiredHeight())}))},t.prototype._onMarkersChanged=function(){var e=this._model.findMarkerAtPosition(this.position);e?(this._container.classList.remove("stale"),this._message.update(e)):this._container.classList.add("stale"),this._relayout()},t.prototype._relayout=function(){e.prototype._relayout.call(this,this.computeRequiredHeight())},t.prototype.computeRequiredHeight=function(){return 1+this._message.lines},t}(v.ZoneWidget),E=function(e){function t(t,n){var i=e.call(this,n)||this;return i._isNext=t,i}return m(t,e),t.prototype.run=function(e,t){var n=e.get(c.ITelemetryService),i=L.get(t);if(i){var o=i.getOrCreateModel();n.publicLog("zoneWidgetShown",{mode:"go to error"}),o&&(this._isNext?o.next():o.previous(),o.reveal())}},t}(f.EditorAction),L=I=function(){function e(e,t,n,i){this._markerService=t,this._contextKeyService=n,this._commandService=i,this._callOnClose=[],this._editor=e,this._markersNavigationVisible=x.bindTo(this._contextKeyService)}return e.get=function(e){return e.getContribution(I.ID)},e.prototype.getId=function(){return I.ID},e.prototype.dispose=function(){this._cleanUp()},e.prototype._cleanUp=function(){this._markersNavigationVisible.reset(),this._callOnClose=o.dispose(this._callOnClose),this._zone=null,this._model=null},e.prototype.getOrCreateModel=function(){var e=this;if(this._model)return this._model;var t=this._getMarkers();return this._model=new b(this._editor,t),this._zone=new S(this._editor,this._model,this._commandService),this._markersNavigationVisible.set(!0),this._callOnClose.push(this._model),this._callOnClose.push(this._zone),this._callOnClose.push(this._editor.onDidChangeModel(function(){return e._cleanUp()})),this._model.onCurrentMarkerChanged(function(t){return!t&&e._cleanUp()},void 0,this._callOnClose),this._markerService.onMarkerChanged(this._onMarkerChanged,this,this._callOnClose),this._model},e.prototype.closeMarkersNavigation=function(){this._cleanUp(),this._editor.focus()},e.prototype._onMarkerChanged=function(e){var t=this;e.some(function(e){return t._editor.getModel().uri.toString()===e.toString()})&&this._model.setMarkers(this._getMarkers())},e.prototype._getMarkers=function(){return this._markerService.read({resource:this._editor.getModel().uri})},e}();L.ID="editor.contrib.markerController",L=I=y([g.editorContribution,C(1,l.IMarkerService),C(2,u.IContextKeyService),C(3,a.ICommandService)],L);var N=function(e){function t(){return e.call(this,!0,{id:"editor.action.marker.next",label:n.localize(1,null),alias:"Go to Next Error or Warning",precondition:_.Writable,kbOpts:{kbExpr:_.Focus,primary:66}})||this}return m(t,e),t}(E);N=y([f.editorAction],N);var T=function(e){function t(){return e.call(this,!1,{id:"editor.action.marker.prev",label:n.localize(2,null),alias:"Go to Previous Error or Warning",precondition:_.Writable,kbOpts:{kbExpr:_.Focus,primary:1090}})||this}return m(t,e),t}(E);T=y([f.editorAction],T);var x=new u.RawContextKey("markersNavigationVisible",!1),M=f.EditorCommand.bindToContribution(L.get);f.CommonEditorRegistry.registerEditorCommand(new M({id:"closeMarkersNavigation",precondition:x,handler:function(e){return e.closeMarkersNavigation()},kbOpts:{weight:f.CommonEditorRegistry.commandWeight(50),kbExpr:_.Focus,primary:9,secondary:[1033]}}));var I}),define(d[465],h([0,1,26,10,6,13,16,17]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t){var r=s.HoverProviderRegistry.ordered(e),u=[],l=r.map(function(n,o){return a.asWinJsPromise(function(i){return n.provideHover(e,t,i)}).then(function(e){if(e){var t="undefined"!=typeof e.range,n="undefined"!=typeof e.contents&&e.contents&&e.contents.length>0;t&&n&&(u[o]=e)}},function(e){i.onUnexpectedExternalError(e)})});return o.TPromise.join(l).then(function(){return n.coalesce(u)})}t.getHover=u,r.CommonEditorRegistry.registerDefaultLanguageCommand("_executeHoverProvider",u)}),define(d[466],h([0,1,297,27,10,11,6,104,66,3,15,16,139,465,154,155,111,134]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v){"use strict";var _=function(){function e(e){this._editor=e,this._range=null}return e.prototype.setRange=function(e){this._range=e,this._result=[]},e.prototype.clearResult=function(){this._result=[]},e.prototype.computeAsync=function(){var e=this._editor.getModel();return d.HoverProviderRegistry.has(e)?p.getHover(e,new c.Position(this._range.startLineNumber,this._range.startColumn)):s.TPromise.as(null)},e.prototype.computeSync=function(){var e=this,t=this._range.startLineNumber;if(t>this._editor.getModel().getLineCount())return[];var n=function(e){return e&&(!Array.isArray(e)||e.length>0)},i=this._editor.getModel().getLineMaxColumn(t),o=this._editor.getLineDecorations(t),r=o.map(function(o){var r=o.range.startLineNumber===t?o.range.startColumn:1,s=o.range.endLineNumber===t?o.range.endColumn:i;if(r>e._range.startColumn||e._range.endColumn>s||!n(o.options.hoverMessage))return null;var a,u=new l.Range(e._range.startLineNumber,r,e._range.startLineNumber,s);return o.options.hoverMessage&&(a=Array.isArray(o.options.hoverMessage)?o.options.hoverMessage.slice():[o.options.hoverMessage]),
{contents:a,range:u}});return r.filter(function(e){return!!e})},e.prototype.onResult=function(e,t){t?this._result=e.concat(this._result):this._result=this._result.concat(e)},e.prototype.getResult=function(){return this._result.slice(0)},e.prototype.getResultWithLoadingMessage=function(){return this._result.slice(0).concat([this._getLoadingMessage()])},e.prototype._getLoadingMessage=function(){return{range:this._range,contents:[v.textToMarkedString(n.localize(0,null))]}},e}(),y=function(e){function t(n,i,o){var r=e.call(this,t.ID,n)||this;return r._computer=new _(r._editor),r._highlightDecorations=[],r._isChangingDecorations=!1,r._openerService=i||u.NullOpenerService,r._modeService=o,r._hoverOperation=new f.HoverOperation(r._computer,function(e){return r._withResult(e,!0)},null,function(e){return r._withResult(e,!1)}),r}return m(t,e),t.prototype.dispose=function(){this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start())},t.prototype.startShowingAt=function(e,t){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var n=[],i=0,o=this._messages.length;i<o;i++){var r=this._messages[i],s=r.range;s.startColumn<=e.startColumn&&s.endColumn>=e.endColumn&&n.push(r)}n.length>0?this._renderMessages(e,n):this.hide()}this._lastRange=e,this._computer.setRange(e),this._shouldFocus=t,this._hoverOperation.start()}},t.prototype.hide=function(){this._lastRange=null,this._hoverOperation.cancel(),e.prototype.hide.call(this),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1},t.prototype._withResult=function(e,t){this._messages=e,this._lastRange&&this._messages.length>0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,t){var n=this,s=Number.MAX_VALUE,u=t[0].range,c=document.createDocumentFragment();t.forEach(function(e){e.range&&(s=Math.min(s,e.range.startColumn),u=l.Range.plusRange(u,e.range),e.contents.filter(function(e){return!!e}).forEach(function(e){var t=a.renderMarkedString(e,{actionCallback:function(e){n._openerService.open(i.default.parse(e)).then(void 0,o.onUnexpectedError)},codeBlockRenderer:function(e,t){var i=e?n._modeService.getModeIdForLanguageName(e):n._editor.getModel().getLanguageIdentifier().language;return n._modeService.getOrCreateMode(i).then(function(e){return'<div class="code">'+h.tokenizeToString(t,i)+"</div>"})}});c.appendChild(r.$("div.hover-row",null,t))}))}),this.showAt({lineNumber:e.startLineNumber,column:s},this._shouldFocus),this.updateContents(c),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:u,options:{className:"hoverHighlight"}}]),this._isChangingDecorations=!1},t}(g.ContentHoverWidget);y.ID="editor.contrib.modesContentHoverWidget",t.ModesContentHoverWidget=y}),define(d[467],h([0,1,296,31,18,66,80,3,2,13,29,466,421,4,375]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";var f=u.EditorContextKeys,g=_=function(){function e(e,t,n){var i=this;this._editor=e,this._toUnhook=[],e.getConfiguration().contribInfo.hover&&(this._toUnhook.push(this._editor.onMouseDown(function(e){return i._onEditorMouseDown(e)})),this._toUnhook.push(this._editor.onMouseMove(function(e){return i._onEditorMouseMove(e)})),this._toUnhook.push(this._editor.onMouseLeave(function(e){return i._hideWidgets()})),this._toUnhook.push(this._editor.onKeyDown(function(e){return i._onKeyDown(e)})),this._toUnhook.push(this._editor.onDidChangeModel(function(){return i._hideWidgets()})),this._toUnhook.push(this._editor.onDidChangeModelDecorations(function(){return i._onModelDecorationsChanged()})),this._toUnhook.push(this._editor.onDidScrollChange(function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&i._hideWidgets()})),this._contentWidget=new d.ModesContentHoverWidget(e,t,n),this._glyphWidget=new h.ModesGlyphHoverWidget(e,t,n))}return e.get=function(e){return e.getContribution(_.ID)},e.prototype._onModelDecorationsChanged=function(){this._contentWidget.onModelDecorationsChanged(),this._glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorMouseDown=function(e){var t=e.target.type;t===u.MouseTargetType.CONTENT_WIDGET&&e.target.detail===d.ModesContentHoverWidget.ID||t===u.MouseTargetType.OVERLAY_WIDGET&&e.target.detail===h.ModesGlyphHoverWidget.ID||this._hideWidgets()},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,n=o.isMacintosh?"metaKey":"ctrlKey";(t!==u.MouseTargetType.CONTENT_WIDGET||e.target.detail!==d.ModesContentHoverWidget.ID||e.event[n])&&(t!==u.MouseTargetType.OVERLAY_WIDGET||e.target.detail!==h.ModesGlyphHoverWidget.ID||e.event[n])&&(this._editor.getConfiguration().contribInfo.hover&&t===u.MouseTargetType.CONTENT_TEXT?(this._glyphWidget.hide(),this._contentWidget.startShowingAt(e.target.range,!1)):t===u.MouseTargetType.GUTTER_GLYPH_MARGIN?(this._contentWidget.hide(),this._glyphWidget.startShowingAt(e.target.position.lineNumber)):this._hideWidgets())},e.prototype._onKeyDown=function(e){var t=o.isMacintosh?57:5;e.keyCode!==t&&this._hideWidgets()},e.prototype._hideWidgets=function(){this._glyphWidget.hide(),this._contentWidget.hide()},e.prototype.showContentHover=function(e,t){this._contentWidget.startShowingAt(e,t)},e.prototype.getId=function(){return _.ID},e.prototype.dispose=function(){this._toUnhook=p.dispose(this._toUnhook),this._glyphWidget&&(this._glyphWidget.dispose(),this._glyphWidget=null),this._contentWidget&&(this._contentWidget.dispose(),this._contentWidget=null)},e}();g.ID="editor.contrib.hover",g=_=y([c.editorContribution,C(1,r.IOpenerService),C(2,s.IModeService)],g);var v=function(e){function t(){return e.call(this,{id:"editor.action.showHover",label:n.localize(0,null),alias:"Show Hover",precondition:null,kbOpts:{kbExpr:f.TextFocus,primary:i.KeyChord(2089,2087)}})||this}return m(t,e),t.prototype.run=function(e,t){var n=g.get(t);if(n){var i=t.getPosition(),o=new a.Range(i.lineNumber,i.column,i.lineNumber,i.column);n.showContentHover(o,!0)}},t}(l.EditorAction);v=y([l.editorAction],v);var _}),define(d[468],h([0,1,298,6,3,20,2,13,48,230]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=p=function(){function e(e,t){this.editor=e,this.editorWorkerService=t,this.requestIdPool=0,this.currentRequest=i.TPromise.as(null),this.decorationRemover=i.TPromise.as(null),this.decorationIds=[]}return e.get=function(e){return e.getContribution(p.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return p.ID},e.prototype.run=function(e,t){var n=this;this.currentRequest.cancel();var a=this.editor.getSelection(),u=this.editor.getModel(),c=u.uri;if(a.startLineNumber!==a.endLineNumber)return null;var d=this.editor.captureState(s.CodeEditorStateFlag.Value,s.CodeEditorStateFlag.Position);return this.currentRequest=this.editorWorkerService.navigateValueSet(c,a,t),this.currentRequest=this.currentRequest.then(function(e){return e&&e.range&&e.value?e:null}),this.currentRequest.then(function(t){if(t&&t.range&&t.value&&d.validate(n.editor)){var s=o.Range.lift(t.range),u=t.range,c=t.value.length-(a.endColumn-a.startColumn);u={startLineNumber:u.startLineNumber,startColumn:u.startColumn,endLineNumber:u.endLineNumber,endColumn:u.startColumn+t.value.length},c>1&&(a=new r.Selection(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+c-1));var h=new l.InPlaceReplaceCommand(s,a,t.value);n.editor.executeCommand(e,h),n.decorationIds=n.editor.deltaDecorations(n.decorationIds,[{range:u,options:p.DECORATION}]),n.decorationRemover.cancel(),n.decorationRemover=i.TPromise.timeout(350),n.decorationRemover.then(function(){n.editor.changeDecorations(function(e){n.decorationIds=e.deltaDecorations(n.decorationIds,[])})})}})},e}();c.ID="editor.contrib.inPlaceReplaceController",c.DECORATION={className:"valueSetReplacement"},c=p=y([a.commonEditorContribution,C(1,u.IEditorWorkerService)],c);var d=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:n.localize(0,null),alias:"Replace with Previous Value",precondition:s.EditorContextKeys.Writable,kbOpts:{kbExpr:s.EditorContextKeys.TextFocus,primary:3154}})||this}return m(t,e),t.prototype.run=function(e,t){var n=c.get(t);if(n)return n.run(this.id,!0)},t}(a.EditorAction);d=y([a.editorAction],d);var h=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:n.localize(1,null),alias:"Replace with Next Value",precondition:s.EditorContextKeys.Writable,kbOpts:{kbExpr:s.EditorContextKeys.TextFocus,primary:3156}})||this}return m(t,e),t.prototype.run=function(e,t){var n=c.get(t);if(n)return n.run(this.id,!1)},t}(a.EditorAction);h=y([a.editorAction],h);var p}),define(d[469],h([0,1,299,4,9,13,21,29,80,147,16,84,63,402]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";function p(e){for(var t="",n=0,i=e.length;n<i;n++){var o=e.charCodeAt(n);switch(o){case 9:t+="&rarr;";break;case 32:t+="&middot;";break;case 60:t+="&lt;";break;case 62:t+="&gt;";break;case 38:t+="&amp;";break;default:t+=String.fromCharCode(o)}}return t}function f(e){var t=c.TokenizationRegistry.get(e.language);return t?t:{getInitialState:function(){return h.NULL_STATE},tokenize:function(t,n,i){return h.nullTokenize(e.language,t,n,i)},tokenize2:function(t,n,i){return h.nullTokenize2(e.id,t,n,i)}}}var g=b=function(e){function t(t,n,i){var o=e.call(this)||this;return o._editor=t,o._standaloneColorService=n,o._modeService=i,o._widget=null,o._register(o._editor.onDidChangeModel(function(e){return o.stop()})),o._register(o._editor.onDidChangeModelLanguage(function(e){return o.stop()})),o._register(c.TokenizationRegistry.onDidChange(function(e){return o.stop()})),o}return m(t,e),t.get=function(e){return e.getContribution(b.ID)},t.prototype.getId=function(){return b.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new _(this._editor,this._standaloneColorService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t}(i.Disposable);g.ID="editor.contrib.inspectTokens",g=b=y([a.editorContribution,C(1,d.IStandaloneColorService),C(2,u.IModeService)],g);var v=function(e){function t(){return e.call(this,{id:"editor.action.inspectTokens",label:n.localize(0,null),alias:"Developer: Inspect Tokens",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var n=g.get(t);n&&n.launch()},t}(r.EditorAction);v=y([r.editorAction],v);var _=function(e){function t(t,n,i){var o=e.call(this)||this;return o.allowEditorOverflow=!0,o._editor=t,o._standaloneColorService=n,o._modeService=i,o._model=o._editor.getModel(),o._domNode=document.createElement("div"),o._domNode.className="tokens-inspect-widget",o._tokenizationSupport=f(o._model.getLanguageIdentifier()),o._compute(o._editor.getPosition()),o._register(o._editor.onDidChangeCursorPosition(function(e){return o._compute(o._editor.getPosition())})),o._editor.addContentWidget(o),o}return m(t,e),t.prototype.dispose=function(){this._editor.removeContentWidget(this),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t._ID},t.prototype._compute=function(e){for(var t=this._getTokensAtLine(e.lineNumber),n=0,i=t.tokens1.length-1;i>=0;i--){var r=t.tokens1[i];if(e.column-1>=r.offset){n=i;break}}for(var s=0,i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){s=i;break}var a="",u=this._model.getLineContent(e.lineNumber),l="";if(n<t.tokens1.length){var c=t.tokens1[n].offset,d=n+1<t.tokens1.length?t.tokens1[n+1].offset:u.length;l=u.substring(c,d)}a+='<h2 class="tm-token">'+p(l)+'<span class="tm-token-length">('+l.length+" "+(1===l.length?"char":"chars")+")</span></h2>",a+='<hr style="clear:both"/>';var h=this._decodeMetadata(t.tokens2[(s<<1)+1]);a+='<table class="tm-metadata-table"><tbody>',a+='<tr><td class="tm-metadata-key">language</td><td class="tm-metadata-value">'+o.escape(h.languageIdentifier.language)+"</td>",a+='<tr><td class="tm-metadata-key">token type</td><td class="tm-metadata-value">'+this._tokenTypeToString(h.tokenType)+"</td>",a+='<tr><td class="tm-metadata-key">font style</td><td class="tm-metadata-value">'+this._fontStyleToString(h.fontStyle)+"</td>",a+='<tr><td class="tm-metadata-key">foreground</td><td class="tm-metadata-value">'+h.foreground+"</td>",a+='<tr><td class="tm-metadata-key">background</td><td class="tm-metadata-value">'+h.background+"</td>",a+="</tbody></table>",a+="<hr/>",n<t.tokens1.length&&(a+='<span class="tm-token-type">'+o.escape(t.tokens1[n].type)+"</span>"),this._domNode.innerHTML=a,this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=c.TokenizationRegistry.getColorMap(),n=l.TokenMetadata.getLanguageId(e),i=l.TokenMetadata.getTokenType(e),o=l.TokenMetadata.getFontStyle(e),r=l.TokenMetadata.getForeground(e),s=l.TokenMetadata.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(n),tokenType:i,fontStyle:o,foreground:t[r],background:t[s]}},t.prototype._tokenTypeToString=function(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx"}return"??"},t.prototype._fontStyleToString=function(e){var t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),0===t.length&&(t="---"),t},t.prototype._getTokensAtLine=function(e){var t=this._getStateBeforeLine(e),n=this._tokenizationSupport.tokenize(this._model.getLineContent(e),t,0),i=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),t,0);return{startState:t,tokens1:n.tokens,tokens2:i.tokens,endState:n.endState}},t.prototype._getStateBeforeLine=function(e){for(var t=this._tokenizationSupport.getInitialState(),n=1;n<e;n++){var i=this._tokenizationSupport.tokenize(this._model.getLineContent(n),t,0);t=i.endState}return t},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return{position:this._editor.getPosition(),preference:[s.ContentWidgetPositionPreference.BELOW,s.ContentWidgetPositionPreference.ABOVE]}},t}(i.Disposable);_._ID="editor.contrib.inspectTokensWidget";var b}),define(d[470],h([0,1,300,31,234,46,448,2,54,3,20,13,231,232,233]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";var g=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return m(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;o<i.length;o++)n.push(new h.CopyLinesCommand(i[o],this.down));t.executeCommands(this.id,n)},t}(d.EditorAction),v=function(e){function t(){return e.call(this,!1,{id:"editor.action.copyLinesUpAction",label:n.localize(0,null),alias:"Copy Line Up",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:1552,linux:{primary:3600}}})||this}return m(t,e),t}(g);v=y([d.editorAction],v);var _=function(e){function t(){return e.call(this,!0,{id:"editor.action.copyLinesDownAction",label:n.localize(1,null),alias:"Copy Line Down",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:1554,linux:{primary:3602}}})||this}return m(t,e),t}(g);_=y([d.editorAction],_);var C=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return m(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;o<i.length;o++)n.push(new f.MoveLinesCommand(i[o],this.down));t.executeCommands(this.id,n)},t}(d.EditorAction),b=function(e){function t(){return e.call(this,!1,{id:"editor.action.moveLinesUpAction",label:n.localize(2,null),alias:"Move Line Up",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:528,linux:{primary:528}}})||this}return m(t,e),t}(C);b=y([d.editorAction],b);var w=function(e){function t(){return e.call(this,!0,{id:"editor.action.moveLinesDownAction",label:n.localize(3,null),alias:"Move Line Down",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:530,linux:{primary:530}}})||this}return m(t,e),t}(C);w=y([d.editorAction],w);var S=function(e){function t(t,n){var i=e.call(this,n)||this;return i.descending=t,i}return m(t,e),t.prototype.run=function(e,t){if(o.SortLinesCommand.canRun(t.getModel(),t.getSelection(),this.descending)){var n=new o.SortLinesCommand(t.getSelection(),this.descending);t.executeCommands(this.id,[n])}},t}(d.EditorAction),E=function(e){function t(){return e.call(this,!1,{id:"editor.action.sortLinesAscending",label:n.localize(4,null),alias:"Sort Lines Ascending",precondition:a.EditorContextKeys.Writable})||this}return m(t,e),t}(S);E=y([d.editorAction],E);var L=function(e){function t(){return e.call(this,!0,{id:"editor.action.sortLinesDescending",label:n.localize(5,null),alias:"Sort Lines Descending",precondition:a.EditorContextKeys.Writable})||this}return m(t,e),t}(S);L=y([d.editorAction],L);var N=B=function(e){function t(){return e.call(this,{id:B.ID,label:n.localize(6,null),alias:"Trim Trailing Whitespace",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:i.KeyChord(2089,2102)}})||this}return m(t,e),t.prototype.run=function(e,t){var n=new s.TrimTrailingWhitespaceCommand(t.getSelection());t.executeCommands(this.id,[n])},t}(d.EditorAction);N.ID="editor.action.trimTrailingWhitespace",N=B=y([d.editorAction],N),t.TrimTrailingWhitespaceAction=N;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype._getLinesToRemove=function(e){var t=e.getSelections().map(function(e){var t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,endLineNumber:t,positionColumn:e.positionColumn}});t.sort(function(e,t){return e.startLineNumber-t.startLineNumber});for(var n=[],i=t[0],o=1;o<t.length;o++)i.endLineNumber+1===t[o].startLineNumber?i.endLineNumber=t[o].endLineNumber:(n.push(i),i=t[o]);return n.push(i),n},t}(d.EditorAction),x=function(e){function t(){return e.call(this,{id:"editor.action.deleteLines",label:n.localize(7,null),alias:"Delete Line",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:3113}})||this}return m(t,e),t.prototype.run=function(e,t){var n=this._getLinesToRemove(t),i=n.map(function(e){return new p.DeleteLinesCommand(e.startLineNumber,e.endLineNumber,e.positionColumn)});t.executeCommands(this.id,i)},t}(T);x=y([d.editorAction],x);var M=function(e){function t(){return e.call(this,{id:"editor.action.indentLines",label:n.localize(8,null),alias:"Indent Line",precondition:a.EditorContextKeys.Writable,handlerId:a.Handler.Indent,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:2137}})||this}return m(t,e),t}(d.HandlerEditorAction);M=y([d.editorAction],M);var I=function(e){function t(){return e.call(this,{id:"editor.action.outdentLines",label:n.localize(9,null),alias:"Outdent Line",precondition:a.EditorContextKeys.Writable,handlerId:a.Handler.Outdent,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:2135}})||this}return m(t,e),t}(d.HandlerEditorAction);I=y([d.editorAction],I);var D=function(e){function t(){return e.call(this,{id:"editor.action.insertLineBefore",label:n.localize(10,null),alias:"Insert Line Above",precondition:a.EditorContextKeys.Writable,handlerId:a.Handler.LineInsertBefore,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:3075}})||this}return m(t,e),t}(d.HandlerEditorAction);D=y([d.editorAction],D);var R=function(e){function t(){return e.call(this,{id:"editor.action.insertLineAfter",label:n.localize(11,null),alias:"Insert Line Below",precondition:a.EditorContextKeys.Writable,handlerId:a.Handler.LineInsertAfter,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:2051}})||this}return m(t,e),t}(d.HandlerEditorAction);R=y([d.editorAction],R);var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){for(var n=t.getSelection(),i=this._getRangesToDelete(t),o=[],s=0,a=i.length-1;s<a;s++){var u=i[s],d=i[s+1];null===l.Range.intersectRanges(u,d)?o.push(u):i[s+1]=l.Range.plusRange(u,d)}o.push(i[i.length-1]);var h=this._getEndCursorState(n,o),p=o.map(function(e){return h.push(new c.Selection(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)),r.EditOperation.replace(e,"")});t.executeEdits(this.id,p,h)},t}(d.EditorAction);t.AbstractDeleteAllToBoundaryAction=k;var O=function(e){function t(){return e.call(this,{id:"deleteAllLeft",label:n.localize(12,null),alias:"Delete All Left",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:null,mac:{primary:2049}}})||this}return m(t,e),t.prototype._getEndCursorState=function(e,t){for(var n,i=[],o=0,r=t.length;o<r;o++){var s=t[o],a=new c.Selection(t[o].startLineNumber,t[o].startColumn,t[o].startLineNumber,t[o].startColumn);s.intersectRanges(e)?n=a:i.push(a)}return n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections();return t.sort(l.Range.compareRangesUsingStarts),t=t.map(function(e){return e.isEmpty()?new l.Range(e.startLineNumber,1,e.startLineNumber,e.startColumn):e})},t}(k);O=y([d.editorAction],O),t.DeleteAllLeftAction=O;var P=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:n.localize(13,null),alias:"Delete All Right",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:null,mac:{primary:297,secondary:[2068]}}})||this}return m(t,e),t.prototype._getEndCursorState=function(e,t){for(var n,i=[],o=0,r=t.length,s=0;o<r;o++){var a=t[o],u=new c.Selection(a.startLineNumber-s,a.startColumn,a.startLineNumber-s,a.startColumn);a.intersectRanges(e)?n=u:i.push(u)}return n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getModel(),n=e.getSelections().map(function(e){if(e.isEmpty()){var n=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===n?new l.Range(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new l.Range(e.startLineNumber,e.startColumn,e.startLineNumber,n)}return e});return n.sort(l.Range.compareRangesUsingStarts),n},t}(k);P=y([d.editorAction],P),t.DeleteAllRightAction=P;var A=function(e){function t(){return e.call(this,{id:"editor.action.joinLines",label:n.localize(14,null),alias:"Join Lines",precondition:a.EditorContextKeys.Writable,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:0,mac:{primary:296}}})||this}return m(t,e),t.prototype.run=function(e,t){var n=t.getSelections(),i=t.getSelection();n.sort(l.Range.compareRangesUsingStarts);var o=[],s=n.reduce(function(e,t){return e.isEmpty()?e.endLineNumber===t.startLineNumber?(i.equalsSelection(e)&&(i=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new c.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new c.Selection(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)});o.push(s);for(var a=t.getModel(),u=[],d=[],h=i,p=0,f=0,g=o.length;f<g;f++){var m=o[f],v=m.startLineNumber,_=1,y=void 0,C=void 0,b=void 0,w=a.getLineContent(m.endLineNumber).length-m.endColumn;if(m.isEmpty()||m.startLineNumber===m.endLineNumber){var S=m.getStartPosition();S.lineNumber<a.getLineCount()?(y=v+1,C=a.getLineMaxColumn(y)):(y=S.lineNumber,C=a.getLineMaxColumn(S.lineNumber))}else y=m.endLineNumber,C=a.getLineMaxColumn(y);for(var E=a.getLineContent(v),L=v+1;L<=y;L++){var N=a.getLineContent(L),T=a.getLineFirstNonWhitespaceColumn(L);if(T>=1){var x=!0;""===E&&(x=!1),!x||" "!==E.charAt(E.length-1)&&"\t"!==E.charAt(E.length-1)||(x=!1,E=E.replace(/[\s\uFEFF\xA0]+$/g," "));var M=N.substr(T-1);E+=(x?" ":"")+M,b=x?M.length+1:M.length}else b=0}var I=new l.Range(v,_,y,C);if(!I.isEmpty()){var D=void 0;m.isEmpty()?(u.push(r.EditOperation.replace(I,E)),D=new c.Selection(I.startLineNumber-p,E.length-b+1,v-p,E.length-b+1)):m.startLineNumber===m.endLineNumber?(u.push(r.EditOperation.replace(I,E)),D=new c.Selection(m.startLineNumber-p,m.startColumn,m.endLineNumber-p,m.endColumn)):(u.push(r.EditOperation.replace(I,E)),D=new c.Selection(m.startLineNumber-p,m.startColumn,m.startLineNumber-p,E.length-w)),null!==l.Range.intersectRanges(I,i)?h=D:d.push(D)}p+=I.endLineNumber-I.startLineNumber}d.unshift(h),t.executeEdits(this.id,u,d)},t}(d.EditorAction);A=y([d.editorAction],A),t.JoinLinesAction=A;var W=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:n.localize(15,null),alias:"Transpose characters around the cursor",precondition:a.EditorContextKeys.Writable})||this}return m(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,s=n.length;r<s;r++){var a=n[r];if(a.isEmpty()){var d=a.getStartPosition(),h=i.getLineMaxColumn(d.lineNumber);if(d.column>=h){if(d.lineNumber===i.getLineCount())continue;var p=new l.Range(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),f=i.getValueInRange(p).split("").reverse().join("");o.push(new u.ReplaceCommand(new c.Selection(d.lineNumber,Math.max(1,d.column-1),d.lineNumber+1,1),f))}else{var p=new l.Range(d.lineNumber,Math.max(1,d.column-1),d.lineNumber,d.column+1),f=i.getValueInRange(p).split("").reverse().join("");o.push(new u.ReplaceCommandThatPreservesSelection(p,f,new c.Selection(d.lineNumber,d.column+1,d.lineNumber,d.column+1)))}}}t.executeCommands(this.id,o)},t}(d.EditorAction);W=y([d.editorAction],W),t.TransposeAction=W;var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,s=n.length;r<s;r++){var a=n[r];if(a.isEmpty()){var d=a.getStartPosition(),h=i.getWordAtPosition(d);if(!h)continue;var p=new l.Range(d.lineNumber,h.startColumn,d.lineNumber,h.endColumn),f=i.getValueInRange(p);o.push(new u.ReplaceCommandThatPreservesSelection(p,this._modifyText(f),new c.Selection(d.lineNumber,d.column,d.lineNumber,d.column)))}else{var f=i.getValueInRange(a);o.push(new u.ReplaceCommandThatPreservesSelection(a,this._modifyText(f),a))}}t.executeCommands(this.id,o)},t}(d.EditorAction);t.AbstractCaseAction=F;var V=function(e){function t(){return e.call(this,{id:"editor.action.transformToUppercase",label:n.localize(16,null),alias:"Transform to Uppercase",precondition:a.EditorContextKeys.Writable})||this}return m(t,e),t.prototype._modifyText=function(e){return e.toLocaleUpperCase()},t}(F);V=y([d.editorAction],V),t.UpperCaseAction=V;var H=function(e){function t(){return e.call(this,{id:"editor.action.transformToLowercase",label:n.localize(17,null),alias:"Transform to Lowercase",precondition:a.EditorContextKeys.Writable})||this}return m(t,e),t.prototype._modifyText=function(e){return e.toLocaleLowerCase()},t}(F);H=y([d.editorAction],H),t.LowerCaseAction=H;var B}),define(d[471],h([0,1,301,10,18,30,6,52,66,2,13,16,48,336,4,29,406]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g){"use strict";var v=function(){function e(e,t){this.link=e,this.decorationId=t}return e.decoration=function(t){return{range:{startLineNumber:t.range.startLineNumber,startColumn:t.range.startColumn,endLineNumber:t.range.endLineNumber,endColumn:t.range.endColumn},options:e._getOptions(t,!1)}},e._getOptions=function(e,t){var n="";return n+=t?_.CLASS_NAME_ACTIVE:_.CLASS_NAME,{stickiness:l.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,inlineClassName:n,hoverMessage:_.HOVER_MESSAGE_GENERAL}},e.prototype.activate=function(t){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,!0))},e.prototype.deactivate=function(t){t.changeDecorationOptions(this.decorationId,e._getOptions(this.link,!1))},e}(),_=w=function(){function e(e,t,n,i){var o=this;this.editor=e,this.openerService=t,this.messageService=n,this.editorWorkerService=i,this.listenersToRemove=[],this.listenersToRemove.push(e.onDidChangeModelContent(function(e){return o.onChange()})),this.listenersToRemove.push(e.onDidChangeModel(function(e){return o.onModelChanged()})),this.listenersToRemove.push(e.onDidChangeModelLanguage(function(e){return o.onModelModeChanged()})),this.listenersToRemove.push(d.LinkProviderRegistry.onDidChange(function(e){return o.onModelModeChanged()})),this.listenersToRemove.push(this.editor.onMouseUp(function(e){return o.onEditorMouseUp(e)})),this.listenersToRemove.push(this.editor.onMouseMove(function(e){return o.onEditorMouseMove(e)})),this.listenersToRemove.push(this.editor.onKeyDown(function(e){return o.onEditorKeyDown(e)})),this.listenersToRemove.push(this.editor.onKeyUp(function(e){return o.onEditorKeyUp(e)})),this.timeoutPromise=null,this.computePromise=null,this.currentOccurences={},this.activeLinkDecorationId=null,this.beginCompute()}return e.get=function(e){return e.getContribution(w.ID)},e.prototype.getId=function(){return w.ID},e.prototype.isComputing=function(){return s.TPromise.is(this.computePromise)},e.prototype.onModelChanged=function(){this.lastMouseEvent=null,this.currentOccurences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()},e.prototype.onModelModeChanged=function(){this.stop(),this.beginCompute()},e.prototype.onChange=function(){var e=this;this.timeoutPromise||(this.timeoutPromise=s.TPromise.timeout(w.RECOMPUTE_TIME),this.timeoutPromise.then(function(){e.timeoutPromise=null,e.beginCompute()}))},e.prototype.beginCompute=function(){var e=this;this.editor.getModel()&&d.LinkProviderRegistry.has(this.editor.getModel())&&(this.computePromise=p.getLinks(this.editor.getModel()).then(function(t){e.updateDecorations(t),e.computePromise=null}))},e.prototype.updateDecorations=function(e){var t=this;this.editor.changeDecorations(function(n){for(var i=[],o=Object.keys(t.currentOccurences),r=0,s=o.length;r<s;r++){var a=o[r],u=t.currentOccurences[a];i.push(u.decorationId)}var l=[];if(e)for(var c=0;c<e.length;c++)l.push(v.decoration(e[c]));var d=n.deltaDecorations(i,l);t.currentOccurences={},t.activeLinkDecorationId=null;for(var h=0,s=d.length;h<s;h++){var p=new v(e[h],d[h]);t.currentOccurences[p.decorationId]=p}})},e.prototype.onEditorKeyDown=function(e){e.keyCode===w.TRIGGER_KEY_VALUE&&this.lastMouseEvent&&this.onEditorMouseMove(this.lastMouseEvent,e)},e.prototype.onEditorKeyUp=function(e){e.keyCode===w.TRIGGER_KEY_VALUE&&this.cleanUpActiveLinkDecoration()},e.prototype.onEditorMouseMove=function(e,t){var n=this;if(this.lastMouseEvent=e,this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();var i=this.getLinkOccurence(e.target.position);i&&this.editor.changeDecorations(function(e){i.activate(e),n.activeLinkDecorationId=i.decorationId})}else this.cleanUpActiveLinkDecoration()},e.prototype.cleanUpActiveLinkDecoration=function(){if(this.activeLinkDecorationId){var e=this.currentOccurences[this.activeLinkDecorationId];e&&this.editor.changeDecorations(function(t){e.deactivate(t)}),this.activeLinkDecorationId=null}},e.prototype.onEditorMouseUp=function(e){if(this.isEnabled(e)){var t=this.getLinkOccurence(e.target.position);t&&this.openLinkOccurence(t,e.event.altKey)}},e.prototype.openLinkOccurence=function(e,t){var o=this;if(this.openerService){var s=e.link;s.resolve().then(function(e){return o.openerService.open(e,{openToSide:t})},function(e){"invalid"===e?o.messageService.show(r.default.Warning,n.localize(2,null,s.url)):"missing"===e?o.messageService.show(r.default.Warning,n.localize(3,null)):i.onUnexpectedError(e)}).done(null,i.onUnexpectedError)}},e.prototype.getLinkOccurence=function(e){for(var t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0),n=0;n<t.length;n++){var i=t[n],o=this.currentOccurences[i.id];if(o)return o}return null},e.prototype.isEnabled=function(e,t){return e.target.type===l.MouseTargetType.CONTENT_TEXT&&(e.event[w.TRIGGER_MODIFIER]||t&&t.keyCode===w.TRIGGER_KEY_VALUE)},e.prototype.stop=function(){this.timeoutPromise&&(this.timeoutPromise.cancel(),this.timeoutPromise=null),
this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)},e.prototype.dispose=function(){this.listenersToRemove=f.dispose(this.listenersToRemove),this.stop()},e}();_.ID="editor.linkDetector",_.RECOMPUTE_TIME=1e3,_.TRIGGER_KEY_VALUE=o.isMacintosh?57:5,_.TRIGGER_MODIFIER=o.isMacintosh?"metaKey":"ctrlKey",_.HOVER_MESSAGE_GENERAL=o.isMacintosh?n.localize(0,null):n.localize(1,null),_.CLASS_NAME="detected-link",_.CLASS_NAME_ACTIVE="detected-link-active",_=w=y([g.editorContribution,C(1,u.IOpenerService),C(2,a.IMessageService),C(3,h.IEditorWorkerService)],_);var b=function(e){function t(){return e.call(this,{id:"editor.action.openLink",label:n.localize(4,null),alias:"Open Link",precondition:null})||this}return m(t,e),t.prototype.run=function(e,t){var n=_.get(t);if(n){var i=n.getLinkOccurence(t.getPosition());i&&n.openLinkOccurence(i,!1)}},t}(c.EditorAction);b=y([c.editorAction],b);var w}),define(d[472],h([0,1,302,2,13,20]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorAbove",label:n.localize(0,null),alias:"Add Cursor Above",precondition:null,handlerId:i.Handler.AddCursorUp,kbOpts:{kbExpr:i.EditorContextKeys.TextFocus,primary:2576,linux:{primary:1552,secondary:[3088]}}})||this}return m(t,e),t}(o.HandlerEditorAction);s=y([o.editorAction],s);var a=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorBelow",label:n.localize(1,null),alias:"Add Cursor Below",precondition:null,handlerId:i.Handler.AddCursorDown,kbOpts:{kbExpr:i.EditorContextKeys.TextFocus,primary:2578,linux:{primary:1554,secondary:[3090]}}})||this}return m(t,e),t}(o.HandlerEditorAction);a=y([o.editorAction],a);var u=function(e){function t(){return e.call(this,{id:"editor.action.insertCursorAtEndOfEachLineSelected",label:n.localize(2,null),alias:"Create Multiple Cursors from Selected Lines",precondition:null,kbOpts:{kbExpr:i.EditorContextKeys.TextFocus,primary:1575}})||this}return m(t,e),t.prototype.getCursorsForSelection=function(e,t){if(e.isEmpty())return[];for(var n=t.getModel(),i=[],o=e.startLineNumber;o<e.endLineNumber;o++){var s=n.getLineMaxColumn(o);i.push(new r.Selection(o,s,o,s))}return e.endColumn>1&&i.push(new r.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)),i},t.prototype.run=function(e,t){var n=this,i=t.getSelections(),o=i.map(function(e){return n.getCursorsForSelection(e,t)}).reduce(function(e,t){return e.concat(t)});o.length>0&&t.setSelections(o)},t}(o.EditorAction);u=y([o.editorAction],u)}),define(d[164],h([0,1,10,13,16,17,19]),function(e,t,n,i,o,r,s){"use strict";function a(e,t){var i,s=o.SignatureHelpProviderRegistry.ordered(e);return r.sequence(s.map(function(o){return function(){if(!i)return r.asWinJsPromise(function(n){return o.provideSignatureHelp(e,t,n)}).then(function(e){i=e},n.onUnexpectedExternalError)}})).then(function(){return i})}t.Context={Visible:new s.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new s.RawContextKey("parameterHintsMultipleSignatures",!1)},t.provideSignatureHelp=a,i.CommonEditorRegistry.registerDefaultLanguageCommand("_executeSignatureHelpProvider",a)}),define(d[474],h([0,1,304,4,6,11,99,16,21,17,10,12,124,19,164,60,69,407]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v){"use strict";var _=r.$,b=function(e){function t(n){var i=e.call(this)||this;return i._onHint=i._register(new d.Emitter),i.onHint=i._onHint.event,i._onCancel=i._register(new d.Emitter),i.onCancel=i._onCancel.event,i.editor=n,i.enabled=!1,i.triggerCharactersListeners=[],i.throttledDelayer=new l.RunOnceScheduler(function(){return i.doTrigger()},t.DELAY),i.active=!1,i._register(i.editor.onDidChangeConfiguration(function(){return i.onEditorConfigurationChange()})),i._register(i.editor.onDidChangeModel(function(e){return i.onModelChanged()})),i._register(i.editor.onDidChangeModelLanguage(function(e){return i.onModelChanged()})),i._register(i.editor.onDidChangeCursorSelection(function(e){return i.onCursorChange(e)})),i._register(a.SignatureHelpProviderRegistry.onDidChange(i.onModelChanged,i)),i.onEditorConfigurationChange(),i.onModelChanged(),i}return m(t,e),t.prototype.cancel=function(e){void 0===e&&(e=!1),this.active=!1,this.throttledDelayer.cancel(),e||this._onCancel.fire(void 0)},t.prototype.trigger=function(e){if(void 0===e&&(e=t.DELAY),this.enabled&&a.SignatureHelpProviderRegistry.has(this.editor.getModel()))return this.cancel(!0),this.throttledDelayer.schedule(e)},t.prototype.doTrigger=function(){var e=this;f.provideSignatureHelp(this.editor.getModel(),this.editor.getPosition()).then(null,c.onUnexpectedError).then(function(t){if(!t||!t.signatures||0===t.signatures.length)return e.cancel(),e._onCancel.fire(void 0),!1;e.active=!0;var n={hints:t};return e._onHint.fire(n),!0})},t.prototype.isTriggered=function(){return this.active||this.throttledDelayer.isScheduled()},t.prototype.onModelChanged=function(){var e=this;this.active&&this.cancel(),this.triggerCharactersListeners=i.dispose(this.triggerCharactersListeners);var t=this.editor.getModel();if(t){for(var n=new v.CharacterSet,o=0,r=a.SignatureHelpProviderRegistry.ordered(t);o<r.length;o++){var s=r[o];if(Array.isArray(s.signatureHelpTriggerCharacters))for(var u=0,l=s.signatureHelpTriggerCharacters;u<l.length;u++){var c=l[u];n.add(c.charCodeAt(0))}}this.triggerCharactersListeners.push(this.editor.onDidType(function(t){var i=t.charCodeAt(t.length-1);n.has(i)&&e.trigger()}))}},t.prototype.onCursorChange=function(e){"mouse"===e.source?this.cancel():this.isTriggered()&&this.trigger()},t.prototype.onEditorConfigurationChange=function(){this.enabled=this.editor.getConfiguration().contribInfo.parameterHints,this.enabled||this.cancel()},t.prototype.dispose=function(){this.cancel(!0),this.triggerCharactersListeners=i.dispose(this.triggerCharactersListeners),e.prototype.dispose.call(this)},t}(i.Disposable);b.DELAY=120,t.ParameterHintsModel=b;var w=function(){function e(e,t){var n=this;this.editor=e,this.allowEditorOverflow=!0,this.model=new b(e),this.keyVisible=f.Context.Visible.bindTo(t),this.keyMultipleSignatures=f.Context.MultipleSignatures.bindTo(t),this.visible=!1,this.disposables=[],this.disposables.push(this.model.onHint(function(e){n.show(),n.hints=e.hints,n.currentSignature=e.hints.activeSignature,n.render()})),this.disposables.push(this.model.onCancel(function(){n.hide()})),this.element=_(".editor-widget.parameter-hints-widget");var i=r.append(this.element,_(".wrapper")),o=h.stop(h.domEvent(this.element,"click"));o(this.next,this,this.disposables);var s=r.append(i,_(".buttons")),a=r.append(s,_(".button.previous")),u=r.append(s,_(".button.next")),l=h.stop(h.domEvent(a,"click"));l(this.previous,this,this.disposables);var c=h.stop(h.domEvent(u,"click"));c(this.next,this,this.disposables),this.overloads=r.append(i,_(".overloads"));var p=_(".body");this.scrollbar=new g.DomScrollableElement(p,{canUseTranslate3d:!1}),this.disposables.push(this.scrollbar),i.appendChild(this.scrollbar.getDomNode()),this.signature=r.append(p,_(".signature")),this.docs=r.append(p,_(".docs")),this.currentSignature=0,this.editor.addContentWidget(this),this.hide(),this.disposables.push(this.editor.onDidChangeCursorSelection(function(e){n.visible&&n.editor.layoutContentWidget(n)}));var m=function(){var e=n.editor.getConfiguration().fontInfo;n.element.style.fontSize=e.fontSize+"px"};m(),d.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo}).on(m,null,this.disposables),this.disposables.push(this.editor.onDidLayoutChange(function(e){return n.updateMaxHeight()})),this.updateMaxHeight()}return e.prototype.show=function(){var e=this;this.model&&!this.visible&&(this.keyVisible.set(!0),this.visible=!0,o.TPromise.timeout(100).done(function(){return r.addClass(e.element,"visible")}),this.editor.layoutContentWidget(this))},e.prototype.hide=function(){this.model&&this.visible&&(this.keyVisible.reset(),this.visible=!1,this.hints=null,this.announcedLabel=null,r.removeClass(this.element,"visible"),this.editor.layoutContentWidget(this))},e.prototype.getPosition=function(){return this.visible?{position:this.editor.getPosition(),preference:[u.ContentWidgetPositionPreference.ABOVE,u.ContentWidgetPositionPreference.BELOW]}:null},e.prototype.render=function(){var e=this.hints.signatures.length>1;r.toggleClass(this.element,"multiple",e),this.keyMultipleSignatures.set(e),this.signature.innerHTML="",this.docs.innerHTML="";var t=this.hints.signatures[this.currentSignature];if(t){var i=r.append(this.signature,_(".code")),o=t.parameters.length>0,a=this.editor.getConfiguration().fontInfo;if(i.style.fontSize=a.fontSize+"px",i.style.fontFamily=a.fontFamily,o)this.renderParameters(i,t,this.hints.activeParameter);else{var u=r.append(i,_("span"));u.textContent=t.label}var l=t.parameters[this.hints.activeParameter];if(l&&l.documentation){var c=_("span.documentation");c.textContent=l.documentation,r.append(this.docs,_("p",null,c))}r.toggleClass(this.signature,"has-docs",!!t.documentation),t.documentation&&r.append(this.docs,_("p",null,t.documentation));var d=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(d+="/"+this.hints.signatures.length),this.overloads.textContent=d,l){var h=l.label;this.announcedLabel!==h&&(s.alert(n.localize(0,null,h)),this.announcedLabel=h)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,n){for(var i,o=t.label.length,s=0,a=t.parameters.length-1;a>=0;a--){var u=t.parameters[a];s=t.label.lastIndexOf(u.label,o);var l=0,c=0;s>=0&&(l=s,c=s+u.label.length),i=document.createElement("span"),i.textContent=t.label.substring(c,o),r.prepend(e,i),i=document.createElement("span"),i.className="parameter "+(a===n?"active":""),i.textContent=t.label.substring(l,c),r.prepend(e,i),o=l}i=document.createElement("span"),i.textContent=t.label.substring(0,o),r.prepend(e,i)},e.prototype.next=function(){var e=this.hints.signatures.length;return e<2?(this.cancel(),!1):(this.currentSignature=(this.currentSignature+1)%e,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length;return e<2?(this.cancel(),!1):(this.currentSignature=(this.currentSignature-1+e)%e,this.render(),!0)},e.prototype.cancel=function(){this.model.cancel()},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.trigger=function(){this.model.trigger(0)},e.prototype.updateMaxHeight=function(){var e=Math.max(this.editor.getLayoutInfo().height/4,250);this.element.style.maxHeight=e+"px"},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables),this.model=null},e}();w.ID="editor.widget.parameterHintsWidget",w=y([C(1,p.IContextKeyService)],w),t.ParameterHintsWidget=w}),define(d[475],h([0,1,303,4,14,2,19,13,29,474,164]),function(e,t,n,i,o,r,s,a,u,l,c){"use strict";var d=g=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(l.ParameterHintsWidget,this.editor)}return e.get=function(e){return e.getContribution(g.ID)},e.prototype.getId=function(){return g.ID},e.prototype.cancel=function(){this.widget.cancel()},e.prototype.previous=function(){this.widget.previous()},e.prototype.next=function(){this.widget.next()},e.prototype.trigger=function(){this.widget.trigger()},e.prototype.dispose=function(){this.widget=i.dispose(this.widget)},e}();d.ID="editor.controller.parameterHints",d=g=y([u.editorContribution,C(1,o.IInstantiationService)],d);var h=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:n.localize(0,null),alias:"Trigger Parameter Hints",precondition:r.ModeContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:r.EditorContextKeys.TextFocus,primary:3082}})||this}return m(t,e),t.prototype.run=function(e,t){var n=d.get(t);n&&n.trigger()},t}(a.EditorAction);h=y([a.editorAction],h),t.TriggerParameterHintsAction=h;var p=a.CommonEditorRegistry.commandWeight(75),f=a.EditorCommand.bindToContribution(d.get);a.CommonEditorRegistry.registerEditorCommand(new f({id:"closeParameterHints",precondition:c.Context.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:p,kbExpr:r.EditorContextKeys.TextFocus,primary:9,secondary:[1033]}})),a.CommonEditorRegistry.registerEditorCommand(new f({id:"showPrevParameterHint",precondition:s.ContextKeyExpr.and(c.Context.Visible,c.Context.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:p,kbExpr:r.EditorContextKeys.TextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),a.CommonEditorRegistry.registerEditorCommand(new f({id:"showNextParameterHint",precondition:s.ContextKeyExpr.and(c.Context.Visible,c.Context.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{weight:p,kbExpr:r.EditorContextKeys.TextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var g}),define(d[476],h([0,1,10,27,6,3,13,16,44,17]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e,t){var i=[],r=a.CodeActionProviderRegistry.all(e).map(function(o){return l.asWinJsPromise(function(n){return o.provideCodeActions(e,t,n)}).then(function(e){Array.isArray(e)&&i.push.apply(i,e)},function(e){n.onUnexpectedExternalError(e)})});return o.TPromise.join(r).then(function(){return i})}t.getCodeActions=c,s.CommonEditorRegistry.registerLanguageCommand("_executeCodeActionProvider",function(e,t){var o=t.resource,s=t.range;if(!(o instanceof i.default&&r.Range.isIRange(s)))throw n.illegalArgument();var a=e.get(u.IModelService).getModel(o);if(!a)throw n.illegalArgument();return c(a,a.validateRange(s))})}),define(d[477],h([0,1,26,12,30,4,3,16,476]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(){function e(e,t,n){var i=this;this._editor=e,this._markerService=t,this._signalChange=n,this._disposables=[],this._disposables.push(this._markerService.onMarkerChanged(function(e){return i._onMarkerChanges(e)}),this._editor.onDidChangeCursorPosition(function(e){return i._onCursorChange()}))}return e.prototype.dispose=function(){this._disposables=r.dispose(this._disposables)},e.prototype.trigger=function(){var e=this._rangeAtPosition(),t=e.range,n=e.severity;t||(t=this._editor.getSelection()),this._signalChange({type:"manual",severity:n,range:t,position:this._editor.getPosition(),fixes:t&&u.getCodeActions(this._editor.getModel(),this._editor.getModel().validateRange(t))})},e.prototype._onMarkerChanges=function(e){for(var t=this._editor.getModel().uri,n=0,i=e;n<i.length;n++){var o=i[n];if(o.toString()===t.toString())return void this._onCursorChange()}},e.prototype._onCursorChange=function(){var e=this._rangeAtPosition(),t=e.range,n=e.severity;s.Range.equalsRange(this._currentRange,t)||(this._currentRange=t,this._signalChange({type:"auto",severity:n,range:t,position:this._editor.getPosition(),fixes:t&&u.getCodeActions(this._editor.getModel(),this._editor.getModel().validateRange(t))}))},e.prototype._rangeAtPosition=function(){var e,t,n=this._markerAtPosition();return n?(e=s.Range.lift(n),t=n.severity):(e=this._wordAtPosition(),t=o.default.Info),{range:e,severity:t}},e.prototype._markerAtPosition=function(){for(var e=this._editor.getPosition(),t=this._editor.getModel().uri,i=this._markerService.read({resource:t}).sort(s.Range.compareRangesUsingStarts),o=n.findFirst(i,function(t){return t.endLineNumber>=e.lineNumber});o<i.length&&i[o].endLineNumber>=e.lineNumber;){var r=i[o];if(s.Range.containsPosition(r,e))return r;o++}},e.prototype._wordAtPosition=function(){var e=this._editor.getSelection(),t=e.positionLineNumber,n=e.positionColumn,i=this._editor.getModel(),o=i.getWordAtPosition({lineNumber:t,column:n});if(o)return{startLineNumber:t,startColumn:o.startColumn,endLineNumber:t,endColumn:o.endColumn}},e}();t.QuickFixOracle=l;var c=function(){function e(e,t){var n=this;this._onDidChangeFixes=new i.Emitter,this._disposables=[],this._editor=e,this._markerService=t,this._disposables.push(this._editor.onDidChangeModel(function(){return n._update()})),this._disposables.push(this._editor.onDidChangeModelLanguage(function(){return n._update()})),this._disposables.push(a.CodeActionProviderRegistry.onDidChange(this._update,this)),this._update()}return e.prototype.dispose=function(){this._disposables=r.dispose(this._disposables),r.dispose(this._quickFixOracle)},Object.defineProperty(e.prototype,"onDidChangeFixes",{get:function(){return this._onDidChangeFixes.event},enumerable:!0,configurable:!0}),e.prototype._update=function(){var e=this;this._quickFixOracle&&(this._quickFixOracle.dispose(),this._quickFixOracle=void 0,this._onDidChangeFixes.fire(void 0)),this._editor.getModel()&&a.CodeActionProviderRegistry.has(this._editor.getModel())&&!this._editor.getConfiguration().readOnly&&(this._quickFixOracle=new l(this._editor,this._markerService,function(t){return e._onDidChangeFixes.fire(t)}))},e.prototype.triggerManual=function(){this._quickFixOracle&&this._quickFixOracle.trigger()},e}();t.QuickFixModel=c}),define(d[478],h([0,1,305,4,23,61,19,43,81,2,13,29,235,263,477]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f){"use strict";var g=_=function(){function e(e,t,n,i,o,r){var s=this;this._keybindingService=r,this._disposables=[],this._editor=e,this._model=new f.QuickFixModel(this._editor,t),this._quickFixContextMenu=new h.QuickFixContextMenu(e,o,i),this._lightBulbWidget=new p.LightBulbWidget(e),this._updateLightBulbTitle(),this._disposables.push(this._lightBulbWidget.onClick(this._handleLightBulbSelect,this),this._model.onDidChangeFixes(function(e){return s._onQuickFixEvent(e)}),this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitle,this))}return e.get=function(e){return e.getContribution(_.ID)},e.prototype.dispose=function(){this._model.dispose(),i.dispose(this._disposables)},e.prototype._onQuickFixEvent=function(e){e&&"manual"===e.type?this._quickFixContextMenu.show(e.fixes,e.position):e&&e.fixes?this._quickFixContextMenu.isVisible?this._quickFixContextMenu.show(e.fixes,e.position):this._lightBulbWidget.model=e:this._lightBulbWidget.hide()},e.prototype.getId=function(){return _.ID},e.prototype._handleLightBulbSelect=function(e){this._quickFixContextMenu.show(this._lightBulbWidget.model.fixes,e)},e.prototype.triggerFromEditorSelection=function(){this._model.triggerManual()},e.prototype._updateLightBulbTitle=function(){var e,t=this._keybindingService.lookupKeybindings(v.Id)[0];e=t?n.localize(0,null,this._keybindingService.getLabelFor(t)):n.localize(1,null),this._lightBulbWidget.getDomNode().title=e},e}();g.ID="editor.contrib.quickFixController",g=_=y([d.editorContribution,C(1,u.IMarkerService),C(2,s.IContextKeyService),C(3,o.ICommandService),C(4,r.IContextMenuService),C(5,a.IKeybindingService)],g),t.QuickFixController=g;var v=b=function(e){function t(){return e.call(this,{id:b.Id,label:n.localize(2,null),alias:"Quick Fix",precondition:s.ContextKeyExpr.and(l.EditorContextKeys.Writable,l.ModeContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:l.EditorContextKeys.TextFocus,primary:2132}})||this}return m(t,e),t.prototype.run=function(e,t){var n=g.get(t);n&&n.triggerFromEditorSelection()},t}(c.EditorAction);v.Id="editor.action.quickFix",v=b=y([c.editorAction],v),t.QuickFixAction=v;var _,b}),define(d[121],h([0,1,29,271,13]),function(e,t,n,i,o){"use strict";var r=a=function(){function e(e){this.editor=e}return e.get=function(e){return e.getContribution(a.ID)},e.prototype.getId=function(){return a.ID},e.prototype.dispose=function(){this.widget&&(this.widget.destroy(),this.widget=null)},e.prototype.run=function(e){var t=this;this.widget&&(this.widget.destroy(),this.widget=null);var n=function(e){t.clearDecorations(),e&&t.lastKnownEditorSelection&&(t.editor.setSelection(t.lastKnownEditorSelection),t.editor.revealRangeInCenterIfOutsideViewport(t.lastKnownEditorSelection)),t.lastKnownEditorSelection=null,t.editor.focus()};this.widget=new i.QuickOpenEditorWidget(this.editor,function(){return n(!1)},function(){return n(!0)},function(n){t.widget.setInput(e.getModel(n),e.getAutoFocus(n))},{inputAriaLabel:e.inputAriaLabel}),this.lastKnownEditorSelection||(this.lastKnownEditorSelection=this.editor.getSelection()),this.widget.show("")},e.prototype.decorateLine=function(e,t){var n=this;t.changeDecorations(function(t){var i=[];n.rangeHighlightDecorationId&&(i.push(n.rangeHighlightDecorationId),n.rangeHighlightDecorationId=null);var o=[{range:e,options:{className:"rangeHighlight",isWholeLine:!0}}],r=t.deltaDecorations(i,o);n.rangeHighlightDecorationId=r[0]})},e.prototype.clearDecorations=function(){var e=this;this.rangeHighlightDecorationId&&this.editor.changeDecorations(function(t){t.deltaDecorations([e.rangeHighlightDecorationId],[]),e.rangeHighlightDecorationId=null})},e}();r.ID="editor.controller.quickOpenController",r=a=y([n.editorContribution],r),t.QuickOpenController=r;var s=function(e){function t(t,n){var i=e.call(this,n)||this;return i._inputAriaLabel=t,i}return m(t,e),t.prototype.getController=function(e){return r.get(e)},t.prototype._show=function(e,t){e.run({inputAriaLabel:this._inputAriaLabel,getModel:function(e){return t.getModel(e)},getAutoFocus:function(e){return t.getAutoFocus(e)}})},t}(o.EditorAction);t.BaseEditorQuickOpenAction=s;var a}),define(d[480],h([0,1,306,106,76,2,121,13,413]),function(e,t,n,i,o,r,s,a){"use strict";var u=r.EditorContextKeys,l=function(e){function t(t,n,i){var o=e.call(this)||this;return o.editor=n,o.decorator=i,o._parseResult=o._parseInput(t),o}return m(t,e),t.prototype._parseInput=function(e){var t,i=e.split(",").map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)});t=0===i.length?{lineNumber:-1,column:-1}:1===i.length?{lineNumber:i[0],column:1}:{lineNumber:i[0],column:i[1]};var o,s=this.editor.getEditorType();switch(s){case r.EditorType.IDiffEditor:o=this.editor.getModel().modified;break;case r.EditorType.ICodeEditor:o=this.editor.getModel();break;default:throw new Error}var a,u=o.validatePosition(t).equals(t);return a=u?t.column&&t.column>1?n.localize(0,null,t.lineNumber,t.column):n.localize(1,null,t.lineNumber,t.column):t.lineNumber<1||t.lineNumber>o.getLineCount()?n.localize(2,null,o.getLineCount()):n.localize(3,null,o.getLineMaxColumn(t.lineNumber)),{position:t,isValid:u,label:a}},t.prototype.getLabel=function(){return this._parseResult.label},t.prototype.getAriaLabel=function(){return n.localize(4,null,this._parseResult.label)},t.prototype.run=function(e,t){return e===o.Mode.OPEN?this.runOpen():this.runPreview()},t.prototype.runOpen=function(){if(!this._parseResult.isValid)return!1;var e=this.toSelection();return this.editor.setSelection(e),this.editor.revealRangeInCenter(e),this.editor.focus(),!0},t.prototype.runPreview=function(){if(!this._parseResult.isValid)return this.decorator.clearDecorations(),!1;var e=this.toSelection();return this.editor.revealRangeInCenter(e),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return{startLineNumber:this._parseResult.position.lineNumber,startColumn:this._parseResult.position.column,endLineNumber:this._parseResult.position.lineNumber,endColumn:this._parseResult.position.column}},t}(i.QuickOpenEntry);t.GotoLineEntry=l;var c=function(e){function t(){return e.call(this,n.localize(5,null),{id:"editor.action.gotoLine",label:n.localize(6,null),alias:"Go to Line...",precondition:null,kbOpts:{kbExpr:u.Focus,primary:2085,mac:{primary:293}}})||this}return m(t,e),t.prototype.run=function(e,t){var n=this;this._show(this.getController(t),{getModel:function(e){return new i.QuickOpenModel([new l(e,t,n.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(s.BaseEditorQuickOpenAction);c=y([a.editorAction],c),t.GotoLineAction=c}),define(d[481],h([0,1,307,10,87,6,106,76,43,2,121,13,24]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.key=t,r.setHighlights(n),r.action=i,r.editor=o,r}return m(t,e),t.prototype.getLabel=function(){return this.action.label},t.prototype.getAriaLabel=function(){return n.localize(0,null,this.getLabel())},t.prototype.getGroupLabel=function(){return this.key},t.prototype.run=function(e,t){var n=this;return e===a.Mode.OPEN&&(r.TPromise.timeout(50).done(function(){n.editor.focus();try{var e=n.action.run()||r.TPromise.as(null);e.done(null,i.onUnexpectedError)}catch(e){i.onUnexpectedError(e)}},i.onUnexpectedError),!0)},t}(s.QuickOpenEntryGroup);t.EditorActionCommandEntry=p;var f=function(e){function t(){return e.call(this,n.localize(1,null),{id:"editor.action.quickCommand",label:n.localize(2,null),alias:"Command Palette",precondition:null,kbOpts:{kbExpr:l.EditorContextKeys.Focus,primary:h.isIE?571:59},menuOpts:{}})||this}return m(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(u.IKeybindingService);this._show(this.getController(t),{getModel:function(e){return new s.QuickOpenModel(n._editorActionsToEntries(i,t,e))},getAutoFocus:function(e){return{autoFocusFirstEntry:!0,autoFocusPrefixMatch:e}}})},t.prototype._sort=function(e,t){var n=e.getLabel().toLowerCase(),i=t.getLabel().toLowerCase();return n.localeCompare(i)},t.prototype._editorActionsToEntries=function(e,t,n){for(var i=t.getSupportedActions(),r=[],s=0;s<i.length;s++){var a=i[s],u=e.lookupKeybindings(a.id).map(function(t){return e.getLabelFor(t)});if(a.label){var l=o.matchesFuzzy(n,a.label);l&&r.push(new p(u.length>0?u.join(", "):"",l,a,t))}}return r=r.sort(this._sort)},t}(c.BaseEditorQuickOpenAction);f=y([d.editorAction],f),t.QuickCommandAction=f}),define(d[482],h([0,1,10,27,6,3,13,16,44,17]),function(e,t,n,i,o,r,s,a,u,l){"use strict";function c(e){var t=[],i=a.DocumentSymbolProviderRegistry.all(e).map(function(i){return l.asWinJsPromise(function(t){return i.provideDocumentSymbols(e,t)}).then(function(e){Array.isArray(e)&&t.push.apply(t,e)},function(e){n.onUnexpectedExternalError(e)})});return o.TPromise.join(i).then(function(){var e=[];return h(e,t,""),e.sort(d),{entries:e}})}function d(e,t){return r.Range.compareRangesUsingStarts(r.Range.lift(e.location.range),r.Range.lift(t.location.range))}function h(e,t,n){for(var i=0,o=t;i<o.length;i++){var r=o[i];e.push({kind:r.kind,location:r.location,name:r.name,containerName:r.containerName||n})}}t.getDocumentSymbols=c,s.CommonEditorRegistry.registerLanguageCommand("_executeDocumentSymbolProvider",function(e,t){var o=t.resource;if(!(o instanceof i.default))throw n.illegalArgument("resource");var r=e.get(u.IModelService).getModel(o);if(!r)throw n.illegalArgument("resource");return c(r)})}),define(d[483],h([0,1,308,87,9,106,76,2,16,121,482,13,414]),function(e,t,n,i,o,r,s,a,u,l,c,d){"use strict";var h=":",p=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this)||this;return u.name=t,u.type=n,u.description=i,u.range=o,u.setHighlights(r),u.editor=s,u.decorator=a,u}return m(t,e),t.prototype.getLabel=function(){return this.name},t.prototype.getAriaLabel=function(){return n.localize(0,null,this.name)},t.prototype.getIcon=function(){return this.type},t.prototype.getDescription=function(){return this.description},t.prototype.getType=function(){return this.type},t.prototype.getRange=function(){return this.range},t.prototype.run=function(e,t){return e===s.Mode.OPEN?this.runOpen(t):this.runPreview()},t.prototype.runOpen=function(e){var t=this.toSelection();return this.editor.setSelection(t),this.editor.revealRangeInCenter(t),this.editor.focus(),!0},t.prototype.runPreview=function(){var e=this.toSelection();return this.editor.revealRangeInCenter(e),this.decorator.decorateLine(this.range,this.editor),!1},t.prototype.toSelection=function(){return{startLineNumber:this.range.startLineNumber,startColumn:this.range.startColumn||1,endLineNumber:this.range.startLineNumber,endColumn:this.range.startColumn||1}},t}(r.QuickOpenEntryGroup),f=function(e){function t(){return e.call(this,n.localize(1,null),{id:"editor.action.quickOutline",label:n.localize(2,null),alias:"Go to Symbol...",precondition:a.ModeContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:a.EditorContextKeys.Focus,primary:3117},menuOpts:{group:"navigation",order:3}})||this}return m(t,e),t.prototype.run=function(e,t){var n=this,i=t.getModel();return u.DocumentSymbolProviderRegistry.has(i)?c.getDocumentSymbols(i).then(function(e){0!==e.entries.length&&n._run(t,e.entries)}):null},t.prototype._run=function(e,t){var n=this;this._show(this.getController(e),{getModel:function(i){return new r.QuickOpenModel(n.toQuickOpenEntries(e,t,i))},getAutoFocus:function(e){return 0===e.indexOf(h)&&(e=e.substr(h.length)),{autoFocusPrefixMatch:e,autoFocusFirstEntry:!!e}}})},t.prototype.toQuickOpenEntries=function(e,t,r){var s=this.getController(e),a=[],l=r;0===r.indexOf(h)&&(l=l.substr(h.length));for(var c=0;c<t.length;c++){var d=t[c],f=o.trim(d.name),g=i.matchesFuzzy(l,f);if(g){var m=null;d.containerName&&(m=d.containerName),a.push(new p(f,u.SymbolKind.from(d.kind),m,d.location.range,g,e,s))}}if(r&&(a=0===r.indexOf(h)?a.sort(this.sortScoped.bind(this,r.toLowerCase())):a.sort(this.sortNormal.bind(this,r.toLowerCase()))),a.length>0&&0===r.indexOf(h)){for(var v=null,_=null,y=0,c=0;c<a.length;c++){var C=a[c];v!==C.getType()?(_&&_.setGroupLabel(this.typeToLabel(v,y)),v=C.getType(),_=C,y=1,C.setShowBorder(c>0)):y++}_&&_.setGroupLabel(this.typeToLabel(v,y))}else a.length>0&&a[0].setGroupLabel(n.localize(3,null,a.length));return a},t.prototype.typeToLabel=function(e,t){switch(e){case"module":return n.localize(4,null,t);case"class":return n.localize(5,null,t);case"interface":return n.localize(6,null,t);case"method":return n.localize(7,null,t);case"function":return n.localize(8,null,t);case"property":return n.localize(9,null,t);case"variable":return n.localize(10,null,t);case"var":return n.localize(11,null,t);case"constructor":return n.localize(12,null,t);case"call":return n.localize(13,null,t)}return e},t.prototype.sortNormal=function(e,t,n){var i=t.getLabel().toLowerCase(),o=n.getLabel().toLowerCase(),r=i.localeCompare(o);if(0!==r)return r;var s=t.getRange(),a=n.getRange();return s.startLineNumber-a.startLineNumber},t.prototype.sortScoped=function(e,t,n){e=e.substr(h.length);var i=t.getType(),o=n.getType(),r=i.localeCompare(o);if(0!==r)return r;if(e){var s=t.getLabel().toLowerCase(),a=n.getLabel().toLowerCase(),u=s.localeCompare(a);if(0!==u)return u}var l=t.getRange(),c=n.getRange();return l.startLineNumber-c.startLineNumber},t}(l.BaseEditorQuickOpenAction);f=y([d.editorAction],f),t.QuickOutlineAction=f}),define(d[484],h([0,1,10,6,13,16,17]),function(e,t,n,i,o,r,s){"use strict";function a(e,t){var o=r.ReferenceProviderRegistry.ordered(e).map(function(i){return s.asWinJsPromise(function(n){return i.provideReferences(e,t,{includeDeclaration:!0},n)}).then(function(e){if(Array.isArray(e))return e},function(e){n.onUnexpectedExternalError(e)})});return i.TPromise.join(o).then(function(e){for(var t=[],n=0,i=e;n<i.length;n++){var o=i[n];o&&t.push.apply(t,o)}return t})}t.provideReferences=a,o.CommonEditorRegistry.registerDefaultLanguageCommand("_executeReferenceProvider",a)}),define(d[485],h([0,1,315,17,10,6,13,16]),function(e,t,n,i,o,r,s,a){"use strict";function u(e,t,s){var u=a.RenameProviderRegistry.ordered(e),l=[],c=!1,d=u.map(function(n){return function(){if(!c)return i.asWinJsPromise(function(i){return n.provideRenameEdits(e,t,s,i)}).then(function(e){if(e){if(!e.rejectReason)return c=!0,e;l.push(e.rejectReason)}else;},function(e){return o.onUnexpectedExternalError(e),r.TPromise.wrapError("provider failed")})}});return i.sequence(d).then(function(e){var t=e[0];return l.length>0?{edits:void 0,rejectReason:l.join("\n")}:t?t:{edits:void 0,rejectReason:n.localize(0,null)}})}t.rename=u,s.CommonEditorRegistry.registerDefaultLanguageCommand("_executeDocumentRenameProvider",function(e,t,n){var i=n.newName;if("string"!=typeof i)throw o.illegalArgument("newName");return u(e,t,i)})}),define(d[486],h([0,1,312,10,30,6,408,19,52,159,13,29,2,281,485,314,68,14]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_){"use strict";var b=new a.RawContextKey("renameInputVisible",!1),w=L=function(){function e(e,t,n,i,o,r){this.editor=e,this._messageService=t,this._textModelResolverService=n,
this._progressService=i,this._fileService=r,this._renameInputField=new g.default(e),this._renameInputVisible=b.bindTo(o)}return e.get=function(e){return e.getContribution(L.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return L.ID},e.prototype.run=function(){var e=this,t=this.editor.getSelection(),s=this.editor.getModel().getWordAtPosition(t.getStartPosition());if(s){var a,u=t.startLineNumber,l=0,c=s.word.length;return a={startLineNumber:u,startColumn:s.startColumn,endLineNumber:u,endColumn:s.endColumn},t.isEmpty()||t.startLineNumber!==t.endLineNumber||(l=Math.max(0,t.startColumn-s.startColumn),c=Math.min(s.endColumn,t.endColumn)-s.startColumn),this._renameInputVisible.set(!0),this._renameInputField.getInput(a,s.word,l,c).then(function(t){e._renameInputVisible.reset(),e.editor.focus();var i=e._prepareRename(t).then(function(t){return t.finish().then(function(t){t&&e.editor.setSelection(t)})},function(t){return"string"!=typeof t?(e._messageService.show(o.default.Error,n.localize(0,null)),r.TPromise.wrapError(t)):void e._messageService.show(o.default.Info,t)});return e._progressService.showWhile(i,250),i},function(t){if(e._renameInputVisible.reset(),e.editor.focus(),!i.isPromiseCanceledError(t))return r.TPromise.wrapError(t)})}},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput()},e.prototype._prepareRename=function(e){var t=p.createBulkEdit(this._textModelResolverService,this.editor,this._fileService);return f.rename(this.editor.getModel(),this.editor.getPosition(),e).then(function(e){return e.rejectReason?r.TPromise.wrapError(e.rejectReason):(t.add(e.edits),t)})},e}();w.ID="editor.contrib.renameController",w=L=y([d.editorContribution,C(1,u.IMessageService),C(2,v.ITextModelResolverService),C(3,l.IProgressService),C(4,a.IContextKeyService),C(5,_.optional(s.IFileService))],w);var S=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.localize(1,null),alias:"Rename Symbol",precondition:a.ContextKeyExpr.and(h.EditorContextKeys.Writable,h.ModeContextKeys.hasRenameProvider),kbOpts:{kbExpr:h.EditorContextKeys.TextFocus,primary:60},menuOpts:{group:"1_modification",order:1.1}})||this}return m(t,e),t.prototype.run=function(e,t){var n=w.get(t);if(n)return n.run()},t}(c.EditorAction);S=y([c.editorAction],S),t.RenameAction=S;var E=c.EditorCommand.bindToContribution(w.get);c.CommonEditorRegistry.registerEditorCommand(new E({id:"acceptRenameInput",precondition:b,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:c.CommonEditorRegistry.commandWeight(99),kbExpr:h.EditorContextKeys.Focus,primary:3}})),c.CommonEditorRegistry.registerEditorCommand(new E({id:"cancelRenameInput",precondition:b,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:c.CommonEditorRegistry.commandWeight(99),kbExpr:h.EditorContextKeys.Focus,primary:9,secondary:[1033]}}));var L}),define(d[487],h([0,1,316,26,6,14,3,2,13,334]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=function(){function e(e){this.editor=e,this.next=null,this.previous=null,this.selection=e.getSelection()}return e}(),d=null,h=!1,p=_=function(){function e(e,t){this.editor=e,this._tokenSelectionSupport=t.createInstance(l.TokenSelectionSupport)}return e.get=function(e){return e.getContribution(_.ID)},e.prototype.dispose=function(){},e.prototype.getId=function(){return _.ID},e.prototype.run=function(e){var t=this,n=this.editor.getSelection(),r=this.editor.getModel();d&&d.editor!==this.editor&&(d=null);var a=o.TPromise.as(null);return d||(a=this._tokenSelectionSupport.getRangesToPosition(r.uri,n.getStartPosition()).then(function(e){if(!i.isFalsyOrEmpty(e)){var n;e.filter(function(e){var n=t.editor.getSelection(),i=new s.Range(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);return i.containsPosition(n.getStartPosition())&&i.containsPosition(n.getEndPosition())}).forEach(function(e){var i=e.range,o=new c(t.editor);o.selection=new s.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn),n&&(o.next=n,n.previous=o),n=o});var o=new c(t.editor);o.next=n,n&&(n.previous=o),d=o;var r=t.editor.onDidChangeCursorPosition(function(e){h||(d=null,r.dispose())})}})),a.then(function(){if(d&&(d=e?d.next:d.previous)){h=!0;try{t.editor.setSelection(d.selection)}finally{h=!1}}})},e}();p.ID="editor.contrib.smartSelectController",p=_=y([u.commonEditorContribution,C(1,r.IInstantiationService)],p);var f=function(e){function t(t,n){var i=e.call(this,n)||this;return i._forward=t,i}return m(t,e),t.prototype.run=function(e,t){var n=p.get(t);if(n)return n.run(this._forward)},t}(u.EditorAction),g=function(e){function t(){return e.call(this,!0,{id:"editor.action.smartSelect.grow",label:n.localize(0,null),alias:"Expand Select",precondition:null,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:1553,mac:{primary:3345}}})||this}return m(t,e),t}(f);g=y([u.editorAction],g);var v=function(e){function t(){return e.call(this,!1,{id:"editor.action.smartSelect.shrink",label:n.localize(1,null),alias:"Shrink Select",precondition:null,kbOpts:{kbExpr:a.EditorContextKeys.TextFocus,primary:1551,mac:{primary:3343}}})||this}return m(t,e),t}(f);v=y([u.editorAction],v);var _}),define(d[166],h([0,1,9,26,19,46,3,20,2,13,4,93,241]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=u.EditorContextKeys,f=function(){function e(e,t,n,i,o){this.editor=e,this._onStop=o,this.model=e.getModel(),this.finishPlaceHolderIndex=t.finishPlaceHolderIndex,this.trackedPlaceHolders=[],this.placeHolderDecorations=[],this.currentPlaceHolderIndex=0,this.highlightDecorationId=null,this.isFinished=!1,this._initialAlternativeVersionId=i,this.initialize(t,n)}return e.prototype.dispose=function(){this.stopAll()},e.prototype.initialize=function(e,t){for(var n=this,o=[],r=0,a=e.placeHolders;r<a.length;r++)for(var l=a[r].occurences,c=0,d=l;c<d.length;c++){var h=d[c];o.push(h)}o.sort(s.Range.compareRangesUsingStarts),this.model.changeDecorations(function(t){for(var r=0;r<e.placeHolders.length;r++){for(var a=e.placeHolders[r].occurences,l=[],c=0,d=a;c<d.length;c++){var h=d[c],p=u.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges;if(r===e.finishPlaceHolderIndex)p=u.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges;else{var f=i.binarySearch(o,h,s.Range.compareRangesUsingStarts);f>0&&o[f-1].endLineNumber===h.startLineNumber&&o[f-1].endColumn===h.startColumn&&(p=u.TrackedRangeStickiness.GrowsOnlyWhenTypingAfter)}l.push(t.addDecoration(h,{stickiness:p}))}n.trackedPlaceHolders.push({ranges:l})}}),this.editor.changeDecorations(function(i){var o=[],r=t+e.lines.length-1,a=n.model.getLineMaxColumn(r);o.push({range:new s.Range(t,1,r,a),options:{className:"new-snippet",isWholeLine:!0}});for(var u=0,l=n.trackedPlaceHolders.length;u<l;u++){var c=u===n.finishPlaceHolderIndex?"finish-snippet-placeholder":"snippet-placeholder";o.push({range:n.model.getDecorationRange(n.trackedPlaceHolders[u].ranges[0]),options:{stickiness:n.model.getDecorationOptions(n.trackedPlaceHolders[u].ranges[0]).stickiness,className:c}})}var d=i.deltaDecorations([],o);n.highlightDecorationId=d[0],n.placeHolderDecorations=d.slice(1)}),this.listenersToRemove=[],this.listenersToRemove.push(this.editor.onDidChangeModelRawContent(function(e){if(!n.isFinished){if(e.changeType===u.EventType.ModelRawContentChangedFlush)n.stopAll();else if(e.changeType===u.EventType.ModelRawContentChangedLineChanged){var t=e.lineNumber,i=n.model.getDecorationRange(n.highlightDecorationId);(t<i.startLineNumber||t>i.endLineNumber)&&n.stopAll()}else if(e.changeType===u.EventType.ModelRawContentChangedLinesInserted){var o=e.fromLineNumber,i=n.model.getDecorationRange(n.highlightDecorationId);(o<i.startLineNumber||o>i.endLineNumber)&&n.stopAll()}else if(e.changeType===u.EventType.ModelRawContentChangedLinesDeleted){var r=e.fromLineNumber,s=e.toLineNumber,i=n.model.getDecorationRange(n.highlightDecorationId),a=s<i.startLineNumber,l=r>i.endLineNumber;(a||l)&&n.stopAll()}var c=n.editor.getModel().getAlternativeVersionId();n._initialAlternativeVersionId===c&&n.stopAll()}})),this.listenersToRemove.push(this.editor.onDidChangeCursorPosition(function(e){if(!n.isFinished){var t=n.model.getDecorationRange(n.highlightDecorationId),i=e.position.lineNumber;(i<t.startLineNumber||i>t.endLineNumber)&&n.stopAll()}})),this.listenersToRemove.push(this.editor.onDidChangeModel(function(){n.stopAll()}));var p=-1;this.listenersToRemove.push(this.editor.onDidBlurEditor(function(){p=setTimeout(function(){n.stopAll()},100)})),this.listenersToRemove.push(this.editor.onDidFocusEditor(function(){p!==-1&&(clearTimeout(p),p=-1)})),this.listenersToRemove.push(this.model.onDidChangeDecorations(function(e){if(!n.isFinished){for(var t=n.model.getEditableRange(),i=null,o=!0,r=!0,s=0;(o||r)&&s<n.trackedPlaceHolders.length;s++)for(var a=n.trackedPlaceHolders[s].ranges,u=0;(o||r)&&u<a.length;u++){var l=n.model.getDecorationRange(a[u]);o&&(l.isEmpty()?null===i?i=l:i.equalsRange(l)||(o=!1):o=!1),r&&!t.equalsRange(l)&&(r=!1)}if(o||r)n.stopAll();else if(n.finishPlaceHolderIndex!==-1){var c=n.placeHolderDecorations[n.finishPlaceHolderIndex],d=n.model.getDecorationRange(c),h=n.model.getDecorationOptions(c),p=d.isEmpty(),f="finish-snippet-placeholder"===h.className,g=Number(p)^Number(f);g&&n.editor.changeDecorations(function(e){var t=p?"finish-snippet-placeholder":"snippet-placeholder";e.changeDecorationOptions(c,{className:t})})}}})),this.doLinkEditing()},e.prototype.onNextPlaceHolder=function(){return this.changePlaceHolder(!0)},e.prototype.onPrevPlaceHolder=function(){return this.changePlaceHolder(!1)},e.prototype.changePlaceHolder=function(e){if(this.isFinished)return!1;var t=this.currentPlaceHolderIndex,n=this.model.getDecorationRange(this.trackedPlaceHolders[t].ranges[0]),i=!0;do{e?this.currentPlaceHolderIndex=(this.currentPlaceHolderIndex+1)%this.trackedPlaceHolders.length:this.currentPlaceHolderIndex=(this.trackedPlaceHolders.length+this.currentPlaceHolderIndex-1)%this.trackedPlaceHolders.length;var o=this.model.getDecorationRange(this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges[0]);i=n.equalsRange(o)}while(this.currentPlaceHolderIndex!==t&&i);return this.doLinkEditing(),!0},e.prototype.onAccept=function(){if(this.isFinished)return!1;if(this.finishPlaceHolderIndex!==-1){var e=this.model.getDecorationRange(this.trackedPlaceHolders[this.finishPlaceHolderIndex].ranges[0]);this.editor.setPosition({lineNumber:e.endLineNumber,column:e.endColumn})}return this.stopAll(),!0},e.prototype.onEscape=function(){return!this.isFinished&&(this.stopAll(),this.editor.setSelections([this.editor.getSelections()[0]]),!0)},e.prototype.doLinkEditing=function(){for(var e=[],t=0,n=this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges.length;t<n;t++){var i=this.model.getDecorationRange(this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges[t]);e.push({selectionStartLineNumber:i.startLineNumber,selectionStartColumn:i.startColumn,positionLineNumber:i.endLineNumber,positionColumn:i.endColumn})}this.editor.setSelections(e),this.editor.revealRangeInCenterIfOutsideViewport(this.editor.getSelection())},e.prototype.stopAll=function(){var e=this;this.isFinished||(this.isFinished=!0,this._onStop(),this.listenersToRemove=c.dispose(this.listenersToRemove),this.model.changeDecorations(function(t){for(var n=0;n<e.trackedPlaceHolders.length;n++)for(var i=e.trackedPlaceHolders[n].ranges,o=0;o<i.length;o++)t.removeDecoration(i[o])}),this.trackedPlaceHolders=[],this.editor.changeDecorations(function(t){var n=[];n.push(e.highlightDecorationId);for(var i=0;i<e.placeHolderDecorations.length;i++)n.push(e.placeHolderDecorations[i]);t.deltaDecorations(n,[]),e.placeHolderDecorations=[],e.highlightDecorationId=null}))},e}();t.InsertSnippetController=f;var g=function(){function e(e,t,n,i,o){this._model=e,this._contentBefore=t,this._contentAfter=n,this.overwriteBefore=i,this.overwriteAfter=o}return e.create=function(t,n,i,o){var r="";i>0&&(r=t.getLineContent(n.startLineNumber).substring(n.startColumn-1-i,n.startColumn-1));var s="";return o>0&&(s=t.getLineContent(n.endLineNumber).substring(n.endColumn-1,n.endColumn-1+o)),new e(t,r,s,i,o)},e.prototype.next=function(t){var n=e.create(this._model,t,this.overwriteBefore,this.overwriteAfter),i=n.overwriteBefore,o=n.overwriteAfter;return n._contentBefore!==this._contentBefore&&(i=0),n._contentAfter!==this._contentAfter&&(o=0),new e(this._model,null,null,i,o)},e}(),m=_=function(){function e(e,n){this._editor=e,this._variableResolver=new h.SnippetVariablesResolver(e),this._currentController=null,this._inSnippetMode=t.CONTEXT_SNIPPET_MODE.bindTo(n)}return e.get=function(e){return e.getContribution(_.ID)},e.prototype.dispose=function(){this._currentController&&(this._currentController.dispose(),this._currentController=null)},e.prototype.getId=function(){return _.ID},e.prototype.insertSnippet=function(e,t,n){var i=d.CodeSnippet.fromTextmate(e,this._variableResolver);this.run(i,t,n)},e.prototype.run=function(e,t,n,i){var o=this;this._runAndRestoreController(function(){if(e.isInsertOnly||e.isSingleTabstopOnly)o._runForAllSelections(e,t,n,i);else{var r=_._prepareSnippet(o._editor,o._editor.getSelection(),e,t,n,i);o._runPreparedSnippetForPrimarySelection(r,!0)}})},e.prototype.runWithReplaceRange=function(e,t){var n=this;this._runAndRestoreController(function(){n._runPreparedSnippetForPrimarySelection({typeRange:t,adaptedSnippet:_._getAdaptedSnippet(n._editor.getModel(),e,t)},!1)})},e.prototype._runAndRestoreController=function(e){var t=this._currentController;this._currentController=null,e(),this._currentController?t&&t.dispose():this._currentController=t},e._addCommandForSnippet=function(e,t,n,i){var o=t.lines.join("\n"),s=e.getValueInRange(n,u.EndOfLinePreference.LF);o!==s&&i.push(r.EditOperation.replaceMove(n,o))},e.prototype._runPreparedSnippetForPrimarySelection=function(e,t){var n=this,i=this._editor.getModel().getAlternativeVersionId(),o=[];_._addCommandForSnippet(this._editor.getModel(),e.adaptedSnippet,e.typeRange,o),o.length>0&&(t&&this._editor.pushUndoStop(),this._editor.executeEdits("editor.contrib.insertSnippetHelper",o),t&&this._editor.pushUndoStop());var r=_._getSnippetCursorOnly(e.adaptedSnippet);r?this._editor.setSelection(new a.Selection(r.lineNumber,r.column,r.lineNumber,r.column)):e.adaptedSnippet.placeHolders.length>0&&(this._inSnippetMode.set(!0),this._currentController=new f(this._editor,e.adaptedSnippet,e.typeRange.startLineNumber,i,function(){n._inSnippetMode.reset(),n._currentController&&(n._currentController.dispose(),n._currentController=null)}))},e.prototype._runForAllSelections=function(e,t,n,i){for(var o=[],r=this._editor.getSelections(),u=this._editor.getModel(),l=g.create(u,r[0],t,n),c=0,d=[],h=r.map(function(e,t){return{selection:e,i:t}}).sort(function(e,t){return s.Range.compareRangesUsingStarts(e.selection,t.selection)}),p=0,f=h;p<f.length;p++){var m=f[p],v=m.selection,y=m.i,C=0!==y?l.next(v):l,b=_._prepareSnippet(this._editor,v,e,C.overwriteBefore,C.overwriteAfter,i),w=b.adaptedSnippet,S=b.typeRange;_._addCommandForSnippet(this._editor.getModel(),w,S,o);var E=u.getOffsetAt(S.getStartPosition());E+=c;for(var L=(w.lines.length-1)*u.getEOL().length,N=0,T=w.lines;N<T.length;N++){var x=T[N];L+=x.length}var M=_._getSnippetCursorOnly(w);if(M){var I=void 0;if(M.lineNumber===S.startLineNumber)I=M.column-S.startColumn;else{I=M.column-1;for(var D=0,R=S.startLineNumber;R<M.lineNumber;D++,R++)I+=w.lines[D].length+u.getEOL().length}E+=I}else E+=L;d.push({offset:E,i:y}),c+=L-u.getValueLengthInRange(S)}if(0!==o.length){var k=function(){for(var e=[],t=0,n=d;t<n.length;t++){var i=n[t],o=i.offset,r=i.i,s=u.getPositionAt(o);e[r]=new a.Selection(s.lineNumber,s.column,s.lineNumber,s.column)}return e};u.pushStackElement(),this._editor.setSelections(u.pushEditOperations(r,o,k)),u.pushStackElement()}},e._prepareSnippet=function(e,t,i,o,r,s){void 0===s&&(s=!0);var a=e.getModel(),u=_._getTypeRangeForSelection(a,t,o,r);if(1===i.lines.length){var l=a.getLineContent(u.endLineNumber).substr(u.endColumn-1),c=i.lines[0].substr(o),d=n.commonPrefixLength(l,c);d>0&&s&&(u=u.setEndPosition(u.endLineNumber,u.endColumn+d))}var h=_._getAdaptedSnippet(a,i,u);return{typeRange:u,adaptedSnippet:h}},e._getTypeRangeForSelection=function(e,t,n,i){var o;return o=n||i?e.validateRange(s.Range.plusRange(t,{startLineNumber:t.positionLineNumber,startColumn:t.positionColumn-n,endLineNumber:t.positionLineNumber,endColumn:t.positionColumn+i})):t},e._getAdaptedSnippet=function(e,t,n){return t.bind(e.getLineContent(n.startLineNumber),n.startLineNumber-1,n.startColumn-1,e)},e._getSnippetCursorOnly=function(e){if(1!==e.placeHolders.length)return null;var t=e.placeHolders[0];if(""!==t.value||1!==t.occurences.length)return null;var n=t.occurences[0];return s.Range.isEmpty(n)?{lineNumber:n.startLineNumber,column:n.startColumn}:null},e.prototype.jumpToNextPlaceholder=function(){this._currentController&&this._currentController.onNextPlaceHolder()},e.prototype.jumpToPrevPlaceholder=function(){this._currentController&&this._currentController.onPrevPlaceHolder()},e.prototype.acceptSnippet=function(){this._currentController&&this._currentController.onAccept()},e.prototype.leaveSnippet=function(){this._currentController&&this._currentController.onEscape()},e}();m.ID="editor.contrib.snippetController",m=_=y([l.commonEditorContribution,C(1,o.IContextKeyService)],m),t.SnippetController=m,t.CONTEXT_SNIPPET_MODE=new o.RawContextKey("inSnippetMode",!1);var v=l.EditorCommand.bindToContribution(m.get);l.CommonEditorRegistry.registerEditorCommand(new v({id:"jumpToNextSnippetPlaceholder",precondition:t.CONTEXT_SNIPPET_MODE,handler:function(e){return e.jumpToNextPlaceholder()},kbOpts:{weight:l.CommonEditorRegistry.commandWeight(30),kbExpr:p.TextFocus,primary:2}})),l.CommonEditorRegistry.registerEditorCommand(new v({id:"jumpToPrevSnippetPlaceholder",precondition:t.CONTEXT_SNIPPET_MODE,handler:function(e){return e.jumpToPrevPlaceholder()},kbOpts:{weight:l.CommonEditorRegistry.commandWeight(30),kbExpr:p.TextFocus,primary:1026}})),l.CommonEditorRegistry.registerEditorCommand(new v({id:"acceptSnippet",precondition:t.CONTEXT_SNIPPET_MODE,handler:function(e){return e.acceptSnippet()},kbOpts:{weight:l.CommonEditorRegistry.commandWeight(30),kbExpr:p.TextFocus,primary:3}})),l.CommonEditorRegistry.registerEditorCommand(new v({id:"leaveSnippet",precondition:t.CONTEXT_SNIPPET_MODE,handler:function(e){return e.leaveSnippet()},kbOpts:{weight:l.CommonEditorRegistry.commandWeight(30),kbExpr:p.TextFocus,primary:9,secondary:[1033]}}));var _}),define(d[489],h([0,1,19,70,150,33,9,2,13,166]),function(e,t,n,i,o,r,s,a,u,l){"use strict";var c=a.EditorContextKeys,d=r.Registry.as(o.Extensions.Snippets),h=f=function(){function e(e,t){var n=this;this._currentSnippets=[],this._snippetController=l.SnippetController.get(e);var i=f.ContextKey.bindTo(t);this._cursorChangeSubscription=e.onDidChangeCursorSelection(function(t){n._currentSnippets.length=0;var r;if(t.selection.isEmpty()){var a=o.getNonWhitespacePrefix(e.getModel(),e.getPosition());r=a&&function(e){return s.endsWith(a,e.prefix)}}else{var u=e.getModel().getValueInRange(t.selection);r=function(e){return u===e.prefix}}r&&d.visitSnippets(e.getModel().getLanguageIdentifier().id,function(e){return r(e)&&n._currentSnippets.push(e),!0}),i.set(1===n._currentSnippets.length)})}return e.get=function(e){return e.getContribution(f.ID)},e.prototype.dispose=function(){this._cursorChangeSubscription.dispose()},e.prototype.performSnippetCompletions=function(){if(1===this._currentSnippets.length){var e=this._currentSnippets[0];this._snippetController.insertSnippet(e.codeSnippet,e.prefix.length,0)}},e.prototype.getId=function(){return f.ID},e}();h.ID="editor.tabCompletionController",h.ContextKey=new n.RawContextKey("hasSnippetCompletions",void 0),h=f=y([u.commonEditorContribution,C(1,n.IContextKeyService)],h),t.TabCompletionController=h;var p=u.EditorCommand.bindToContribution(h.get);u.CommonEditorRegistry.registerEditorCommand(new p({id:"insertSnippet",precondition:h.ContextKey,handler:function(e){return e.performSnippetCompletions()},kbOpts:{weight:i.KeybindingsRegistry.WEIGHT.editorContrib(),kbExpr:n.ContextKeyExpr.and(c.TextFocus,c.TabDoesNotMoveFocus,l.CONTEXT_SNIPPET_MODE.toNegated(),n.ContextKeyExpr.has("config.editor.tabCompletion")),primary:2}}));var f}),define(d[122],h([0,1,17,26,9,35,10,6,13,16,150,33,19,42]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e,o,r,u){void 0===r&&(r="bottom");var c=[],d=v(r);o=o.clone();var h=l.SuggestRegistry.orderedGroups(e);"none"!==r&&h.unshift([t.snippetSuggestSupport]);var p=!1,f=h.map(function(r){return function(){if(!p)return a.TPromise.join(r.map(function(r){if(i.isFalsyOrEmpty(u)||!(u.indexOf(r)<0))return n.asWinJsPromise(function(t){return r.provideCompletionItems(e,o,t)}).then(function(n){var s=c.length;if(n&&!i.isFalsyOrEmpty(n.suggestions))for(var a=0,u=n.suggestions;a<u.length;a++){var l=u[a];d(l)&&(g(l,n),c.push({position:o,container:n,suggestion:l,support:r,resolve:m(r,l,e,o)}))}s!==c.length&&r!==t.snippetSuggestSupport&&(p=!0)},s.onUnexpectedExternalError)}))}}),_=n.sequence(f).then(function(){return c.sort(b(r))});return _}function g(e,t){"number"!=typeof e.overwriteBefore&&(e.overwriteBefore=0),("number"!=typeof e.overwriteAfter||e.overwriteAfter<0)&&(e.overwriteAfter=0)}function m(e,t,i,o){return function(){return"function"==typeof e.resolveCompletionItem?n.asWinJsPromise(function(n){return e.resolveCompletionItem(i,o,t,n)}).then(function(e){r.assign(t,e)}):a.TPromise.as(void 0)}}function v(e){return"none"===e?function(e){return"snippet"!==e.type}:function(){return!0}}function _(e,t){var n=0;return"string"==typeof e.suggestion.sortText&&"string"==typeof t.suggestion.sortText&&(n=o.compareIgnoreCase(e.suggestion.sortText,t.suggestion.sortText)),0===n&&(n=o.compareIgnoreCase(e.suggestion.label,t.suggestion.label)),0===n&&e.suggestion.type!==t.suggestion.type&&("snippet"===e.suggestion.type?n=1:"snippet"===t.suggestion.type&&(n=-1)),n}function y(e,t){if(e.suggestion.type!==t.suggestion.type){if("snippet"===e.suggestion.type)return-1;if("snippet"===t.suggestion.type)return 1}return _(e,t)}function C(e,t){if(e.suggestion.type!==t.suggestion.type){if("snippet"===e.suggestion.type)return 1;if("snippet"===t.suggestion.type)return-1}return _(e,t)}function b(e){return"top"===e?y:"bottom"===e?C:_}t.Context={Visible:new h.RawContextKey("suggestWidgetVisible",!1),MultipleSuggestions:new h.RawContextKey("suggestWidgetMultipleSuggestions",!1),AcceptOnKey:new h.RawContextKey("suggestionSupportsAcceptOnKey",!0),AcceptSuggestionsOnEnter:new h.RawContextKey("acceptSuggestionOnEnter",p.DefaultConfig.editor.acceptSuggestionOnEnter)},t.snippetSuggestSupport={triggerCharacters:[],provideCompletionItems:function(e,t){var n=d.Registry.as(c.Extensions.Snippets).getSnippetCompletions(e,t);if(n)return{suggestions:n}}},t.provideSuggestionItems=f,t.getSuggestionComparator=b,u.CommonEditorRegistry.registerDefaultLanguageCommand("_executeCompletionItemProvider",function(e,t,n){var i={incomplete:!1,suggestions:[]};return f(e,t).then(function(e){for(var t=0,n=e;t<n.length;t++){var o=n[t],r=o.container,s=o.suggestion;i.incomplete=i.incomplete||r.incomplete,i.suggestions.push(s)}return i})})}),define(d[491],h([0,1,318,9,12,6,10,4,11,112,267,60,14,43,19,21,122,99,47,422]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,v,_){"use strict";function b(e){return e&&e.match(E)?e:null}function w(e){var t=e.suggestion;return!!t.documentation||(t.detail||"").indexOf("\n")>=0}var S=!1,E=/^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i,L=function(){function e(e,t,n){this.widget=e,this.editor=t;var i=n.lookupKeybindings("editor.action.triggerSuggest");this.triggerKeybindingLabel=0===i.length?"":" ("+n.getLabelFor(i[0])+")"}return Object.defineProperty(e.prototype,"templateId",{get:function(){return"suggestion"},enumerable:!0,configurable:!0}),e.prototype.renderTemplate=function(e){var t=this,i=Object.create(null);i.disposables=[],i.root=e,i.icon=u.append(e,u.$(".icon")),i.colorspan=u.append(i.icon,u.$("span.colorspan"));var r=u.append(e,u.$(".contents")),s=u.append(r,u.$(".main"));i.highlightedLabel=new l.HighlightedLabel(s),i.disposables.push(i.highlightedLabel),i.typeLabel=u.append(s,u.$("span.type-label"));var a=u.append(r,u.$(".docs"));i.documentation=u.append(a,u.$("span.docs-text")),i.documentationDetails=u.append(a,u.$("span.docs-details")),i.documentationDetails.title=n.localize(0,null,this.triggerKeybindingLabel);var c=function(){var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,o=e.contribInfo.suggestFontSize||e.fontInfo.fontSize,r=e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight,a=o+"px",u=r+"px";i.root.style.fontSize=a,s.style.fontFamily=n,s.style.lineHeight=u,i.icon.style.height=u,i.icon.style.width=u,i.documentationDetails.style.height=u,i.documentationDetails.style.width=u};return c(),o.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo||e.contribInfo}).on(c,null,i.disposables),i},e.prototype.renderElement=function(e,t,i){var o=this,r=i,s=e.suggestion;if(w(e)?r.root.setAttribute("aria-label",n.localize(1,null,s.label)):r.root.setAttribute("aria-label",n.localize(2,null,s.label)),r.icon.className="icon "+s.type,r.colorspan.style.backgroundColor="","color"===s.type){var a=b(s.label)||b(s.documentation);a&&(r.icon.className="icon customcolor",r.colorspan.style.backgroundColor=a)}r.highlightedLabel.set(s.label,e.highlights),r.typeLabel.textContent=(s.detail||"").replace(/\n.*$/m,""),r.documentation.textContent=s.documentation||"",w(e)?(u.show(r.documentationDetails),r.documentationDetails.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},r.documentationDetails.onclick=function(e){e.stopPropagation(),e.preventDefault(),o.widget.toggleDetails()}):(u.hide(r.documentationDetails),r.documentationDetails.onmousedown=null,r.documentationDetails.onclick=null)},e.prototype.disposeTemplate=function(e){e.highlightedLabel.dispose(),e.disposables=a.dispose(e.disposables)},e}();L=y([C(2,p.IKeybindingService)],L);var N;!function(e){e[e.Hidden=0]="Hidden",e[e.Loading=1]="Loading",e[e.Empty=2]="Empty",e[e.Open=3]="Open",e[e.Frozen=4]="Frozen",e[e.Details=5]="Details"}(N||(N={}));var T=function(){function e(e,t,i){var r=this;this.widget=t,this.editor=i,this.disposables=[],this.el=u.append(e,u.$(".details")),this.disposables.push(a.toDisposable(function(){return e.removeChild(r.el)}));var s=u.append(this.el,u.$(".header"));this.title=u.append(s,u.$("span.title")),this.titleLabel=new l.HighlightedLabel(this.title),this.disposables.push(this.titleLabel),this.back=u.append(s,u.$("span.go-back")),this.back.title=n.localize(3,null),this.body=u.$(".body"),this.scrollbar=new d.DomScrollableElement(this.body,{canUseTranslate3d:!1}),u.append(this.el,this.scrollbar.getDomNode()),this.disposables.push(this.scrollbar),this.type=u.append(this.body,u.$("p.type")),this.docs=u.append(this.body,u.$("p.docs")),this.ariaLabel=null,this.configureFont(),o.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo}).on(this.configureFont,this,this.disposables)}return Object.defineProperty(e.prototype,"element",{get:function(){return this.el},enumerable:!0,configurable:!0}),e.prototype.render=function(e){var t=this;return e?(this.titleLabel.set(e.suggestion.label,e.highlights),this.type.innerText=e.suggestion.detail||"",this.docs.textContent=e.suggestion.documentation,this.back.onmousedown=function(e){e.preventDefault(),e.stopPropagation()},this.back.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),void(this.ariaLabel=i.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||""))):(this.titleLabel.set(""),this.type.textContent="",this.docs.textContent="",void(this.ariaLabel=null))},e.prototype.getAriaLabel=function(){return this.ariaLabel},e.prototype.scrollDown=function(e){void 0===e&&(e=8),this.body.scrollTop+=e},e.prototype.scrollUp=function(e){void 0===e&&(e=8),this.body.scrollTop-=e},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,n=e.contribInfo.suggestFontSize||e.fontInfo.fontSize,i=e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight,o=n+"px",r=i+"px";this.el.style.fontSize=o,this.title.style.fontFamily=t,this.type.style.fontFamily=t,this.back.style.height=r,this.back.style.width=r},e.prototype.dispose=function(){this.disposables=a.dispose(this.disposables)},e}(),x=function(){function e(e,t,n,i){var r=this;this.editor=e,this.telemetryService=t,this.allowEditorOverflow=!0,this.onDidSelectEmitter=new o.Emitter,this.onDidFocusEmitter=new o.Emitter,this.onDidHideEmitter=new o.Emitter,this.onDidShowEmitter=new o.Emitter,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.isAuto=!1,this.focusedItem=null,this.element=u.$(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||u.addClass(this.element,"no-icons"),this.messageElement=u.append(this.element,u.$(".message")),this.listElement=u.append(this.element,u.$(".tree")),this.details=new T(this.element,this,this.editor);var s=i.createInstance(L,this,this.editor);this.list=new c.List(this.listElement,this,[s],{useShadows:!1}),this.toDispose=[e.onDidBlurEditorText(function(){return r.onEditorBlur()}),this.list.onSelectionChange(function(e){return r.onListSelection(e)}),this.list.onFocusChange(function(e){return r.onListFocus(e)}),this.editor.onDidChangeCursorSelection(function(){return r.onCursorSelectionChanged()})],this.suggestWidgetVisible=m.Context.Visible.bindTo(n),this.suggestWidgetMultipleSuggestions=m.Context.MultipleSuggestions.bindTo(n),this.suggestionSupportsAutoAccept=m.Context.AcceptOnKey.bindTo(n),this.editor.addContentWidget(this),this.setState(0)}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;S||(this.editorBlurTimeout=r.TPromise.timeout(150).then(function(){e.editor.isFocused()||e.setState(0)}))},e.prototype.onListSelection=function(e){if(e.elements.length){var t=e.elements[0];this.onDidSelectEmitter.fire(t),v.alert(n.localize(6,null,t.suggestion.label)),this.editor.focus()}},e.prototype._getSuggestionAriaAlertLabel=function(e){return w(e)?n.localize(7,null,e.suggestion.label):n.localize(8,null,e.suggestion.label)},e.prototype._ariaAlert=function(e){this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&v.alert(this._lastAriaAlertLabel))},e.prototype.onListFocus=function(e){var t=this;if(!e.elements.length)return this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null,this.focusedItem=null),void this._ariaAlert(null);var n=e.elements[0];if(this._ariaAlert(this._getSuggestionAriaAlertLabel(n)),n!==this.focusedItem){this.currentSuggestionDetails&&(this.currentSuggestionDetails.cancel(),this.currentSuggestionDetails=null);var i=e.indexes[0];this.suggestionSupportsAutoAccept.set(!n.suggestion.noAutoAccept),this.focusedItem=n,this.updateWidgetHeight(),this.list.reveal(i),this.currentSuggestionDetails=n.resolve().then(function(){t.list.setFocus([i]),t.updateWidgetHeight(),t.list.reveal(i),t._ariaAlert(t._getSuggestionAriaAlertLabel(n))}).then(null,function(e){return!s.isPromiseCanceledError(e)&&s.onUnexpectedError(e)}).then(function(){return t.currentSuggestionDetails=null}),this.onDidFocusEmitter.fire(n)}},e.prototype.setState=function(t){if(this.element){
var n=this.state!==t;switch(this.state=t,u.toggleClass(this.element,"frozen",4===t),t){case 0:u.hide(this.messageElement,this.details.element),u.show(this.listElement),this.hide(),n&&this.list.splice(0,this.list.length);break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,u.hide(this.listElement,this.details.element),u.show(this.messageElement),this.show();break;case 2:this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,u.hide(this.listElement,this.details.element),u.show(this.messageElement),this.show();break;case 3:u.hide(this.messageElement,this.details.element),u.show(this.listElement),this.show();break;case 4:u.hide(this.messageElement,this.details.element),u.show(this.listElement),this.show();break;case 5:u.hide(this.messageElement,this.listElement),u.show(this.details.element),this.show(),this._ariaAlert(this.details.getAriaLabel())}n&&this.editor.layoutContentWidget(this)}},e.prototype.showTriggered=function(e){var t=this;0===this.state&&(this.isAuto=!!e,this.isAuto||(this.loadingTimeout=setTimeout(function(){t.loadingTimeout=null,t.setState(1)},50)))},e.prototype.showSuggestions=function(e,t,n){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel=e,t&&2!==this.state)return void this.setState(4);var i=this.completionModel.items.length,o=0===i;if(this.suggestWidgetMultipleSuggestions.set(i>1),o)n?this.setState(0):this.setState(2),this.completionModel=null;else{var r=this.completionModel.stats;r.wasAutomaticallyTriggered=!!n,this.telemetryService.publicLog("suggestWidget",r),this.list.splice(0,this.list.length,this.completionModel.items),this.list.setFocus([this.completionModel.topScoreIdx]),this.list.reveal(this.completionModel.topScoreIdx,0),this.setState(3)}},e.prototype.selectNextPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageDown(),!0;case 1:return!this.isAuto;default:return this.list.focusNextPage(),!0}},e.prototype.selectNext=function(){switch(this.state){case 0:return!1;case 5:return this.list.focusNext(1,!0),this.renderDetails(),!0;case 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectPreviousPage=function(){switch(this.state){case 0:return!1;case 5:return this.details.pageUp(),!0;case 1:return!this.isAuto;default:return this.list.focusPreviousPage(),!0}},e.prototype.selectPrevious=function(){switch(this.state){case 0:return!1;case 5:return this.list.focusPrevious(1,!0),this.renderDetails(),!0;case 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return this.list.getFocusedElements()[0]},e.prototype.toggleDetails=function(){if(5===this.state)return this.setState(3),void this.editor.focus();if(3===this.state){var e=this.list.getFocusedElements()[0];e&&w(e)&&(this.setState(5),this.editor.focus(),this.telemetryService.publicLog("suggestWidget:toggleDetails"))}},e.prototype.show=function(){var e=this;this.updateWidgetHeight(),this.suggestWidgetVisible.set(!0),this.renderDetails(),this.showTimeout=r.TPromise.timeout(100).then(function(){u.addClass(e.element,"visible"),e.onDidShowEmitter.fire(e)})},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),u.removeClass(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.hideDetailsOrHideWidget=function(){5===this.state?this.toggleDetails():this.hideWidget()},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[g.ContentWidgetPositionPreference.BELOW,g.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateWidgetHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else if(5===this.state)e=12*this.unfocusedHeight;else{var t=this.list.getFocusedElements()[0],n=t?this.getHeight(t):this.unfocusedHeight;e=n;var i=(this.list.contentHeight-n)/this.unfocusedHeight;e+=Math.min(i,11)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.element.style.height=e+"px",this.list.layout(e),this.editor.layoutContentWidget(this),e},e.prototype.renderDetails=function(){5!==this.state?this.details.render(null):this.details.render(this.list.getFocusedElements()[0])},Object.defineProperty(e.prototype,"focusHeight",{get:function(){return 2*this.unfocusedHeight},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"unfocusedHeight",{get:function(){var e=this.editor.getConfiguration();return e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight},enumerable:!0,configurable:!0}),e.prototype.getHeight=function(e){var t=this.list.getFocusedElements()[0];return w(e)&&e===t?this.focusHeight:this.unfocusedHeight},e.prototype.getTemplateId=function(e){return"suggestion"},e.prototype.dispose=function(){this.state=null,this.suggestionSupportsAutoAccept=null,this.currentSuggestionDetails=null,this.focusedItem=null,this.element=null,this.messageElement=null,this.listElement=null,this.details.dispose(),this.details=null,this.list.dispose(),this.list=null,this.toDispose=a.dispose(this.toDispose),this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.editorBlurTimeout&&(this.editorBlurTimeout.cancel(),this.editorBlurTimeout=null),this.showTimeout&&(this.showTimeout.cancel(),this.showTimeout=null)},e}();x.ID="editor.widget.suggestWidget",x.LOADING_MESSAGE=n.localize(4,null),x.NO_SUGGESTIONS_MESSAGE=n.localize(5,null),x=y([C(1,_.ITelemetryService),C(2,f.IContextKeyService),C(3,h.IInstantiationService)],x),t.SuggestWidget=x}),define(d[492],h([0,1,10,26,17,12,4,6,2,16,15,122,242]),function(e,t,n,i,o,r,s,a,u,l,c,d,h){"use strict";var p=function(){function e(e,t,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=n}return e.shouldAutoTrigger=function(e){var t=e.getModel();if(!t)return!1;var n=e.getPosition(),i=t.getWordAtPosition(n);return!!i&&(i.endColumn===n.column&&!!isNaN(Number(i.word)))},e.isInEditableRange=function(e){var t=e.getModel(),n=e.getPosition();if(t.hasEditableRange()){var i=t.getEditableRange();if(!i.containsPosition(n))return!1}return!0},e}();t.LineContext=p;var f;!function(e){e[e.Idle=0]="Idle",e[e.Manual=1]="Manual",e[e.Auto=2]="Auto"}(f||(f={}));var g=function(){function e(e){var t=this;this.editor=e,this.toDispose=[],this.triggerRefilter=new o.TimeoutTimer,this._onDidCancel=new r.Emitter,this._onDidTrigger=new r.Emitter,this._onDidSuggest=new r.Emitter,this.state=0,this.triggerAutoSuggestPromise=null,this.requestPromise=null,this.completionModel=null,this.context=null,this.currentPosition=e.getPosition()||new c.Position(1,1),this.toDispose.push(this.editor.onDidChangeModel(function(){t.updateTriggerCharacters(),t.cancel()})),this.toDispose.push(e.onDidChangeModelLanguage(function(){t.updateTriggerCharacters(),t.cancel()})),this.toDispose.push(this.editor.onDidChangeConfiguration(function(){t.updateTriggerCharacters(),t.updateQuickSuggest()})),this.toDispose.push(l.SuggestRegistry.onDidChange(function(){t.updateTriggerCharacters(),t.updateActiveSuggestSession()})),this.toDispose.push(this.editor.onDidChangeCursorSelection(function(e){t.onCursorChange(e)})),this.updateTriggerCharacters(),this.updateQuickSuggest()}return Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this._onDidCancel.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidTrigger",{get:function(){return this._onDidTrigger.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidSuggest",{get:function(){return this._onDidSuggest.event},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){s.dispose([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this.triggerCharacterListener,this.triggerRefilter]),this.toDispose=s.dispose(this.toDispose),this.cancel()},e.prototype.updateQuickSuggest=function(){this.quickSuggestDelay=this.editor.getConfiguration().contribInfo.quickSuggestionsDelay,(isNaN(this.quickSuggestDelay)||!this.quickSuggestDelay&&0!==this.quickSuggestDelay||this.quickSuggestDelay<0)&&(this.quickSuggestDelay=10)},e.prototype.updateTriggerCharacters=function(){var e=this;if(s.dispose(this.triggerCharacterListener),!this.editor.getConfiguration().readOnly&&this.editor.getModel()&&this.editor.getConfiguration().contribInfo.suggestOnTriggerCharacters){for(var t=Object.create(null),n=0,o=l.SuggestRegistry.all(this.editor.getModel());n<o.length;n++){var r=o[n];if(!i.isFalsyOrEmpty(r.triggerCharacters))for(var a=0,u=r.triggerCharacters;a<u.length;a++){var c=u[a],d=t[c];d?d.push(r):t[c]=[r]}}this.triggerCharacterListener=this.editor.onDidType(function(n){var i=n.charAt(n.length-1),o=t[i];o&&e.trigger(!0,!1,o)})}},e.prototype.cancel=function(e){void 0===e&&(e=!1),this.triggerAutoSuggestPromise&&(this.triggerAutoSuggestPromise.cancel(),this.triggerAutoSuggestPromise=null),this.requestPromise&&(this.requestPromise.cancel(),this.requestPromise=null),this.state=0,this.completionModel=null,this.context=null,this._onDidCancel.fire({retrigger:e})},e.prototype.updateActiveSuggestSession=function(){0!==this.state&&(l.SuggestRegistry.has(this.editor.getModel())?this.trigger(2===this.state,!0):this.cancel())},e.prototype.onCursorChange=function(e){var t=this,n=this.currentPosition;if(this.currentPosition=this.editor.getPosition(),!e.selection.isEmpty()||"keyboard"!==e.source||e.reason!==u.CursorChangeReason.NotSet)return void this.cancel();if(l.SuggestRegistry.has(this.editor.getModel())){var i=this.editor.getModel();i&&(0===this.state?this.editor.getConfiguration().contribInfo.quickSuggestions&&n.isBefore(this.currentPosition)&&(this.cancel(),p.shouldAutoTrigger(this.editor)&&(this.triggerAutoSuggestPromise=a.TPromise.timeout(this.quickSuggestDelay),this.triggerAutoSuggestPromise.then(function(){t.triggerAutoSuggestPromise=null,t.trigger(!0)}))):this.triggerRefilter.cancelAndSet(function(){var e=t.editor.getPosition(),n=new p(i,e,2===t.state);t.onNewContext(n)},25))}},e.prototype.trigger=function(e,t,o,r){var s=this;void 0===t&&(t=!1);var a=this.editor.getModel();if(a){var u=new p(a,this.editor.getPosition(),e);p.isInEditableRange(this.editor)&&(this.cancel(t),this.state=e?2:1,this._onDidTrigger.fire({auto:e}),this.context=u,this.requestPromise=d.provideSuggestionItems(a,this.editor.getPosition(),this.editor.getConfiguration().contribInfo.snippetSuggestions,o).then(function(t){if(s.requestPromise=null,0!==s.state){var n=s.editor.getModel();if(n){if(!i.isFalsyOrEmpty(r)){var o=d.getSuggestionComparator(s.editor.getConfiguration().contribInfo.snippetSuggestions);t=t.concat(r).sort(o)}var a=new p(n,s.editor.getPosition(),e);s.completionModel=new h.CompletionModel(t,s.context.column,{leadingLineContent:a.leadingLineContent,characterCountDelta:s.context?a.column-s.context.column:0}),s.onNewContext(a)}}}).then(null,n.onUnexpectedError))}},e.prototype.onNewContext=function(e){if(this.context){if(e.lineNumber!==this.context.lineNumber)return void this.cancel();if(e.column<this.context.column)return void(e.leadingWord.word?this.trigger(this.context.auto,!0):this.cancel());if(this.completionModel)if(e.column>this.context.column&&this.completionModel.incomplete){var t=this.completionModel.resolveIncompleteInfo(),n=t.complete,i=t.incomplete;this.trigger(2===this.state,!0,i,n)}else{var o=this.completionModel.lineContext,r=!1;if(this.completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this.context.column},0===this.completionModel.items.length){if(p.shouldAutoTrigger(this.editor)&&this.context.leadingWord.endColumn<e.leadingWord.startColumn)return void this.trigger(this.context.auto,!0);this.context.auto||(this.completionModel.lineContext=o,r=this.completionModel.items.length>0)}this._onDidSuggest.fire({completionModel:this.completionModel,auto:this.context.auto,isFrozen:r})}}},e}();t.SuggestModel=g}),define(d[493],h([0,1,317,10,26,4,14,47,19,23,2,13,29,46,3,93,166,122,492,491]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b,w){"use strict";var S=function(){function e(e,t,n){var i=this;this._disposables=[],this._activeAcceptCharacters=new Set,this._disposables.push(t.onDidShow(function(){return i._onItem(t.getFocusedItem())})),this._disposables.push(t.onDidFocus(this._onItem,this)),this._disposables.push(t.onDidHide(this.reset,this)),this._disposables.push(e.onWillType(function(t){if(i._activeItem){var o=t[t.length-1];i._activeAcceptCharacters.has(o)&&e.getConfiguration().contribInfo.acceptSuggestionOnCommitCharacter&&n(i._activeItem)}}))}return e.prototype._onItem=function(e){if(!e||o.isFalsyOrEmpty(e.suggestion.commitCharacters))return void this.reset();this._activeItem=e,this._activeAcceptCharacters.clear();for(var t=0,n=e.suggestion.commitCharacters;t<n.length;t++){var i=n[t];i.length>0&&this._activeAcceptCharacters.add(i[0])}},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){r.dispose(this._disposables)},e}(),E=x=function(){function e(e,t,n,i,o){var r=this;this.editor=e,this.commandService=t,this.telemetryService=n,this.toDispose=[],this.model=new b.SuggestModel(this.editor),this.toDispose.push(this.model.onDidTrigger(function(e){return r.widget.showTriggered(e.auto)})),this.toDispose.push(this.model.onDidSuggest(function(e){return r.widget.showSuggestions(e.completionModel,e.isFrozen,e.auto)})),this.toDispose.push(this.model.onDidCancel(function(e){return!e.retrigger&&r.widget.hideWidget()}));var s=_.Context.AcceptSuggestionsOnEnter.bindTo(i),a=function(){s.set(r.editor.getConfiguration().contribInfo.acceptSuggestionOnEnter)};this.toDispose.push(this.editor.onDidChangeConfiguration(function(e){return a()})),a(),this.widget=o.createInstance(w.SuggestWidget,this.editor),this.toDispose.push(this.widget.onDidSelect(this.onDidSelectItem,this));var u=new S(e,this.widget,function(e){return r.onDidSelectItem(e)});this.toDispose.push(u,this.model.onDidSuggest(function(e){0===e.completionModel.items.length&&u.reset()}))}return e.get=function(e){return e.getContribution(x.ID)},e.prototype.getId=function(){return x.ID},e.prototype.dispose=function(){this.toDispose=r.dispose(this.toDispose),this.widget&&(this.widget.dispose(),this.widget=null),this.model&&(this.model.dispose(),this.model=null)},e.prototype.onDidSelectItem=function(e){if(e){var t=e.suggestion,n=e.position,o=this.editor.getPosition().column-n.column;Array.isArray(t.additionalTextEdits)&&(this.editor.pushUndoStop(),this.editor.executeEdits("suggestController.additionalTextEdits",t.additionalTextEdits.map(function(e){return p.EditOperation.replace(f.Range.lift(e.range),e.text)})),this.editor.pushUndoStop()),"textmate"===t.snippetType?v.SnippetController.get(this.editor).insertSnippet(t.insertText,t.overwriteBefore+o,t.overwriteAfter):v.SnippetController.get(this.editor).run(g.CodeSnippet.fromInternal(t.insertText),t.overwriteBefore+o,t.overwriteAfter),t.command&&(r=this.commandService).executeCommand.apply(r,[t.command.id].concat(t.command.arguments)).done(void 0,i.onUnexpectedError)}this.model.cancel();var r},e.prototype.triggerSuggest=function(){this.model.trigger(!1,!1),this.editor.revealLine(this.editor.getPosition().lineNumber),this.editor.focus()},e.prototype.acceptSelectedSuggestion=function(){if(this.widget){var e=this.widget.getFocusedItem();this.onDidSelectItem(e)}},e.prototype.cancelSuggestWidget=function(){this.widget&&(this.model.cancel(),this.widget.hideDetailsOrHideWidget())},e.prototype.selectNextSuggestion=function(){this.widget&&this.widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this.widget&&this.widget.selectNextPage()},e.prototype.selectPrevSuggestion=function(){this.widget&&this.widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this.widget&&this.widget.selectPreviousPage()},e.prototype.toggleSuggestionDetails=function(){this.widget&&this.widget.toggleDetails()},e}();E.ID="editor.contrib.suggestController",E=x=y([h.editorContribution,C(1,l.ICommandService),C(2,a.ITelemetryService),C(3,u.IContextKeyService),C(4,s.IInstantiationService)],E),t.SuggestController=E;var L=function(e){function t(){return e.call(this,{id:"editor.action.triggerSuggest",label:n.localize(0,null),alias:"Trigger Suggest",precondition:u.ContextKeyExpr.and(c.EditorContextKeys.Writable,c.ModeContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:c.EditorContextKeys.TextFocus,primary:2058,mac:{primary:266}}})||this}return m(t,e),t.prototype.run=function(e,t){E.get(t).triggerSuggest()},t}(d.EditorAction);L=y([d.editorAction],L),t.TriggerSuggestAction=L;var N=d.CommonEditorRegistry.commandWeight(90),T=d.EditorCommand.bindToContribution(E.get);d.CommonEditorRegistry.registerEditorCommand(new T({id:"acceptSelectedSuggestion",precondition:_.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:2}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"acceptSelectedSuggestionOnEnter",precondition:_.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:N,kbExpr:u.ContextKeyExpr.and(c.EditorContextKeys.TextFocus,_.Context.AcceptSuggestionsOnEnter),primary:3}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"hideSuggestWidget",precondition:_.Context.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:9,secondary:[1033]}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectNextSuggestion",precondition:u.ContextKeyExpr.and(_.Context.Visible,_.Context.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectNextPageSuggestion",precondition:u.ContextKeyExpr.and(_.Context.Visible,_.Context.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:12,secondary:[524]}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectPrevSuggestion",precondition:u.ContextKeyExpr.and(_.Context.Visible,_.Context.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"selectPrevPageSuggestion",precondition:u.ContextKeyExpr.and(_.Context.Visible,_.Context.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:11,secondary:[523]}})),d.CommonEditorRegistry.registerEditorCommand(new T({id:"toggleSuggestionDetails",precondition:_.Context.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:N,kbExpr:c.EditorContextKeys.TextFocus,primary:2058,mac:{primary:266}}}));var x}),define(d[494],h([0,1,319,13,115]),function(e,t,n,i,o){"use strict";var r=s=function(e){function t(){return e.call(this,{id:s.ID,label:n.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323}}})||this}return m(t,e),t.prototype.run=function(e,t){var n=o.TabFocus.getTabFocusMode();o.TabFocus.setTabFocusMode(!n)},t}(i.EditorAction);r.ID="editor.action.toggleTabFocusMode",r=s=y([i.editorAction],r),t.ToggleTabFocusModeAction=r;var s}),define(d[495],h([0,1,17,10,3,2,13,16,4]),function(e,t,n,i,o,r,s,a,u){"use strict";function l(e,t){var o=a.DocumentHighlightProviderRegistry.ordered(e),r=!1;return n.sequence(o.map(function(o){return function(){if(!r)return n.asWinJsPromise(function(n){return o.provideDocumentHighlights(e,t,n)}).then(function(e){if(Array.isArray(e)&&e.length>0)return r=!0,e},function(e){i.onUnexpectedExternalError(e)})}})).then(function(e){return e[0]})}t.getOccurrencesAtPosition=l,s.CommonEditorRegistry.registerDefaultLanguageCommand("_executeDocumentHighlights",l);var c=function(){function e(e){var t=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition(function(e){t._onPositionChanged(e)})),this.toUnhook.push(e.onDidChangeModel(function(e){t._stopAll(),t.model=t.editor.getModel()})),this.toUnhook.push(e.onDidChangeModelContent(function(e){t._stopAll()})),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)},e.prototype._onPositionChanged=function(e){var t=this;if(e.reason!==r.CursorChangeReason.Explicit)return void this._stopAll();if(!a.DocumentHighlightProviderRegistry.has(this.model))return void this._stopAll();var n=this.editor.getSelection();if(n.startLineNumber!==n.endLineNumber)return void this._stopAll();var i=n.startLineNumber,s=n.startColumn,u=n.endColumn,c=this.model.getWordAtPosition({lineNumber:i,column:s});if(!c||c.startColumn>s||c.endColumn<u)return void this._stopAll();for(var d=new o.Range(i,c.startColumn,i,c.endColumn),h=this._lastWordRange&&this._lastWordRange.equalsRange(d),p=0,f=this._decorationIds.length;!h&&p<f;p++){var g=this.model.getDecorationRange(this._decorationIds[p]);g&&g.startLineNumber===i&&g.startColumn<=s&&g.endColumn>=u&&(h=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(),h)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var m=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=l(this.model,this.editor.getPosition()),this.workerRequest.then(function(e){m===t.workerRequestTokenId&&(t.workerRequestCompleted=!0,t.workerRequestValue=e||[],t._beginRenderDecorations())}).done()}this._lastWordRange=d},e.prototype._beginRenderDecorations=function(){var e=this,t=(new Date).getTime(),n=this.lastCursorPositionChangeTime+250;t>=n?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(function(){e.renderDecorations()},n-t)},e.prototype.renderDecorations=function(){this.renderDecorationsTimer=-1;for(var e=[],t=0,n=this.workerRequestValue.length;t<n;t++){var i=this.workerRequestValue[t],o="#A0A0A0",s=void 0;s=i.kind===a.DocumentHighlightKind.Write?"wordHighlightStrong":i.kind===a.DocumentHighlightKind.Text?"selectionHighlight":"wordHighlight",e.push({range:i.range,options:{stickiness:r.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:s,overviewRuler:{color:o,darkColor:o,position:r.OverviewRulerLane.Center}}})}this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e)},e.prototype.dispose=function(){this._stopAll(),this.toUnhook=u.dispose(this.toUnhook)},e}(),d=h=function(){function e(e){this.wordHighligher=new c(e)}return e.prototype.getId=function(){return h.ID},e.prototype.dispose=function(){this.wordHighligher.dispose()},e}();d.ID="editor.contrib.wordHighlighter",d=h=y([s.commonEditorContribution],d);var h}),define(d[496],h([0,1,128,47,52]),function(e,t,n,i,o){"use strict";var r=function(){function e(e,t,i){this.contextView=new n.ContextView(e)}return e.prototype.dispose=function(){this.contextView.dispose()},e.prototype.setContainer=function(e){this.contextView.setContainer(e)},e.prototype.showContextView=function(e){this.contextView.show(e)},e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.contextView.hide(e)},e}();r=y([C(1,i.ITelemetryService),C(2,o.IMessageService)],r),t.ContextViewService=r}),define(d[497],h([0,1]),function(e,t){"use strict";function n(e){return/vs($| )/.test(e)}function i(e){return/vs-dark($| )/.test(e)}function o(e){return e.split(" ")[1]}function r(e){return e.split(" ")[0]}t.isLightTheme=n,t.isDarkTheme=i,t.getSyntaxThemeId=o,t.getBaseThemeId=r}),define(d[498],h([0,1,497,2,32,130]),function(e,t,n,i,o,r){"use strict";var s=function(e){function t(i,o,s){var a=e.call(this,i)||this;a._overviewRuler=new r.OverviewRulerImpl(1,"decorationsOverviewRuler",o,a._context.configuration.editor.lineHeight,a._context.configuration.editor.viewInfo.canUseTranslate3d,t.MIN_DECORATION_HEIGHT,t.MAX_DECORATION_HEIGHT,s),a._overviewRuler.setLanesCount(a._context.configuration.editor.viewInfo.overviewRulerLanes,!1);var u=a._context.configuration.editor.viewInfo.theme;return a._overviewRuler.setUseDarkColor(!n.isLightTheme(u),!1),a._shouldUpdateDecorations=!0,a._zonesFromDecorations=[],a._shouldUpdateCursorPosition=!0,a._hideCursor=a._context.configuration.editor.viewInfo.hideCursorInOverviewRuler,a._zonesFromCursors=[],a._cursorPositions=[],a}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._overviewRuler.dispose()},t.prototype.onCursorPositionChanged=function(e){return this._shouldUpdateCursorPosition=!0,this._cursorPositions=[e.position],this._cursorPositions=this._cursorPositions.concat(e.secondaryPositions),!0},t.prototype.onConfigurationChanged=function(e){var t=this._overviewRuler.getLanesCount(),i=this._context.configuration.editor.viewInfo.overviewRulerLanes,o=!1;if(e.lineHeight&&(this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight,!1),o=!0),e.viewInfo.canUseTranslate3d&&(this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d,!1),o=!0),t!==i&&(this._overviewRuler.setLanesCount(i,!1),o=!0),e.viewInfo.hideCursorInOverviewRuler&&(this._hideCursor=this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler,this._shouldUpdateCursorPosition=!0,o=!0),e.viewInfo.theme){var r=this._context.configuration.editor.viewInfo.theme;this._overviewRuler.setUseDarkColor(!n.isLightTheme(r),!1),o=!0}return o},t.prototype.onLayoutChanged=function(e){return this._overviewRuler.setLayout(e.overviewRuler,!1),!0},t.prototype.onZonesChanged=function(){return!0},t.prototype.onModelFlushed=function(){return this._shouldUpdateCursorPosition=!0,this._shouldUpdateDecorations=!0,!0},t.prototype.onModelDecorationsChanged=function(e){return this._shouldUpdateDecorations=!0,!0},t.prototype.onScrollChanged=function(t){return this._overviewRuler.setScrollHeight(t.scrollHeight,!1),e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype.getDomNode=function(){return this._overviewRuler.getDomNode()},t.prototype._createZonesFromDecorations=function(){for(var e=this._context.model.getAllOverviewRulerDecorations(),t=[],n=0,o=e.length;n<o;n++){var r=e[n],s=r.source.options.overviewRuler;t.push(new i.OverviewRulerZone(r.range.startLineNumber,r.range.endLineNumber,s.position,0,s.color,s.darkColor))}return t},t.prototype._createZonesFromCursors=function(){for(var e=[],n=0,o=this._cursorPositions.length;n<o;n++){var r=this._cursorPositions[n];e.push(new i.OverviewRulerZone(r.lineNumber,r.lineNumber,i.OverviewRulerLane.Full,2,t._CURSOR_COLOR,t._CURSOR_COLOR_DARK))}return e},t.prototype.prepareRender=function(e){if(!this.shouldRender())throw new Error("I did not ask to render!")},t.prototype.render=function(e){if(this._shouldUpdateDecorations||this._shouldUpdateCursorPosition){this._shouldUpdateDecorations&&(this._shouldUpdateDecorations=!1,this._zonesFromDecorations=this._createZonesFromDecorations()),this._shouldUpdateCursorPosition&&(this._shouldUpdateCursorPosition=!1,this._hideCursor?this._zonesFromCursors=[]:this._zonesFromCursors=this._createZonesFromCursors());var t=[];t=t.concat(this._zonesFromCursors),t=t.concat(this._zonesFromDecorations),this._overviewRuler.setZones(t,!1)}var n=this._overviewRuler.render(!1);if(n&&this._overviewRuler.getLanesCount()>0&&(this._zonesFromDecorations.length>0||this._zonesFromCursors.length>0)){var i=this._overviewRuler.getDomNode().getContext("2d");i.beginPath(),i.lineWidth=1,i.strokeStyle="rgba(197,197,197,0.8)",i.moveTo(0,0),i.lineTo(0,this._overviewRuler.getPixelHeight()),i.stroke(),i.moveTo(0,0),i.lineTo(this._overviewRuler.getPixelWidth(),0),i.stroke()}},t}(o.ViewPart);s.MIN_DECORATION_HEIGHT=6,s.MAX_DECORATION_HEIGHT=60,s._CURSOR_COLOR="rgba(0, 0, 102, 0.8)",s._CURSOR_COLOR_DARK="rgba(152, 152, 152, 0.8)",t.DecorationsOverviewRuler=s}),define(d[499],h([0,1,10,4,24,11,28,3,2,51,434,377,21,342,443,435,381,382,383,384,385,101,388,387,436,390,389,391,392,498,393,394,395,396,438,397,32,205,85,379]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y,C,b,w,S,E,L,N,T,x,M,I,D,R,k,O,P,A,W,F,V,H){"use strict";function B(e){try{return e()}catch(e){n.onUnexpectedError(e)}}function U(e,t){try{return e(t)}catch(e){n.onUnexpectedError(e)}}var z=function(e){function t(t,n,i,o){var r=e.call(this)||this;r.triggerCursorHandler=o,r._isDisposed=!1,r._renderAnimationFrame=null,r.outgoingEvents=new H.ViewOutgoingEvents(i);var s=new p.ViewController(i,o,r.outgoingEvents,t);return r.listenersToRemove=[],r.listenersToDispose=[],r.eventDispatcher=new f.ViewEventDispatcher(function(e){return r._renderOnce(e)}),r.linesContent=document.createElement("div"),r.linesContent.className=h.ClassNames.LINES_CONTENT+" monaco-editor-background",r.linesContent.style.position="absolute",r.domNode=document.createElement("div"),r.domNode.className=n.editor.viewInfo.editorClassName,r.overflowGuardContainer=document.createElement("div"),W.PartFingerprints.write(r.overflowGuardContainer,3),r.overflowGuardContainer.className=h.ClassNames.OVERFLOW_GUARD,r.layoutProvider=new v.LayoutProvider(n,i,r.eventDispatcher,r.linesContent,r.domNode,r.overflowGuardContainer),r.eventDispatcher.addEventHandler(r.layoutProvider),r._context=new F.ViewContext(n,i,r.eventDispatcher,function(e){return r.eventDispatcher.addEventHandler(e)},function(e){return r.eventDispatcher.removeEventHandler(e)}),r.createTextArea(),r.createViewParts(),r.keyboardHandler=new c.KeyboardHandler(r._context,s,r.createKeyboardHandlerHelper()),r.pointerHandler=new d.PointerHandler(r._context,s,r.createPointerHandlerHelper()),r.hasFocus=!1,r.codeEditorHelper=null,r.eventDispatcher.addEventHandler(r),r.handleAccumulatedModelEventsTimeout=-1,r.accumulatedModelEvents=[],r.listenersToRemove.push(i.addBulkListener2(function(e){r.accumulatedModelEvents=r.accumulatedModelEvents.concat(e),r.handleAccumulatedModelEventsTimeout===-1&&(r.handleAccumulatedModelEventsTimeout=setTimeout(function(){r.handleAccumulatedModelEventsTimeout=-1,r._flushAnyAccumulatedEvents()}))})),r}return m(t,e),t.prototype._flushAnyAccumulatedEvents=function(){var e=this.accumulatedModelEvents;this.accumulatedModelEvents=[],e.length>0&&this.eventDispatcher.emitMany(e)},t.prototype.createTextArea=function(){var e=this;this.textArea=document.createElement("textarea"),W.PartFingerprints.write(this.textArea,6),this.textArea.className=h.ClassNames.TEXTAREA,this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._context.configuration.editor.viewInfo.ariaLabel),
this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),s.StyleMutator.setTop(this.textArea,0),s.StyleMutator.setLeft(this.textArea,0),this.listenersToDispose.push(r.addDisposableListener(this.textArea,"focus",function(){return e._setHasFocus(!0)})),this.listenersToDispose.push(r.addDisposableListener(this.textArea,"blur",function(){return e._setHasFocus(!1)})),this.textAreaCover=document.createElement("div"),this._context.configuration.editor.viewInfo.glyphMargin?this.textAreaCover.className="monaco-editor-background "+h.ClassNames.GLYPH_MARGIN+" "+h.ClassNames.TEXTAREA_COVER:this._context.configuration.editor.viewInfo.renderLineNumbers?this.textAreaCover.className="monaco-editor-background "+h.ClassNames.LINE_NUMBERS+" "+h.ClassNames.TEXTAREA_COVER:this.textAreaCover.className="monaco-editor-background "+h.ClassNames.TEXTAREA_COVER,this.textAreaCover.style.position="absolute",s.StyleMutator.setWidth(this.textAreaCover,1),s.StyleMutator.setHeight(this.textAreaCover,1),s.StyleMutator.setTop(this.textAreaCover,0),s.StyleMutator.setLeft(this.textAreaCover,0)},t.prototype.createViewParts=function(){var e=this;this.viewParts=[],this.viewLines=new L.ViewLines(this._context,this.layoutProvider),this.viewZones=new A.ViewZones(this._context,this.layoutProvider),this.viewParts.push(this.viewZones);var t=new I.DecorationsOverviewRuler(this._context,this.layoutProvider.getScrollHeight(),function(t){return e.layoutProvider.getVerticalOffsetForLineNumber(t)});this.viewParts.push(t);var n=new k.ScrollDecorationViewPart(this._context);this.viewParts.push(n);var i=new g.ContentViewOverlays(this._context,this.layoutProvider);this.viewParts.push(i),i.addDynamicOverlay(new y.CurrentLineHighlightOverlay(this._context,this.layoutProvider)),i.addDynamicOverlay(new O.SelectionsOverlay(this._context)),i.addDynamicOverlay(new b.DecorationsOverlay(this._context)),i.addDynamicOverlay(new E.IndentGuidesOverlay(this._context));var o=new g.MarginViewOverlays(this._context,this.layoutProvider);this.viewParts.push(o),o.addDynamicOverlay(new C.CurrentLineMarginHighlightOverlay(this._context,this.layoutProvider)),o.addDynamicOverlay(new w.GlyphMarginOverlay(this._context)),o.addDynamicOverlay(new x.MarginViewLineDecorationsOverlay(this._context)),o.addDynamicOverlay(new T.LinesDecorationsOverlay(this._context)),o.addDynamicOverlay(new S.LineNumbersOverlay(this._context));var r=new N.Margin(this._context,this.layoutProvider);r.domNode.appendChild(this.viewZones.marginDomNode),r.domNode.appendChild(o.getDomNode()),this.viewParts.push(r),this.contentWidgets=new _.ViewContentWidgets(this._context,this.domNode),this.viewParts.push(this.contentWidgets),this.viewCursors=new P.ViewCursors(this._context),this.viewParts.push(this.viewCursors),this.overlayWidgets=new M.ViewOverlayWidgets(this._context),this.viewParts.push(this.overlayWidgets);var s=new R.Rulers(this._context,this.layoutProvider);if(this.viewParts.push(s),this.linesContentContainer=this.layoutProvider.getScrollbarContainerDomNode(),this.linesContentContainer.style.position="absolute",t){var a=this.layoutProvider.getOverviewRulerInsertData();a.parent.insertBefore(t.getDomNode(),a.insertBefore)}this.linesContent.appendChild(i.getDomNode()),this.linesContent.appendChild(s.domNode),this.linesContent.appendChild(this.viewZones.domNode),this.linesContent.appendChild(this.viewLines.getDomNode()),this.linesContent.appendChild(this.contentWidgets.domNode),this.linesContent.appendChild(this.viewCursors.getDomNode()),this.overflowGuardContainer.appendChild(r.domNode),this.overflowGuardContainer.appendChild(this.linesContentContainer),this.overflowGuardContainer.appendChild(n.getDomNode()),this.overflowGuardContainer.appendChild(this.overlayWidgets.domNode),this.overflowGuardContainer.appendChild(this.textArea),this.overflowGuardContainer.appendChild(this.textAreaCover),this.domNode.appendChild(this.overflowGuardContainer),this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode)},t.prototype._flushAccumulatedAndRenderNow=function(){this._flushAnyAccumulatedEvents(),this._renderNow()},t.prototype.createPointerHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,linesContentDomNode:this.linesContent,focusTextArea:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.focusTextArea: View is disposed");e.focus()},isDirty:function(){return e.accumulatedModelEvents.length>0},getScrollLeft:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getScrollLeft: View is disposed");return e.layoutProvider.getScrollLeft()},getScrollTop:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getScrollTop: View is disposed");return e.layoutProvider.getScrollTop()},setScrollPosition:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.setScrollPosition: View is disposed");e.layoutProvider.setScrollPosition(t)},isAfterLines:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.isAfterLines: View is disposed");return e.layoutProvider.isAfterLines(t)},getLineNumberAtVerticalOffset:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getLineNumberAtVerticalOffset: View is disposed");return e.layoutProvider.getLineNumberAtVerticalOffset(t)},getVerticalOffsetForLineNumber:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getVerticalOffsetForLineNumber: View is disposed");return e.layoutProvider.getVerticalOffsetForLineNumber(t)},getWhitespaceAtVerticalOffset:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getWhitespaceAtVerticalOffset: View is disposed");return e.layoutProvider.getWhitespaceAtVerticalOffset(t)},getLastViewCursorsRenderData:function(){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getLastViewCursorsRenderData: View is disposed");return e.viewCursors.getLastRenderData()||[]},shouldSuppressMouseDownOnViewZone:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.shouldSuppressMouseDownOnViewZone: View is disposed");return e.viewZones.shouldSuppressMouseDownOnViewZone(t)},shouldSuppressMouseDownOnWidget:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.shouldSuppressMouseDownOnWidget: View is disposed");return e.contentWidgets.shouldSuppressMouseDownOnWidget(t)},getPositionFromDOMInfo:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getPositionFromDOMInfo: View is disposed");return e._flushAccumulatedAndRenderNow(),e.viewLines.getPositionFromDOMInfo(t,n)},visibleRangeForPosition2:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.visibleRangeForPosition2: View is disposed");e._flushAccumulatedAndRenderNow();var i=e.viewLines.visibleRangesForRange2(new a.Range(t,n,t,n),0);return i?i[0]:null},getLineWidth:function(t){if(e._isDisposed)throw new Error("ViewImpl.pointerHandler.getLineWidth: View is disposed");return e._flushAccumulatedAndRenderNow(),e.viewLines.getLineWidth(t)}}},t.prototype.createKeyboardHandlerHelper=function(){var e=this;return{viewDomNode:this.domNode,textArea:this.textArea,visibleRangeForPositionRelativeToEditor:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.keyboardHandler.visibleRangeForPositionRelativeToEditor: View is disposed");e._flushAccumulatedAndRenderNow();var i=e.layoutProvider.getLinesViewportData(),o=e.viewLines.visibleRangesForRange2(new a.Range(t,n,t,n),i.visibleRangesDeltaTop);return o?o[0]:null},flushAnyAccumulatedEvents:function(){e._flushAnyAccumulatedEvents()}}},t.prototype.setAriaActiveDescendant=function(e){e?(this.textArea.setAttribute("role","combobox"),this.textArea.getAttribute("aria-activedescendant")!==e&&(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-activedescendant",e))):(this.textArea.setAttribute("role","textbox"),this.textArea.removeAttribute("aria-activedescendant"),this.textArea.removeAttribute("aria-haspopup"))},t.prototype.onLayoutChanged=function(e){if(o.isChrome){this.overflowGuardContainer.clientWidth+"px"}return s.StyleMutator.setWidth(this.domNode,e.width),s.StyleMutator.setHeight(this.domNode,e.height),s.StyleMutator.setWidth(this.overflowGuardContainer,e.width),s.StyleMutator.setHeight(this.overflowGuardContainer,e.height),s.StyleMutator.setWidth(this.linesContent,1e6),s.StyleMutator.setHeight(this.linesContent,1e6),s.StyleMutator.setLeft(this.linesContentContainer,e.contentLeft),s.StyleMutator.setWidth(this.linesContentContainer,e.contentWidth),s.StyleMutator.setHeight(this.linesContentContainer,e.contentHeight),this.outgoingEvents.emitViewLayoutChanged(e),!1},t.prototype.onConfigurationChanged=function(e){return e.viewInfo.editorClassName&&(this.domNode.className=this._context.configuration.editor.viewInfo.editorClassName),e.viewInfo.ariaLabel&&this.textArea.setAttribute("aria-label",this._context.configuration.editor.viewInfo.ariaLabel),!1},t.prototype.onScrollChanged=function(e){return this.outgoingEvents.emitScrollChanged(e),!1},t.prototype.onViewFocusChanged=function(e){return r.toggleClass(this.domNode,"focused",e),e?this.outgoingEvents.emitViewFocusGained():this.outgoingEvents.emitViewFocusLost(),!1},t.prototype.onCursorRevealRange=function(e){return!!e.revealCursor&&this.revealCursor()},t.prototype.onCursorScrollRequest=function(e){return!!e.revealCursor&&this.revealCursor()},t.prototype.revealCursor=function(){return this.triggerCursorHandler("revealCursor",u.Handler.CursorMove,{to:u.CursorMovePosition.ViewPortIfOutside}),!1},t.prototype.dispose=function(){this._isDisposed=!0,this.handleAccumulatedModelEventsTimeout!==-1&&(clearTimeout(this.handleAccumulatedModelEventsTimeout),this.handleAccumulatedModelEventsTimeout=-1),null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this.accumulatedModelEvents=[],this.eventDispatcher.removeEventHandler(this),this.outgoingEvents.dispose(),this.listenersToRemove=i.dispose(this.listenersToRemove),this.listenersToDispose=i.dispose(this.listenersToDispose),this.keyboardHandler.dispose(),this.pointerHandler.dispose(),this.viewLines.dispose();for(var e=0,t=this.viewParts.length;e<t;e++)this.viewParts[e].dispose();this.viewParts=[],this.layoutProvider.dispose()},t.prototype.getCodeEditorHelper=function(){var e=this;return this.codeEditorHelper||(this.codeEditorHelper={getScrollWidth:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollWidth: View is disposed");return e.layoutProvider.getScrollWidth()},getScrollLeft:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollLeft: View is disposed");return e.layoutProvider.getScrollLeft()},getScrollHeight:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollHeight: View is disposed");return e.layoutProvider.getScrollHeight()},getScrollTop:function(){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getScrollTop: View is disposed");return e.layoutProvider.getScrollTop()},setScrollPosition:function(t){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.setScrollPosition: View is disposed");e.layoutProvider.setScrollPosition(t)},getVerticalOffsetForPosition:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getVerticalOffsetForPosition: View is disposed");var i=e._context.model.validateModelPosition({lineNumber:t,column:n}),o=e._context.model.convertModelPositionToViewPosition(i.lineNumber,i.column);return e.layoutProvider.getVerticalOffsetForLineNumber(o.lineNumber)},delegateVerticalScrollbarMouseDown:function(t){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.delegateVerticalScrollbarMouseDown: View is disposed");e.layoutProvider.delegateVerticalScrollbarMouseDown(t)},getOffsetForColumn:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getOffsetForColumn: View is disposed");var i=e._context.model.validateModelPosition({lineNumber:t,column:n}),o=e._context.model.convertModelPositionToViewPosition(i.lineNumber,i.column);e._flushAccumulatedAndRenderNow();var r=e.viewLines.visibleRangesForRange2(new a.Range(o.lineNumber,o.column,o.lineNumber,o.column),0);return r?r[0].left:-1},getTargetAtClientPoint:function(t,n){if(e._isDisposed)throw new Error("ViewImpl.codeEditorHelper.getTargetAtClientPoint: View is disposed");return e.pointerHandler.getTargetAtClientPoint(t,n)}}),this.codeEditorHelper},t.prototype.getCenteredRangeInViewport=function(){if(this._isDisposed)throw new Error("ViewImpl.getCenteredRangeInViewport: View is disposed");var e=this.layoutProvider.getCenteredViewLineNumberInViewport(),t=this._context.model,n=new a.Range(e,1,e,t.getLineMaxColumn(e));return t.convertViewRangeToModelRange(n)},t.prototype.getCompletelyVisibleLinesRangeInViewport=function(){if(this._isDisposed)throw new Error("ViewImpl.getVisibleRangeInViewportExcludingPartialRenderedLines: View is disposed");var e=this.layoutProvider.getLinesViewportData().completelyVisibleLinesRange;return this._context.model.convertViewRangeToModelRange(e)},t.prototype.getInternalEventBus=function(){if(this._isDisposed)throw new Error("ViewImpl.getInternalEventBus: View is disposed");return this.outgoingEvents.getInternalEventBus()},t.prototype.saveState=function(){if(this._isDisposed)throw new Error("ViewImpl.saveState: View is disposed");return this.layoutProvider.saveState()},t.prototype.restoreState=function(e){if(this._isDisposed)throw new Error("ViewImpl.restoreState: View is disposed");return this._flushAnyAccumulatedEvents(),this.layoutProvider.restoreState(e)},t.prototype.focus=function(){if(this._isDisposed)throw new Error("ViewImpl.focus: View is disposed");this.keyboardHandler.focusTextArea(),document.activeElement===this.textArea&&this._setHasFocus(!0)},t.prototype.isFocused=function(){if(this._isDisposed)throw new Error("ViewImpl.isFocused: View is disposed");return this.hasFocus},t.prototype.createOverviewRuler=function(e,t,n){var i=this;if(this._isDisposed)throw new Error("ViewImpl.createOverviewRuler: View is disposed");return new D.OverviewRuler(this._context,e,this.layoutProvider.getScrollHeight(),t,n,function(e){return i.layoutProvider.getVerticalOffsetForLineNumber(e)})},t.prototype.change=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl.change: View is disposed");var n=!1;return this._renderOnce(function(){t._flushAnyAccumulatedEvents();var i={addZone:function(e){return n=!0,t.viewZones.addZone(e)},removeZone:function(e){e&&(n=t.viewZones.removeZone(e)||n)},layoutZone:function(e){e&&(n=t.viewZones.layoutZone(e)||n)}},o=U(e,i);return i.addZone=null,i.removeZone=null,n&&t._context.privateViewEventBus.emit(u.EventType.ViewZonesChanged,null),o}),n},t.prototype.getWhitespaces=function(){if(this._isDisposed)throw new Error("ViewImpl.getWhitespaces: View is disposed");return this.layoutProvider.getWhitespaces()},t.prototype.addContentWidget=function(e){if(this._isDisposed)throw new Error("ViewImpl.addContentWidget: View is disposed");this.contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()},t.prototype.layoutContentWidget=function(e){if(this._isDisposed)throw new Error("ViewImpl.layoutContentWidget: View is disposed");var t=e.position?e.position.position:null,n=e.position?e.position.preference:null;this.contentWidgets.setWidgetPosition(e.widget,t,n),this._scheduleRender()},t.prototype.removeContentWidget=function(e){if(this._isDisposed)throw new Error("ViewImpl.removeContentWidget: View is disposed");this.contentWidgets.removeWidget(e.widget),this._scheduleRender()},t.prototype.addOverlayWidget=function(e){if(this._isDisposed)throw new Error("ViewImpl.addOverlayWidget: View is disposed");this.overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()},t.prototype.layoutOverlayWidget=function(e){if(this._isDisposed)throw new Error("ViewImpl.layoutOverlayWidget: View is disposed");var t=e.position?e.position.preference:null,n=this.overlayWidgets.setWidgetPosition(e.widget,t);n&&this._scheduleRender()},t.prototype.removeOverlayWidget=function(e){if(this._isDisposed)throw new Error("ViewImpl.removeOverlayWidget: View is disposed");this.overlayWidgets.removeWidget(e.widget),this._scheduleRender()},t.prototype.render=function(e,t){if(this._isDisposed)throw new Error("ViewImpl.render: View is disposed");t&&this.layoutProvider.emitLayoutChangedEvent(),e&&this._flushAccumulatedAndRenderNow()},t.prototype._renderOnce=function(e){var t=this;if(this._isDisposed)throw new Error("ViewImpl._renderOnce: View is disposed");return this.outgoingEvents.deferredEmit(function(){var n=B(e);return t._scheduleRender(),n})},t.prototype._scheduleRender=function(){if(this._isDisposed)throw new Error("ViewImpl._scheduleRender: View is disposed");null===this._renderAnimationFrame&&(this._renderAnimationFrame=r.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))},t.prototype._onRenderScheduled=function(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()},t.prototype._renderNow=function(){var e=this;B(function(){return e._actualRender()})},t.prototype._getViewPartsToRender=function(){for(var e=[],t=0,n=this.viewParts.length;t<n;t++){var i=this.viewParts[t];i.shouldRender()&&e.push(i)}return e},t.prototype._actualRender=function(){var e=this;if(r.isInDOM(this.domNode)){var t=this._getViewPartsToRender();if(!this.viewLines.shouldRender()&&0===t.length)return void this.keyboardHandler.writeToTextArea();var n=this.layoutProvider.getLinesViewportData();this.viewLines.shouldRender()?(this.viewLines.renderText(n,function(){e.keyboardHandler.writeToTextArea()}),this.viewLines.onDidRender(),t=this._getViewPartsToRender()):this.keyboardHandler.writeToTextArea();for(var i=new V.RenderingContext(this.viewLines,this.layoutProvider,n),o=0,s=t.length;o<s;o++){var a=t[o];a.prepareRender(i)}for(var o=0,s=t.length;o<s;o++){var a=t[o];a.render(i),a.onDidRender()}this.layoutProvider.renderScrollbar()}},t.prototype._setHasFocus=function(e){this.hasFocus!==e&&(this.hasFocus=e,this._context.privateViewEventBus.emit(u.EventType.ViewFocusChanged,this.hasFocus))},t}(l.ViewEventHandler);t.View=z}),define(d[168],h([0,1,10,24,11,14,23,19,410,3,20,2,45,58,146,499,4,12,145,354,355]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b){"use strict";var w=function(e){function t(t,i,o,r,s,a){var u=e.call(this,t,i,o,a)||this;u.onMouseUp=_.fromEventEmitter(u,d.EventType.MouseUp),u.onMouseDown=_.fromEventEmitter(u,d.EventType.MouseDown),u.onContextMenu=_.fromEventEmitter(u,d.EventType.ContextMenu),u.onMouseMove=_.fromEventEmitter(u,d.EventType.MouseMove),u.onMouseLeave=_.fromEventEmitter(u,d.EventType.MouseLeave),u.onKeyUp=_.fromEventEmitter(u,d.EventType.KeyUp),u.onKeyDown=_.fromEventEmitter(u,d.EventType.KeyDown),u.onDidLayoutChange=_.fromEventEmitter(u,d.EventType.EditorLayout),u.onDidScrollChange=_.fromEventEmitter(u,"scroll"),u._codeEditorService=r,u._commandService=s,u._focusTracker=new E(t),u._focusTracker.onChage(function(){var e=u._focusTracker.hasFocus();e?u.emit(d.EventType.EditorFocus,{}):u.emit(d.EventType.EditorBlur,{})}),u.contentWidgets={},u.overlayWidgets={};for(var l=u._getContributions(),c=0,h=l.length;c<h;c++){var p=l[c];try{var f=u._instantiationService.createInstance(p,u);u._contributions[f.getId()]=f}catch(e){n.onUnexpectedError(e)}}return u._getActions().forEach(function(e){var t=new b.InternalEditorAction(e.id,e.label,e.alias,e.precondition,function(){return u._instantiationService.invokeFunction(function(t){return e.runEditorCommand(t,u,null)})},u._contextKeyService);u._actions[t.id]=t}),u._codeEditorService.addCodeEditor(u),u}return m(t,e),t.prototype._createConfiguration=function(e){return new p.Configuration(e,this.domElement)},t.prototype.dispose=function(){this._codeEditorService.removeCodeEditor(this),this.contentWidgets={},this.overlayWidgets={},this._focusTracker.dispose(),e.prototype.dispose.call(this)},t.prototype.updateOptions=function(t){var n=this._configuration.editor.viewInfo.theme;e.prototype.updateOptions.call(this,t);var i=this._configuration.editor.viewInfo.theme;n!==i&&this.render()},t.prototype.colorizeModelLine=function(e,t){if(void 0===t&&(t=this.model),!t)return"";var n=t.getLineContent(e),i=t.getLineTokens(e,!1),o=i.inflate(),r=t.getOptions().tabSize;return f.Colorizer.colorizeLine(n,t.mightContainRTL(),o,r)},t.prototype.getView=function(){return this._view},t.prototype.getDomNode=function(){return this.hasView?this._view.domNode:null},t.prototype.getCenteredRangeInViewport=function(){return this.hasView?this._view.getCenteredRangeInViewport():null},t.prototype.getCompletelyVisibleLinesRangeInViewport=function(){return this.hasView?this._view.getCompletelyVisibleLinesRangeInViewport():null},t.prototype.getScrollWidth=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollWidth():-1},t.prototype.getScrollLeft=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollLeft():-1},t.prototype.getScrollHeight=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollHeight():-1},t.prototype.getScrollTop=function(){return this.hasView?this._view.getCodeEditorHelper().getScrollTop():-1},t.prototype.setScrollLeft=function(e){if(this.hasView){if("number"!=typeof e)throw new Error("Invalid arguments");this._view.getCodeEditorHelper().setScrollPosition({scrollLeft:e})}},t.prototype.setScrollTop=function(e){if(this.hasView){if("number"!=typeof e)throw new Error("Invalid arguments");this._view.getCodeEditorHelper().setScrollPosition({scrollTop:e})}},t.prototype.setScrollPosition=function(e){this.hasView&&this._view.getCodeEditorHelper().setScrollPosition(e)},t.prototype.delegateVerticalScrollbarMouseDown=function(e){this.hasView&&this._view.getCodeEditorHelper().delegateVerticalScrollbarMouseDown(e)},t.prototype.saveViewState=function(){if(!this.cursor||!this.hasView)return null;for(var e={},t=Object.keys(this._contributions),n=0,i=t.length;n<i;n++){var o=t[n],r=this._contributions[o];"function"==typeof r.saveViewState&&(e[o]=r.saveViewState())}var s=this.cursor.saveState(),a=this._view.saveState();return{cursorState:s,viewState:a,contributionsState:e}},t.prototype.restoreViewState=function(e){if(this.cursor&&this.hasView&&e&&e.cursorState&&e.viewState){var t=e,n=t.cursorState;Array.isArray(n)?this.cursor.restoreState(n):this.cursor.restoreState([n]),this._view.restoreState(t.viewState);for(var i=e.contributionsState||{},o=Object.keys(this._contributions),r=0,s=o.length;r<s;r++){var a=o[r],u=this._contributions[a];"function"==typeof u.restoreViewState&&u.restoreViewState(i[a])}}},t.prototype.layout=function(e){this._configuration.observeReferenceElement(e),this.render()},t.prototype.focus=function(){this.hasView&&this._view.focus()},t.prototype.isFocused=function(){return this.hasView&&this._view.isFocused()},t.prototype.hasWidgetFocus=function(){return this._focusTracker&&this._focusTracker.hasFocus()},t.prototype.addContentWidget=function(e){var t={widget:e,position:e.getPosition()};this.contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this.contentWidgets[e.getId()]=t,this.hasView&&this._view.addContentWidget(t)},t.prototype.layoutContentWidget=function(e){var t=e.getId();if(this.contentWidgets.hasOwnProperty(t)){var n=this.contentWidgets[t];n.position=e.getPosition(),this.hasView&&this._view.layoutContentWidget(n)}},t.prototype.removeContentWidget=function(e){var t=e.getId();if(this.contentWidgets.hasOwnProperty(t)){var n=this.contentWidgets[t];delete this.contentWidgets[t],this.hasView&&this._view.removeContentWidget(n)}},t.prototype.addOverlayWidget=function(e){var t={widget:e,position:e.getPosition()};this.overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this.overlayWidgets[e.getId()]=t,this.hasView&&this._view.addOverlayWidget(t)},t.prototype.layoutOverlayWidget=function(e){var t=e.getId();if(this.overlayWidgets.hasOwnProperty(t)){var n=this.overlayWidgets[t];n.position=e.getPosition(),this.hasView&&this._view.layoutOverlayWidget(n)}},t.prototype.removeOverlayWidget=function(e){var t=e.getId();if(this.overlayWidgets.hasOwnProperty(t)){var n=this.overlayWidgets[t];delete this.overlayWidgets[t],this.hasView&&this._view.removeOverlayWidget(n)}},t.prototype.changeViewZones=function(e){if(this.hasView){var t=this._view.change(e);t&&this.emit(d.EventType.ViewZonesChanged)}},t.prototype.getWhitespaces=function(){return this.hasView?this._view.getWhitespaces():[]},t.prototype.getTopForLineNumber=function(e){return this.hasView?this._view.getCodeEditorHelper().getVerticalOffsetForPosition(e,1):-1},t.prototype.getTopForPosition=function(e,t){return this.hasView?this._view.getCodeEditorHelper().getVerticalOffsetForPosition(e,t):-1},t.prototype.getTargetAtClientPoint=function(e,t){return this.hasView?this._view.getCodeEditorHelper().getTargetAtClientPoint(e,t):null},t.prototype.getScrolledVisiblePosition=function(e){if(!this.hasView)return null;var t=this.model.validatePosition(e),n=this._view.getCodeEditorHelper(),i=this._configuration.editor.layoutInfo,o=n.getVerticalOffsetForPosition(t.lineNumber,t.column)-n.getScrollTop(),r=n.getOffsetForColumn(t.lineNumber,t.column)+i.glyphMarginWidth+i.lineNumbersWidth+i.decorationsWidth-n.getScrollLeft();return{top:o,left:r,height:this._configuration.editor.lineHeight}},t.prototype.getOffsetForColumn=function(e,t){return this.hasView?this._view.getCodeEditorHelper().getOffsetForColumn(e,t):-1},t.prototype.render=function(){this.hasView&&this._view.render(!0,!1)},t.prototype.setHiddenAreas=function(e){this.viewModel&&this.viewModel.setHiddenAreas(e)},t.prototype.setAriaActiveDescendant=function(e){this.hasView&&this._view.setAriaActiveDescendant(e)},t.prototype.applyFontInfo=function(e){p.Configuration.applyFontInfoSlow(e,this._configuration.editor.fontInfo)},t.prototype._attachModel=function(t){if(this._view=null,e.prototype._attachModel.call(this,t),this._view){this.domElement.appendChild(this._view.domNode);for(var n=Object.keys(this.contentWidgets),i=0,o=n.length;i<o;i++){var r=n[i];this._view.addContentWidget(this.contentWidgets[r])}n=Object.keys(this.overlayWidgets);for(var i=0,o=n.length;i<o;i++){var r=n[i];this._view.addOverlayWidget(this.overlayWidgets[r])}this._view.render(!1,!0),this.hasView=!0}},t.prototype._enableEmptySelectionClipboard=function(){return i.enableEmptySelectionClipboard},t.prototype._createView=function(){var e=this;this._view=new g.View(this._commandService,this._configuration,this.viewModel,function(t,n,i){e.cursor&&e.cursor.trigger(t,n,i)})},t.prototype._getViewInternalEventBus=function(){return this._view.getInternalEventBus()},t.prototype._detachModel=function(){var t=null;this._view&&(this._view.dispose(),t=this._view.domNode,this._view=null);var n=e.prototype._detachModel.call(this);return t&&this.domElement.removeChild(t),n},t.prototype._registerDecorationType=function(e,t,n){this._codeEditorService.registerDecorationType(e,t,n)},t.prototype._removeDecorationType=function(e){this._codeEditorService.removeDecorationType(e)},t.prototype._resolveDecorationOptions=function(e,t){return this._codeEditorService.resolveDecorationOptions(e,t)},t}(u.CommonCodeEditor);w=y([C(2,r.IInstantiationService),C(3,h.ICodeEditorService),C(4,s.ICommandService),C(5,a.IContextKeyService)],w),t.CodeEditorWidget=w;var S,E=function(e){function t(t){var n=e.call(this)||this;return n._onChange=n._register(new _.Emitter),n.onChage=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(o.trackFocus(t)),n._domFocusTracker.addFocusListener(function(){n._hasFocus=!0,n._onChange.fire(void 0)}),n._domFocusTracker.addBlurListener(function(){n._hasFocus=!1,n._onChange.fire(void 0)}),n}return m(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(v.Disposable);(function(){function e(e,t){this._id=e,this._position=t,this._domNode=document.createElement("div"),this._domNode.className=this._id.replace(/\./g,"-").replace(/[^a-z0-9\-]/,"")}return e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.getPosition=function(){return this._position},e})();!function(e){e[e.EndOfLastEditOperation=0]="EndOfLastEditOperation"}(S=t.EditCursorState||(t.EditCursorState={}));var L=function(){function e(e){this.range=new l.Range(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn),this.text=e.text,this.forceMoveMarkers=e.forceMoveMarkers||!1}return e}(),N=function(){function e(e,t){this._ops=e.map(function(e){return new L(e)}),this._editCursorState=t}return e.prototype.getEditOperations=function(e,t){if(0!==this._ops.length){this._ops.sort(function(e,t){return l.Range.compareRangesUsingStarts(e.range,t.range)});for(var n=[],i=this._ops[0],o=1;o<this._ops.length;o++)i.range.endLineNumber===this._ops[o].range.startLineNumber&&i.range.endColumn===this._ops[o].range.startColumn?(i.range=l.Range.plusRange(i.range,this._ops[o].range),i.text=i.text+this._ops[o].text):(n.push(i),i=this._ops[o]);n.push(i);for(var o=0;o<n.length;o++)t.addEditOperation(l.Range.lift(n[o].range),n[o].text)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations(),i=n[n.length-1].range;return new c.Selection(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)},e}();t.CommandRunner=N}),define(d[123],h([0,1,14,23,19,45,168,13,29]),function(e,t,n,i,o,r,s,a,u){"use strict";var l=function(e){function t(t,n,i,o,r,s){return e.call(this,t,n,i,o,r,s)||this}return m(t,e),t.prototype._getContributions=function(){return[].concat(u.EditorBrowserRegistry.getEditorContributions()).concat(a.CommonEditorRegistry.getEditorContributions())},t.prototype._getActions=function(){return a.CommonEditorRegistry.getEditorActions()},t}(s.CodeEditorWidget);l=y([C(2,n.IInstantiationService),C(3,r.ICodeEditorService),C(4,i.ICommandService),C(5,o.IContextKeyService)],l),t.CodeEditor=l}),define(d[170],h([0,1,17,25,4,35,11,28,98,14,19,42,3,2,48,119,120,123,88,58,148,352]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b,w,S){"use strict";function E(e){return e.modifiedEndLineNumber>0}function L(e){return e.originalEndLineNumber>0}function N(e,t,n,i,o,r){return{range:new h.Range(e,t,n,i),options:{className:o,isWholeLine:r}}}function T(){var e=document.createElement("div");return e.className="diagonal-fill",e}var x=function(){function e(){this._zones=[],this._zonesMap={},this._decorations=[]}return e.prototype.getForeignViewZones=function(e){var t=this;return e.filter(function(e){return!t._zonesMap[String(e.id)]})},e.prototype.clean=function(e){var t=this;this._zones.length>0&&e.changeViewZones(function(e){for(var n=0,i=t._zones.length;n<i;n++)e.removeZone(t._zones[n])}),this._zones=[],this._zonesMap={},this._decorations.length>0&&e.changeDecorations(function(e){e.deltaDecorations(t._decorations,[])}),this._decorations=[]},e.prototype.apply=function(e,t,n){var i=this;e.changeViewZones(function(e){for(var t=0,o=i._zones.length;t<o;t++)e.removeZone(i._zones[t]);i._zones=[],i._zonesMap={};for(var t=0,r=n.zones.length;t<r;t++){n.zones[t].suppressMouseDown=!0;var s=e.addZone(n.zones[t]);i._zones.push(s),i._zonesMap[String(s)]=!0}}),this._decorations=e.deltaDecorations(this._decorations,n.decorations),t&&t.setZones(n.overviewZones)},e}(),M=0,I=function(e){function t(i,o,r,a,u){var l=e.call(this)||this;return l._editorWorkerService=r,l._contextKeyService=a,l.id=++M,l._domElement=i,o=o||{},l._theme=o.theme||d.DefaultConfig.editor.theme,l._renderSideBySide=!0,"undefined"!=typeof o.renderSideBySide&&(l._renderSideBySide=o.renderSideBySide),l._ignoreTrimWhitespace=!0,"undefined"!=typeof o.ignoreTrimWhitespace&&(l._ignoreTrimWhitespace=o.ignoreTrimWhitespace),l._renderIndicators=!0,"undefined"!=typeof o.renderIndicators&&(l._renderIndicators=o.renderIndicators),l._originalIsEditable=!1,"undefined"!=typeof o.originalEditable&&(l._originalIsEditable=Boolean(o.originalEditable)),
l._updateDecorationsRunner=new n.RunOnceScheduler(function(){return l._updateDecorations()},0),l._toDispose=[],l._toDispose.push(l._updateDecorationsRunner),l._containerDomElement=document.createElement("div"),l._containerDomElement.className=t._getClassName(l._theme,l._renderSideBySide),l._containerDomElement.style.position="relative",l._containerDomElement.style.height="100%",l._domElement.appendChild(l._containerDomElement),l._overviewViewportDomElement=document.createElement("div"),l._overviewViewportDomElement.className="diffViewport",l._overviewViewportDomElement.style.position="absolute",l._overviewDomElement=document.createElement("div"),l._overviewDomElement.className="diffOverview",l._overviewDomElement.style.position="absolute",l._overviewDomElement.style.height="100%",l._overviewDomElement.appendChild(l._overviewViewportDomElement),l._toDispose.push(s.addDisposableListener(l._overviewDomElement,"mousedown",function(e){l.modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),l._containerDomElement.appendChild(l._overviewDomElement),l._createLeftHandSide(),l._createRightHandSide(),l._beginUpdateDecorationsTimeout=-1,l._currentlyChangingViewZones=!1,l._diffComputationToken=0,l._originalEditorState=new x,l._modifiedEditorState=new x,l._isVisible=!0,l._isHandlingScrollEvent=!1,l._width=0,l._height=0,l._lineChanges=null,l._createLeftHandSideEditor(o,u),l._createRightHandSideEditor(o,u),o.automaticLayout&&(l._measureDomElementToken=window.setInterval(function(){return l._measureDomElement(!1)},100)),l._enableSplitViewResizing=!0,"undefined"!=typeof o.enableSplitViewResizing&&(l._enableSplitViewResizing=o.enableSplitViewResizing),l._renderSideBySide?l._setStrategy(new O(l._createDataSource(),l._enableSplitViewResizing)):l._setStrategy(new A(l._createDataSource(),l._enableSplitViewResizing)),l}return m(t,e),t.prototype.onDidChangeModelRawContent=function(e){return this.addListener2(p.EventType.ModelRawContentChanged,e)},t.prototype.onDidChangeModelContent=function(e){return this.addListener2(p.EventType.ModelContentChanged2,e)},t.prototype.onDidChangeModelLanguage=function(e){return this.addListener2(p.EventType.ModelLanguageChanged,e)},t.prototype.onDidChangeModelOptions=function(e){return this.addListener2(p.EventType.ModelOptionsChanged,e)},t.prototype.onDidChangeConfiguration=function(e){return this.addListener2(p.EventType.ConfigurationChanged,e)},t.prototype.onDidChangeCursorPosition=function(e){return this.addListener2(p.EventType.CursorPositionChanged,e)},t.prototype.onDidChangeCursorSelection=function(e){return this.addListener2(p.EventType.CursorSelectionChanged,e)},t.prototype.onDidDispose=function(e){return this.addListener2(p.EventType.Disposed,e)},t.prototype.onDidUpdateDiff=function(e){return this.addListener2(p.EventType.DiffUpdated,e)},Object.defineProperty(t.prototype,"ignoreTrimWhitespace",{get:function(){return this._ignoreTrimWhitespace},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderSideBySide",{get:function(){return this._renderSideBySide},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderIndicators",{get:function(){return this._renderIndicators},enumerable:!0,configurable:!0}),t._getClassName=function(e,t){var n="monaco-diff-editor monaco-editor-background ";return t&&(n+="side-by-side "),n+=e},t.prototype._recreateOverviewRulers=function(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalOverviewRuler=this.originalEditor.getView().createOverviewRuler("original diffOverviewRuler",4,Number.MAX_VALUE),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedOverviewRuler=this.modifiedEditor.getView().createOverviewRuler("modified diffOverviewRuler",4,Number.MAX_VALUE),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode()),this._layoutOverviewRulers()},t.prototype._createLeftHandSide=function(){this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode)},t.prototype._createRightHandSide=function(){this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode)},t.prototype._createLeftHandSideEditor=function(e,t){var n=this;this.originalEditor=this._createInnerEditor(t,this._originalDomNode,this._adjustOptionsForLeftHandSide(e,this._originalIsEditable)),this._toDispose.push(this.originalEditor.addBulkListener2(function(e){return n._onOriginalEditorEvents(e)})),this._toDispose.push(this.addEmitter2(this.originalEditor))},t.prototype._createRightHandSideEditor=function(e,t){var n=this;this.modifiedEditor=this._createInnerEditor(t,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e)),this._toDispose.push(this.modifiedEditor.addBulkListener2(function(e){return n._onModifiedEditorEvents(e)})),this._toDispose.push(this.addEmitter2(this.modifiedEditor))},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(_.CodeEditor,t,n)},t.prototype.destroy=function(){this.dispose()},t.prototype.dispose=function(){this._toDispose=o.dispose(this._toDispose),window.clearInterval(this._measureDomElementToken),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler.dispose(),this._modifiedOverviewRuler.dispose(),this.originalEditor.dispose(),this.modifiedEditor.dispose(),this._strategy.dispose(),this.emit(p.EventType.Disposed),e.prototype.dispose.call(this)},t.prototype.getId=function(){return this.getEditorType()+":"+this.id},t.prototype.getEditorType=function(){return p.EditorType.IDiffEditor},t.prototype.getLineChanges=function(){return this._lineChanges},t.prototype.getOriginalEditor=function(){return this.originalEditor},t.prototype.getModifiedEditor=function(){return this.modifiedEditor},t.prototype.updateOptions=function(e){this._theme=e&&e.theme?e.theme:this._theme;var n=!1;"undefined"!=typeof e.renderSideBySide&&this._renderSideBySide!==e.renderSideBySide&&(this._renderSideBySide=e.renderSideBySide,n=!0);var i=!1;"undefined"!=typeof e.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==e.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=e.ignoreTrimWhitespace,i=!0),"undefined"!=typeof e.renderIndicators&&this._renderIndicators!==e.renderIndicators&&(this._renderIndicators=e.renderIndicators,i=!0),i&&this._beginUpdateDecorations(),"undefined"!=typeof e.originalEditable&&(this._originalIsEditable=Boolean(e.originalEditable)),this._containerDomElement.className=t._getClassName(this._theme,this._renderSideBySide),this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e,this._originalIsEditable)),"undefined"!=typeof e.enableSplitViewResizing&&(this._enableSplitViewResizing=e.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),n&&(this._renderSideBySide?this._setStrategy(new O(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new A(this._createDataSource(),this._enableSplitViewResizing)))},t.prototype.getValue=function(e){return void 0===e&&(e=null),this.modifiedEditor.getValue(e)},t.prototype.getModel=function(){return{original:this.originalEditor.getModel(),modified:this.modifiedEditor.getModel()}},t.prototype.setModel=function(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this.originalEditor.setModel(e?e.original:null),this.modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this.originalEditor.setScrollTop(0),this.modifiedEditor.setScrollTop(0)),this._lineChanges=null,this._diffComputationToken++,e?(this._recreateOverviewRulers(),this._beginUpdateDecorations()):this._lineChanges=null,this._layoutOverviewViewport()},t.prototype.getDomNode=function(){return this._domElement},t.prototype.getVisibleColumnFromPosition=function(e){return this.modifiedEditor.getVisibleColumnFromPosition(e)},t.prototype.getPosition=function(){return this.modifiedEditor.getPosition()},t.prototype.setPosition=function(e,t,n,i){this.modifiedEditor.setPosition(e,t,n,i)},t.prototype.revealLine=function(e){this.modifiedEditor.revealLine(e)},t.prototype.revealLineInCenter=function(e){this.modifiedEditor.revealLineInCenter(e)},t.prototype.revealLineInCenterIfOutsideViewport=function(e){this.modifiedEditor.revealLineInCenterIfOutsideViewport(e)},t.prototype.revealPosition=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1),this.modifiedEditor.revealPosition(e,t,n)},t.prototype.revealPositionInCenter=function(e){this.modifiedEditor.revealPositionInCenter(e)},t.prototype.revealPositionInCenterIfOutsideViewport=function(e){this.modifiedEditor.revealPositionInCenterIfOutsideViewport(e)},t.prototype.getSelection=function(){return this.modifiedEditor.getSelection()},t.prototype.getSelections=function(){return this.modifiedEditor.getSelections()},t.prototype.setSelection=function(e,t,n,i){this.modifiedEditor.setSelection(e,t,n,i)},t.prototype.setSelections=function(e){this.modifiedEditor.setSelections(e)},t.prototype.revealLines=function(e,t){this.modifiedEditor.revealLines(e,t)},t.prototype.revealLinesInCenter=function(e,t){this.modifiedEditor.revealLinesInCenter(e,t)},t.prototype.revealLinesInCenterIfOutsideViewport=function(e,t){this.modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t)},t.prototype.revealRange=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),this.modifiedEditor.revealRange(e,t,n)},t.prototype.revealRangeInCenter=function(e){this.modifiedEditor.revealRangeInCenter(e)},t.prototype.revealRangeInCenterIfOutsideViewport=function(e){this.modifiedEditor.revealRangeInCenterIfOutsideViewport(e)},t.prototype.revealRangeAtTop=function(e){this.modifiedEditor.revealRangeAtTop(e)},t.prototype.getActions=function(){return this.modifiedEditor.getActions()},t.prototype.getSupportedActions=function(){return this.modifiedEditor.getSupportedActions()},t.prototype.getAction=function(e){return this.modifiedEditor.getAction(e)},t.prototype.saveViewState=function(){var e=this.originalEditor.saveViewState(),t=this.modifiedEditor.saveViewState();return{original:e,modified:t}},t.prototype.restoreViewState=function(e){if(e.original&&e.original){var t=e;this.originalEditor.restoreViewState(t.original),this.modifiedEditor.restoreViewState(t.modified)}},t.prototype.layout=function(e){this._measureDomElement(!1,e)},t.prototype.focus=function(){this.modifiedEditor.focus()},t.prototype.isFocused=function(){return this.originalEditor.isFocused()||this.modifiedEditor.isFocused()},t.prototype.onVisible=function(){this._isVisible=!0,this.originalEditor.onVisible(),this.modifiedEditor.onVisible(),this._beginUpdateDecorations()},t.prototype.onHide=function(){this._isVisible=!1,this.originalEditor.onHide(),this.modifiedEditor.onHide(),this._cleanViewZonesAndDecorations()},t.prototype.trigger=function(e,t,n){this.modifiedEditor.trigger(e,t,n)},t.prototype.changeDecorations=function(e){return this.modifiedEditor.changeDecorations(e)},t.prototype._measureDomElement=function(e,t){return t=t||{width:this._containerDomElement.clientWidth,height:this._containerDomElement.clientHeight},t.width<=0?(this._width=0,void(this._height=0)):void((e||t.width!==this._width||t.height!==this._height)&&(this._width=t.width,this._height=t.height,this._doLayout()))},t.prototype._layoutOverviewRulers=function(){var e=t.ENTIRE_DIFF_OVERVIEW_WIDTH-2*t.ONE_OVERVIEW_WIDTH,n=this.modifiedEditor.getLayoutInfo();n&&(this._originalOverviewRuler.setLayout(new p.OverviewRulerPosition({top:0,width:t.ONE_OVERVIEW_WIDTH,right:e+t.ONE_OVERVIEW_WIDTH,height:this._height})),this._modifiedOverviewRuler.setLayout(new p.OverviewRulerPosition({top:0,right:0,width:t.ONE_OVERVIEW_WIDTH,height:this._height})))},t.prototype._recomputeIfNecessary=function(e){for(var n=this,i=!1,o=0;!i&&o<e.length;o++){var r=e[o].getType();i=i||r===p.EventType.ModelRawContentChanged}i&&this._isVisible&&(this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(function(){return n._beginUpdateDecorations()},t.UPDATE_DIFF_DECORATIONS_DELAY))},t.prototype._onOriginalEditorEvents=function(e){for(var t=0;t<e.length;t++){var n=e[t].getType(),i=e[t].getData();if("scroll"===n&&this._onOriginalEditorScroll(i),n===p.EventType.ViewZonesChanged&&this._onViewZonesChanged(),n===p.EventType.ConfigurationChanged){var o=this.originalEditor.getConfiguration().wrappingInfo.isViewportWrapping;o&&this.originalEditor.updateOptions({wrappingColumn:-1})}}this._recomputeIfNecessary(e)},t.prototype._onModifiedEditorEvents=function(e){for(var t=0;t<e.length;t++){var n=e[t].getType(),i=e[t].getData();if("scroll"===n&&(this._onModifiedEditorScroll(i),this._layoutOverviewViewport()),"viewLayoutChanged"===n&&this._layoutOverviewViewport(),n===p.EventType.ViewZonesChanged&&this._onViewZonesChanged(),n===p.EventType.ConfigurationChanged){var o=i,r=this.modifiedEditor.getConfiguration().wrappingInfo.isViewportWrapping;r&&this.modifiedEditor.updateOptions({wrappingColumn:-1}),o.fontInfo&&this.modifiedEditor.getModel()&&this._onViewZonesChanged()}}this._recomputeIfNecessary(e)},t.prototype._onViewZonesChanged=function(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()},t.prototype._beginUpdateDecorations=function(){var e=this;if(this._beginUpdateDecorationsTimeout=-1,this.modifiedEditor.getModel()){this._diffComputationToken++;var t=this._diffComputationToken,n=this.originalEditor.getModel(),i=this.modifiedEditor.getModel();this._editorWorkerService.computeDiff(n.uri,i.uri,this._ignoreTrimWhitespace).then(function(o){t===e._diffComputationToken&&n===e.originalEditor.getModel()&&i===e.modifiedEditor.getModel()&&(e._lineChanges=o,e._updateDecorationsRunner.schedule(),e.emit(p.EventType.DiffUpdated,{}))},function(o){t===e._diffComputationToken&&n===e.originalEditor.getModel()&&i===e.modifiedEditor.getModel()&&(e._lineChanges=null,e._updateDecorationsRunner.schedule())})}},t.prototype._cleanViewZonesAndDecorations=function(){this._originalEditorState.clean(this.originalEditor),this._modifiedEditorState.clean(this.modifiedEditor)},t.prototype._updateDecorations=function(){if(this.originalEditor.getModel()&&this.modifiedEditor.getModel()){var e=this._lineChanges||[],t=this._originalEditorState.getForeignViewZones(this.originalEditor.getWhitespaces()),n=this._modifiedEditorState.getForeignViewZones(this.modifiedEditor.getWhitespaces()),i=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,n,this.originalEditor,this.modifiedEditor);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this.originalEditor,this._originalOverviewRuler,i.original),this._modifiedEditorState.apply(this.modifiedEditor,this._modifiedOverviewRuler,i.modified)}finally{this._currentlyChangingViewZones=!1}}},t.prototype._adjustOptionsForSubEditor=function(e){var t=r.clone(e||{});return t.wrappingColumn=-1,t.automaticLayout=!1,t.scrollbar=t.scrollbar||{},t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=!1,t.fixedOverflowWidgets=!0,t.lineDecorationsWidth="2ch",t},t.prototype._adjustOptionsForLeftHandSide=function(e,t){var n=this._adjustOptionsForSubEditor(e);return n.readOnly=!t,n.overviewRulerLanes=1,n.theme=this._theme+" original-in-monaco-diff-editor",n},t.prototype._adjustOptionsForRightHandSide=function(e){var n=this._adjustOptionsForSubEditor(e);return n.revealHorizontalRightPadding=d.DefaultConfig.editor.revealHorizontalRightPadding+t.ENTIRE_DIFF_OVERVIEW_WIDTH,n.scrollbar.verticalHasArrows=!1,n.theme=this._theme+" modified-in-monaco-diff-editor",n},t.prototype._onOriginalEditorScroll=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&(this._isHandlingScrollEvent||(this._isHandlingScrollEvent=!0,this.modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1))},t.prototype._onModifiedEditorScroll=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&(this._isHandlingScrollEvent||(this._isHandlingScrollEvent=!0,this.originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1))},t.prototype._doLayout=function(){var e=this._strategy.layout();this._originalDomNode.style.width=e+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=this._width-e+"px",this._modifiedDomNode.style.left=e+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=this._width-t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.style.height="30px",this.originalEditor.layout({width:e,height:this._height}),this.modifiedEditor.layout({width:this._width-e-t.ENTIRE_DIFF_OVERVIEW_WIDTH,height:this._height}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._layoutOverviewViewport()},t.prototype._layoutOverviewViewport=function(){var e=this._computeOverviewViewport();e?(a.StyleMutator.setTop(this._overviewViewportDomElement,e.top),a.StyleMutator.setHeight(this._overviewViewportDomElement,e.height)):(a.StyleMutator.setTop(this._overviewViewportDomElement,0),a.StyleMutator.setHeight(this._overviewViewportDomElement,0))},t.prototype._computeOverviewViewport=function(){var e=this.modifiedEditor.getLayoutInfo();if(!e)return null;var t=this.modifiedEditor.getScrollTop(),n=this.modifiedEditor.getScrollHeight(),i=Math.max(0,e.contentHeight),o=Math.max(0,i-0),r=n>0?o/n:0,s=Math.max(1,Math.floor(e.contentHeight*r)),a=Math.floor(t*r);return{height:s,top:a}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height},getContainerDomNode:function(){return e._containerDomElement},relayoutEditors:function(){e._doLayout()},getOriginalEditor:function(){return e.originalEditor},getModifiedEditor:function(){return e.modifiedEditor}}},t.prototype._setStrategy=function(e){this._strategy&&this._strategy.dispose(),this._strategy=e,this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){if(0===this._lineChanges.length||e<t(this._lineChanges[0]))return null;for(var n=0,i=this._lineChanges.length-1;n<i;){var o=Math.floor((n+i)/2),r=t(this._lineChanges[o]),s=o+1<=i?t(this._lineChanges[o+1]):Number.MAX_VALUE;e<r?i=o-1:e>=s?n=o+1:(n=o,i=o)}return this._lineChanges[n]},t.prototype._getEquivalentLineForOriginalLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.originalStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s},t.prototype._getEquivalentLineForModifiedLineNumber=function(e){var t=this._getLineChangeAtOrBeforeLineNumber(e,function(e){return e.modifiedStartLineNumber});if(!t)return e;var n=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),i=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s},t.prototype.getDiffLineInformationForOriginal=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null},t.prototype.getDiffLineInformationForModified=function(e){return this._lineChanges?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null},t}(i.EventEmitter);I.ONE_OVERVIEW_WIDTH=15,I.ENTIRE_DIFF_OVERVIEW_WIDTH=30,I.UPDATE_DIFF_DECORATIONS_DELAY=200,I=y([C(2,f.IEditorWorkerService),C(3,c.IContextKeyService),C(4,l.IInstantiationService)],I),t.DiffEditorWidget=I;var D=function(){function e(e){this._dataSource=e}return e.prototype.getEditorsDiffDecorations=function(e,t,n,i,o,r,s){o=o.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber}),i=i.sort(function(e,t){return e.afterLineNumber-t.afterLineNumber});var a=this._getViewZones(e,i,o,r,s,n),u=this._getOriginalEditorDecorations(e,t,n,r,s),l=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.modified}}},e.prototype._getViewZones=function(e,t,n,i,o,r){return null},e.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){return null},e.prototype._getModifiedEditorDecorations=function(e,t,n,i,o){return null},e}(),R=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null},e}(),k=function(){function e(e,t,n){this.lineChanges=e,this.originalForeignVZ=t,this.modifiedForeignVZ=n}return e.prototype.getViewZones=function(){for(var e={original:[],modified:[]},t=0,n=0,i=0,o=0,r=0,s=0,a=function(e,t){return e.afterLineNumber-t.afterLineNumber},u=function(e,t){if(null===t.domNode&&e.length>0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},l=new R(this.modifiedForeignVZ),c=new R(this.originalForeignVZ),d=0,h=this.lineChanges.length;d<=h;d++){var p=d<h?this.lineChanges[d]:null;null!==p?(i=p.originalStartLineNumber+(p.originalEndLineNumber>0?-1:0),o=p.modifiedStartLineNumber+(p.modifiedEndLineNumber>0?-1:0),n=p.originalEndLineNumber>0?p.originalEndLineNumber-p.originalStartLineNumber+1:0,t=p.modifiedEndLineNumber>0?p.modifiedEndLineNumber-p.modifiedStartLineNumber+1:0,r=Math.max(p.originalStartLineNumber,p.originalEndLineNumber),s=Math.max(p.modifiedStartLineNumber,p.modifiedEndLineNumber)):(i+=1e7+n,o+=1e7+t,r=i,s=o);for(var f=[],g=[];l.current&&l.current.afterLineNumber<=s;){var m=void 0;m=l.current.afterLineNumber<=o?i-o+l.current.afterLineNumber:r,f.push({afterLineNumber:m,heightInLines:l.current.heightInLines,domNode:null}),l.advance()}for(;c.current&&c.current.afterLineNumber<=r;){var m=void 0;m=c.current.afterLineNumber<=i?o-i+c.current.afterLineNumber:s,g.push({afterLineNumber:m,heightInLines:c.current.heightInLines,domNode:null}),c.advance()}if(null!==p&&E(p)){var v=this._produceOriginalFromDiff(p,n,t);v&&f.push(v)}if(null!==p&&L(p)){var v=this._produceModifiedFromDiff(p,n,t);v&&g.push(v)}var _=0,y=0;for(f=f.sort(a),g=g.sort(a);_<f.length&&y<g.length;){var C=f[_],b=g[y],w=C.afterLineNumber-i,S=b.afterLineNumber-o;w<S?(u(e.original,C),_++):S<w?(u(e.modified,b),y++):C.shouldNotShrink?(u(e.original,C),_++):b.shouldNotShrink?(u(e.modified,b),y++):C.heightInLines>=b.heightInLines?(C.heightInLines-=b.heightInLines,y++):(b.heightInLines-=C.heightInLines,_++)}for(;_<f.length;)u(e.original,f[_]),_++;for(;y<g.length;)u(e.modified,g[y]),y++}var N=function(e){e.domNode||(e.domNode=T())};return e.original.forEach(N),e.modified.forEach(N),e},e}(),O=function(e){function t(t,n){var i=e.call(this,t)||this;return i._disableSash=n===!1,i._sashRatio=null,i._sashPosition=null,i._sash=new u.Sash(i._dataSource.getContainerDomNode(),i),i._disableSash&&i._sash.disable(),i._sash.addListener2("start",function(){return i.onSashDragStart()}),i._sash.addListener2("change",function(e){return i.onSashDrag(e)}),i._sash.addListener2("end",function(){return i.onSashDragEnd()}),i._sash.addListener2("reset",function(){return i.onSashReset()}),i}return m(t,e),t.prototype.dispose=function(){this._sash.dispose()},t.prototype.setEnableSplitViewResizing=function(e){var t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._disableSash?this._sash.disable():this._sash.enable())},t.prototype.layout=function(e){void 0===e&&(e=this._sashRatio);var n=this._dataSource.getWidth(),i=n-I.ENTIRE_DIFF_OVERVIEW_WIDTH,o=Math.floor((e||.5)*i),r=Math.floor(.5*i);return o=this._disableSash?r:o||r,i>2*t.MINIMUM_EDITOR_WIDTH?(o<t.MINIMUM_EDITOR_WIDTH&&(o=t.MINIMUM_EDITOR_WIDTH),o>i-t.MINIMUM_EDITOR_WIDTH&&(o=i-t.MINIMUM_EDITOR_WIDTH)):o=r,this._sashPosition!==o&&(this._sashPosition=o,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth(),n=t-I.ENTIRE_DIFF_OVERVIEW_WIDTH,i=this.layout((this._startSashPosition+(e.currentX-e.startX))/n);this._sashRatio=i/n,this._dataSource.relayoutEditors()},t.prototype.onSashDragEnd=function(){this._sash.layout()},t.prototype.onSashReset=function(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()},t.prototype.getVerticalSashTop=function(e){return 0},t.prototype.getVerticalSashLeft=function(e){return this._sashPosition},t.prototype.getVerticalSashHeight=function(e){return this._dataSource.getHeight()},t.prototype._getViewZones=function(e,t,n,i,o){var r=new P(e,t,n);return r.getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r={decorations:[],overviewZones:[]},s=i.getModel(),a=0,u=e.length;a<u;a++){var l=e[a];if(L(l)&&(r.decorations.push({range:new h.Range(l.originalStartLineNumber,1,l.originalEndLineNumber,Number.MAX_VALUE),options:{className:"line-delete",linesDecorationsClassName:n?"delete-sign":void 0,marginClassName:"line-delete",isWholeLine:!0}}),E(l)&&l.charChanges||r.decorations.push(N(l.originalStartLineNumber,1,l.originalEndLineNumber,Number.MAX_VALUE,"char-delete",!0)),r.overviewZones.push(new p.OverviewRulerZone(l.originalStartLineNumber,l.originalEndLineNumber,p.OverviewRulerLane.Full,0,"rgba(255, 0, 0, 0.4)","rgba(255, 0, 0, 0.4)")),l.charChanges))for(var c=0,d=l.charChanges.length;c<d;c++){var f=l.charChanges[c];if(L(f))if(t)for(var g=f.originalStartLineNumber;g<=f.originalEndLineNumber;g++){var m=void 0,v=void 0;m=g===f.originalStartLineNumber?f.originalStartColumn:s.getLineFirstNonWhitespaceColumn(g),v=g===f.originalEndLineNumber?f.originalEndColumn:s.getLineLastNonWhitespaceColumn(g),r.decorations.push(N(g,m,g,v,"char-delete",!1))}else r.decorations.push(N(f.originalStartLineNumber,f.originalStartColumn,f.originalEndLineNumber,f.originalEndColumn,"char-delete",!1))}}return r},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,o){for(var r={decorations:[],overviewZones:[]},s=o.getModel(),a=0,u=e.length;a<u;a++){var l=e[a];if(E(l)&&(r.decorations.push({range:new h.Range(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,Number.MAX_VALUE),options:{className:"line-insert",linesDecorationsClassName:n?"insert-sign":void 0,marginClassName:"line-insert",isWholeLine:!0}}),L(l)&&l.charChanges||r.decorations.push(N(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,Number.MAX_VALUE,"char-insert",!0)),r.overviewZones.push(new p.OverviewRulerZone(l.modifiedStartLineNumber,l.modifiedEndLineNumber,p.OverviewRulerLane.Full,0,"rgba(155, 185, 85, 0.4)","rgba(155, 185, 85, 0.4)")),l.charChanges))for(var c=0,d=l.charChanges.length;c<d;c++){var f=l.charChanges[c];if(E(f))if(t)for(var g=f.modifiedStartLineNumber;g<=f.modifiedEndLineNumber;g++){var m=void 0,v=void 0;m=g===f.modifiedStartLineNumber?f.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(g),v=g===f.modifiedEndLineNumber?f.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(g),r.decorations.push(N(g,m,g,v,"char-insert",!1))}else r.decorations.push(N(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn,"char-insert",!1))}}return r},t}(D);O.MINIMUM_EDITOR_WIDTH=100;var P=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return m(t,e),t.prototype._produceOriginalFromDiff=function(e,t,n){return n>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n-t,domNode:null}:null},t.prototype._produceModifiedFromDiff=function(e,t,n){return t>n?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-n,domNode:null}:null},t}(k),A=function(e){function t(t,n){var i=e.call(this,t)||this;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i.toDispose=[],i.toDispose.push(t.getOriginalEditor().onDidLayoutChange(function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())})),i}return m(t,e),t.prototype.dispose=function(){this.toDispose=o.dispose(this.toDispose)},t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){var s=new W(e,t,n,i,o,r);return s.getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r={decorations:[],overviewZones:[]},s=0,a=e.length;s<a;s++){var u=e[s];L(u)&&(r.decorations.push({range:new h.Range(u.originalStartLineNumber,1,u.originalEndLineNumber,Number.MAX_VALUE),options:{marginClassName:"line-delete"}}),r.overviewZones.push(new p.OverviewRulerZone(u.originalStartLineNumber,u.originalEndLineNumber,p.OverviewRulerLane.Full,0,"rgba(255, 0, 0, 0.4)","rgba(255, 0, 0, 0.4)")))}return r},t.prototype._getModifiedEditorDecorations=function(e,t,n,i,o){for(var r={decorations:[],overviewZones:[]},s=o.getModel(),a=0,u=e.length;a<u;a++){var l=e[a];if(E(l))if(r.decorations.push({range:new h.Range(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,Number.MAX_VALUE),options:{className:"line-insert",linesDecorationsClassName:n?"insert-sign":void 0,marginClassName:"line-insert",isWholeLine:!0}}),r.overviewZones.push(new p.OverviewRulerZone(l.modifiedStartLineNumber,l.modifiedEndLineNumber,p.OverviewRulerLane.Full,0,"rgba(155, 185, 85, 0.4)","rgba(155, 185, 85, 0.4)")),l.charChanges)for(var c=0,d=l.charChanges.length;c<d;c++){var f=l.charChanges[c];if(E(f))if(t)for(var g=f.modifiedStartLineNumber;g<=f.modifiedEndLineNumber;g++){var m=void 0,v=void 0;m=g===f.modifiedStartLineNumber?f.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(g),v=g===f.modifiedEndLineNumber?f.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(g),r.decorations.push(N(g,m,g,v,"char-insert",!1))}else r.decorations.push(N(f.modifiedStartLineNumber,f.modifiedStartColumn,f.modifiedEndLineNumber,f.modifiedEndColumn,"char-insert",!1))}else r.decorations.push(N(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,Number.MAX_VALUE,"char-insert",!0))}return r},t.prototype.layout=function(){return Math.max(5,this.decorationsLeft)},t}(D),W=function(e){function t(t,n,i,o,r,s){var a=e.call(this,t,n,i)||this;return a.originalModel=o.getModel(),a.modifiedEditorConfiguration=r.getConfiguration(),a.modifiedEditorTabSize=r.getModel().getOptions().tabSize,a.renderIndicators=s,a}return m(t,e),t.prototype._produceOriginalFromDiff=function(e,t,n){var i=document.createElement("div");return i.className="inline-added-margin-view-zone",w.Configuration.applyFontInfoSlow(i,this.modifiedEditorConfiguration.fontInfo),{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:n,domNode:document.createElement("div"),marginDomNode:i}},t.prototype._produceModifiedFromDiff=function(e,t,n){var i=[];if(e.charChanges)for(var o=0,r=e.charChanges.length;o<r;o++){
var s=e.charChanges[o];L(s)&&i.push(new S.InlineDecoration(new h.Range(s.originalStartLineNumber,s.originalStartColumn,s.originalEndLineNumber,s.originalEndColumn),"char-delete",!1))}for(var a=[],u=[],l=this.modifiedEditorConfiguration.layoutInfo.decorationsWidth,c=this.modifiedEditorConfiguration.lineHeight,d=e.originalStartLineNumber;d<=e.originalEndLineNumber;d++)if(a=a.concat(this.renderOriginalLine(d-e.originalStartLineNumber,this.originalModel,this.modifiedEditorConfiguration,this.modifiedEditorTabSize,d,i)),this.renderIndicators){var p=d-e.originalStartLineNumber;u=u.concat(['<div class="delete-sign" style="position:absolute;top:'+p*c+"px;width:"+l+"px;height:"+c+'px;right:0;"></div>'])}var f=document.createElement("div");f.className="view-lines line-delete",f.innerHTML=a.join(""),w.Configuration.applyFontInfoSlow(f,this.modifiedEditorConfiguration.fontInfo);var g=document.createElement("div");return g.className="inline-deleted-margin-view-zone",g.innerHTML=u.join(""),w.Configuration.applyFontInfoSlow(g,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,domNode:f,marginDomNode:g}},t.prototype.renderOriginalLine=function(e,t,n,i,o,r){var s=t.getLineContent(o),a=g.Decoration.filter(r,o,1,s.length+1),u=v.renderViewLine(new v.RenderLineInput(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,s,t.mightContainRTL(),0,[new b.ViewLineToken(s.length,"")],a,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters)),l=[];return l.push('<div class="view-line'),0===r.length&&l.push(" char-delete"),l.push('" style="top:'),l.push(String(e*n.lineHeight)),l.push('px;width:1000000px;">'),l=l.concat(u.output),l.push("</div>"),l},t}(k)}),define(d[503],h([0,1,4,6,61,14,23,43,19,2,45,48,118,123,170,84,107,145,57]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b){"use strict";var w=0,S=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this,t,n,i,o,r,s)||this;return a instanceof h.StandaloneKeybindingService&&(u._standaloneKeybindingService=a),u}return m(t,e),t.prototype.addCommand=function(e,t,n){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;var i="DYNAMIC_"+ ++w,o=v.IOSupport.readKeybindingWhen(n);return this._standaloneKeybindingService.addDynamicKeybinding(i,e,t,o),i},t.prototype.createContextKey=function(e,t){return this._contextKeyService.createKey(e,t)},t.prototype.addAction=function(e){var t=this;if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),n.empty;var o=e.id,r=e.label,a=u.ContextKeyExpr.and(u.ContextKeyExpr.equals("editorId",this.getId()),v.IOSupport.readKeybindingWhen(e.precondition)),l=e.keybindings,c=u.ContextKeyExpr.and(a,v.IOSupport.readKeybindingWhen(e.keybindingContext)),d=e.contextMenuGroupId||null,h=e.contextMenuOrder||0,p=function(){return i.TPromise.as(e.run(t))},f=[],g=this.getId()+":"+o;if(f.push(s.CommandsRegistry.registerCommand(g,p)),d){var m={command:{id:g,title:r},when:a,group:d,order:h};f.push(b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,m))}Array.isArray(l)&&(f=f.concat(l.map(function(e){return t._standaloneKeybindingService.addDynamicKeybinding(g,e,p,c)})));var y=new _.InternalEditorAction(g,r,r,a,p,this._contextKeyService);return this._actions[o]=y,f.push({dispose:function(){delete t._actions[o]}}),n.combinedDisposable(f)},t}(p.CodeEditor);S=y([C(2,r.IInstantiationService),C(3,c.ICodeEditorService),C(4,s.ICommandService),C(5,u.IContextKeyService),C(6,a.IKeybindingService)],S),t.StandaloneCodeEditor=S;var E=function(e){function t(t,n,i,o,r,s,a,u,c,d){var h=this;n=n||{},"string"==typeof n.theme&&(n.theme=d.setTheme(n.theme)),h=e.call(this,t,n,o,r,s,a,u)||this,h._contextViewService=c,h._standaloneColorService=d,h._toDispose2=[i];var p=null;if("undefined"==typeof n.model?(p=self.monaco.editor.createModel(n.value||"",n.language||"text/plain"),h._ownsModel=!0):(p=n.model,delete n.model,h._ownsModel=!1),h._attachModel(p),p){var f={oldModelUrl:null,newModelUrl:p.uri};h.emit(l.EventType.ModelChanged,f)}return h}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._toDispose2=n.dispose(this._toDispose2)},t.prototype.destroy=function(){this.dispose()},t.prototype.updateOptions=function(t){"string"==typeof t.theme&&(t.theme=this._standaloneColorService.setTheme(t.theme)),e.prototype.updateOptions.call(this,t)},t.prototype._attachModel=function(t){e.prototype._attachModel.call(this,t),this._view&&this._contextViewService.setContainer(this._view.domNode)},t.prototype._postDetachModelCleanup=function(t){e.prototype._postDetachModelCleanup.call(this,t),t&&this._ownsModel&&(t.dispose(),this._ownsModel=!1)},t}(S);E=y([C(3,r.IInstantiationService),C(4,c.ICodeEditorService),C(5,s.ICommandService),C(6,u.IContextKeyService),C(7,a.IKeybindingService),C(8,o.IContextViewService),C(9,g.IStandaloneColorService)],E),t.StandaloneEditor=E;var L=function(e){function t(t,n,i,o,r,s,a,u,l){var c=this;return n=n||{},"string"==typeof n.theme&&(n.theme=u.setTheme(n.theme)),c=e.call(this,t,n,l,r,o)||this,s instanceof h.StandaloneKeybindingService&&(c._standaloneKeybindingService=s),c._contextViewService=a,c._standaloneColorService=u,c._toDispose2=[i],c._contextViewService.setContainer(c._containerDomElement),c}return m(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._toDispose2=n.dispose(this._toDispose2)},t.prototype.destroy=function(){this.dispose()},t.prototype.updateOptions=function(t){"string"==typeof t.theme&&(t.theme=this._standaloneColorService.setTheme(t.theme)),e.prototype.updateOptions.call(this,t)},t.prototype._createInnerEditor=function(e,t,n){return e.createInstance(S,t,n)},t.prototype.getOriginalEditor=function(){return e.prototype.getOriginalEditor.call(this)},t.prototype.getModifiedEditor=function(){return e.prototype.getModifiedEditor.call(this)},t.prototype.addCommand=function(e,t,n){return this.getModifiedEditor().addCommand(e,t,n)},t.prototype.createContextKey=function(e,t){return this.getModifiedEditor().createContextKey(e,t)},t.prototype.addAction=function(e){return this.getModifiedEditor().addAction(e)},t}(f.DiffEditorWidget);L=y([C(3,r.IInstantiationService),C(4,u.IContextKeyService),C(5,a.IKeybindingService),C(6,o.IContextViewService),C(7,g.IStandaloneColorService),C(8,d.IEditorWorkerService)],L),t.StandaloneDiffEditor=L}),define(d[171],h([0,1,35,14,23,19,45,123]),function(e,t,n,i,o,r,s,a){"use strict";var u=function(e){function t(t,n,i,o,r,s,a){var u=e.call(this,t,i.getRawConfiguration(),o,r,s,a)||this;return u._parentEditor=i,u._overwriteOptions=n,e.prototype.updateOptions.call(u,u._overwriteOptions),u._lifetimeDispose.push(i.onDidChangeConfiguration(function(e){return u._onParentConfigurationChanged(e)})),u}return m(t,e),t.prototype.getParentEditor=function(){return this._parentEditor},t.prototype._onParentConfigurationChanged=function(t){e.prototype.updateOptions.call(this,this._parentEditor.getRawConfiguration()),e.prototype.updateOptions.call(this,this._overwriteOptions)},t.prototype.updateOptions=function(t){n.mixin(this._overwriteOptions,t,!0),e.prototype.updateOptions.call(this,this._overwriteOptions)},t}(a.CodeEditor);u=y([C(3,i.IInstantiationService),C(4,s.ICodeEditorService),C(5,o.ICommandService),C(6,r.IContextKeyService)],u),t.EmbeddedCodeEditorWidget=u}),define(d[90],h([0,1,320,49,9,34,12,11,71,14,45,161,171,19,424]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e,t){var n=e.get(c.ICodeEditorService).getFocusedCodeEditor();return n instanceof h.EmbeddedCodeEditorWidget?n.getParentEditor():n}t.IPeekViewService=l.createDecorator("peekViewService");var g;!function(e){e.inPeekEditor=new p.RawContextKey("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(g=t.PeekContext||(t.PeekContext={})),t.NOT_INNER_EDITOR_CONTEXT_KEY=new p.RawContextKey("inReferenceSearchEditor",!0),t.getOuterEditor=f;var v=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new s.Emitter,i._isActive=!1,i}return m(t,e),t.prototype.dispose=function(){this._isActive=!1,e.prototype.dispose.call(this),this._onDidClose.fire(this)},Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!0,configurable:!0}),t.prototype.show=function(t,n){this._isActive=!0,this._headElement.style.borderTopColor=this.options.frameColor,this._bodyElement.style.borderTopColor=this.options.frameColor,this._bodyElement.style.borderBottomColor=this.options.frameColor,e.prototype.show.call(this,t,n)},t.prototype._fillContainer=function(e){r.$(e).addClass("peekview-widget"),this._headElement=r.$(".head").getHTMLElement(),this._bodyElement=r.$(".body").getHTMLElement(),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)},t.prototype._fillHead=function(e){var t=this,o=r.$(".peekview-title").on(a.EventType.CLICK,function(e){return t._onTitleClick(e)}).appendTo(this._headElement).getHTMLElement();this._primaryHeading=r.$("span.filename").appendTo(o).getHTMLElement(),this._secondaryHeading=r.$("span.dirname").appendTo(o).getHTMLElement(),this._metaHeading=r.$("span.meta").appendTo(o).getHTMLElement(),this._actionbarWidget=new u.ActionBar(r.$(".peekview-actions").appendTo(this._headElement)),this._actionbarWidget.push(new i.Action("peekview.close",n.localize(0,null),"close-peekview-action",!0,function(){return t.dispose(),null}),{label:!1,icon:!0})},t.prototype._onTitleClick=function(e){},t.prototype.setTitle=function(e,t){r.$(this._primaryHeading).safeInnerHtml(e),t?r.$(this._secondaryHeading).safeInnerHtml(t):a.clearNode(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?r.$(this._metaHeading).safeInnerHtml(e):a.clearNode(this._metaHeading)},t.prototype._fillBody=function(e){},t.prototype._doLayout=function(e,t){if(e<0)return this.dispose(),void this._onDidClose.fire(this);var n=Math.ceil(1.2*this.editor.getConfiguration().lineHeight),i=e-(n+2);this._doLayoutHead(n,t),this._doLayoutBody(i,t)},t.prototype._doLayoutHead=function(e,t){this._headElement.style.height=o.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=o.format("{0}px",e)},t}(d.ZoneWidget);t.PeekViewWidget=v}),define(d[97],h([0,1,27,14,39]),function(e,t,n,i,o){"use strict";t.IWorkspaceContextService=i.createDecorator("contextService");var r=function(){function e(e){this.workspace=e}return e.prototype.getWorkspace=function(){return this.workspace},e.prototype.hasWorkspace=function(){return!!this.workspace},e.prototype.isInsideWorkspace=function(e){return!(!e||!this.workspace)&&o.isEqualOrParent(e.fsPath,this.workspace.resource.fsPath)},e.prototype.toWorkspaceRelativePath=function(e){return this.isInsideWorkspace(e)?o.normalize(o.relative(this.workspace.resource.fsPath,e.fsPath)):null},e.prototype.toResource=function(e){return"string"==typeof e&&this.workspace?n.default.file(o.join(this.workspace.resource.fsPath,e)):null},e}();t.WorkspaceContextService=r}),define(d[174],h([0,1,4,27,56,326,61,496,14,411,79,23,43,19,416,81,52,159,160,47,97,45,48,129,80,440,44,426,341,118,415,57,84,202]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,y,C,b,w,S,E,L,N,T,x,M,I,D,R,k,O){"use strict";var P;!function(e){function t(e,t){var n=new s(e,t);return a.push(n),n}function n(e){var t=new c.ServiceCollection;for(var n in e)e.hasOwnProperty(n)&&t.set(u.createDecorator(n),e[n]);a.forEach(function(n){return t.set(n.id,n.get(e))});var i=new l.InstantiationService(t,!0);return t.set(u.IInstantiationService,i),[t,i]}var r=new c.ServiceCollection,s=function(){function e(e,t){this._serviceId=e,this._factory=t,this._value=null}return Object.defineProperty(e.prototype,"id",{get:function(){return this._serviceId},enumerable:!0,configurable:!0}),e.prototype.get=function(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");r.set(this._serviceId,this._value)}return this._value},e}();e.LazyStaticService=s;var a=[];e.init=n,e.instantiationService=t(u.IInstantiationService,function(){return new l.InstantiationService(r,!0)}),e.contextService=t(b.IWorkspaceContextService,function(){return new b.WorkspaceContextService({resource:i.default.from({scheme:"inmemory",authority:"model",path:"/"})})}),e.telemetryService=t(C.ITelemetryService,function(){return new I.StandaloneTelemetryService}),e.configurationService=t(o.IConfigurationService,function(){return new I.SimpleConfigurationService}),e.messageService=t(v.IMessageService,function(){return new I.SimpleMessageService}),e.markerService=t(g.IMarkerService,function(){return new f.MarkerService}),e.modeService=t(L.IModeService,function(e){return new N.ModeServiceImpl}),e.modelService=t(T.IModelService,function(t){return new x.ModelServiceImpl(e.markerService.get(t),e.configurationService.get(t))}),e.editorWorkerService=t(S.IEditorWorkerService,function(t){return new E.EditorWorkerServiceImpl(e.modelService.get(t),e.configurationService.get(t))}),e.codeEditorService=t(w.ICodeEditorService,function(){return new M.CodeEditorServiceImpl}),e.progressService=t(_.IProgressService,function(){return new I.SimpleProgressService}),e.storageService=t(y.IStorageService,function(){return y.NullStorageService}),e.standaloneColorService=t(k.IStandaloneColorService,function(){return new O.StandaloneColorServiceImpl})}(P=t.StaticServices||(t.StaticServices={}));var A=function(e){function t(t,n){var i=e.call(this)||this,u=P.init(n),l=u[0],c=u[1];i._serviceCollection=l,i._instantiationService=c;var f=i.get(o.IConfigurationService),g=i.get(v.IMessageService),m=i.get(C.ITelemetryService),_=function(e,t){var o=null;return n&&(o=n[e.toString()]),o||(o=t()),i._serviceCollection.set(e,o),o},y=_(p.IContextKeyService,function(){return i._register(new D.ContextKeyService(f))}),b=_(d.ICommandService,function(){return new I.StandaloneCommandService(i._instantiationService)});_(h.IKeybindingService,function(){return i._register(new I.StandaloneKeybindingService(y,b,g,t))});var w=_(s.IContextViewService,function(){return i._register(new a.ContextViewService(t,m,g))});return _(s.IContextMenuService,function(){return i._register(new r.ContextMenuService(t,m,g,w))}),_(R.IMenuService,function(){return new I.SimpleMenuService(b)}),i}return m(t,e),t.prototype.get=function(e){var t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t},t.prototype.set=function(e,t){this._serviceCollection.set(e,t)},t.prototype.has=function(e){return this._serviceCollection.has(e)},t}(n.Disposable);t.DynamicStandaloneServices=A}),define(d[508],h([0,1,2,21,503,40,174,419,66,146,118,16,366,125,62,23,61,14,43,19,45,48,68,63,84,109,328]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,v,_,y,C,b,w,S,E,L){"use strict";function N(e){return s.StaticServices.init(e)}function T(e,t,n){var i=new s.DynamicStandaloneServices(e,t),o=null;i.has(f.IEditorService)||(o=new c.SimpleEditorService,i.set(f.IEditorService,o));var r=null;i.has(w.ITextModelResolverService)||(r=new c.SimpleEditorModelResolverService,i.set(w.ITextModelResolverService,r)),i.has(u.IOpenerService)||i.set(u.IOpenerService,new a.OpenerService(i.get(f.IEditorService),i.get(g.ICommandService)));var l=n(i);return o&&o.setEditor(l),r&&r.setEditor(l),l}function x(e,t,n){return T(e,n,function(n){return new o.StandaloneEditor(e,t,n,n.get(v.IInstantiationService),n.get(C.ICodeEditorService),n.get(g.ICommandService),n.get(y.IContextKeyService),n.get(_.IKeybindingService),n.get(m.IContextViewService),n.get(E.IStandaloneColorService))})}function M(e){return s.StaticServices.codeEditorService.get().onCodeEditorAdd(function(t){e(t)})}function I(e,t,n){return T(e,n,function(n){return new o.StandaloneDiffEditor(e,t,n,n.get(v.IInstantiationService),n.get(y.IContextKeyService),n.get(_.IKeybindingService),n.get(m.IContextViewService),n.get(E.IStandaloneColorService),n.get(b.IEditorWorkerService))})}function D(e,t){return new p.DiffNavigator(e,t)}function R(e,t,n){return s.StaticServices.modelService.get().createModel(e,t,n)}function k(e,t,n){if(e=e||"",!t){var i=n?n.path:null,o=e.indexOf("\n"),r=e;return o!==-1&&(r=e.substring(0,o)),R(e,s.StaticServices.modeService.get().getOrCreateModeByFilenameOrFirstLine(i,r),n)}return R(e,s.StaticServices.modeService.get().getOrCreateMode(t),n)}function O(e,t){s.StaticServices.modelService.get().setMode(e,s.StaticServices.modeService.get().getOrCreateMode(t))}function P(e,t,n){e&&s.StaticServices.markerService.get().changeOne(t,e.uri,n)}function A(e){return s.StaticServices.modelService.get().getModel(e)}function W(){return s.StaticServices.modelService.get().getModels()}function F(e){return s.StaticServices.modelService.get().onModelAdded(e)}function V(e){return s.StaticServices.modelService.get().onModelRemoved(e)}function H(e){return s.StaticServices.modelService.get().onModelModeChanged(function(t){e({model:t.model,oldLanguage:t.oldModeId})})}function B(e){return h.createWebWorker(s.StaticServices.modelService.get(),e)}function U(e,t){return l.Colorizer.colorizeElement(s.StaticServices.standaloneColorService.get(),s.StaticServices.modeService.get(),e,t)}function z(e,t,n){return l.Colorizer.colorize(s.StaticServices.modeService.get(),e,t,n)}function K(e,t,n){return void 0===n&&(n=4),l.Colorizer.colorizeModelLine(e,t,n)}function j(e){var t=d.TokenizationRegistry.get(e);return t?t:{getInitialState:function(){return S.NULL_STATE},tokenize:function(t,n,i){return S.nullTokenize(e,t,n,i)},tokenize2:void 0}}function q(e,t){var n=s.StaticServices.modeService.get();n.getOrCreateMode(t);for(var i=j(t),o=e.split(/\r\n|\r|\n/),r=[],a=i.getInitialState(),u=0,l=o.length;u<l;u++){var c=o[u],d=i.tokenize(c,a,0);r[u]=d.tokens,a=d.endState}return r}function G(e,t){s.StaticServices.standaloneColorService.get().defineTheme(e,t)}function Y(){return{create:x,onDidCreateEditor:M,createDiffEditor:I,createDiffNavigator:D,createModel:k,setModelLanguage:O,setModelMarkers:P,getModels:W,getModel:A,onDidCreateModel:F,onWillDisposeModel:V,onDidChangeModelLanguage:H,createWebWorker:B,colorizeElement:U,colorize:z,colorizeModelLine:K,tokenize:q,defineTheme:G,ScrollbarVisibility:r.ScrollbarVisibility,WrappingIndent:n.WrappingIndent,OverviewRulerLane:n.OverviewRulerLane,EndOfLinePreference:n.EndOfLinePreference,DefaultEndOfLine:n.DefaultEndOfLine,EndOfLineSequence:n.EndOfLineSequence,TrackedRangeStickiness:n.TrackedRangeStickiness,CursorChangeReason:n.CursorChangeReason,MouseTargetType:n.MouseTargetType,TextEditorCursorStyle:n.TextEditorCursorStyle,TextEditorCursorBlinkingStyle:n.TextEditorCursorBlinkingStyle,ContentWidgetPositionPreference:i.ContentWidgetPositionPreference,OverlayWidgetPositionPreference:i.OverlayWidgetPositionPreference,InternalEditorScrollbarOptions:n.InternalEditorScrollbarOptions,EditorWrappingInfo:n.EditorWrappingInfo,InternalEditorViewOptions:n.InternalEditorViewOptions,EditorContribOptions:n.EditorContribOptions,InternalEditorOptions:n.InternalEditorOptions,OverviewRulerPosition:n.OverviewRulerPosition,EditorLayoutInfo:n.EditorLayoutInfo,BareFontInfo:L.BareFontInfo,FontInfo:L.FontInfo,TextModelResolvedOptions:n.TextModelResolvedOptions,FindMatch:n.FindMatch,EditorType:n.EditorType,CursorMoveByUnit:n.CursorMoveByUnit,CursorMovePosition:n.CursorMovePosition,EditorScrollDirection:n.EditorScrollDirection,EditorScrollByUnit:n.EditorScrollByUnit,RevealLineAtArgument:n.RevealLineAtArgument,Handler:n.Handler}}t.setupServices=N,t.create=x,t.onDidCreateEditor=M,t.createDiffEditor=I,t.createDiffNavigator=D,t.createModel=k,t.setModelLanguage=O,t.setModelMarkers=P,t.getModel=A,t.getModels=W,t.onDidCreateModel=F,t.onWillDisposeModel=V,t.onDidChangeModelLanguage=H,t.createWebWorker=B,t.colorizeElement=U,t.colorize=z,t.colorizeModelLine=K,t.tokenize=q,t.defineTheme=G,t.createMonacoEditorAPI=Y}),define(d[509],h([0,1,6,113,174,16,65,15,3,17,187,189,38,82]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p){"use strict";function f(e){i.ModesRegistry.registerLanguage(e)}function g(){var e=[];return e=e.concat(i.ModesRegistry.getLanguages())}function m(e,t){var n=o.StaticServices.modeService.get().onDidCreateMode(function(i){i.getId()===e&&(n.dispose(),t())});return n}function v(e,t){var n=o.StaticServices.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set configuration for unknown language "+e);return h.LanguageConfigurationRegistry.register(n,t)}function _(e,t){var n=o.StaticServices.modeService.get().getLanguageIdentifier(e);if(!n)throw new Error("Cannot set tokens provider for unknown language "+e);var i=new W(o.StaticServices.standaloneColorService.get(),n,t);return r.TokenizationRegistry.register(e,i)}function y(e,t){var n=c.compile(e,t),i=d.createTokenizationSupport(o.StaticServices.modeService.get(),o.StaticServices.standaloneColorService.get(),e,n);return r.TokenizationRegistry.register(e,i)}function C(e,t){return r.ReferenceProviderRegistry.register(e,t)}function b(e,t){return r.RenameProviderRegistry.register(e,t)}function w(e,t){return r.SignatureHelpProviderRegistry.register(e,t)}function S(e,t){return r.HoverProviderRegistry.register(e,{provideHover:function(e,n,i){var o=e.getWordAtPosition(n);return l.toThenable(t.provideHover(e,n,i)).then(function(e){if(e)return!e.range&&o&&(e.range=new u.Range(n.lineNumber,o.startColumn,n.column,o.endColumn)),e.range||(e.range=new u.Range(n.lineNumber,n.column,n.lineNumber,n.column)),e})}})}function E(e,t){return r.DocumentSymbolProviderRegistry.register(e,t)}function L(e,t){return r.DocumentHighlightProviderRegistry.register(e,t)}function N(e,t){return r.DefinitionProviderRegistry.register(e,t)}function T(e,t){return r.ImplementationProviderRegistry.register(e,t)}function x(e,t){return r.CodeLensProviderRegistry.register(e,t)}function M(e,t){return r.CodeActionProviderRegistry.register(e,{provideCodeActions:function(e,n,i){var r=o.StaticServices.markerService.get().read({resource:e.uri}).filter(function(e){return u.Range.areIntersectingOrTouching(e,n)});return t.provideCodeActions(e,n,{markers:r},i)}})}function I(e,t){return r.DocumentFormattingEditProviderRegistry.register(e,t)}function D(e,t){return r.DocumentRangeFormattingEditProviderRegistry.register(e,t)}function R(e,t){return r.OnTypeFormattingEditProviderRegistry.register(e,t)}function k(e,t){return r.LinkProviderRegistry.register(e,t)}function O(e,t){var n=new V(t);return r.SuggestRegistry.register(e,{triggerCharacters:t.triggerCharacters,provideCompletionItems:function(e,t,i){return n.provideCompletionItems(e,t,i)},resolveCompletionItem:function(e,t,i,o){return n.resolveCompletionItem(e,t,i,o)}})}function P(e){switch(e){case F.Method:return"method";case F.Function:return"function";case F.Constructor:return"constructor";case F.Field:return"field";case F.Variable:return"variable";case F.Class:return"class";case F.Interface:return"interface";case F.Module:return"module";case F.Property:return"property";case F.Unit:return"unit";case F.Value:return"value";case F.Enum:return"enum";case F.Keyword:return"keyword";case F.Snippet:return"snippet";case F.Text:return"text";case F.Color:return"color";case F.File:return"file";case F.Reference:return"reference";case F.Folder:return"folder"}return"property"}function A(){return{register:f,getLanguages:g,onLanguage:m,setLanguageConfiguration:v,setTokensProvider:_,setMonarchTokensProvider:y,registerReferenceProvider:C,registerRenameProvider:b,registerCompletionItemProvider:O,registerSignatureHelpProvider:w,registerHoverProvider:S,registerDocumentSymbolProvider:E,registerDocumentHighlightProvider:L,registerDefinitionProvider:N,registerImplementationProvider:T,registerCodeLensProvider:x,registerCodeActionProvider:M,registerDocumentFormattingEditProvider:I,registerDocumentRangeFormattingEditProvider:D,registerOnTypeFormattingEditProvider:R,registerLinkProvider:k,DocumentHighlightKind:r.DocumentHighlightKind,CompletionItemKind:F,SymbolKind:r.SymbolKind,IndentAction:s.IndentAction}}t.register=f,t.getLanguages=g,t.onLanguage=m,t.setLanguageConfiguration=v;var W=function(){function e(e,t,n){this._standaloneColorService=e,this._languageIdentifier=t,this._actual=n}return e.prototype.getInitialState=function(){return this._actual.getInitialState()},e.prototype._toClassicTokens=function(e,t,n){for(var i=[],o=0,r=e.length;o<r;o++){var s=e[o];i[o]=new p.Token(s.startIndex+n,s.scopes,t)}return i},e.prototype.tokenize=function(e,t,n){var i,o=this._actual.tokenize(e,t),r=this._toClassicTokens(o.tokens,this._languageIdentifier.language,n);return i=o.endState.equals(t)?t:o.endState,new p.TokenizationResult(r,i)},e.prototype._toBinaryTokens=function(e,t){for(var n=this._languageIdentifier.id,i=this._standaloneColorService.getTheme(),o=[],r=0,s=0,a=e.length;s<a;s++){var u=e[s],l=i.match(n,u.scopes);r>0&&o[r-1]===l||(o[r++]=u.startIndex,o[r++]=l)}for(var c=new Uint32Array(r),s=0;s<r;s++)c[s]=o[s];return c},e.prototype.tokenize2=function(e,t,n){var i,o=this._actual.tokenize(e,t),r=this._toBinaryTokens(o.tokens,n);return i=o.endState.equals(t)?t:o.endState,new p.TokenizationResult2(r,i)},e}();t.TokenizationSupport2Adapter=W,t.setTokensProvider=_,t.setMonarchTokensProvider=y,t.registerReferenceProvider=C,t.registerRenameProvider=b,t.registerSignatureHelpProvider=w,t.registerHoverProvider=S,t.registerDocumentSymbolProvider=E,t.registerDocumentHighlightProvider=L,t.registerDefinitionProvider=N,t.registerImplementationProvider=T,t.registerCodeLensProvider=x,t.registerCodeActionProvider=M,t.registerDocumentFormattingEditProvider=I,t.registerDocumentRangeFormattingEditProvider=D,t.registerOnTypeFormattingEditProvider=R,t.registerLinkProvider=k,t.registerCompletionItemProvider=O;var F;!function(e){e[e.Text=0]="Text",e[e.Method=1]="Method",e[e.Function=2]="Function",e[e.Constructor=3]="Constructor",e[e.Field=4]="Field",e[e.Variable=5]="Variable",e[e.Class=6]="Class",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Unit=10]="Unit",e[e.Value=11]="Value",e[e.Enum=12]="Enum",e[e.Keyword=13]="Keyword",e[e.Snippet=14]="Snippet",e[e.Color=15]="Color",e[e.File=16]="File",e[e.Reference=17]="Reference",e[e.Folder=18]="Folder"}(F=t.CompletionItemKind||(t.CompletionItemKind={}));var V=function(){function e(e){this._provider=e}return e.from=function(e,t,n){var i={_actual:e,label:e.label,insertText:e.label,type:P(e.kind),detail:e.detail,documentation:e.documentation,sortText:e.sortText,filterText:e.filterText,snippetType:"internal"},o=e.textEdit?e.textEdit.range:e.range;if(o){var r=o.startLineNumber===o.endLineNumber;if(!r||o.startLineNumber!==t.lineNumber)return console.warn("INVALID range, must be single line and on the same line"),null;i.overwriteBefore=t.column-o.startColumn,i.overwriteAfter=o.endColumn-t.column}else i.overwriteBefore=t.column-n.column,i.overwriteAfter=0;return e.textEdit?i.insertText=e.textEdit.text:"object"==typeof e.insertText&&"string"==typeof e.insertText.value?(i.insertText=e.insertText.value,i.snippetType="textmate"):"string"==typeof e.insertText&&(i.insertText=e.insertText),i},e.prototype.provideCompletionItems=function(t,n,i){return l.toThenable(this._provider.provideCompletionItems(t,n,i)).then(function(i){var o={suggestions:[]},r=n,s=t.getWordUntilPosition(n);s&&(r=new a.Position(r.lineNumber,s.startColumn));var u;if(Array.isArray(i))u={items:i,isIncomplete:!1};else if("object"==typeof i&&Array.isArray(i.items))u=i,o.incomplete=u.isIncomplete;else{if(!i)return;console.warn("INVALID result from completion provider. expected CompletionItem-array or CompletionList but got:",i)}for(var l=0;l<u.items.length;l++){var c=u.items[l],d=e.from(c,n,r);d&&o.suggestions.push(d)}return o})},e.prototype.resolveCompletionItem=function(t,i,o,r){if("function"!=typeof this._provider.resolveCompletionItem)return n.TPromise.as(o);var s=o._actual;return s?l.toThenable(this._provider.resolveCompletionItem(s,r)).then(function(n){var o=i,r=t.getWordUntilPosition(i);return r&&(o=new a.Position(o.lineNumber,r.startColumn)),e.from(n,i,o)}):n.TPromise.as(o)},e}();t.createMonacoLanguagesAPI=A}),define(d[510],h([0,1,311,10,165,12,4,64,9,6,34,11,98,217,133,243,75,141,79,97,42,3,2,127,171,90,92,68,417]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b,w,S,E,L,N,T,x,M,I){"use strict";var D=function(){function e(e,t){var n=this;this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=[],this._callOnModelChange=[],this._callOnDispose.push(this._editor.onDidChangeModel(function(){return n._onModelChanged()})),this._onModelChanged()}return e.prototype.dispose=function(){this._callOnModelChange=s.dispose(this._callOnModelChange),this._callOnDispose=s.dispose(this._callOnDispose),this.removeDecorations()},e.prototype._onModelChanged=function(){this._callOnModelChange=s.dispose(this._callOnModelChange);var e=this._editor.getModel();if(e)for(var t=0,n=this._model.groups;t<n.length;t++){var i=n[t];if(i.uri.toString()===e.uri.toString())return void this._addDecorations(i)}},e.prototype._addDecorations=function(t){var n=this;this._callOnModelChange.push(this._editor.getModel().onDidChangeDecorations(function(e){return n._onDecorationChanged(e)})),this._editor.changeDecorations(function(i){for(var o=[],r=[],s=0,a=t.children.length;s<a;s++){var u=t.children[s];n._decorationIgnoreSet.has(u.id)||(o.push({range:u.range,options:e.DecorationOptions}),r.push(s))}for(var l=i.deltaDecorations([],o),s=0;s<l.length;s++)n._decorations.set(l[s],t.children[r[s]])})},e.prototype._onDecorationChanged=function(e){for(var t=this,n=e.changedDecorations,i=[],o=0,r=n.length;o<r;o++){var s=this._decorations.get(n[o]);if(s){var a=this._editor.getModel().getDecorationRange(n[o]),u=!1;if(!E.Range.equalsRange(a,s.range)){if(E.Range.spansMultipleLines(a))u=!0;else{var l=s.range.endColumn-s.range.startColumn,c=a.endColumn-a.startColumn;l!==c&&(u=!0)}u?(this._decorationIgnoreSet.add(s.id),i.push(n[o])):s.range=a}}}this._editor.changeDecorations(function(e){for(var n=0,o=i.length;n<o;n++)delete t._decorations[i[n]];e.deltaDecorations(i,[])})},e.prototype.removeDecorations=function(){var e=this;this._editor.changeDecorations(function(t){e._decorations.forEach(function(e,n){t.removeDecoration(n)}),e._decorations.clear()})},e}();D.DecorationOptions={stickiness:L.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"reference-decoration"};var R=function(){function e(e){this._textModelResolverService=e}return e.prototype.getId=function(e,t){return t instanceof M.ReferencesModel?"root":t instanceof M.FileReferences?t.id:t instanceof M.OneReference?t.id:void 0},e.prototype.hasChildren=function(e,t){return t instanceof M.ReferencesModel||(t instanceof M.FileReferences&&!t.failure||void 0)},e.prototype.getChildren=function(e,t){return t instanceof M.ReferencesModel?l.TPromise.as(t.groups):t instanceof M.FileReferences?t.resolve(this._textModelResolverService).then(function(n){return t.failure?e.refresh(t).then(function(){return n.children}):n.children}):l.TPromise.as([])},e.prototype.getParent=function(e,t){var n=null;return t instanceof M.FileReferences?n=t.parent:t instanceof M.OneReference&&(n=t.parent),l.TPromise.as(n)},e}();R=y([C(0,I.ITextModelResolverService)],R);var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.prototype.onTap=function(n,i,o){
if(i instanceof M.FileReferences)return o.preventDefault(),o.stopPropagation(),this._expandCollapse(n,i);var r=e.prototype.onTap.call(this,n,i,o);return n.emit(t.Events.FOCUSED,i),r},t.prototype.onMouseDown=function(n,i,o){if(o.leftButton){if(i instanceof M.FileReferences)return o.preventDefault(),o.stopPropagation(),this._expandCollapse(n,i);var r=e.prototype.onClick.call(this,n,i,o);return o.ctrlKey||o.metaKey?n.emit(t.Events.OPEN_TO_SIDE,i):2===o.detail?n.emit(t.Events.SELECTED,i):n.emit(t.Events.FOCUSED,i),r}return!1},t.prototype.onClick=function(t,n,i){return!i.leftButton&&e.prototype.onClick.call(this,t,n,i)},t.prototype._expandCollapse=function(e,t){return e.isExpanded(t)?e.collapse(t).done(null,i.onUnexpectedError):e.expand(t).done(null,i.onUnexpectedError),!0},t.prototype.onEscape=function(e,t){return!1},t.prototype.onEnter=function(n,i){var o=n.getFocus();if(o instanceof M.FileReferences)return this._expandCollapse(n,o);var r=e.prototype.onEnter.call(this,n,i);return i.ctrlKey||i.metaKey?n.emit(t.Events.OPEN_TO_SIDE,o):n.emit(t.Events.SELECTED,o),r},t.prototype.onUp=function(t,n){return e.prototype.onUp.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onPageUp=function(t,n){return e.prototype.onPageUp.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onLeft=function(t,n){return e.prototype.onLeft.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onDown=function(t,n){return e.prototype.onDown.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onPageDown=function(t,n){return e.prototype.onPageDown.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype.onRight=function(t,n){return e.prototype.onRight.call(this,t,n),this._fakeFocus(t,n),!0},t.prototype._fakeFocus=function(e,n){var i=e.getFocus();e.setSelection([i]),e.emit(t.Events.FOCUSED,i)},t}(v.DefaultController);k.Events={FOCUSED:"events/custom/focused",SELECTED:"events/custom/selected",OPEN_TO_SIDE:"events/custom/opentoside"};var O=function(e){function t(t){var n=e.call(this)||this;return n._contextService=t,n}return m(t,e),t.prototype.getHeight=function(e,t){return 22},t.prototype.render=function(e,t,i){var o=this;if(d.clearNode(i),t instanceof M.FileReferences){var r=c.$(".reference-file");new g.LeftRightWidget(r,function(e){return new f.FileLabel(e,t.uri,o._contextService),null},function(e){var i=t.children.length,o=new p.CountBadge(e,i);return t.failure?o.setTitleFormat(n.localize(0,null)):i>1?o.setTitleFormat(n.localize(1,null,i)):o.setTitleFormat(n.localize(2,null,i)),null}),r.appendTo(i)}else if(t instanceof M.OneReference){var s=t.parent.preview.preview(t.range);if(!s)return;c.$(".reference").innerHtml(u.format('<span>{0}</span><span class="referenceMatch">{1}</span><span>{2}</span>',u.escape(s.before),u.escape(s.inside),u.escape(s.after))).appendTo(i)}return null},t}(v.LegacyRenderer);O=y([C(0,w.IWorkspaceContextService)],O);var P=function(){function e(e,t){var n=this;this._disposables=new s.Disposables,this._onDidChangePercentages=new r.Emitter,this._ratio=t,this._sash=new h.Sash(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}});var i;this._disposables.add(this._sash.addListener2("start",function(e){i=e.startX-n._width*n.ratio})),this._disposables.add(this._sash.addListener2("change",function(e){var t=e.currentX-i;t>20&&t+20<n._width&&(n._ratio=t/n._width,n._sash.layout(),n._onDidChangePercentages.fire(n))}))}return e.prototype.dispose=function(){this._sash.dispose(),this._onDidChangePercentages.dispose(),this._disposables.dispose()},Object.defineProperty(e.prototype,"onDidChangePercentages",{get:function(){return this._onDidChangePercentages.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{set:function(e){this._width=e,this._sash.layout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{set:function(e){this._height=e,this._sash.layout()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"percentages",{get:function(){var e=100*this._ratio,t=100-e;return[e+"%",t+"%"]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ratio",{get:function(){return this._ratio},enumerable:!0,configurable:!0}),e}(),A=function(e){function t(t,n,i,o,a){var u=e.call(this,t,{frameColor:"#007ACC",showFrame:!1,showArrow:!0,isResizeable:!0})||this;return u.layoutData=n,u._textModelResolverService=i,u._contextService=o,u._instantiationService=a,u._disposeOnNewModel=[],u._onDidSelectReference=new r.Emitter,u._previewModelReference=s.empty,u._instantiationService=u._instantiationService.createChild(new b.ServiceCollection([x.IPeekViewService,u])),u.create(),u}return m(t,e),t.prototype.dispose=function(){this.setModel(null),s.dispose(this._preview,this._previewNotAvailableMessage,this._tree,this._sash),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"onDidSelectReference",{get:function(){return this._onDidSelectReference.event},enumerable:!0,configurable:!0}),t.prototype.show=function(t){this.editor.revealRangeInCenterIfOutsideViewport(t),e.prototype.show.call(this,t,this.layoutData.heightInLines||18)},t.prototype.focus=function(){this._tree.DOMFocus()},t.prototype._onTitleClick=function(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey?"side":"open",source:"title"})},t.prototype._fillBody=function(e){var t=this,i=c.$(e);i.addClass("reference-zone-widget"),i.div({class:"messages"},function(e){t._messageContainer=e.hide()}),i.div({class:"preview inline"},function(e){var i={scrollBeyondLastLine:!1,scrollbar:S.DefaultConfig.editor.scrollbar,overviewRulerLanes:2,fixedOverflowWidgets:!0};t._preview=t._instantiationService.createInstance(T.EmbeddedCodeEditorWidget,e.getHTMLElement(),i,t.editor),t._previewContainer=e.hide(),t._previewNotAvailableMessage=N.Model.createFromString(n.localize(3,null))}),this._sash=new P(e,this.layoutData.ratio||.8),this._sash.onDidChangePercentages(function(){var e=t._sash.percentages,n=e[0],i=e[1];t._previewContainer.style({width:n}),t._treeContainer.style({width:i}),t._preview.layout(),t._tree.layout(),t.layoutData.ratio=t._sash.ratio}),i.div({class:"ref-tree inline"},function(e){var i={dataSource:t._instantiationService.createInstance(R),renderer:t._instantiationService.createInstance(O),controller:new k},o={allowHorizontalScroll:!1,twistiePixels:20,ariaLabel:n.localize(4,null)};t._tree=new _.Tree(e.getHTMLElement(),i,o),t._treeContainer=e.hide()})},t.prototype._doLayoutBody=function(t,n){e.prototype._doLayoutBody.call(this,t,n);var i=t+"px";this._sash.height=t,this._sash.width=n;var o=this._sash.percentages,r=o[0],s=o[1];this._previewContainer.style({height:i,width:r}),this._treeContainer.style({height:i,width:s}),this._tree.layout(t),this._preview.layout(),this.layoutData={heightInLines:this._viewZone.heightInLines,ratio:this._sash.ratio}},t.prototype._onWidth=function(e){this._sash.width=e,this._preview.layout()},t.prototype.setSelection=function(e){return this._revealReference(e)},t.prototype.setModel=function(e){if(this._disposeOnNewModel=s.dispose(this._disposeOnNewModel),this._model=e,this._model)return this._onNewModel()},t.prototype._onNewModel=function(){var e=this;if(this._model.empty)return this.setTitle(""),this._messageContainer.innerHtml(n.localize(5,null)).show(),l.TPromise.as(void 0);this._messageContainer.hide(),this._decorationsManager=new D(this._preview,this._model),this._disposeOnNewModel.push(this._decorationsManager),this._disposeOnNewModel.push(this._model.onDidChangeReferenceRange(function(t){return e._tree.refresh(t)})),this._disposeOnNewModel.push(this._tree.addListener2(k.Events.FOCUSED,function(t){t instanceof M.OneReference&&(e._revealReference(t),e._onDidSelectReference.fire({element:t,kind:"show",source:"tree"}))})),this._disposeOnNewModel.push(this._tree.addListener2(k.Events.SELECTED,function(t){t instanceof M.OneReference&&e._onDidSelectReference.fire({element:t,kind:"goto",source:"tree"})})),this._disposeOnNewModel.push(this._tree.addListener2(k.Events.OPEN_TO_SIDE,function(t){t instanceof M.OneReference&&e._onDidSelectReference.fire({element:t,kind:"side",source:"tree"})})),this._disposeOnNewModel.push(this._preview.onMouseDown(function(t){2===t.event.detail&&e._onDidSelectReference.fire({element:e._getFocusedReference(),kind:t.event.ctrlKey||t.event.metaKey?"side":"open",source:"editor"})})),d.addClass(this.container,"results-loaded"),this._treeContainer.show(),this._previewContainer.show(),this._preview.layout(),this._tree.layout(),this.focus();var t=1===this._model.groups.length?this._model.groups[0]:this._model;return this._tree.setInput(t)},t.prototype._getFocusedReference=function(){var e=this._tree.getFocus();return e instanceof M.OneReference?e:e instanceof M.FileReferences&&e.children.length>0?e.children[0]:void 0},t.prototype._revealReference=function(e){var t=this;e.uri.scheme!==a.Schemas.inMemory?this.setTitle(e.name,o.getPathLabel(e.directory,this._contextService)):this.setTitle(n.localize(6,null));var r=this._textModelResolverService.createModelReference(e.uri);return l.TPromise.join([r,this._tree.reveal(e)]).then(function(n){var i=n[0];if(!t._model)return void i.dispose();t._previewModelReference.dispose(),t._previewModelReference=s.empty;var o=i.object;if(o){t._previewModelReference=i,t._preview.setModel(o.textEditorModel);var r=E.Range.lift(e.range).collapseToStart();t._preview.setSelection(r),t._preview.revealRangeInCenter(r)}else t._preview.setModel(t._previewNotAvailableMessage),i.dispose();t._tree.setSelection([e]),t._tree.setFocus(e)},i.onUnexpectedError)},t}(x.PeekViewWidget);t.ReferenceWidget=A}),define(d[175],h([0,1,310,10,4,30,62,12,14,19,52,47,56,97,160,29,90,510,68]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,m,v,_){"use strict";t.ctxReferenceSearchVisible=new l.RawContextKey("referenceSearchVisible",!1);var b=w=function(){function e(e,n,i,o,r,s,a,u,l,c,d){this._editorService=i,this._textModelResolverService=o,this._telemetryService=r,this._messageService=s,this._instantiationService=a,this._contextService=u,this._storageService=l,this._configurationService=c,this._peekViewService=d,this._requestIdPool=0,this._disposables=[],this._ignoreModelChangeEvent=!1,this._editor=e,this._referenceSearchVisible=t.ctxReferenceSearchVisible.bindTo(n)}return e.get=function(e){return e.getContribution(w.ID)},e.prototype.getId=function(){return w.ID},e.prototype.dispose=function(){this._widget&&(this._widget.dispose(),this._widget=null),this._editor=null},e.prototype.toggleWidget=function(e,t,i){var o,s=this;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))return null;this._referenceSearchVisible.set(!0),this._disposables.push(this._editor.onDidChangeModelLanguage(function(){s.closeWidget()})),this._disposables.push(this._editor.onDidChangeModel(function(){s._ignoreModelChangeEvent||s.closeWidget()}));var u="peekViewLayout",l=JSON.parse(this._storageService.get(u,void 0,"{}"));this._widget=new v.ReferenceWidget(this._editor,l,this._textModelResolverService,this._contextService,this._instantiationService),this._widget.setTitle(n.localize(0,null)),this._widget.show(e),this._disposables.push(this._widget.onDidClose(function(){t.cancel(),s._storageService.store(u,JSON.stringify(s._widget.layoutData)),s._widget=null,s.closeWidget()})),this._disposables.push(this._widget.onDidSelectReference(function(e){var t=e.element,n=e.kind;switch(n){case"open":if("editor"===e.source&&s._configurationService.lookup("editor.stablePeek").value)break;case"side":s._openReference(t,"side"===n);break;case"goto":i.onGoto?i.onGoto(t):s._gotoReference(t)}}));var c=++this._requestIdPool,d=t.then(function(t){if(c===s._requestIdPool&&s._widget){s._model&&s._model.dispose(),s._model=t;var n=Date.now();return s._disposables.push({dispose:function(){s._telemetryService.publicLog("zoneWidgetShown",{mode:"reference search",elapsedTime:Date.now()-n})}}),s._widget.setModel(s._model).then(function(){s._widget.setMetaTitle(i.getMetaTitle(s._model));var t=s._editor.getModel().uri,n={lineNumber:e.startLineNumber,column:e.startColumn},o=s._model.nearestReference(t,n);if(o)return s._widget.setSelection(o)})}},function(e){s._messageService.show(r.default.Error,e)}),h=a.stopwatch(a.fromPromise(d));h(function(e){return s._telemetryService.publicLog("findReferences",{duration:e,mode:s._editor.getModel().getLanguageIdentifier().language})})},e.prototype.closeWidget=function(){this._widget&&(this._widget.dispose(),this._widget=null),this._referenceSearchVisible.reset(),this._disposables=o.dispose(this._disposables),this._model&&(this._model.dispose(),this._model=null),this._editor.focus(),this._requestIdPool+=1},e.prototype._gotoReference=function(e){var t=this;this._widget.hide(),this._ignoreModelChangeEvent=!0;var n=e.uri,o=e.range;this._editorService.openEditor({resource:n,options:{selection:o}}).done(function(e){return t._ignoreModelChangeEvent=!1,e&&e.getControl()===t._editor?(t._widget.show(o),void t._widget.focus()):void t.closeWidget()},function(e){t._ignoreModelChangeEvent=!1,i.onUnexpectedError(e)})},e.prototype._openReference=function(e,t){var n=e.uri,i=e.range;this._editorService.openEditor({resource:n,options:{selection:i}},t),t||this.closeWidget()},e}();b.ID="editor.contrib.referencesController",b=w=y([g.editorContribution,C(1,l.IContextKeyService),C(2,s.IEditorService),C(3,_.ITextModelResolverService),C(4,d.ITelemetryService),C(5,c.IMessageService),C(6,u.IInstantiationService),C(7,p.IWorkspaceContextService),C(8,f.IStorageService),C(9,h.IConfigurationService),C(10,u.optional(m.IPeekViewService))],b),t.ReferencesController=b;var w}),define(d[512],h([0,1,294,17,10,31,18,30,9,6,24,62,80,52,3,2,13,16,29,463,175,92,4,90,19,68,373]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_,b,w,S,E,L,N,T,x){"use strict";var M=g.ModeContextKeys,I=g.EditorContextKeys,D=function(){function e(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=n}return e}();t.DefinitionActionConfig=D;var R=function(e){function t(t,n){var i=e.call(this,n)||this;return i._configuration=t,i}return m(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(p.IMessageService),o=e.get(d.IEditorService),r=t.getModel(),s=t.getPosition();return this.getDeclarationsAtPosition(r,s).then(function(e){if(e){for(var i=[],a=0;a<e.length;a++){var u=e[a];if(u&&u.range){var l=u.uri,c=u.range;n._configuration.filterCurrent&&l.toString()===r.uri.toString()&&f.Range.containsPosition(c,s)||i.push({uri:l,range:f.Range.collapseToStart(c)})}}if(0!==i.length)return n._onResult(o,t,new E.ReferencesModel(i))}},function(e){return i.show(a.default.Error,e),!1})},t.prototype.getDeclarationsAtPosition=function(e,t){return w.getDeclarationsAtPosition(e,t)},t.prototype._onResult=function(e,t,n){var i=this;if(this._configuration.openInPeek)this._openInPeek(e,t,n);else{var o=n.nearestReference(t.getModel().uri,t.getPosition());this._openReference(e,o,this._configuration.openToSide).then(function(t){t&&n.references.length>1?i._openInPeek(e,t,n):n.dispose()})}},t.prototype._openReference=function(e,t,n){var i=t.uri,o=t.range;return e.openEditor({resource:i,options:{selection:o,revealIfVisible:!n}},n).then(function(e){return e&&e.getControl()})},t.prototype._openInPeek=function(e,t,i){var o=this,r=S.ReferencesController.get(t);r?r.toggleWidget(t.getSelection(),l.TPromise.as(i),{getMetaTitle:function(e){return e.references.length>1&&n.localize(0,null,e.references.length)},onGoto:function(t){return r.closeWidget(),o._openReference(e,t,!1)}}):i.dispose()},t}(v.EditorAction);t.DefinitionAction=R;var k=s.isWeb?2118:70,O=H=function(e){function t(){return e.call(this,new D,{id:H.ID,label:n.localize(1,null),alias:"Go to Definition",precondition:T.ContextKeyExpr.and(M.hasDefinitionProvider,M.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:I.TextFocus,primary:k},menuOpts:{group:"navigation",order:1.1}})||this}return m(t,e),t}(R);O.ID="editor.action.goToDeclaration",O=H=y([v.editorAction],O),t.GoToDefinitionAction=O;var P=B=function(e){function t(){return e.call(this,new D(!0),{id:B.ID,label:n.localize(2,null),alias:"Open Definition to the Side",precondition:T.ContextKeyExpr.and(M.hasDefinitionProvider,M.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:I.TextFocus,primary:r.KeyChord(2089,k)}})||this}return m(t,e),t}(R);P.ID="editor.action.openDeclarationToTheSide",P=B=y([v.editorAction],P),t.OpenDefinitionToSideAction=P;var A=function(e){function t(){return e.call(this,new D(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:n.localize(3,null),alias:"Peek Definition",precondition:T.ContextKeyExpr.and(M.hasDefinitionProvider,N.PeekContext.notInPeekEditor,M.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:I.TextFocus,primary:582,linux:{primary:3140}},menuOpts:{group:"navigation",order:1.2}})||this}return m(t,e),t}(R);A=y([v.editorAction],A),t.PeekDefinitionAction=A;var W=U=function(e){function t(){return e.call(this,new D,{id:U.ID,label:n.localize(4,null),alias:"Go to Implementation",precondition:T.ContextKeyExpr.and(M.hasImplementationProvider,M.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:I.TextFocus,primary:2118},menuOpts:{group:"navigation",order:1.3}})||this}return m(t,e),t.prototype.getDeclarationsAtPosition=function(e,t){return w.getImplementationAtPosition(e,t)},t}(R);W.ID="editor.action.goToImplementation",W=U=y([v.editorAction],W),t.GoToImplementationAction=W;var F=z=function(e){function t(){return e.call(this,new D(!1,!0,!1),{id:z.ID,label:n.localize(5,null),alias:"Peek Implementation",precondition:T.ContextKeyExpr.and(M.hasImplementationProvider,M.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:I.TextFocus,primary:3142},menuOpts:{group:"navigation",order:1.3}})||this}return m(t,e),t.prototype.getDeclarationsAtPosition=function(e,t){return w.getImplementationAtPosition(e,t)},t}(R);F.ID="editor.action.peekImplementation",F=z=y([v.editorAction],F),t.PeekImplementationAction=F;var V=K=function(){function e(e,t,n){var o=this;this.textModelResolverService=t,this.modeService=n,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.Throttler,this.toUnhook.push(this.editor.onMouseDown(function(e){return o.onEditorMouseDown(e)})),this.toUnhook.push(this.editor.onMouseUp(function(e){return o.onEditorMouseUp(e)})),this.toUnhook.push(this.editor.onMouseMove(function(e){return o.onEditorMouseMove(e)})),this.toUnhook.push(this.editor.onKeyDown(function(e){return o.onEditorKeyDown(e)})),this.toUnhook.push(this.editor.onKeyUp(function(e){return o.onEditorKeyUp(e)})),this.toUnhook.push(this.editor.onDidChangeCursorSelection(function(e){return o.onDidChangeCursorSelection(e)})),this.toUnhook.push(this.editor.onDidChangeModel(function(e){return o.resetHandler()})),this.toUnhook.push(this.editor.onDidChangeModelContent(function(){return o.resetHandler()})),this.toUnhook.push(this.editor.onDidScrollChange(function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&o.resetHandler()}))}return e.prototype.onDidChangeCursorSelection=function(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this.resetHandler()},e.prototype.onEditorMouseMove=function(e,t){this.lastMouseMoveEvent=e,this.startFindDefinition(e,t)},e.prototype.startFindDefinition=function(e,t){var i=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var r=e.target.position,s=r?this.editor.getModel().getWordAtPosition(r):null;if(!s)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==s.startColumn||this.currentWordUnderMouse.endColumn!==s.endColumn||this.currentWordUnderMouse.word!==s.word){this.currentWordUnderMouse=s;var a=this.editor.captureState(g.CodeEditorStateFlag.Position,g.CodeEditorStateFlag.Value,g.CodeEditorStateFlag.Selection,g.CodeEditorStateFlag.Scroll);this.throttler.queue(function(){return a.validate(i.editor)?i.findDefinition(e.target):l.TPromise.as(null)}).then(function(e){if(!e||!e.length||!a.validate(i.editor))return void i.removeDecorations();if(e.length>1)i.addDecoration({startLineNumber:r.lineNumber,startColumn:s.startColumn,endLineNumber:r.lineNumber,endColumn:s.endColumn},n.localize(6,null,e.length));else{var t=e[0];if(!t.uri)return;i.textModelResolverService.createModelReference(t.uri).then(function(e){var n,o=e.object;if(o&&o.textEditorModel){var a=o.textEditorModel,l=Math.max(1,t.range.startLineNumber),c=void 0;c=f.Range.isEmpty(t.range)?Math.min(l+K.MAX_SOURCE_PREVIEW_LINES,a.getLineCount()):Math.min(t.range.endLineNumber,t.range.startLineNumber+K.MAX_SOURCE_PREVIEW_LINES,a.getLineCount());for(var d=a.getValueInRange({startLineNumber:l,startColumn:1,endLineNumber:c,endColumn:a.getLineMaxColumn(c)}).trim(),h=Number.MAX_VALUE,p=/^[ \t]*/,g=void 0,m=void 0;l<=c&&h>0;)m=a.getLineContent(l++),0!==m.trim().length&&(g=p.exec(m),h=Math.min(h,g[0].length));d=d.replace(new RegExp("^([ \\t]{"+h+"})","gm"),u.empty),c<a.getLineCount()&&(d+="\n…");var v=i.modeService.getModeIdByFilenameOrFirstLine(a.uri.fsPath);n={language:v,value:d}}e.dispose(),i.addDecoration({startLineNumber:r.lineNumber,startColumn:s.startColumn,endLineNumber:r.lineNumber,endColumn:s.endColumn},n)})}}).done(void 0,o.onUnexpectedError)}},e.prototype.addDecoration=function(e,t){var n={range:e,options:{inlineClassName:"goto-definition-link",hoverMessage:t}};this.decorations=this.editor.deltaDecorations(this.decorations,[n])},e.prototype.removeDecorations=function(){this.decorations.length>0&&(this.decorations=this.editor.deltaDecorations(this.decorations,[]))},e.prototype.onEditorKeyDown=function(e){this.lastMouseMoveEvent&&(e.keyCode===K.TRIGGER_KEY_VALUE||e.keyCode===K.TRIGGER_SIDEBYSIDE_KEY_VALUE&&e[K.TRIGGER_MODIFIER])?this.startFindDefinition(this.lastMouseMoveEvent,e):e[K.TRIGGER_MODIFIER]&&this.removeDecorations()},e.prototype.resetHandler=function(){this.lastMouseMoveEvent=null,this.hasTriggerKeyOnMouseDown=!1,this.removeDecorations()},e.prototype.onEditorMouseDown=function(e){this.hasTriggerKeyOnMouseDown=!!e.event[K.TRIGGER_MODIFIER]},e.prototype.onEditorMouseUp=function(e){var t=this;this.isEnabled(e)&&this.hasTriggerKeyOnMouseDown&&this.gotoDefinition(e.target,e.event.altKey).done(function(){t.removeDecorations()},function(e){t.removeDecorations(),o.onUnexpectedError(e)})},e.prototype.onEditorKeyUp=function(e){e.keyCode===K.TRIGGER_KEY_VALUE&&(this.removeDecorations(),this.currentWordUnderMouse=null)},e.prototype.isEnabled=function(e,t){return this.editor.getModel()&&(c.isIE||e.event.detail<=1)&&e.target.type===g.MouseTargetType.CONTENT_TEXT&&(e.event[K.TRIGGER_MODIFIER]||t&&t.keyCode===K.TRIGGER_KEY_VALUE)&&_.DefinitionProviderRegistry.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?w.getDeclarationsAtPosition(this.editor.getModel(),e.position):l.TPromise.as(null)},e.prototype.gotoDefinition=function(e,t){var n=t?P.ID:O.ID;return this.editor.setPosition(e.position),this.editor.getAction(n).run()},e.prototype.getId=function(){return K.ID},e.prototype.dispose=function(){this.toUnhook=L.dispose(this.toUnhook)},e}();V.ID="editor.contrib.gotodefinitionwithmouse",V.TRIGGER_MODIFIER=s.isMacintosh?"metaKey":"ctrlKey",V.TRIGGER_SIDEBYSIDE_KEY_VALUE=6,V.TRIGGER_KEY_VALUE=s.isMacintosh?57:5,V.MAX_SOURCE_PREVIEW_LINES=7,V=K=y([b.editorContribution,C(1,x.ITextModelResolverService),C(2,h.IModeService)],V);var H,B,U,z,K}),define(d[229],h([0,1,309,27,6,62,14,23,19,70,15,3,2,13,90,484,175,92]),function(e,t,n,i,o,r,s,a,u,l,c,d,h,p,f,g,v,_){"use strict";function b(e,t){var n=f.getOuterEditor(e,t);if(n){var i=v.ReferencesController.get(n);i&&i.closeWidget()}}var w=h.ModeContextKeys,S=h.EditorContextKeys,E={getMetaTitle:function(e){return e.references.length>1&&n.localize(0,null,e.references.length)}},L=M=function(){function e(e,t,n){n&&f.PeekContext.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return M.ID},e}();L.ID="editor.contrib.referenceController",L=M=y([p.commonEditorContribution,C(1,u.IContextKeyService),C(2,s.optional(f.IPeekViewService))],L),t.ReferenceController=L;var N=function(e){function t(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:n.localize(1,null),alias:"Find All References",precondition:u.ContextKeyExpr.and(w.hasReferenceProvider,f.PeekContext.notInPeekEditor,w.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:S.TextFocus,primary:1094},menuOpts:{group:"navigation",order:1.3}})||this}return m(t,e),t.prototype.run=function(e,t){var n=v.ReferencesController.get(t);if(n){var i=t.getSelection(),o=t.getModel(),r=g.provideReferences(o,i.getStartPosition()).then(function(e){return new _.ReferencesModel(e)});n.toggleWidget(i,r,E)}},t}(p.EditorAction);N=y([p.editorAction],N),t.ReferenceAction=N;var T=function(e,t,n){if(!(t instanceof i.default))throw new Error("illegal argument, uri");if(!n)throw new Error("illegal argument, position");return e.get(r.IEditorService).openEditor({resource:t}).then(function(e){var t=e.getControl();if(t&&"function"==typeof t.getEditorType){var i=v.ReferencesController.get(t);if(i){var r=g.provideReferences(t.getModel(),c.Position.lift(n)).then(function(e){return new _.ReferencesModel(e)}),s=new d.Range(n.lineNumber,n.column,n.lineNumber,n.column);return o.TPromise.as(i.toggleWidget(s,r,E))}}})},x=function(e,t,n,s){if(!(t instanceof i.default))throw new Error("illegal argument, uri expected");return e.get(r.IEditorService).openEditor({resource:t}).then(function(e){var t=e.getControl();if(t&&"function"==typeof t.getEditorType){var i=v.ReferencesController.get(t);if(i)return o.TPromise.as(i.toggleWidget(new d.Range(n.lineNumber,n.column,n.lineNumber,n.column),o.TPromise.as(new _.ReferencesModel(s)),E)).then(function(){return!0})}})};a.CommandsRegistry.registerCommand("editor.action.findReferences",T),a.CommandsRegistry.registerCommand("editor.action.showReferences",{handler:x,description:{description:"Show references at a position in a file",args:[{name:"uri",description:"The text document in which to show references",constraint:i.default},{name:"position",description:"The position at which to show",constraint:c.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array}]}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearch",weight:p.CommonEditorRegistry.commandWeight(50),primary:9,secondary:[1033],when:u.ContextKeyExpr.and(v.ctxReferenceSearchVisible,u.ContextKeyExpr.not("config.editor.stablePeek")),handler:b}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearchEditor",weight:p.CommonEditorRegistry.commandWeight(-101),primary:9,secondary:[1033],when:u.ContextKeyExpr.and(f.PeekContext.inPeekEditor,u.ContextKeyExpr.not("config.editor.stablePeek")),handler:b});var M}),define(d[260],h([0,1,168,170,449,362,450,451,452,454,455,456,125,459,462,512,464,467,386,468,427,470,471,472,428,475,478,229,486,487,93,238,493,489,494,423,495,460]),function(e,t){"use strict"}),define(d[515],h([0,1,140,508,509,42,260,483,480,481,469]),function(e,t,n,i,o,r){"use strict";r.DefaultConfig.editor.wrappingIndent="none",r.DefaultConfig.editor.folding=!1,r.DefaultConfig.editor.glyphMargin=!1;var s=self;s.monaco=n.createMonacoBaseAPI(),s.monaco.editor=i.createMonacoEditorAPI(),s.monaco.languages=o.createMonacoLanguagesAPI(),"undefined"!=typeof s.require&&"function"==typeof s.require.config&&s.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main"]})})}).call(this);
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-typescript version: 2.1.2(a210d77cf42d35831932c488f3869e7dbbcd995a)
* Released under the MIT license
* https://github.com/Microsoft/monaco-typescript/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/language/typescript/src/monaco.contribution",["require","exports","vs/editor/edcore.main"],function(e,t){"use strict";function n(){return new monaco.Promise(function(e,t){r(function(n){n.getTypeScriptWorker().then(e,t)})})}function i(){return new monaco.Promise(function(e,t){r(function(n){n.getJavaScriptWorker().then(e,t)})})}function o(){return{ModuleKind:c,JsxEmit:p,NewLineKind:u,ScriptTarget:f,ModuleResolutionKind:d,typescriptDefaults:S,javascriptDefaults:m,getTypeScriptWorker:n,getJavaScriptWorker:i}}function r(t){e(["vs/language/typescript/src/mode"],t)}var a=monaco.Emitter,s=function(){function e(e,t){this._onDidChange=new a,this._extraLibs=Object.create(null),this._workerMaxIdleTime=12e4,this.setCompilerOptions(e),this.setDiagnosticsOptions(t)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),e.prototype.getExtraLibs=function(){var e=Object.create(null);for(var t in this._extraLibs)e[t]=this._extraLibs[t];return Object.freeze(e)},e.prototype.addExtraLib=function(e,t){var n=this;if("undefined"==typeof t&&(t="ts:extralib-"+Date.now()),this._extraLibs[t])throw new Error(t+" already a extra lib");return this._extraLibs[t]=e,this._onDidChange.fire(this),{dispose:function(){delete n._extraLibs[t]&&n._onDidChange.fire(n)}}},e.prototype.getCompilerOptions=function(){return this._compilerOptions},e.prototype.setCompilerOptions=function(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setMaximunWorkerIdleTime=function(e){this._workerMaxIdleTime=e},e.prototype.getWorkerMaxIdleTime=function(){return this._workerMaxIdleTime},e}();t.LanguageServiceDefaultsImpl=s;var c;!function(e){e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015"}(c||(c={}));var p;!function(e){e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React"}(p||(p={}));var u;!function(e){e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed"}(u||(u={}));var l;!function(e){e[e.Unknown=0]="Unknown",e[e.JS=1]="JS",e[e.JSX=2]="JSX",e[e.TS=3]="TS",e[e.TSX=4]="TSX"}(l||(l={}));var f;!function(e){e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ESNext=5]="ESNext",e[e.Latest=5]="Latest"}(f||(f={}));var g;!function(e){e[e.Standard=0]="Standard",e[e.JSX=1]="JSX"}(g||(g={}));var d;!function(e){e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs"}(d||(d={}));var S=new s({allowNonTsExtensions:!0,target:f.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1}),m=new s({allowNonTsExtensions:!0,allowJs:!0,target:f.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1});monaco.languages.typescript=o(),monaco.languages.register({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"]}),monaco.languages.onLanguage("typescript",function(){r(function(e){return e.setupTypeScript(S)})}),monaco.languages.register({id:"javascript",extensions:[".js",".es6",".jsx"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"]}),monaco.languages.onLanguage("javascript",function(){r(function(e){return e.setupJavaScript(m)})})});
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-css version: 1.3.1(6787816d8e12533292fca5e861cc1769c775d1e7)
* Released under the MIT license
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/css/monaco.contribution",["require","exports","vs/editor/edcore.main"],e)}(function(e,n){function o(){return{cssDefaults:a,lessDefaults:g,scssDefaults:u}}function t(n){e(["vs/language/css/cssMode"],n)}var i=monaco.Emitter,r=function(){function e(e,n){this._onDidChange=new i,this._languageId=e,this.setDiagnosticsOptions(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!0,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e}();n.LanguageServiceDefaultsImpl=r;var s={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore","float":"ignore",idSelector:"ignore"}},a=new r("css",s),u=new r("scss",s),g=new r("less",s);monaco.languages.css=o(),monaco.languages.onLanguage("less",function(){t(function(e){return e.setupMode(g)})}),monaco.languages.onLanguage("scss",function(){t(function(e){return e.setupMode(u)})}),monaco.languages.onLanguage("css",function(){t(function(e){return e.setupMode(a)})})});
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-json version: 1.2.2(5618dbdb4f72c31da0555b463daa3b053decf40a)
* Released under the MIT license
* https://github.com/Microsoft/monaco-json/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/json/monaco.contribution",["require","exports","vs/editor/edcore.main"],e)}(function(e,n){function o(){return{jsonDefaults:r}}function t(n){e(["vs/language/json/jsonMode"],n)}var i=monaco.Emitter,s=function(){function e(e,n){this._onDidChange=new i,this._languageId=e,this.setDiagnosticsOptions(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!0,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e}();n.LanguageServiceDefaultsImpl=s;var a={validate:!0,allowComments:!0,schemas:[]},r=new s("json",a);monaco.languages.json=o(),monaco.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc"],aliases:["JSON","json"],mimetypes:["application/json"]}),monaco.languages.onLanguage("json",function(){t(function(e){return e.setupMode(r)})})});
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-html version: 1.2.1(f1b96cadd5996161d6caaa3dfdf7c39b381053e8)
* Released under the MIT license
* https://github.com/Microsoft/monaco-html/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var n=e(require,exports);void 0!==n&&(module.exports=n)}else"function"==typeof define&&define.amd&&define("vs/language/html/monaco.contribution",["require","exports","vs/editor/edcore.main"],e)}(function(e,n){function t(){return{htmlDefaults:m,razorDefaults:d,handlebarDefaults:p}}function o(n){e(["vs/language/html/htmlMode"],n)}var a=monaco.Emitter,r=function(){function e(e,n){this._onDidChange=new a,this._languageId=e,this.setOptions(n)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e}();n.LanguageServiceDefaultsImpl=r;var i={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},u={format:i,suggest:{html5:!0,angular1:!0,ionic:!0}},s={format:i,suggest:{html5:!0}},l={format:i,suggest:{html5:!0,razor:!0}},g="html",c="handlebars",f="razor",m=new r(g,u),d=new r(c,s),p=new r(f,l);monaco.languages.html=t(),monaco.languages.onLanguage(g,function(){o(function(e){return e.setupMode(m)})}),monaco.languages.onLanguage(c,function(){o(function(e){return e.setupMode(d)})}),monaco.languages.onLanguage(f,function(){o(function(e){return e.setupMode(p)})})});
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-languages version: 0.7.0(18916e97a4ff0f1b195d68d01d632631cc84d50e)
* Released under the MIT license
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/src/monaco.contribution",["require","exports","vs/editor/edcore.main"],function(e,s){function i(s){var i=l[s].module;return new o.Promise(function(a,t,l){e([i],function(e){o.languages.setMonarchTokensProvider(s,e.language),o.languages.setLanguageConfiguration(s,e.conf),a(void 0)},t)})}function a(e){return n[e]||(n[e]=i(e)),n[e]}function t(e){var s=e.id;l[s]=e,o.languages.register(e),o.languages.onLanguage(s,function(){a(s)})}var o="undefined"==typeof monaco?self.monaco:monaco,l={},n={};s.loadLanguage=a,t({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],module:"./bat"}),t({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],module:"./coffee"}),t({id:"c",extensions:[".c",".h"],aliases:["C","c"],module:"./cpp"}),t({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],module:"./cpp"}),t({id:"csharp",extensions:[".cs",".csx"],aliases:["C#","csharp"],module:"./csharp"}),t({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],module:"./dockerfile"}),t({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],module:"./fsharp"}),t({id:"go",extensions:[".go"],aliases:["Go"],module:"./go"}),t({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars"],mimetypes:["text/x-handlebars-template"],module:"./handlebars"}),t({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],module:"./html"}),t({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],module:"./ini"}),t({id:"jade",extensions:[".jade",".pug"],aliases:["Jade","jade"],module:"./jade"}),t({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],module:"./java"}),t({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],module:"./lua"}),t({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],module:"./markdown"}),t({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],module:"./objective-c"}),t({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],module:"./postiats"}),t({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],module:"./php"}),t({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],module:"./powershell"}),t({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",module:"./python"}),t({id:"r",extensions:[".r",".rhistory",".rprofile",".rt"],aliases:["R","r"],module:"./r"}),t({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],module:"./razor"}),t({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile"],aliases:["Ruby","rb"],module:"./ruby"}),t({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],module:"./swift"}),t({id:"sql",extensions:[".sql"],aliases:["SQL"],module:"./sql"}),t({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],module:"./vb"}),t({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],module:"./xml"}),t({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],module:"./less"}),t({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],module:"./scss"}),t({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],module:"./css"}),t({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml"],module:"./yaml"})});
define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/language/typescript/src/monaco.contribution","vs/language/css/monaco.contribution","vs/language/json/monaco.contribution","vs/language/html/monaco.contribution","vs/basic-languages/src/monaco.contribution"], function() {});
//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map