/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.14.6(6c8f02b41db9ae5c4d15df767d47755e5c73b9d5) * Released under the MIT license * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt *-----------------------------------------------------------*/ (function(){ var e,t=["exports","require","vs/base/common/lifecycle","vs/editor/common/core/range","vs/nls!vs/editor/editor.main","vs/nls","vs/base/common/strings","vs/base/browser/dom","vs/css!vs/editor/editor.main","vs/base/common/event","vs/base/common/errors","vs/editor/browser/editorExtensions","vs/editor/common/core/position","vs/base/common/winjs.base","vs/base/common/async","vs/platform/instantiation/common/instantiation","vs/platform/theme/common/themeService","vs/editor/common/modes","vs/base/common/platform","vs/platform/contextkey/common/contextkey","vs/editor/common/editorContextKeys","vs/editor/common/core/selection","vs/platform/theme/common/colorRegistry","vs/editor/browser/editorBrowser","vs/editor/common/model","vs/base/common/arrays","vs/base/browser/fastDomNode","vs/base/common/color","vs/base/common/objects","vs/editor/common/model/textModel","vs/base/browser/browser","vs/base/common/uri","vs/editor/browser/services/codeEditorService","vs/base/common/types","vs/platform/commands/common/commands","vs/editor/common/view/editorColorRegistry","vs/editor/browser/view/viewPart","vs/platform/notification/common/notification","vs/editor/common/controller/cursorCommon","vs/base/common/keyCodes","vs/base/common/cancellation","vs/editor/common/modes/languageConfigurationRegistry","vs/base/browser/mouseEvent","vs/base/common/scrollable","vs/platform/actions/common/actions","vs/platform/registry/common/platform","vs/base/browser/ui/widget","vs/editor/common/config/editorOptions","vs/editor/common/services/modelService","vs/platform/keybinding/common/keybinding","vs/base/common/paths","vs/platform/configuration/common/configuration","vs/base/browser/ui/aria/aria","vs/editor/common/core/editOperation","vs/editor/common/controller/cursorEvents","vs/base/browser/ui/scrollbar/scrollableElement","vs/base/browser/builder","vs/base/browser/keyboardEvent","vs/editor/common/modes/languageConfiguration","vs/editor/browser/view/dynamicViewOverlay","vs/editor/common/modes/nullMode","vs/base/common/network","vs/platform/opener/common/opener","vs/editor/common/viewModel/viewModel","vs/editor/common/services/modeService","vs/editor/browser/config/configuration","vs/editor/common/editorCommon","vs/base/common/actions","vs/editor/browser/core/editorState","vs/base/browser/ui/actionbar/actionbar","vs/base/common/map","vs/editor/common/services/editorWorkerService","vs/platform/storage/common/storage","vs/base/browser/globalMouseMoveMonitor","vs/base/browser/touch","vs/platform/markers/common/markers","vs/editor/common/commands/replaceCommand","vs/platform/contextview/browser/contextView","vs/editor/common/view/viewEvents","vs/base/common/htmlContent","vs/editor/common/viewModel/viewEventHandler","vs/base/parts/tree/browser/treeDefaults","vs/platform/configuration/common/configurationRegistry","vs/editor/common/core/characterClassifier","vs/editor/standalone/common/standaloneThemeService","vs/base/common/assert","vs/platform/telemetry/common/telemetry","vs/base/browser/event","vs/editor/common/view/renderingContext","vs/editor/common/controller/wordCharacterClassifier","vs/base/browser/ui/sash/sash","vs/editor/common/modes/supports","vs/platform/progress/common/progress","vs/base/parts/quickopen/common/quickOpen","vs/editor/common/core/uint","vs/editor/common/core/token","vs/editor/common/viewLayout/viewLineRenderer","vs/platform/keybinding/common/keybindingsRegistry","vs/editor/common/config/editorZoom","vs/editor/common/core/lineTokens","vs/editor/common/model/wordHelper","vs/editor/contrib/suggest/suggest","vs/base/common/filters","vs/platform/theme/common/styler","vs/editor/browser/widget/codeEditorWidget","vs/editor/common/modes/supports/richEditBrackets","vs/platform/instantiation/common/serviceCollection","vs/editor/common/services/resolverService","vs/editor/common/view/minimapCharRenderer","vs/editor/contrib/folding/foldingRanges","vs/editor/contrib/snippet/snippetParser","vs/base/common/decorators","vs/editor/common/core/stringBuilder","vs/editor/browser/view/viewLayer","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/browser/ui/inputbox/inputBox","vs/editor/browser/editorDom","vs/platform/log/common/log","vs/base/common/severity","vs/base/parts/quickopen/browser/quickOpenModel","vs/base/common/diff/diff","vs/editor/contrib/markdown/markdownRenderer","vs/editor/common/config/fontInfo","vs/editor/contrib/referenceSearch/referencesModel","vs/editor/common/modes/modesRegistry","vs/editor/common/viewLayout/lineDecorations","vs/editor/common/config/commonEditorConfig","vs/editor/browser/services/bulkEditService","vs/editor/standalone/browser/simpleServices","vs/editor/common/viewModel/prefixSumComputer","vs/base/common/idGenerator","vs/base/browser/htmlContentRenderer","vs/base/common/iterator","vs/editor/browser/controller/coreCommands","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/contrib/snippet/snippetController2","vs/editor/common/model/textModelSearch","vs/editor/contrib/codeAction/codeActionTrigger","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/editor/common/controller/cursorTypeOperations","vs/editor/common/controller/cursorWordOperations","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/editor/contrib/find/findModel","vs/editor/contrib/message/messageController","vs/editor/contrib/referenceSearch/peekViewWidget","vs/editor/standalone/browser/quickOpen/editorQuickOpen","vs/platform/list/browser/listService","vs/platform/workspace/common/workspace","vs/editor/contrib/referenceSearch/referencesController","vs/editor/contrib/comment/blockCommentCommand","vs/base/browser/ui/findinput/findInputCheckboxes","vs/editor/common/standalone/standaloneBase","vs/editor/common/view/overviewZoneManager","vs/base/common/glob","vs/platform/keybinding/common/keybindingResolver","vs/base/parts/tree/browser/treeImpl","vs/css!vs/editor/contrib/goToDefinition/goToDefinitionMouse","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/editor/common/editorAction","vs/base/common/worker/simpleWorker","vs/base/common/hacks","vs/base/common/keybindingLabels","vs/editor/browser/viewParts/margin/margin","vs/editor/browser/controller/textAreaState","vs/editor/browser/controller/textAreaInput","vs/base/common/linkedList","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/contrib/folding/syntaxRangeProvider","vs/editor/contrib/goToDefinition/clickLinkGesture","vs/editor/common/commands/shiftCommand","vs/editor/common/controller/cursorMoveOperations","vs/editor/contrib/colorPicker/color","vs/editor/contrib/colorPicker/colorDetector","vs/editor/contrib/goToDefinition/goToDefinition","vs/editor/contrib/parameterHints/provideSignatureHelp","vs/editor/common/controller/cursorDeleteOperations","vs/editor/contrib/hover/hoverOperation","vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/editor/contrib/wordOperations/wordOperations","vs/editor/contrib/hover/hoverWidgets","vs/editor/common/controller/cursorMoveCommands","vs/editor/common/modes/textToHtmlTokenizer","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/controller/mouseTarget","vs/editor/browser/widget/diffNavigator","vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/editor/common/services/resourceConfiguration","vs/editor/browser/widget/diffEditorWidget","vs/editor/common/services/editorWorkerServiceImpl","vs/editor/standalone/common/monarch/monarchCommon","vs/editor/common/viewModel/splitLinesCollection","vs/editor/contrib/zoneWidget/zoneWidget","vs/base/browser/iframe","vs/platform/clipboard/common/clipboardService","vs/platform/uriDisplay/common/uriDisplay","vs/editor/contrib/find/findController","vs/base/browser/ui/contextview/contextview","vs/editor/contrib/referenceSearch/referencesWidget","vs/base/browser/ui/iconLabel/iconLabel","vs/editor/contrib/goToDefinition/goToDefinitionCommands","vs/base/common/labels","vs/editor/standalone/browser/standaloneServices","vs/base/browser/ui/countBadge/countBadge","vs/editor/common/modes/supports/tokenization","vs/editor/common/modes/tokenizationRegistry","vs/css!vs/base/browser/ui/findinput/findInput","vs/css!vs/base/browser/ui/findinput/findInputCheckboxes","vs/css!vs/base/browser/ui/iconLabel/iconlabel","vs/editor/browser/viewParts/lines/rangeUtil","vs/editor/common/view/viewContext","vs/editor/common/view/viewEventDispatcher","vs/editor/editor.api","vs/css!vs/base/browser/ui/inputbox/inputBox","vs/css!vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/common/viewLayout/whitespaceComputer","vs/editor/common/viewLayout/linesLayout","vs/css!vs/base/browser/ui/list/list","vs/editor/common/model/mirrorTextModel","vs/editor/common/services/editorSimpleWorker","vs/css!vs/base/browser/ui/menu/menu","vs/css!vs/base/browser/ui/progressbar/progressbar","vs/base/browser/ui/progressbar/progressbar","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/viewParts/decorations/decorations","vs/css!vs/base/browser/ui/sash/sash","vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/base/common/stopwatch","vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/browser/viewParts/viewZones/viewZones","vs/css!vs/base/browser/ui/scrollbar/media/scrollbars","vs/editor/common/viewLayout/viewLayout","vs/editor/common/viewModel/viewModelDecorations","vs/editor/contrib/caretOperations/moveCaretCommand","vs/base/browser/ui/list/rangeMap","vs/editor/contrib/codeAction/codeActionWidget","vs/editor/contrib/colorPicker/colorPickerModel","vs/base/browser/ui/list/listView","vs/editor/contrib/comment/lineCommentCommand","vs/editor/contrib/dnd/dragAndDropCommand","vs/editor/contrib/find/findState","vs/editor/contrib/find/replaceAllCommand","vs/editor/contrib/find/replacePattern","vs/base/parts/tree/browser/treeView","vs/editor/contrib/folding/foldingModel","vs/editor/contrib/folding/hiddenRangeModel","vs/css!vs/base/parts/quickopen/browser/quickopen","vs/editor/contrib/folding/intializingRangeProvider","vs/editor/contrib/format/formattingEdit","vs/css!vs/base/parts/tree/browser/tree","vs/base/browser/ui/list/rowCache","vs/css!vs/editor/browser/controller/textAreaHandler","vs/editor/contrib/hover/modesGlyphHover","vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand","vs/editor/contrib/indentation/indentUtils","vs/editor/contrib/linesOperations/copyLinesCommand","vs/editor/contrib/linesOperations/deleteLinesCommand","vs/editor/contrib/linesOperations/sortLinesCommand","vs/editor/contrib/smartSelect/tokenTree","vs/css!vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/css!vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight","vs/editor/standalone/common/monarch/monarchCompile","vs/nls!vs/base/browser/ui/actionbar/actionbar","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/nls!vs/base/browser/ui/aria/aria","vs/css!vs/editor/browser/viewParts/lineNumbers/lineNumbers","vs/nls!vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/findinput/findInputCheckboxes","vs/css!vs/editor/browser/viewParts/lines/viewLines","vs/nls!vs/base/browser/ui/inputbox/inputBox","vs/css!vs/editor/browser/viewParts/linesDecorations/linesDecorations","vs/base/browser/ui/findinput/findInput","vs/nls!vs/base/browser/ui/list/listWidget","vs/base/browser/ui/list/listWidget","vs/nls!vs/base/browser/ui/menu/menu","vs/base/browser/ui/menu/menu","vs/nls!vs/base/common/keybindingLabels","vs/css!vs/editor/browser/viewParts/marginDecorations/marginDecorations","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/nls!vs/base/common/severity","vs/css!vs/editor/browser/viewParts/minimap/minimap","vs/nls!vs/base/parts/quickopen/browser/quickOpenModel","vs/css!vs/editor/browser/viewParts/overlayWidgets/overlayWidgets","vs/nls!vs/base/parts/quickopen/browser/quickOpenWidget","vs/base/parts/quickopen/browser/quickOpenWidget","vs/nls!vs/editor/browser/controller/coreCommands","vs/nls!vs/editor/browser/widget/codeEditorWidget","vs/nls!vs/editor/browser/widget/diffEditorWidget","vs/nls!vs/editor/browser/widget/diffReview","vs/nls!vs/editor/common/config/commonEditorConfig","vs/nls!vs/editor/common/config/editorOptions","vs/css!vs/editor/browser/viewParts/rulers/rulers","vs/css!vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/contrib/suggest/completionModel","vs/nls!vs/editor/common/controller/cursor","vs/nls!vs/editor/common/modes/modesRegistry","vs/nls!vs/editor/common/services/modelServiceImpl","vs/nls!vs/editor/common/view/editorColorRegistry","vs/nls!vs/editor/contrib/bracketMatching/bracketMatching","vs/nls!vs/editor/contrib/caretOperations/caretOperations","vs/nls!vs/editor/contrib/caretOperations/transpose","vs/nls!vs/editor/contrib/clipboard/clipboard","vs/nls!vs/editor/contrib/codeAction/codeActionCommands","vs/nls!vs/editor/contrib/comment/comment","vs/nls!vs/editor/contrib/contextmenu/contextmenu","vs/nls!vs/editor/contrib/cursorUndo/cursorUndo","vs/nls!vs/editor/contrib/find/findController","vs/nls!vs/editor/contrib/find/findWidget","vs/nls!vs/editor/contrib/folding/folding","vs/nls!vs/editor/contrib/fontZoom/fontZoom","vs/nls!vs/editor/contrib/format/formatActions","vs/nls!vs/editor/contrib/goToDefinition/goToDefinitionCommands","vs/nls!vs/editor/contrib/goToDefinition/goToDefinitionMouse","vs/nls!vs/editor/contrib/gotoError/gotoError","vs/nls!vs/editor/contrib/gotoError/gotoErrorWidget","vs/nls!vs/editor/contrib/hover/hover","vs/nls!vs/editor/contrib/hover/modesContentHover","vs/nls!vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/nls!vs/editor/contrib/linesOperations/linesOperations","vs/nls!vs/editor/contrib/links/links","vs/nls!vs/editor/contrib/message/messageController","vs/nls!vs/editor/contrib/multicursor/multicursor","vs/nls!vs/editor/contrib/parameterHints/parameterHints","vs/nls!vs/editor/contrib/parameterHints/parameterHintsWidget","vs/nls!vs/editor/contrib/referenceSearch/peekViewWidget","vs/nls!vs/editor/contrib/referenceSearch/referenceSearch","vs/nls!vs/editor/contrib/referenceSearch/referencesController","vs/nls!vs/editor/contrib/referenceSearch/referencesModel","vs/css!vs/editor/browser/viewParts/selections/selections","vs/nls!vs/editor/contrib/referenceSearch/referencesWidget","vs/nls!vs/editor/contrib/rename/rename","vs/nls!vs/editor/contrib/rename/renameInputField","vs/nls!vs/editor/contrib/smartSelect/smartSelect","vs/nls!vs/editor/contrib/snippet/snippetVariables","vs/editor/contrib/snippet/snippetVariables","vs/nls!vs/editor/contrib/suggest/suggestController","vs/nls!vs/editor/contrib/suggest/suggestWidget","vs/nls!vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode","vs/nls!vs/editor/contrib/wordHighlighter/wordHighlighter","vs/nls!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/nls!vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/nls!vs/editor/standalone/browser/quickOpen/gotoLine","vs/nls!vs/editor/standalone/browser/quickOpen/quickCommand","vs/nls!vs/editor/standalone/browser/quickOpen/quickOutline","vs/nls!vs/editor/standalone/browser/simpleServices","vs/nls!vs/editor/standalone/browser/standaloneCodeEditor","vs/nls!vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/nls!vs/platform/configuration/common/configurationRegistry","vs/nls!vs/platform/keybinding/common/abstractKeybindingService","vs/nls!vs/platform/list/browser/listService","vs/nls!vs/platform/markers/common/markers","vs/nls!vs/platform/theme/common/colorRegistry","vs/platform/contextview/browser/contextMenuHandler","vs/platform/contextview/browser/contextMenuService","vs/platform/instantiation/common/descriptors","vs/css!vs/editor/browser/viewParts/viewCursors/viewCursors","vs/css!vs/editor/browser/widget/media/diffEditor","vs/css!vs/editor/browser/widget/media/diffReview","vs/css!vs/editor/browser/widget/media/editor","vs/css!vs/editor/browser/widget/media/tokens","vs/css!vs/editor/contrib/bracketMatching/bracketMatching","vs/editor/common/modes/languageFeatureRegistry","vs/css!vs/editor/contrib/clipboard/clipboard","vs/css!vs/editor/contrib/codeAction/lightBulbWidget","vs/css!vs/editor/contrib/codelens/codelensWidget","vs/editor/common/model/textModelTokens","vs/css!vs/editor/contrib/colorPicker/colorPicker","vs/css!vs/editor/contrib/dnd/dnd","vs/css!vs/editor/contrib/find/findWidget","vs/editor/common/controller/cursorColumnSelection","vs/css!vs/editor/contrib/folding/folding","vs/base/browser/ui/octiconLabel/octiconLabel","vs/css!vs/editor/contrib/gotoError/gotoErrorWidget","vs/css!vs/editor/contrib/hover/hover","vs/css!vs/editor/contrib/links/links","vs/editor/common/controller/oneCursor","vs/editor/common/controller/cursorCollection","vs/editor/common/controller/cursor","vs/css!vs/editor/contrib/message/messageController","vs/css!vs/editor/contrib/parameterHints/parameterHints","vs/css!vs/editor/contrib/referenceSearch/media/peekViewWidget","vs/css!vs/editor/contrib/referenceSearch/media/referencesWidget","vs/editor/common/services/webWorker","vs/css!vs/editor/contrib/rename/renameInputField","vs/editor/common/view/runtimeMinimapCharRenderer","vs/css!vs/editor/contrib/snippet/snippetSession","vs/editor/common/viewModel/characterHardWrappingLineMapper","vs/editor/common/viewModel/viewModelImpl","vs/editor/contrib/codeAction/lightBulbWidget","vs/editor/contrib/folding/foldingDecorations","vs/editor/contrib/folding/indentRangeProvider","vs/editor/contrib/linesOperations/moveLinesCommand","vs/editor/contrib/smartSelect/tokenSelectionSupport","vs/css!vs/editor/contrib/suggest/media/suggest","vs/editor/standalone/browser/colorizer","vs/editor/standalone/common/monarch/monarchLexer","vs/css!vs/editor/contrib/zoneWidget/zoneWidget","vs/css!vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/contrib/snippet/snippetSession","vs/css!vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/contrib/links/getLinks","vs/css!vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/css!vs/editor/standalone/browser/quickOpen/gotoLine","vs/css!vs/editor/standalone/browser/quickOpen/quickOutline","vs/platform/actions/common/menu","vs/css!vs/editor/standalone/browser/standalone-tokens","vs/platform/dialogs/common/dialogs","vs/platform/environment/common/environment","vs/css!vs/platform/contextview/browser/contextMenuHandler","vs/platform/instantiation/common/instantiationService","vs/platform/keybinding/common/abstractKeybindingService","vs/editor/browser/config/charWidthReader","vs/editor/browser/config/elementSizeObserver","vs/platform/keybinding/common/resolvedKeybindingItem","vs/platform/keybinding/common/usLayoutResolvedKeybinding","vs/base/common/history","vs/base/common/diff/diffChange","vs/platform/markers/common/markerService","vs/editor/browser/services/abstractCodeEditorService","vs/base/common/mime","vs/base/browser/ui/list/splice","vs/base/browser/ui/scrollbar/scrollbarVisibilityController","vs/base/common/functional","vs/base/browser/ui/scrollbar/horizontalScrollbar","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/base/browser/ui/scrollbar/verticalScrollbar","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/core/rgba","vs/editor/browser/view/viewOverlays","vs/editor/browser/viewParts/viewCursors/viewCursor","vs/editor/common/services/languagesRegistry","vs/editor/common/services/modeServiceImpl","vs/base/common/winjs.polyfill.promise","vs/platform/configuration/common/configurationModels","vs/platform/contextkey/browser/contextKeyService","vs/base/common/graph","vs/editor/common/commands/surroundSelectionCommand","vs/editor/contrib/suggest/suggestMemory","vs/base/parts/quickopen/browser/quickOpenViewer","vs/base/common/hash","vs/base/parts/tree/browser/tree","vs/editor/browser/view/viewController","vs/editor/contrib/caretOperations/caretOperations","vs/editor/contrib/caretOperations/transpose","vs/editor/contrib/clipboard/clipboard","vs/editor/contrib/codeAction/codeAction","vs/editor/contrib/codeAction/codeActionModel","vs/editor/contrib/codelens/codelens","vs/base/common/collections","vs/base/parts/tree/browser/treeDnd","vs/editor/contrib/comment/comment","vs/editor/contrib/contextmenu/contextmenu","vs/editor/contrib/cursorUndo/cursorUndo","vs/editor/contrib/dnd/dnd","vs/editor/contrib/folding/folding","vs/editor/contrib/fontZoom/fontZoom","vs/editor/contrib/format/format","vs/editor/contrib/format/formatActions","vs/base/parts/tree/browser/treeModel","vs/editor/contrib/hover/getHover","vs/editor/contrib/linesOperations/linesOperations","vs/editor/common/diff/diffComputer","vs/editor/contrib/quickOpen/quickOpen","vs/editor/contrib/smartSelect/smartSelect","vs/base/parts/tree/browser/treeViewModel","vs/base/worker/defaultWorkerFactory","vs/editor/contrib/suggest/suggestModel","vs/css!vs/base/browser/builder","vs/base/common/numbers","vs/editor/contrib/wordPartOperations/wordPartOperations","vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard","vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast","vs/platform/contextview/browser/contextViewService","vs/platform/telemetry/common/telemetryUtils","vs/editor/browser/services/openerService","vs/base/common/marshalling","vs/css!vs/base/browser/ui/actionbar/actionbar","vs/editor/standalone/browser/quickOpen/quickOpenEditorWidget","vs/editor/common/model/editStack","vs/editor/browser/services/codeEditorServiceImpl","vs/editor/browser/viewParts/editorScrollbar/editorScrollbar","vs/editor/common/model/indentationGuesser","vs/editor/common/model/intervalTree","vs/editor/browser/controller/mouseHandler","vs/editor/browser/controller/pointerHandler","vs/editor/browser/view/viewOutgoingEvents","vs/editor/browser/viewParts/lines/viewLines","vs/editor/browser/viewParts/minimap/minimap","vs/editor/browser/viewParts/scrollDecoration/scrollDecoration","vs/editor/browser/viewParts/selections/selections","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight","vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight","vs/editor/browser/viewParts/indentGuides/indentGuides","vs/editor/common/model/textModelEvents","vs/editor/browser/controller/textAreaHandler","vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler","vs/editor/browser/viewParts/rulers/rulers","vs/editor/browser/viewParts/viewCursors/viewCursors","vs/editor/browser/view/viewImpl","vs/css!vs/base/browser/ui/aria/aria","vs/editor/browser/widget/diffReview","vs/css!vs/base/browser/ui/checkbox/checkbox","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/services/modelServiceImpl","vs/editor/contrib/bracketMatching/bracketMatching","vs/editor/contrib/codelens/codelensWidget","vs/editor/contrib/codelens/codelensController","vs/editor/contrib/colorPicker/colorPickerWidget","vs/editor/contrib/find/findDecorations","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/contrib/find/findOptionsWidget","vs/editor/contrib/gotoError/gotoErrorWidget","vs/editor/contrib/gotoError/gotoError","vs/editor/contrib/hover/modesContentHover","vs/editor/contrib/hover/hover","vs/editor/contrib/inPlaceReplace/inPlaceReplace","vs/editor/contrib/links/links","vs/base/browser/ui/checkbox/checkbox","vs/editor/contrib/codeAction/codeActionCommands","vs/editor/contrib/codeAction/codeActionContributions","vs/editor/contrib/parameterHints/parameterHintsWidget","vs/editor/contrib/parameterHints/parameterHints","vs/editor/common/modes/abstractMode","vs/editor/contrib/rename/renameInputField","vs/editor/contrib/rename/rename","vs/editor/contrib/suggest/suggestWidget","vs/editor/contrib/suggest/suggestController","vs/editor/contrib/wordHighlighter/wordHighlighter","vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp","vs/editor/standalone/browser/inspectTokens/inspectTokens","vs/css!vs/base/browser/ui/contextview/contextview","vs/editor/standalone/browser/quickOpen/gotoLine","vs/editor/standalone/browser/quickOpen/quickCommand","vs/editor/standalone/browser/quickOpen/quickOutline","vs/editor/standalone/browser/standaloneCodeServiceImpl","vs/editor/standalone/common/themes","vs/editor/standalone/browser/standaloneThemeServiceImpl","vs/editor/common/modes/languageSelector","vs/editor/common/modes/linkComputer","vs/platform/widget/common/contextScopedWidget","vs/platform/widget/browser/contextScopedHistoryWidget","vs/editor/contrib/find/findWidget","vs/base/browser/dnd","vs/editor/contrib/multicursor/multicursor","vs/editor/common/modes/supports/characterPair","vs/editor/common/modes/supports/indentRules","vs/editor/common/modes/supports/inplaceReplaceSupport","vs/editor/common/modes/supports/onEnter","vs/editor/contrib/goToDefinition/goToDefinitionMouse","vs/editor/contrib/referenceSearch/referenceSearch","vs/editor/editor.all","vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch","vs/css!vs/base/browser/ui/countBadge/countBadge","vs/editor/standalone/browser/standaloneCodeEditor","vs/editor/common/modes/supports/electricCharacter","vs/editor/standalone/browser/standaloneEditor","vs/editor/standalone/browser/standaloneLanguages","vs/base/common/marked/marked","vs/editor/edcore.main"],n=function(e){ for(var n=[],i=0,o=e.length;i0?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);return this.attachListeners(e,r,function(){return o._onLoad(e,n)},function(t){ return o._onLoadError(e,i,t)}),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=0)},e}(),o=function(){function e(e){var n=this;this._env=e,this.localize=function(e,i){for(var o=[],r=2;r=t.end||t.start>=e.end)return{start:0,end:0};var n=Math.max(e.start,t.start),i=Math.min(e.end,t.end);return i-n<=0?{start:0,end:0}:{start:n,end:i}}function i(e){return e.end-e.start<=0}function o(e,t){for(var o=[],r=0,s=t;r=a.range.end)){ if(e.end0&&i>n;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};var l=Math.round(Math.max(20,Math.floor(n*s/i))),u=(s-l)/(i-n),d=o*u;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:u,computedSliderPosition:Math.round(d)}},e.prototype._refreshComputedValues=function(){ var t=e._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition},e.prototype.getArrowSize=function(){return this._arrowSize},e.prototype.getScrollPosition=function(){return this._scrollPosition},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.getDesiredScrollPositionFromOffset=function(e){if(!this._computedIsNeeded)return 0;var t=e-this._arrowSize-this._computedSliderSize/2 ;return Math.round(t/this._computedSliderRatio)},e.prototype.getDesiredScrollPositionFromDelta=function(e){if(!this._computedIsNeeded)return 0;var t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)},e}();t.ScrollbarState=n}),define(t[25],n([1,0]),function(e,t){"use strict";function n(e,t){return i(e,t,0,e.length-1,[]),e}function i(e,t,n,o,r){if(!(o<=n)){var s=n+(o-n)/2|0;i(e,t,n,s,r),i(e,t,s+1,o,r),t(e[s],e[s+1])<=0||function(e,t,n,i,o,r){for(var s=n,a=i+1,l=n;l<=o;l++)r[l]=e[l];for(l=n;l<=o;l++)s>i?e[l]=r[a++]:a>o?e[l]=r[s++]:t(r[a],r[s])<0?e[l]=r[a++]:e[l]=r[s++]}(e,t,n,s,o,r)}}function o(e,t){for(var n=0;n0))return r;o=r-1}}return-(i+1)},t.findFirstInSorted=function(e,t){var n=0,i=e.length;if(0===i)return 0;for(;nt;o--)i.push(o);return i},t.arrayInsert=function(e,t,n){var i=e.slice(0,t),o=e.slice(t);return i.concat(n,o)}}),define(t[85],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ok=function(e,t){if(!e||null===e)throw new Error(t?"Assertion failed ("+t+")":"Assertion Failed")}}),define(t[453],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.prototype.hasOwnProperty;t.forEach=function(e,t){var i=function(i){if(n.call(e,i)&&!1===t({key:i,value:e[i]},function(){delete e[i]}))return{value:void 0}};for(var o in e){var r=i(o);if("object"==typeof r)return r.value}}}),define(t[27],n([1,0]),function(e,t){"use strict";function n(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,o){void 0===o&&(o=1),this.r=0|Math.min(255,Math.max(0,e)), this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}return e.equals=function(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a},e}();t.RGBA=i;var o=function(){function e(e,t,i,o){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a},e.fromRGBA=function(t){var n=t.r/255,i=t.g/255,o=t.b/255,r=t.a,s=Math.max(n,i,o),a=Math.min(n,i,o),l=0,u=0,d=(a+s)/2,c=s-a;if(c>0){switch(u=Math.min(d<=.5?c/(2*d):c/(2-2*d),1),s){case n:l=(i-o)/c+(i1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},e.toRGBA=function(t){var n,o,r,s=t.h/360,a=t.s,l=t.l,u=t.a;if(0===a)n=o=r=l;else{var d=l<.5?l*(1+a):l+a-l*a,c=2*l-d ;n=e._hue2rgb(c,d,s+1/3),o=e._hue2rgb(c,d,s),r=e._hue2rgb(c,d,s-1/3)}return new i(Math.round(255*n),Math.round(255*o),Math.round(255*r),u)},e}();t.HSLA=o;var r=function(){function e(e,t,i,o){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}return e.equals=function(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a},e.fromRGBA=function(t){var n,i=t.r/255,o=t.g/255,r=t.b/255,s=Math.max(i,o,r),a=s-Math.min(i,o,r),l=0===s?0:a/s;return n=0===a?0:s===i?((o-r)/a%6+6)%6:s===o?(r-i)/a+2:(i-o)/a+4,new e(Math.round(60*n),l,s,t.a)},e.toRGBA=function(e){var t=e.h,n=e.s,o=e.v,r=e.a,s=o*n,a=s*(1-Math.abs(t/60%2-1)),l=o-s,u=[0,0,0],d=u[0],c=u[1],h=u[2];return t<60?(d=s,c=a):t<120?(d=a,c=s):t<180?(c=s,h=a):t<240?(c=a,h=s):t<300?(d=a,h=s):t<360&&(d=s,h=a),d=Math.round(255*(d+l)),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),new i(d,c,h,r)},e}();t.HSVA=r;var s=function(){function e(e){ if(!e)throw new Error("Color needs a value");if(e instanceof i)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}return e.fromHex=function(t){return e.Format.CSS.parseHex(t)||e.red},Object.defineProperty(e.prototype,"hsla",{get:function(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hsva",{get:function(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)},enumerable:!0,configurable:!0}),e.prototype.equals=function(e){return!!e&&i.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)},e.prototype.getRelativeLuminance=function(){return n(.2126*e._relativeLuminanceForComponent(this.rgba.r)+.7152*e._relativeLuminanceForComponent(this.rgba.g)+.0722*e._relativeLuminanceForComponent(this.rgba.b),4)},e._relativeLuminanceForComponent=function(e){var t=e/255 ;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)},e.prototype.isLighter=function(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128},e.prototype.isLighterThan=function(e){return this.getRelativeLuminance()>e.getRelativeLuminance()},e.prototype.isDarkerThan=function(e){return this.getRelativeLuminance()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}(),a=function(){function e(e,t,n){void 0===n&&(n=null),this.OriginalSequence=e,this.ModifiedSequence=t,this.ContinueProcessingPredicate=n,this.m_forwardHistory=[],this.m_reverseHistory=[]}return e.prototype.ElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.OriginalElementsAreEqual=function(e,t){return this.OriginalSequence.getElementAtIndex(e)===this.OriginalSequence.getElementAtIndex(t)},e.prototype.ModifiedElementsAreEqual=function(e,t){ return this.ModifiedSequence.getElementAtIndex(e)===this.ModifiedSequence.getElementAtIndex(t)},e.prototype.ComputeDiff=function(e){return this._ComputeDiff(0,this.OriginalSequence.getLength()-1,0,this.ModifiedSequence.getLength()-1,e)},e.prototype._ComputeDiff=function(e,t,n,i,o){var r=this.ComputeDiffRecursive(e,t,n,i,[!1]);return o?this.ShiftChanges(r):r},e.prototype.ComputeDiffRecursive=function(e,t,i,r,s){for(s[0]=!1;e<=t&&i<=r&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&r>=i&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||i>r){var a=void 0;return i<=r?(o.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a=[new n.DiffChange(e,0,i,r-i+1)]):e<=t?(o.Assert(i===r+1,"modifiedStart should only be one more than modifiedEnd"),a=[new n.DiffChange(e,t-e+1,i,0)]):(o.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o.Assert(i===r+1,"modifiedStart should only be one more than modifiedEnd"),a=[]),a}var l=[0],u=[0],d=this.ComputeRecursionPoint(e,t,i,r,l,u,s),c=l[0],h=u[0] ;if(null!==d)return d;if(!s[0]){var p=this.ComputeDiffRecursive(e,c,i,h,s),f=[];return f=s[0]?[new n.DiffChange(c+1,t-(c+1)+1,h+1,r-(h+1)+1)]:this.ComputeDiffRecursive(c+1,t,h+1,r,s),this.ConcatenateChanges(p,f)}return[new n.DiffChange(e,t-e+1,i,r-i+1)]},e.prototype.WALKTRACE=function(e,t,i,o,r,a,l,u,d,c,h,p,f,g,m,v,_,y){var C,b=null,S=null,w=new s,E=t,L=i,x=f[0]-v[0]-o,N=Number.MIN_VALUE,I=this.m_forwardHistory.length-1;do{(C=x+e)===E||C=0&&(e=(d=this.m_forwardHistory[I])[0],E=1,L=d.length-1)}while(--I>=-1);if(b=w.getReverseChanges(),y[0]){var M=f[0]+1,D=v[0]+1;if(null!==b&&b.length>0){var T=b[b.length-1];M=Math.max(M,T.getOriginalEnd()),D=Math.max(D,T.getModifiedEnd())}S=[new n.DiffChange(M,p-M+1,D,m-D+1)]}else{w=new s,E=a,L=l,x=f[0]-v[0]-u,N=Number.MAX_VALUE, I=_?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{(C=x+r)===E||C=c[C+1]?(g=(h=c[C+1]-1)-x-u,h>N&&w.MarkNextChange(),N=h+1,w.AddOriginalElement(h+1,g+1),x=C+1-r):(g=(h=c[C-1])-x-u,h>N&&w.MarkNextChange(),N=h,w.AddModifiedElement(h+1,g+1),x=C-1-r),I>=0&&(r=(c=this.m_reverseHistory[I])[0],E=1,L=c.length-1)}while(--I>=-1);S=w.getChanges()}return this.ConcatenateChanges(b,S)},e.prototype.ComputeRecursionPoint=function(e,t,i,o,s,a,l){var u,d,c,h=0,p=0,f=0,g=0;e--,i--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];var m=t-e+(o-i),v=m+1,_=new Array(v),y=new Array(v),C=o-i,b=t-e,S=e-i,w=t-o,E=(b-C)%2==0;_[C]=e,y[b]=t,l[0]=!1;var L,x;for(c=1;c<=m/2+1;c++){var N=0,I=0;for(h=this.ClipDiagonalBound(C-c,c,C,v),p=this.ClipDiagonalBound(C+c,c,C,v),L=h;L<=p;L+=2){for(d=(u=L===h||LN+I&&(N=u,I=d),!E&&Math.abs(L-b)<=c-1&&u>=y[L])return s[0]=u,a[0]=d, x<=y[L]&&c<=1448?this.WALKTRACE(C,h,p,S,b,f,g,w,_,y,u,t,s,d,o,a,E,l):null}var M=(N-e+(I-i)-c)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(N,this.OriginalSequence,M))return l[0]=!0,s[0]=N,a[0]=I,M>0&&c<=1448?this.WALKTRACE(C,h,p,S,b,f,g,w,_,y,u,t,s,d,o,a,E,l):(e++,i++,[new n.DiffChange(e,t-e+1,i,o-i+1)]);for(f=this.ClipDiagonalBound(b-c,c,b,v),g=this.ClipDiagonalBound(b+c,c,b,v),L=f;L<=g;L+=2){for(d=(u=L===f||L=y[L+1]?y[L+1]-1:y[L-1])-(L-b)-w,x=u;u>e&&d>i&&this.ElementsAreEqual(u,d);)u--,d--;if(y[L]=u,E&&Math.abs(L-C)<=c&&u<=_[L])return s[0]=u,a[0]=d,x>=_[L]&&c<=1448?this.WALKTRACE(C,h,p,S,b,f,g,w,_,y,u,t,s,d,o,a,E,l):null}if(c<=1447){var D=new Array(p-h+2);D[0]=C-h+1,r.Copy(_,h,D,1,p-h+1),this.m_forwardHistory.push(D),(D=new Array(g-f+2))[0]=b-f+1,r.Copy(y,f,D,1,g-f+1),this.m_reverseHistory.push(D)}}return this.WALKTRACE(C,h,p,S,b,f,g,w,_,y,u,t,s,d,o,a,E,l)},e.prototype.ShiftChanges=function(e){var t;do{t=!1 ;for(u=0;u0,s=n.modifiedLength>0;n.originalStart+n.originalLength=0;u--){var n=e[u],i=0,o=0;if(u>0){var d=e[u-1];d.originalLength>0&&(i=d.originalStart+d.originalLength),d.modifiedLength>0&&(o=d.modifiedStart+d.modifiedLength)}for(var r=n.originalLength>0,s=n.modifiedLength>0,c=0,h=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength),p=1;;p++){ var f=n.originalStart-p,g=n.modifiedStart-p;if(fh&&(h=m,c=p)}n.originalStart-=c,n.modifiedStart-=c}return e},e.prototype._OriginalIsBoundary=function(e){if(e<=0||e>=this.OriginalSequence.getLength()-1)return!0;var t=this.OriginalSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._OriginalRegionIsBoundary=function(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1},e.prototype._ModifiedIsBoundary=function(e){if(e<=0||e>=this.ModifiedSequence.getLength()-1)return!0;var t=this.ModifiedSequence.getElementAtIndex(e);return"string"==typeof t&&/^\s*$/.test(t)},e.prototype._ModifiedRegionIsBoundary=function(e,t){ if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){var n=e+t;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1},e.prototype._boundaryScore=function(e,t,n,i){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(n,i)?1:0)},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),r.Copy(e,0,i,0,e.length-1),i[e.length-1]=n[0],r.Copy(t,1,i,e.length,t.length-1),i):(i=new Array(e.length+t.length),r.Copy(e,0,i,0,e.length),r.Copy(t,0,i,e.length,t.length),i)},e.prototype.ChangesOverlap=function(e,t,i){if(o.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),o.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 r=e.originalStart,s=e.originalLength,a=e.modifiedStart,l=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(l=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n.DiffChange(r,s,a,l),!0}return i[0]=null,!1},e.prototype.ClipDiagonalBound=function(e,t,n,i){if(e>=0&&e=n?{done:!0,value:void 0}:{done:!1,value:e[t++]}}}},e.map=function(e,t){return{next:function(){var n=e.next(),i=n.done,o=n.value;return{done:i,value:i?void 0:t(o)}}}},e.filter=function(e,t){return{next:function(){for(;;){var n=e.next(),i=n.done,o=n.value;if(i)return{done:i,value:void 0};if(t(o))return{done:i,value:o}}}}},e.forEach=t,e.collect=function(e){var n=[];return t(e,function(e){return n.push(e)}),n}}(t.Iterator||(t.Iterator={}));var n=function(){function e(e,t,n,i){void 0===t&&(t=0),void 0===n&&(n=e.length),void 0===i&&(i=t-1), this.items=e,this.start=t,this.end=n,this.index=i}return 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,o){return void 0===n&&(n=0),void 0===i&&(i=t.length),void 0===o&&(o=n-1),e.call(this,t,n,i,o)||this}return o(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 r=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=r}), define(t[420],n([1,0,132]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=10),this._initialize(e),this._limit=t,this._onChange()}return e.prototype.add=function(e){this._history.delete(e),this._history.add(e),this._onChange()},e.prototype.next=function(){return this._navigator.next()},e.prototype.previous=function(){return this._navigator.previous()},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.has=function(e){return this._history.has(e)},e.prototype._onChange=function(){this._reduceToLimit(),this._navigator=new n.ArrayNavigator(this._elements,0,this._elements.length,this._elements.length)},e.prototype._reduceToLimit=function(){var e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}, e.prototype._initialize=function(e){this._history=new Set;for(var t=0,n=e;t>>0)>>>0},t.createKeybinding=function(e,t){ if(0===e)return null;var i=(65535&e)>>>0,o=(4294901760&e)>>>16;return 0!==o?new l(n(i,t),n(o,t)):n(i,t)},t.createSimpleKeybinding=n;var a=function(){function e(e,t,n,i,o){this.type=1,this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyCode=o}return e.prototype.equals=function(e){return 1===e.type&&(this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode)},e.prototype.isModifierKey=function(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode},e.prototype.isDuplicateModifierCase=function(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode},e}();t.SimpleKeybinding=a;var l=function(){return function(e,t){this.type=2,this.firstPart=e,this.chordPart=t}}();t.ChordKeybinding=l;var u=function(){return function(e,t,n,i,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=n,this.metaKey=i,this.keyLabel=o, this.keyAriaLabel=r}}();t.ResolvedKeybindingPart=u;var d=function(){return function(){}}();t.ResolvedKeybinding=d}),define(t[2],n([1,0]),function(e,t){"use strict";function n(e){for(var t=[],i=1;i0)n.left||(n.left=new r,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new r,n.right.segment=i.value()),n=n.right;else{ if(!i.hasNext())break;i.next(),n.mid||(n.mid=new r,n.mid.segment=i.value()),n=n.mid}}var s=n.value;return n.value=t,n.key=e,s},e.prototype.get=function(e){for(var t=this._iter.reset(e),n=this._root;n;){var i=t.cmp(n.segment);if(i>0)n=n.left;else if(i<0)n=n.right;else{if(!t.hasNext())break;t.next(),n=n.mid}}return n?n.value:void 0},e.prototype.findSubstr=function(e){for(var t,n=this._iter.reset(e),i=this._root;i;){var o=n.cmp(i.segment);if(o>0)i=i.left;else if(o<0)i=i.right;else{if(!n.hasNext())break;n.next(),t=i.value||t,i=i.mid}}return i&&i.value||t},e.prototype.forEach=function(e){this._forEach(this._root,e)},e.prototype._forEach=function(e,t){e&&(this._forEach(e.left,t),e.value&&t(e.value,e.key),this._forEach(e.mid,t),this._forEach(e.right,t))},e}();t.TernarySearchTree=s;var a=function(){function e(){this.map=new Map,this.ignoreCase=!1}return e.prototype.set=function(e,t){this.map.set(this.toKey(e),t)},e.prototype.get=function(e){return this.map.get(this.toKey(e))},e.prototype.toKey=function(e){ var t=e.toString();return this.ignoreCase&&(t=t.toLowerCase()),t},e}();t.ResourceMap=a;var l;!function(e){e[e.None=0]="None",e[e.AsOld=1]="AsOld",e[e.AsNew=2]="AsNew"}(l=t.Touch||(t.Touch={}));var u=function(){function e(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}return e.prototype.clear=function(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),e.prototype.get=function(e,t){void 0===t&&(t=l.None);var n=this._map.get(e);if(n)return t!==l.None&&this.touch(n,t),n.value},e.prototype.set=function(e,t,n){void 0===n&&(n=l.None);var i=this._map.get(e);if(i)i.value=t,n!==l.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case l.None:this.addItemLast(i);break;case l.AsOld:this.addItemFirst(i);break;case l.AsNew:default:this.addItemLast(i)}this._map.set(e,i),this._size++}},e.prototype.forEach=function(e,t){ for(var n=this._head;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next},e.prototype.trimOld=function(e){if(!(e>=this.size))if(0!==e){for(var t=this._head,n=this.size;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t.previous=void 0}else this.clear()},e.prototype.addItemFirst=function(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e},e.prototype.addItemLast=function(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e},e.prototype.touch=function(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===l.AsOld||t===l.AsNew)if(t===l.AsOld){if(e===this._head)return;var n=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(n.previous=i,i.next=n),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===l.AsNew){ if(e===this._tail)return;var n=e.next,i=e.previous;e===this._head?(n.previous=void 0,this._head=n):(n.previous=i,i.next=n),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}},e.prototype.toJSON=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),e},e}();t.LinkedMap=u;var d=function(e){function t(t,n){void 0===n&&(n=1);var i=e.call(this)||this;return i._limit=t,i._ratio=Math.min(Math.max(0,n),1),i}return o(t,e),t.prototype.get=function(t){return e.prototype.get.call(this,t,l.AsNew)},t.prototype.set=function(t,n){e.prototype.set.call(this,t,n,l.AsNew),this.checkTrim()},t.prototype.checkTrim=function(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))},t}(u);t.LRUCache=d});/** * marked - a markdown parser * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) * https://github.com/markedjs/marked */ var r;(function(e){"use strict";function t(e){this.tokens=[],this.tokens.links={},this.options=e||g.defaults,this.rules=m.normal,this.options.pedantic?this.rules=m.pedantic:this.options.gfm&&(this.options.tables?this.rules=m.tables:this.rules=m.gfm)}function n(e,t){if(this.options=t||g.defaults,this.links=e,this.rules=v.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=v.pedantic:this.options.gfm&&(this.options.breaks?this.rules=v.breaks:this.rules=v.gfm)}function i(e){this.options=e||g.defaults}function o(){}function s(e){this.tokens=[],this.token=null,this.options=e||g.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options}function a(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(e){ return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function u(e,t){return e=e.source||e,t=t||"",{replace:function(t,n){return n=n.source||n,n=n.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(t,n),this},getRegex:function(){return new RegExp(e,t)}}}function d(e,t){return _[" "+e]||(/^[^:]+:\/*[^/]*$/.test(e)?_[" "+e]=e+"/":_[" "+e]=f(e,"/",!0)),e=_[" "+e],"//"===t.slice(0,2)?e.replace(/:[\s\S]*/,":")+t:"/"===t.charAt(0)?e.replace(/(:\/*[^/]*)[\s\S]*/,"$1")+t:e+t}function c(){}function h(e){for(var t,n,i=1;i=0&&"\\"===n[o];)i=!i;return i?"|":" |"}).split(/ \|/),i=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred:

"+a(e.message+"",!0)+"
";throw e}}var m={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:c,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,nptable:c,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/, table:c,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};m._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,m._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,m.def=u(m.def).replace("label",m._label).replace("title",m._title).getRegex(),m.bullet=/(?:[*+-]|\d+\.)/,m.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,m.item=u(m.item,"gm").replace(/bull/g,m.bullet).getRegex(),m.list=u(m.list).replace(/bull/g,m.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+m.def.source+")").getRegex(), m._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m._comment=//,m.html=u(m.html,"i").replace("comment",m._comment).replace("tag",m._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),m.paragraph=u(m.paragraph).replace("hr",m.hr).replace("heading",m.heading).replace("lheading",m.lheading).replace("tag",m._tag).getRegex(),m.blockquote=u(m.blockquote).replace("paragraph",m.paragraph).getRegex(),m.normal=h({},m),m.gfm=h({},m.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}), m.gfm.paragraph=u(m.paragraph).replace("(?!","(?!"+m.gfm.fences.source.replace("\\1","\\2")+"|"+m.list.source.replace("\\1","\\3")+"|").getRegex(),m.tables=h({},m.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),m.pedantic=h({},m.normal,{html:u("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m._comment).replace(/tag/g,"(?!(?: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").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),t.rules=m,t.lex=function(e,n){return new t(n).lex(e)},t.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)}, t.prototype.token=function(e,t){e=e.replace(/^ +$/gm,"");for(var n,i,o,r,s,a,l,u,d,c,h,g,v;e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:f(o,"\n")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))&&(a={type:"table",header:p(o[1].replace(/^ *| *\| *$/g,"")),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3]?o[3].replace(/\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(o[0].length), u=0;u ?/gm,""),this.token(o,t),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),h=(r=o[2]).length>1,this.tokens.push({type:"list_start",ordered:h,start:h?+r:""}),n=!1,c=(o=o[0].match(this.rules.item)).length,u=0;u1&&s.length>1||(e=o.slice(u+1).join("\n")+e,u=c-1)),i=n||/\n\n(?!\s*$)/.test(a),u!==c-1&&(n="\n"===a.charAt(a.length-1),i||(i=n)),v=void 0,(g=/^\[[ xX]\] /.test(a))&&(v=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),this.tokens.push({type:i?"loose_item_start":"list_item_start",task:g,checked:v}),this.token(a,!1),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),o[3]&&(o[3]=o[3].substring(1,o[3].length-1)),d=o[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[d]||(this.tokens.links[d]={href:o[2],title:o[3]});else if(t&&(o=this.rules.table.exec(e))&&(a={type:"table",header:p(o[1].replace(/^ *| *\| *$/g,"")), align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3]?o[3].replace(/(?: *\| *)?\n$/,"").split("\n"):[]}).header.length===a.align.length){for(e=e.substring(o[0].length),u=0;u?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:c,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)|^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)/,em:/^_([^\s][\s\S]*?[^\s_])_(?!_)|^_([^\s_][\s\S]*?[^\s])_(?!_)|^\*([^\s][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*][\s\S]*?[^\s])\*(?!\*)|^_([^\s_])_(?!_)|^\*([^\s*])\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:c,text:/^[\s\S]+?(?=[\\?@\[\]\\^_`{|}~])/g,v._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/, v._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,v.autolink=u(v.autolink).replace("scheme",v._scheme).replace("email",v._email).getRegex(),v._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,v.tag=u(v.tag).replace("comment",m._comment).replace("attribute",v._attribute).getRegex(),v._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,v._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f()\\]*\)|[^\s\x00-\x1f()\\])*?)/,v._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,v.link=u(v.link).replace("label",v._label).replace("href",v._href).replace("title",v._title).getRegex(),v.reflink=u(v.reflink).replace("label",v._label).getRegex(),v.normal=h({},v),v.pedantic=h({},v.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/, link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",v._label).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v._label).getRegex()}),v.gfm=h({},v.normal,{escape:u(v.escape).replace("])","~|])").getRegex(),url:u(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("email",v._email).getRegex(),_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:u(v.text).replace("]|","~]|").replace("|","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|").getRegex()}),v.breaks=h({},v.gfm,{br:u(v.br).replace("{2,}","*").getRegex(),text:u(v.gfm.text).replace("{2,}","*").getRegex()}),n.rules=v,n.output=function(e,t,i){return new n(t,i).output(e)},n.prototype.output=function(e){for(var t,i,o,r,s,l="";e;)if(s=this.rules.escape.exec(e))e=e.substring(s[0].length),l+=s[1];else if(s=this.rules.autolink.exec(e))e=e.substring(s[0].length),o="@"===s[2]?"mailto:"+(i=a(this.mangle(s[1]))):i=a(s[1]), l+=this.renderer.link(o,null,i);else if(this.inLink||!(s=this.rules.url.exec(e))){if(s=this.rules.tag.exec(e))!this.inLink&&/^/i.test(s[0])&&(this.inLink=!1),e=e.substring(s[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):a(s[0]):s[0];else if(s=this.rules.link.exec(e))e=e.substring(s[0].length),this.inLink=!0,o=s[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o))?(o=t[1],r=t[3]):r="":r=s[3]?s[3].slice(1,-1):"",o=o.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(s,{href:n.escapes(o),title:n.escapes(r)}),this.inLink=!1;else if((s=this.rules.reflink.exec(e))||(s=this.rules.nolink.exec(e))){if(e=e.substring(s[0].length),t=(s[2]||s[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=s[0].charAt(0),e=s[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(s,t),this.inLink=!1}else if(s=this.rules.strong.exec(e))e=e.substring(s[0].length), l+=this.renderer.strong(this.output(s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.em.exec(e))e=e.substring(s[0].length),l+=this.renderer.em(this.output(s[6]||s[5]||s[4]||s[3]||s[2]||s[1]));else if(s=this.rules.code.exec(e))e=e.substring(s[0].length),l+=this.renderer.codespan(a(s[2].trim(),!0));else if(s=this.rules.br.exec(e))e=e.substring(s[0].length),l+=this.renderer.br();else if(s=this.rules.del.exec(e))e=e.substring(s[0].length),l+=this.renderer.del(this.output(s[1]));else if(s=this.rules.text.exec(e))e=e.substring(s[0].length),l+=this.renderer.text(a(this.smartypants(s[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else s[0]=this.rules._backpedal.exec(s[0])[0],e=e.substring(s[0].length),"@"===s[2]?o="mailto:"+(i=a(s[0])):(i=a(s[0]),o="www."===s[1]?"http://"+i:i),l+=this.renderer.link(o,null,i);return l},n.escapes=function(e){return e?e.replace(n.rules._escapes,"$1"):e},n.prototype.outputLink=function(e,t){var n=t.href,i=t.title?a(t.title):null ;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,a(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,o=0;o.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.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?'
'+(n?e:a(e,!0))+"
\n":"
"+(n?e:a(e,!0))+"
"},i.prototype.blockquote=function(e){return"
\n"+e+"
\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){ return this.options.headerIds?"'+e+"\n":""+e+"\n"},i.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},i.prototype.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},i.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},i.prototype.checkbox=function(e){return" "},i.prototype.paragraph=function(e){return"

    "+e+"

    \n"},i.prototype.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},i.prototype.tablerow=function(e){return"\n"+e+"\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},i.prototype.strong=function(e){return""+e+""},i.prototype.em=function(e){ return""+e+""},i.prototype.codespan=function(e){return""+e+""},i.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},i.prototype.del=function(e){return""+e+""},i.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return n}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return n}this.options.baseUrl&&!y.test(e)&&(e=d(this.options.baseUrl,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return n}var o='
    "},i.prototype.image=function(e,t,n){this.options.baseUrl&&!y.test(e)&&(e=d(this.options.baseUrl,e));var i=''+n+'":">"},i.prototype.text=function(e){return e},o.prototype.strong=o.prototype.em=o.prototype.codespan=o.prototype.del=o.prototype.text=function(e){return e}, o.prototype.link=o.prototype.image=function(e,t,n){return""+n},o.prototype.br=function(){return""},s.parse=function(e,t){return new s(t).parse(e)},s.prototype.parse=function(e){this.inline=new n(e.links,this.options),this.inlineText=new n(e.links,h({},this.options,{renderer:new o})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.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,l(this.inlineText.output(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="";for(n="", e=0;e=0,i=d.indexOf("Macintosh")>=0,o=d.indexOf("Linux")>=0,s=!0, navigator.language}var c;!function(e){e[e.Web=0]="Web",e[e.Mac=1]="Mac",e[e.Linux=2]="Linux",e[e.Windows=3]="Windows"}(c=t.Platform||(t.Platform={}));t.isWindows=n,t.isMacintosh=i,t.isLinux=o,t.isNative=r,t.isWeb=s;var h="object"==typeof self?self:"object"==typeof global?global:{};t.globals=h;var p=null;t.setImmediate=function(e){return null===p&&(p=t.globals.setImmediate?t.globals.setImmediate.bind(t.globals):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):t.globals.setTimeout.bind(t.globals)),p(e)},t.OS=i?2:n?1:3}),define(t[228],n([1,0,18]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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.elapsed=function(){ return-1!==this._stopTime?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(t[6],n([1,0]),function(e,t){"use strict";function n(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\[\]\(\)\#]/g,"\\$&")}function i(e,t){if(!e||!t)return e;var n=t.length;if(0===n||0===e.length)return e;for(var i=0;e.indexOf(t,i)===i;)i+=n;return e.substring(i)}function o(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(-1===(r=e.lastIndexOf(t,o-1))||r+n!==o)break;if(0===r)return"";o=r}return e.substring(0,o)}function r(e,t){return et?1:0}function s(e){return e>=97&&e<=122}function a(e){return e>=65&&e<=90}function l(e){return s(e)||a(e)}function u(e,t,n){if(void 0===n&&(n=e.length),"string"!=typeof e||"string"!=typeof t)return!1;for(var i=0;i=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}Object.defineProperty(t,"__esModule",{value:!0}),t.empty="",t.isFalsyOrWhitespace=function(e){return!e||"string"!=typeof e||0===e.trim().length},t.pad=function(e,t,n){void 0===n&&(n="0");for(var i=""+e,o=[i],r=i.length;r=t.length?e:t[i]})},t.escape=function(e){return e.replace(/[<|>|&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})},t.escapeRegExpCharacters=n,t.trim=function(e,t){return void 0===t&&(t=" "),o(i(e,t),t)},t.ltrim=i,t.rtrim=o,t.convertSimple2RegExpPattern=function(e){ return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")},t.startsWith=function(e,t){if(e.length0?e.indexOf(t,n)===n:0===n&&e===t},t.createRegExp=function(e,t,i){if(void 0===i&&(i={}),!e)throw new Error("Cannot create regex from empty string");t||(e=n(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));var o="";return i.global&&(o+="g"),i.matchCase||(o+="i"),i.multiline&&(o+="m"),new RegExp(e,o)},t.regExpLeadsToEndlessLoop=function(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&e.exec("")&&0===e.lastIndex},t.firstNonWhitespaceIndex=function(e){for(var t=0,n=e.length;t=0;n--){var i=e.charCodeAt(n);if(32!==i&&9!==i)return n}return-1},t.compare=r,t.compareIgnoreCase=function(e,t){for(var n=Math.min(e.length,t.length),i=0;it.length?1:0},t.isLowerAsciiLetter=s,t.isUpperAsciiLetter=a,t.equalsIgnoreCase=function(e,t){return(e?e.length:0)===(t?t.length:0)&&u(e,t)},t.startsWithIgnoreCase=function(e,t){var n=t.length;return!(t.length>e.length)&&u(e,t,n)},t.commonPrefixLength=function(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n0&&65279===e.charCodeAt(0)},t.safeBtoa=function(e){return btoa(encodeURIComponent(e))},t.repeat=function(e,t){for(var n="",i=0;i0&&!h(e.charCodeAt(n-1)))return n}return e.length}function g(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=g(e,t,n+1,i+1);!o&&(r=f(t,r))60)return null;var n=function(e){for(var t=0,n=0,i=0,o=0,r=0,s=0;s.2&&t<.8&&i>.6&&o<.2}(n)){if(!function(e){var t=e.upperPercent;return 0===e.lowerPercent&&t>.6}(n))return null;t=t.toLowerCase()}var i=null,o=0;for(e=e.toLowerCase();o=e.length)return!1;switch(e.charCodeAt(t)){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:return!0;default:return!1}}function C(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function b(e,t,n,i){var o=e.length>100?100:e.length,r=t.length>100?100:t.length,s=0;for(void 0===n&&(n=o);sr)){for(var a=e.toLowerCase(),l=t.toLowerCase(),u=s,d=0;u1?1:c),f=x[u-1][d]+-1,g=x[u][d-1]+-1;g>=f?g>p?(x[u][d]=g,I[u][d]=4):g===p?(x[u][d]=g,I[u][d]=6):(x[u][d]=p,I[u][d]=2):f>p?(x[u][d]=f,I[u][d]=1):f===p?(x[u][d]=f,I[u][d]=3):(x[u][d]=p,I[u][d]=2)}if(M&&(console.log(_(x,e,o,t,r)),console.log(_(I,e,o,t,r)),console.log(_(N,e,o,t,r))),T=0,k=-100,R=s, O=i,S(o,r,o===r?1:0,new P,!1),0!==T)return[k,D.toArray()]}}}function S(e,t,n,i,o){if(!(T>=10||n<-25)){for(var r=0;e>R&&t>0;){var s=N[e][t],a=I[e][t];if(4===a)t-=1,o?n-=5:i.isEmpty()||(n-=1),o=!1,r=0;else{if(!(2&a))return;if(4&a&&S(e,t-1,i.isEmpty()?n:n-1,i.slice(),o),n+=s,e-=1,t-=1,i.unshift(t),o=!0,1===s){if(r+=1,e===R&&!O)return}else n+=1+r*(s-1),r=0}}T+=1,(n-=t>=3?9:3*t)>k&&(k=n,D=i)}}function w(e,t,n){return function(e,t,n,i){var o=b(e,t,i);if(o&&!n)return o;if(e.length>=3)for(var r=Math.min(7,e.length-1),s=1;s=e.length)return;var n=e[t],i=e[t+1];if(n===i)return;return e.slice(0,t)+i+n+e.slice(t+2)}(e,s);if(a){var l=b(a,t,i);l&&(l[0]-=3,(!o||l[0]>o[0])&&(o=l))}}return o}(e,t,!0,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.or=o,t.matchesPrefix=function(e,t,i){return!i||i.length0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0),t.matchesContiguousSubString=r,t.matchesSubString=s,t.isUpper=u, t.matchesCamelCase=m,t.fuzzyContiguousFilter=o(t.matchesPrefix,m,r);var E=o(t.matchesPrefix,m,s),L=new i.LRUCache(1e4);t.matchesFuzzy=function(e,i,o){if(void 0===o&&(o=!1),"string"!=typeof e||"string"!=typeof i)return null;var r=L.get(e);r||(r=new RegExp(n.convertSimple2RegExpPattern(e),"i"),L.set(e,r));var s=r.exec(i);return s?[{start:s.index,end:s.index+s[0].length}]:o?E(e,i):t.fuzzyContiguousFilter(e,i)},t.anyScore=function(e,t,n){e=e.toLowerCase(),t=t.toLowerCase();for(var i=[],o=0,r=0;r=0&&(i.push(s),o=s+1)}return[i.length,i]},t.createMatches=function(e){var t=[];if(!e)return t;for(var n,i=0,o=e;i0)&&".."!==m&&(p=-1===g?"":p.slice(0,g),d=!0)}else a(e,u,f,".")&&(s||p||f=65&&i<=90||i>=97&&i<=122)&&58===e.charCodeAt(1))return 47===(i=e.charCodeAt(2))||92===i?e.slice(0,2)+t:e.slice(0,2);var s=e.indexOf("://") ;if(-1!==s)for(s+=3;s=65&&t<=90||t>=97&&t<=122)&&e.length>2&&58===e.charCodeAt(1)){var n=e.charCodeAt(2);if(47===n||92===n)return!0}return!1}function d(e){return e&&47===e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.sep="/",t.nativeSep=n.isWindows?"\\":"/",t.dirname=o,t.basename=r,t.extname=function(e){var t=~(e=r(e)).lastIndexOf(".");return t?e.substring(~t):""};var c=/(\/\.\.?\/)|(\/\.\.?)$|^(\.\.?\/)|(\/\/+)|(\\)/,h=/(\\\.\.?\\)|(\\\.\.?)$|^(\.\.?\\)|(\\\\+)|(\/)/;t.normalize=s,t.getRoot=l,t.join=function(){for(var e="",n=0;n0){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 s(e)},t.isEqualOrParent=function(e,n,o,r){if(void 0===r&&(r=t.nativeSep),e===n)return!0;if(!e||!n)return!1;if(n.length>e.length)return!1;if(o){ if(!i.startsWithIgnoreCase(e,n))return!1;if(n.length===e.length)return!0;var s=n.length;return n.charAt(n.length-1)===r&&s--,e.charAt(s)===r}return n.charAt(n.length-1)!==r&&(n+=r),0===e.indexOf(n)},t.isAbsolute=function(e){return n.isWindows?u(e):d(e)},t.isAbsolute_win32=u,t.isAbsolute_posix=d}),define(t[161],n([1,0,50,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.basenameOrAuthority=function(e){return n.basename(e.path)||e.authority},t.isEqual=function(e,t,n){return!(e!==t)||!(!e||!t)&&(n?i.equalsIgnoreCase(e.toString(),t.toString()):e.toString()===t.toString())},t.dirname=function(e){var t=n.dirname(e.path);return e.authority&&t&&!n.isAbsolute(t)?null:e.with({path:t})}}),define(t[33],n([1,0]),function(e,t){"use strict";function n(e){return typeof e===l.string||e instanceof String}function i(e){return!(typeof e!==l.object||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function o(e){return typeof e===l.undefined}function r(e){return o(e)||null===e }function s(e){return typeof e===l.function}function a(e,t){if(n(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(s(t)){if(e instanceof t)return;if(!r(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}Object.defineProperty(t,"__esModule",{value:!0});var l={number:"number",string:"string",undefined:"undefined",object:"object",function:"function"};t.isArray=function(e){return Array.isArray?Array.isArray(e):!(!e||typeof e.length!==l.number||e.constructor!==Array)},t.isString=n,t.isObject=i,t.isNumber=function(e){return(typeof e===l.number||e instanceof Number)&&!isNaN(e)},t.isBoolean=function(e){return!0===e||!1===e},t.isUndefined=o,t.isUndefinedOrNull=r;var u=Object.prototype.hasOwnProperty;t.isEmptyObject=function(e){if(!i(e))return!1;for(var t in e)if(u.call(e,t))return!1;return!0}, t.isFunction=s,t.validateConstraints=function(e,t){for(var n=Math.min(e.length,t.length),i=0;i0;){var n=t.shift();Object.freeze(n);for(var i in n)if(a.call(n,i)){var o=n[i];"object"!=typeof o||Object.isFrozen(o)||t.push(o)}}return e};var a=Object.prototype.hasOwnProperty;t.mixin=o,t.assign=function(e){for(var t=[],n=1;n=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var s=m[r];void 0!==s?(-1!==i&&(n+=encodeURIComponent(e.substring(i,o)),i=-1),n+=s):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function r(e){var t ;return t=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?e.path[1].toLowerCase()+e.path.substr(2):e.path,n.isWindows&&(t=t.replace(/\//g,"\\")),t}function s(e,t){var n=t?function(e){for(var t=void 0,n=0;n=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){ (p=a.charCodeAt(1))>=65&&p<=90&&(a="/"+String.fromCharCode(p+32)+":"+a.substr(3))}else if(a.length>=2&&58===a.charCodeAt(1)){var p=a.charCodeAt(0);p>=65&&p<=90&&(a=String.fromCharCode(p+32)+":"+a.substr(2))}o+=n(a,!0)}return l&&(o+="?",o+=n(l,!1)),u&&(o+="#",o+=t?u:i(u,!1)),o}Object.defineProperty(t,"__esModule",{value:!0});var a,l=/^\w[\w\d+.-]*$/,u=/^\//,d=/^\/\//,c="",h="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,f=function(){function e(e,t,n,i,o){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=e||c,this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==h&&(t=h+t):t=h}return t}(this.scheme,n||c),this.query=i||c,this.fragment=o||c,function(e){if(e.scheme&&!l.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){ if(!u.test(e.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(d.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this))}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,"fsPath",{get:function(){return r(this)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,i=e.path,o=e.query,r=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===n?n=this.authority:null===n&&(n=c),void 0===i?i=this.path:null===i&&(i=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c), t===this.scheme&&n===this.authority&&i===this.path&&o===this.query&&r===this.fragment?this:new g(t,n,i,o,r)},e.parse=function(e){var t=p.exec(e);return t?new g(t[2]||c,decodeURIComponent(t[4]||c),decodeURIComponent(t[5]||c),decodeURIComponent(t[7]||c),decodeURIComponent(t[9]||c)):new g(c,c,c,c,c)},e.file=function(e){var t=c;if(n.isWindows&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){var i=e.indexOf(h,2);-1===i?(t=e.substring(2),e=h):(t=e.substring(2,i),e=e.substring(i)||h)}return new g("file",t,e,c,c)},e.from=function(e){return new g(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),s(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new g(t);return n._fsPath=t.fsPath,n._formatted=t.external,n}return t},e}();t.default=f;var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return o(t,e), Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=r(this)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?s(this,!0):(this._formatted||(this._formatted=s(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath),this._formatted&&(e.external=this._formatted),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},t}(f),m=(a={},a[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a)}),define(t[201],n([1,0,31,50,6,61,18,161]),function(e,t,n,i,o,r,s,a){"use strict";function l(e){return s.isWindows&&e&&":"===e[1]}function u(e){ return l(e)?e.charAt(0).toUpperCase()+e.slice(1):e}function d(e,t){if(s.isWindows||!e||!t)return e;var n=c.original===t?c.normalized:void 0;return n||(n=""+o.rtrim(t,i.sep)+i.sep,c={original:t,normalized:n}),(s.isLinux?o.startsWith(e,n):o.startsWithIgnoreCase(e,n))&&(e="~/"+e.substr(n.length)),e}Object.defineProperty(t,"__esModule",{value:!0}),t.getPathLabel=function(e,t,c){if(!e)return null;"string"==typeof e&&(e=n.default.file(e));var h=c?c.getWorkspaceFolder(e):null;if(h){var p=c.getWorkspace().folders.length>1,f=void 0;if(f=a.isEqual(h.uri,e,!s.isLinux)?"":i.normalize(o.ltrim(e.path.substr(h.uri.path.length),i.sep),!0),p){var g=h&&h.name?h.name:i.basename(h.uri.fsPath);f=f?g+" • "+f:g}return f}if(e.scheme!==r.Schemas.file&&e.scheme!==r.Schemas.untitled)return e.with({query:null,fragment:null}).toString(!0);if(l(e.fsPath))return i.normalize(u(e.fsPath),!0);var m=i.normalize(e.fsPath,!0);return!s.isWindows&&t&&(m=d(m,t.userHome)),m},t.getBaseLabel=function(e){if(!e)return null ;"string"==typeof e&&(e=n.default.file(e));var t=i.basename(e.path)||(e.scheme===r.Schemas.file?e.fsPath:e.path);return l(t)?u(t):t},t.normalizeDriveLetter=u;var c=Object.create(null);t.tildify=d}),define(t[480],n([1,0,31]),function(e,t,n){"use strict";function i(e,t){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return n.default.revive(e);case 2:return new RegExp(e.source,e.flags)}for(var o in e)Object.hasOwnProperty.call(e,o)&&(e[o]=i(e[o],t+1))}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e){var t=JSON.parse(e);return t=i(t,0)},t.revive=i});var s;!function(){var e=Object.create(null);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";return"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{}}),t("WinJS/Core/_BaseCoreUtils",["WinJS/Core/_Global"],function(e){ "use strict";var t=null;return{hasWinRT:!!e.Windows,markSupportedForProcessing:function(e){return e.supportedForProcessing=!0,e},_setImmediate:function(n){null===t&&(t=e.setImmediate?e.setImmediate.bind(e):"undefined"!=typeof process&&"function"==typeof process.nextTick?process.nextTick.bind(process):e.setTimeout.bind(e)),t(n)}}}),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}var s=e;s.Namespace||(s.Namespace=Object.create(Object.prototype));var a={uninitialized:1,working:2,initialized:3};Object.defineProperties(s.Namespace,{defineWithParent:{value:r,writable:!0,enumerable:!0,configurable:!0},define:{value:function(e,n){return r(t,e,n)},writable:!0,enumerable:!0,configurable:!0},_lazy:{value:function(e){var t,n,o=a.uninitialized;return{setName:function(e){t=e},get:function(){switch(o){case a.initialized:return n;case a.uninitialized:o=a.working;try{i("WinJS.Namespace._lazy:"+t+",StartTM"),n=e() }finally{i("WinJS.Namespace._lazy:"+t+",StopTM"),o=a.uninitialized}return e=null,o=a.initialized,n;case a.working:throw"Illegal: reentrancy on initialization";default:throw"Illegal"}},set:function(e){switch(o){case a.working:throw"Illegal: reentrancy on initialization";default:o=a.initialized,n=e}},enumerable:!0,configurable:!0}},writable:!0,enumerable:!0,configurable:!0},_moduleDefine:{value:function(e,i,r){var s=[e],a=null;return i&&(a=n(t,i),s.push(a)),o(s,r,i||""),a},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}e.Namespace.define("WinJS.Class",{define:t,derive:function(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)},mix:function(e){e=e||function(){};var t,n ;for(t=1,n=arguments.length;t0;){var o=this._deliveryQueue.shift(),r=o[0],s=o[1];try{"function"==typeof r?r.call(void 0,s):r[0].call(r[1],s)}catch(i){n.onUnexpectedError(i)}}}},e.prototype.dispose=function(){this._listeners&&(this._listeners=void 0),this._deliveryQueue&&(this._deliveryQueue.length=0),this._disposed=!0},e._noop=function(){},e}();t.Emitter=l;var u=function(){function e(){var e=this;this.hasListeners=!1,this.events=[],this.emitter=new l({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,n={event:e,listener:null};this.events.push(n),this.hasListeners&&this.hook(n);return o.toDisposable(i.once(function(){t.hasListeners&&t.unhook(n);var e=t.events.indexOf(n);t.events.splice(e,1)}))},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=u,t.once=function(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}},t.anyEvent=function(){for(var e=[],t=0;t1)&&u.fire(e),a=0},n)})},onLastListenerRemove:function(){o.dispose()}});return u.event};var d=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=d,t.mapEvent=s,t.filterEvent=a;var c=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(s(this._event,t))},e.prototype.filter=function(t){return new e(a(this._event,t))},e.prototype.on=function(e,t,n){return this._event(e,t,n)},e}();t.chain=function(e){return new c(e)};var h=function(){function e(){this.emitter=new l,this.event=this.emitter.event,this.disposable=o.Disposable.None}return Object.defineProperty(e.prototype,"input",{set:function(e){this.disposable.dispose(),this.disposable=e(this.emitter.fire,this.emitter)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.disposable.dispose(),this.emitter.dispose()},e}();t.Relay=h}),define(t[30],n([1,0,9]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Emitter,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._accessibilitySupport=0,this._onDidChangeAccessibilitySupport=new n.Emitter,this.onDidChangeAccessibilitySupport=this._onDidChangeAccessibilitySupport.event }return e.prototype.getZoomLevel=function(){return this._zoomLevel},e.prototype.getTimeSinceLastZoomLevelChanged=function(){return Date.now()-this._lastZoomLevelChangeTime},e.prototype.getPixelRatio=function(){var e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},e.prototype.getAccessibilitySupport=function(){return this._accessibilitySupport},e.INSTANCE=new e,e}();t.getZoomLevel=function(){return i.INSTANCE.getZoomLevel()},t.getTimeSinceLastZoomLevelChanged=function(){return i.INSTANCE.getTimeSinceLastZoomLevelChanged()},t.onDidChangeZoomLevel=function(e){return i.INSTANCE.onDidChangeZoomLevel(e)},t.getPixelRatio=function(){return i.INSTANCE.getPixelRatio()},t.getAccessibilitySupport=function(){return i.INSTANCE.getAccessibilitySupport()},t.onDidChangeAccessibilitySupport=function(e){ return i.INSTANCE.onDidChangeAccessibilitySupport(e)};var o=navigator.userAgent;t.isIE=o.indexOf("Trident")>=0,t.isEdge=o.indexOf("Edge/")>=0,t.isEdgeOrIE=t.isIE||t.isEdge,t.isFirefox=o.indexOf("Firefox")>=0,t.isWebKit=o.indexOf("AppleWebKit")>=0,t.isChrome=o.indexOf("Chrome")>=0,t.isSafari=-1===o.indexOf("Chrome")&&o.indexOf("Safari")>=0,t.isIPad=o.indexOf("iPad")>=0,t.isEdgeWebView=t.isEdge&&o.indexOf("WebView/")>=0,t.hasClipboardSupport=function(){if(t.isIE)return!1;if(t.isEdge){var e=o.indexOf("Edge/"),n=parseInt(o.substring(e+5,o.indexOf(".",e)),10);if(!n||n>=12&&n<=16)return!1}return!0}}),define(t[87],n([1,0,9]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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=function(e){return n.mapEvent(e,function(e){return e.preventDefault(),e.stopPropagation(),e})} }),define(t[57],n([1,0,39,18,30]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=new Array(230),s=new Array(112);!function(){function e(e,t){r[e]=t,s[t]=e}for(var t=0;t=o?Promise.resolve(n):(0,e[i++])().then(function(e){return t(e)?Promise.resolve(e):r()})};return r()},t.first=function(e,t,n){void 0===t&&(t=function(e){return!!e}),void 0===n&&(n=null);var o=0,r=e.length,s=function(){return o>=r?i.TPromise.as(n):(0,e[o++])().then(function(e){return t(e)?i.TPromise.as(e):s()})};return s()},t.setDisposableTimeout=function(e,t){for(var n=[],i=2;i=0;){if(r=s+o, (0===s||32===n.charCodeAt(s-1))&&32===n.charCodeAt(r))return this._lastStart=s,void(this._lastEnd=r+1);if(s>0&&32===n.charCodeAt(s-1)&&r===i)return this._lastStart=s-1,void(this._lastEnd=r);if(0===s&&r===i)return this._lastStart=0,void(this._lastEnd=r)}this._lastStart=-1}else this._lastStart=-1}else this._lastStart=-1},e.prototype.hasClass=function(e,t){return this._findClassName(e,t),-1!==this._lastStart},e.prototype.addClasses=function(e){for(var t=this,n=[],i=1;i0;){n.sort(E.sort);n.shift().execute()}o=!1};t.scheduleAtNextAnimationFrame=function(t,n){void 0===n&&(n=0);var o=new E(t,n);return e.push(o),i||(i=!0,p(r)),o},t.runAtThisOrScheduleAtNextAnimationFrame=function(e,i){if(o){var r=new E(e,i);return n.push(r),r}return t.scheduleAtNextAnimationFrame(e,i)}}();var L=16,x=function(e,t){return t},N=function(e){function t(t,n,o,r,s){void 0===r&&(r=x),void 0===s&&(s=L);var a=e.call(this)||this,l=null,u=0,d=a._register(new i.TimeoutTimer),c=function(){u=(new Date).getTime(),o(l),l=null} ;return a._register(h(t,n,function(e){l=r(l,e);var t=(new Date).getTime()-u;t>=s?(d.cancel(),c()):d.setIfNotSet(c,s-t)})),a}return o(t,e),t}(s.Disposable);t.addDisposableThrottledListener=function(e,t,n,i,o){return new N(e,t,n,i,o)},t.getComputedStyle=f;var I=function(e,t){return parseFloat(t)||0};t.getClientArea=function(e){if(e!==document.body)return new D(e.clientWidth,e.clientHeight);if(window.innerWidth&&window.innerHeight)return new D(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientWidth)return new D(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new D(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")};var M={getBorderLeftWidth:function(e){return g(e,"border-left-width","borderLeftWidth")},getBorderRightWidth:function(e){ return g(e,"border-right-width","borderRightWidth")},getBorderTopWidth:function(e){return g(e,"border-top-width","borderTopWidth")},getBorderBottomWidth:function(e){return g(e,"border-bottom-width","borderBottomWidth")},getPaddingLeft:function(e){return g(e,"padding-left","paddingLeft")},getPaddingRight:function(e){return g(e,"padding-right","paddingRight")},getPaddingTop:function(e){return g(e,"padding-top","paddingTop")},getPaddingBottom:function(e){return g(e,"padding-bottom","paddingBottom")},getMarginLeft:function(e){return g(e,"margin-left","marginLeft")},getMarginTop:function(e){return g(e,"margin-top","marginTop")},getMarginRight:function(e){return g(e,"margin-right","marginRight")},getMarginBottom:function(e){return g(e,"margin-bottom","marginBottom")},__commaSentinel:!1},D=function(){return function(e,t){this.width=e,this.height=t}}();t.Dimension=D,t.getTopLeftOffset=function(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=f(e);o&&(i-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(i+=M.getBorderLeftWidth(e),n+=M.getBorderTopWidth(e),n+=e.offsetTop,i+=e.offsetLeft,t=e.offsetParent)}return{left:i,top:n}},t.getDomNodePagePosition=function(e){var n=e.getBoundingClientRect();return{left:n.left+t.StandardWindow.scrollX,top:n.top+t.StandardWindow.scrollY,width:n.width,height:n.height}},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.getTotalWidth=function(e){ var t=M.getMarginLeft(e)+M.getMarginRight(e);return e.offsetWidth+t},t.getContentWidth=function(e){var t=M.getBorderLeftWidth(e)+M.getBorderRightWidth(e),n=M.getPaddingLeft(e)+M.getPaddingRight(e);return e.offsetWidth-t-n},t.getContentHeight=function(e){var t=M.getBorderTopWidth(e)+M.getBorderBottomWidth(e),n=M.getPaddingTop(e)+M.getPaddingBottom(e);return e.offsetHeight-t-n},t.getTotalHeight=function(e){var t=M.getMarginTop(e)+M.getMarginBottom(e);return e.offsetHeight+t},t.isAncestor=function(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1},t.findParentWithClass=function(e,n,i){for(;e;){if(t.hasClass(e,n))return e;if(i)if("string"==typeof i){if(t.hasClass(e,i))return null}else if(e===i)return null;e=e.parentNode}return null},t.createStyleSheet=m;var T=null;t.createCSSRule=function(e,t,n){void 0===n&&(n=v()),n&&t&&n.sheet.insertRule(e+"{"+t+"}",0)},t.removeCSSRulesContainingSelector=function(e,t){if(void 0===t&&(t=v()),t){for(var n=function(e){ return e&&e.sheet&&e.sheet.rules?e.sheet.rules:e&&e.sheet&&e.sheet.cssRules?e.sheet.cssRules:[]}(t),i=[],o=0;o=0;o--)t.sheet.deleteRule(i[o])}},t.isHTMLElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},t.EventType={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",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",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",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:a.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:a.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:a.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=function(e){for(var t=[],n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)t[n]=e.scrollTop,e=e.parentNode;return t},t.restoreParentsScrollTop=function(e,t){for(var n=0;e&&e.nodeType===e.ELEMENT_NODE;n++)e.scrollTop!==t[n]&&(e.scrollTop=t[n]),e=e.parentNode};var k=function(){function e(e){var n=this;this._onDidFocus=new d.Emitter,this.onDidFocus=this._onDidFocus.event,this._onDidBlur=new d.Emitter,this.onDidBlur=this._onDidBlur.event,this.disposables=[];var i=!1,o=!1;c.domEvent(e,t.EventType.FOCUS,!0)(function(){o=!1,i||(i=!0,n._onDidFocus.fire())},null,this.disposables), c.domEvent(e,t.EventType.BLUR,!0)(function(){i&&(o=!0,window.setTimeout(function(){o&&(o=!1,i=!1,n._onDidBlur.fire())},0))},null,this.disposables)}return e.prototype.dispose=function(){this.disposables=s.dispose(this.disposables),this._onDidFocus.dispose(),this._onDidBlur.dispose()},e}();t.trackFocus=function(e){return new k(e)},t.append=function(e){for(var t=[],n=1;n0},t.prototype.startMonitoring=function(e,t,n){var o=this;if(!this.isMonitoring()){this.mouseMoveEventMerger=e,this.mouseMoveCallback=t,this.onStopCallback=n;for(var a=r.IframeUtils.getSameOriginWindowChain(),l=0;l"},c.link=function(t,n,i){ return t===i&&(i=r.removeMarkdownEscapes(i)),n=r.removeMarkdownEscapes(n),!(t=r.removeMarkdownEscapes(t))||t.match(/^data:|javascript:/i)||t.match(/^command:/i)&&!e.isTrusted?i:''+i+""},c.paragraph=function(e){return"

    "+e+"

    "},t.codeBlockRenderer&&(c.code=function(e,n){var r=t.codeBlockRenderer(n,e),s=i.defaultGenerator.nextId(),a=Promise.all([r,d]).then(function(e){var t=e[0],n=u.querySelector('div[data-code="'+s+'"]');n&&(n.innerHTML=t)}).catch(function(e){});return t.codeBlockRenderCallback&&a.then(t.codeBlockRenderCallback),'
    '+o.escape(e)+"
    "}),t.actionHandler&&t.actionHandler.disposeables.push(n.addStandardDisposableListener(u,"click",function(e){var n=e.target;if("A"===n.tagName||(n=n.parentElement)&&"A"===n.tagName){var i=n.dataset.href;i&&t.actionHandler.callback(i,e)}}));var h={sanitize:!0,renderer:c};return u.innerHTML=s.marked(e.value,h),l(),u};var c=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}()});var a=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(t[74],n([1,0,25,2,7,111]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(s=t.EventType||(t.EventType={}));var l=function(){function e(){var e=this;this.toDispose=[],this.activeTouches={}, this.handle=null,this.targets=[],this.toDispose.push(o.addDisposableListener(document,"touchstart",function(t){return e.onTouchStart(t)})),this.toDispose.push(o.addDisposableListener(document,"touchend",function(t){return e.onTouchEnd(t)})),this.toDispose.push(o.addDisposableListener(document,"touchmove",function(t){return e.onTouchMove(t)}))}return e.addTarget=function(t){e.isTouchDevice()&&(e.INSTANCE||(e.INSTANCE=new e),e.INSTANCE.targets.push(t))},e.isTouchDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0},e.prototype.dispose=function(){this.handle&&(this.handle.dispose(),i.dispose(this.toDispose),this.handle=null)},e.prototype.onTouchStart=function(e){var t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(var n=0,i=e.targetTouches.length;n=e.HOLD_DELAY&&Math.abs(d.initialPageX-n.tail(d.rollingPageX))<30&&Math.abs(d.initialPageY-n.tail(d.rollingPageY))<30){var h=a.newGestureEvent(s.Contextmenu,d.initialTarget) ;h.pageX=n.tail(d.rollingPageX),h.pageY=n.tail(d.rollingPageY),a.dispatchEvent(h)}else if(1===o){var p=n.tail(d.rollingPageX),f=n.tail(d.rollingPageY),g=n.tail(d.rollingTimestamps)-d.rollingTimestamps[0],m=p-d.rollingPageX[0],v=f-d.rollingPageY[0],_=a.targets.filter(function(e){return d.initialTarget instanceof Node&&e.contains(d.initialTarget)});a.inertia(_,i,Math.abs(m)/g,m>0?1:-1,p,Math.abs(v)/g,v>0?1:-1,f)}a.dispatchEvent(a.newGestureEvent(s.End,d.initialTarget)),delete a.activeTouches[u.identifier]},a=this,l=0,u=t.changedTouches.length;l0&&(g=!1,p=r*i*h),l>0&&(g=!1,f=u*l*h);var m=c.newGestureEvent(s.Change);m.translationX=p,m.translationY=f,t.forEach(function(e){return e.dispatchEvent(m)}),g||c.inertia(t,o,i,r,a+p,l,u,d+f)})},e.prototype.onTouchMove=function(e){for(var t=Date.now(),i=0,o=e.changedTouches.length;i3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(r.pageX),a.rollingPageY.push(r.pageY),a.rollingTimestamps.push(t)}else console.warn("end of an UNKNOWN touch",r)}this.dispatched&&(e.preventDefault(), e.stopPropagation(),this.dispatched=!1)},e.SCROLL_FRICTION=-.005,e.HOLD_DELAY=700,a([r.memoize],e,"isTouchDevice",null),e}();t.Gesture=l}),define(t[138],n([1,0,7,28,376]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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(t,n,o,r){void 0===n&&(n=[]),void 0===o&&(o=""),t||(t=""),r&&(t=e.escapeNewLines(t,n)),this.didEverRender&&this.text===t&&this.title===o&&i.equals(this.highlights,n)||(Array.isArray(n)||(n=[]),this.text=t,this.title=o,this.highlights=n,this.render())},e.prototype.render=function(){n.clearNode(this.domNode);for(var e,t=[],i=0,r=0;r"), t.push(o.renderOcticons(this.text.substring(i,e.start))),t.push(""),i=e.end),t.push(''),t.push(o.renderOcticons(this.text.substring(e.start,e.end))),t.push(""),i=e.end);i"),t.push(o.renderOcticons(this.text.substring(i))),t.push("")),this.domNode.innerHTML=t.join(""),this.domNode.title=this.title,this.didEverRender=!0},e.prototype.dispose=function(){this.text=null,this.highlights=null},e.escapeNewLines=function(e,t){var n=0,i=0;return e.replace(/\r\n|\r|\n/,function(e,o){i="\r\n"===e?-1:0,o+=n;for(var r=0,s=t;r=o&&(a.start+=i),a.end>=o&&(a.end+=i))}return n+=i,"⏎"})},e}();t.HighlightedLabel=r}),define(t[253],n([1,0,7]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.renderers=e,this.cache=new Map}return e.prototype.alloc=function(e){var t=this.getTemplateCache(e).pop();if(!t){var i=n.$(".monaco-list-row");t={domNode:i, templateId:e,templateData:this.renderers.get(e).renderTemplate(i)}}return t},e.prototype.release=function(e){e&&this.releaseRow(e)},e.prototype.releaseRow=function(e){var t=e.domNode,i=e.templateId;n.removeClass(t,"scrolling"),function(e){try{e.parentElement.removeChild(e)}catch(e){}}(t);this.getTemplateCache(i).push(e)},e.prototype.getTemplateCache=function(e){var t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t},e.prototype.garbageCollect=function(){var e=this;this.renderers&&(this.cache.forEach(function(t,n){for(var i=0,o=t;i0;n--){var r=e.charCodeAt(n-1);if(47===r||92===r)break}t=e.substr(n)}var s=o.indexOf(t);return-1!==s?i[s]:null};a.basenames=o,a.patterns=i,a.allBasenames=o;var l=e.filter(function(e){return!e.basenames});return l.push(a),l }Object.defineProperty(t,"__esModule",{value:!0});var v="**",_="/",y="[/\\\\]",C="[^/\\\\]",b=/\//g;t.splitGlobAware=l;var S=/^\*\*\/\*\.[\w\.-]+$/,w=/^\*\*\/([\w\.-]+)\/?$/,E=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,L=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,x=/^\*\*((\/[\w\.-]+)+)\/?$/,N=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,I=new r.LRUCache(1e4),M=function(){return!1},D=function(){return null};t.match=function(e,t,n){return!(!e||!t)&&f(e)(t,void 0,n)},t.parse=f,t.isRelativePattern=g}),define(t[424],n([1,0,50,6,153]),function(e,t,n,i,o){"use strict";function r(e,t){void 0===t&&(t=!1);var i=function(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}}(e);l.push(i),i.userConfigured?d.push(i):u.push(i),t&&!i.userConfigured&&l.forEach(function(e){e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn("Overwriting extension <<"+i.extension+">> to now point to mime <<"+i.mime+">>"),i.filename&&e.filename===i.filename&&console.warn("Overwriting filename <<"+i.filename+">> to now point to mime <<"+i.mime+">>"),i.filepattern&&e.filepattern===i.filepattern&&console.warn("Overwriting filepattern <<"+i.filepattern+">> to now point to mime <<"+i.mime+">>"),i.firstline&&e.firstline===i.firstline&&console.warn("Overwriting firstline <<"+i.firstline+">> to now point to mime <<"+i.mime+">>"))})}function s(e,o){if(!e)return[t.MIME_UNKNOWN];e=e.toLowerCase();var r=n.basename(e),s=a(e,r,d);if(s)return[s,t.MIME_TEXT];var c=a(e,r,u);if(c)return[c,t.MIME_TEXT];if(o){var h=function(e){i.startsWithUTF8BOM(e)&&(e=e.substr(1));if(e.length>0)for(var t=0;t0)return n.mime}}return null}(o);if(h)return[h,t.MIME_TEXT]}return[t.MIME_UNKNOWN]}function a(e,t,n){for(var r,s,a,l=n.length-1;l>=0;l--){var u=n[l];if(t===u.filenameLowercase){r=u;break}if(u.filepattern&&(!s||u.filepattern.length>s.filepattern.length)){var d=u.filepatternOnPath?e:t;o.match(u.filepatternLowercase,d)&&(s=u)}u.extension&&(!a||u.extension.length>a.extension.length)&&i.endsWith(t,u.extensionLowercase)&&(a=u)}return r?r.mime:s?s.mime:a?a.mime:null}Object.defineProperty(t,"__esModule",{value:!0}),t.MIME_TEXT="text/plain",t.MIME_UNKNOWN="application/unknown";var l=[],u=[],d=[];t.registerTextMime=r,t.guessMimeTypes=s}),define(t[43],n([1,0,2,9]),function(e,t,n,i){"use strict";function r(e,t){var n=t-e;return function(t){return e+n*function(e){return 1-function(e){return Math.pow(e,3)}(1-e)}(t)}}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible" }(t.ScrollbarVisibility||(t.ScrollbarVisibility={}));var s=function(){function e(e,t,n,i,o,r){t|=0,n|=0,i|=0,o|=0,r|=0,(e|=0)<0&&(e=0),n+e>t&&(n=t-e),n<0&&(n=0),i<0&&(i=0),r+i>o&&(r=o-i),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=n,this.height=i,this.scrollHeight=o,this.scrollTop=r}return e.prototype.equals=function(e){return this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop},e.prototype.withScrollDimensions=function(t){return new e(void 0!==t.width?t.width:this.width,void 0!==t.scrollWidth?t.scrollWidth:this.scrollWidth,this.scrollLeft,void 0!==t.height?t.height:this.height,void 0!==t.scrollHeight?t.scrollHeight:this.scrollHeight,this.scrollTop)},e.prototype.withScrollPosition=function(t){return new e(this.width,this.scrollWidth,void 0!==t.scrollLeft?t.scrollLeft:this.scrollLeft,this.height,this.scrollHeight,void 0!==t.scrollTop?t.scrollTop:this.scrollTop)}, e.prototype.createScrollEvent=function(e){var t=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,i=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,s=this.scrollTop!==e.scrollTop;return{width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:t,scrollWidthChanged:n,scrollLeftChanged:i,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:s}},e}();t.ScrollState=s;var a=function(e){function t(t,n){var o=e.call(this)||this;return o._onScroll=o._register(new i.Emitter),o.onScroll=o._onScroll.event,o._smoothScrollDuration=t,o._scheduleAtNextAnimationFrame=n,o._state=new s(0,0,0,0,0,0),o._smoothScrolling=null,o}return o(t,e),t.prototype.dispose=function(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),e.prototype.dispose.call(this)},t.prototype.setSmoothScrollDuration=function(e){this._smoothScrollDuration=e}, t.prototype.validateScrollPosition=function(e){return this._state.withScrollPosition(e)},t.prototype.getScrollDimensions=function(){return this._state},t.prototype.setScrollDimensions=function(e){var t=this._state.withScrollDimensions(e);this._setState(t),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)},t.prototype.getFutureScrollPosition=function(){return this._smoothScrolling?this._smoothScrolling.to:this._state},t.prototype.getCurrentScrollPosition=function(){return this._state},t.prototype.setScrollPositionNow=function(e){var t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t)},t.prototype.setScrollPositionSmooth=function(e){var t=this;if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft, scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;var n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration);this._smoothScrolling.dispose(),this._smoothScrolling=n}else{var i=this._state.withScrollPosition(e);this._smoothScrolling=u.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){t._smoothScrolling&&(t._smoothScrolling.animationFrameDisposable=null,t._performSmoothScrolling())})},t.prototype._performSmoothScrolling=function(){var e=this,t=this._smoothScrolling.tick(),n=this._state.withScrollPosition(t);if(this._setState(n),t.isDone)return this._smoothScrolling.dispose(),void(this._smoothScrolling=null);this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(function(){ e._smoothScrolling&&(e._smoothScrolling.animationFrameDisposable=null,e._performSmoothScrolling())})},t.prototype._setState=function(e){var t=this._state;t.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(t)))},t}(n.Disposable);t.Scrollable=a;var l=function(){return function(e,t,n){this.scrollLeft=e,this.scrollTop=t,this.isDone=n}}();t.SmoothScrollingUpdate=l;var u=function(){function e(e,t,n,i){this.from=e,this.to=t,this.duration=i,this._startTime=n,this.animationFrameDisposable=null,this._initAnimations()}return e.prototype._initAnimations=function(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)},e.prototype._initAnimation=function(e,t,n){if(Math.abs(e-t)>2.5*n){var i=void 0,o=void 0;return e140)i._setDesiredScrollPositionNow(a.getScrollPosition());else{var l=i._sliderMousePosition(e)-o;i._setDesiredScrollPositionNow(a.getDesiredScrollPositionFromDelta(l))}},function(){i.slider.toggleClassName("active",!1),i._host.onDragEnd(),t()}),this._host.onDragStart()},t.prototype._setDesiredScrollPositionNow=function(e){var t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)},t}(s.Widget);t.AbstractScrollbar=d}),define(t[428],n([1,0,158,42,43,157,114]),function(e,t,n,i,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,n,o){var l=e.call(this,{lazyRender:n.lazyRender,host:o, scrollbarState:new s.ScrollbarState(n.horizontalHasArrows?n.arrowSize:0,n.horizontal===r.ScrollbarVisibility.Hidden?0:n.horizontalScrollbarSize,n.vertical===r.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize),visibility:n.horizontal,extraScrollbarClassName:"horizontal",scrollable:t})||this;if(n.horizontalHasArrows){var u=(n.arrowSize-a.ARROW_IMG_SIZE)/2,d=(n.horizontalScrollbarSize-a.ARROW_IMG_SIZE)/2;l._createArrow({className:"left-arrow",top:d,left:u,bottom:void 0,right:void 0,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return l._host.onMouseWheel(new i.StandardMouseWheelEvent(null,1,0))}}),l._createArrow({className:"right-arrow",top:d,left:void 0,bottom:void 0,right:u,bgWidth:n.arrowSize,bgHeight:n.horizontalScrollbarSize,onActivate:function(){return l._host.onMouseWheel(new i.StandardMouseWheelEvent(null,-1,0))}})}return l._createSlider(Math.floor((n.horizontalScrollbarSize-n.horizontalSliderSize)/2),0,null,n.horizontalSliderSize),l}return o(t,e), t.prototype._updateSlider=function(e,t){this.slider.setWidth(e),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},t.prototype._sliderMousePosition=function(e){return e.posx},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posy},t.prototype.writeScrollPosition=function(e,t){e.scrollLeft=t},t}(n.AbstractScrollbar);t.HorizontalScrollbar=l}),define(t[430],n([1,0,158,42,43,157,114]),function(e,t,n,i,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t,n,o){var l=e.call(this,{ lazyRender:n.lazyRender,host:o,scrollbarState:new s.ScrollbarState(n.verticalHasArrows?n.arrowSize:0,n.vertical===r.ScrollbarVisibility.Hidden?0:n.verticalScrollbarSize,0),visibility:n.vertical,extraScrollbarClassName:"vertical",scrollable:t})||this;if(n.verticalHasArrows){var u=(n.arrowSize-a.ARROW_IMG_SIZE)/2,d=(n.verticalScrollbarSize-a.ARROW_IMG_SIZE)/2;l._createArrow({className:"up-arrow",top:u,left:d,bottom:void 0,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return l._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,1))}}),l._createArrow({className:"down-arrow",top:void 0,left:d,bottom:u,right:void 0,bgWidth:n.verticalScrollbarSize,bgHeight:n.arrowSize,onActivate:function(){return l._host.onMouseWheel(new i.StandardMouseWheelEvent(null,0,-1))}})}return l._createSlider(0,Math.floor((n.verticalScrollbarSize-n.verticalSliderSize)/2),n.verticalSliderSize,null),l}return o(t,e),t.prototype._updateSlider=function(e,t){this.slider.setHeight(e), 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 t},t.prototype._sliderMousePosition=function(e){return e.posy},t.prototype._sliderOrthogonalMousePosition=function(e){return e.posx},t.prototype.writeScrollPosition=function(e,t){e.scrollTop=t},t}(n.AbstractScrollbar);t.VerticalScrollbar=l}),define(t[437],n([1,0,13,18]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){n.Promise.is(e)?this._winjsPromise=e:this._winjsPromise=new n.Promise(function(t,n){var o=!0;e(function(e){ o?i.setImmediate(function(){return t(e)}):t(e)},function(e){o?i.setImmediate(function(){return n(e)}):n(e)}),o=!1})}return e.all=function(t){return new e(n.Promise.join(t).then(null,function(e){for(var t in e)if(e.hasOwnProperty(t))return e[t]}))},e.race=function(t){return new e(n.Promise.any(t).then(function(e){return e.value},function(e){return e.value}))},e.resolve=function(t){return new e(n.Promise.wrap(t))},e.reject=function(t){return new e(n.Promise.wrapError(t))},e.prototype.then=function(t,n){var o=!0,r=new e(this._winjsPromise.then(t&&function(e){o?i.setImmediate(function(){return t(e)}):t(e)},n&&function(e){o?i.setImmediate(function(){return n(e)}):n(e)}));return o=!1,r},e.prototype.catch=function(e){return this.then(null,e)},e}();t.PolyfillPromise=o}),define(t[160],n([1,0,10,2,13,14,18]),function(e,t,n,i,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l="$initialize",u=!1;t.logOnceWebWorkerWarning=function(e){a.isWeb&&(u||(u=!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))};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},o=new r.TPromise(function(e,t){i.c=e,i.e=t},function(){});return this._pendingReplies[n]=i,this._send({vsWorker:this._workerId,req:n,method:e,args:t}),o},e.prototype.handleMessage=function(e){var t;try{t=JSON.parse(e)}catch(e){}t&&t.vsWorker&&(-1!==this._workerId&&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).name=i.err.name,r.message=i.err.message,r.stack=i.err.stack),void o.e(r)}o.c(i.res)}else{var s=e,a=s.req;this._handler.handleMessage(s.method,s.args).then(function(e){t._send({vsWorker:t._workerId,seq:a,res:e,err:void 0})},function(e){e.detail instanceof Error&&(e.detail=n.transformErrorForSerialization(e.detail)),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}(),c=function(e){function t(t,n){var i=e.call(this)||this,o=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 r.TPromise.as(null)}}),i._protocol.setWorkerId(i._worker.getId());var a=null ;void 0!==self.require&&"function"==typeof self.require.getConfig?a=self.require.getConfig():void 0!==self.requirejs&&(a=self.requirejs.s.contexts._.config),i._lazyProxy=new r.TPromise(function(e,t){o=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;n0},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.prototype.getPosInSet=function(e,t){var n=this.modelProvider.getModel();return String(n.entries.indexOf(t)+1)},e.prototype.getSetSize=function(){var e=this.modelProvider.getModel();return String(e.entries.length)},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,t){this.modelProvider=e,this.styles=t}return e.prototype.updateStyles=function(e){this.styles=e},e.prototype.getHeight=function(e,t){return this.modelProvider.getModel().renderer.getHeight(t)},e.prototype.getTemplateId=function(e,t){return this.modelProvider.getModel().renderer.getTemplateId(t)},e.prototype.renderTemplate=function(e,t,n){ return this.modelProvider.getModel().renderer.renderTemplate(t,n,this.styles)},e.prototype.renderElement=function(e,t,n,i){this.modelProvider.getModel().renderer.renderElement(t,n,i,this.styles)},e.prototype.disposeTemplate=function(e,t,n){this.modelProvider.getModel().renderer.disposeTemplate(t,n)},e}();t.Renderer=a}),define(t[93],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.PREVIEW=0]="PREVIEW",e[e.OPEN=1]="OPEN",e[e.OPEN_IN_BACKGROUND=2]="OPEN_IN_BACKGROUND"}(t.Mode||(t.Mode={}))}),define(t[445],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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,"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 o(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.MouseContextMenuEvent=i;var r=function(e){function t(t,n,i){var o=e.call(this,t,n,i.target)||this;return o.originalEvent=i,o}return o(t,e),t.prototype.preventDefault=function(){this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.originalEvent.stopPropagation()},t}(n);t.KeyboardContextMenuEvent=r;!function(e){e[e.COPY=0]="COPY",e[e.MOVE=1]="MOVE"}(t.DragOverEffect||(t.DragOverEffect={}));!function(e){e[e.BUBBLE_DOWN=0]="BUBBLE_DOWN",e[e.BUBBLE_UP=1]="BUBBLE_UP"}(t.DragOverBubble||(t.DragOverBubble={}))}),define(t[81],n([1,0,18,10,7,39]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s;!function(e){e[e.ON_MOUSE_DOWN=0]="ON_MOUSE_DOWN",e[e.ON_MOUSE_UP=1]="ON_MOUSE_UP" }(s=t.ClickBehavior||(t.ClickBehavior={}));var a;!function(e){e[e.SINGLE_CLICK=0]="SINGLE_CLICK",e[e.DOUBLE_CLICK=1]="DOUBLE_CLICK"}(a=t.OpenMode||(t.OpenMode={}));var l=function(){function e(){this._arr=[]}return e.prototype.set=function(e,t){this._arr.push({keybinding:r.createKeybinding(e,n.OS),callback:t})},e.prototype.dispatch=function(e){for(var t=this._arr.length-1;t>=0;t--){var n=this._arr[t];if(e.equals(n.keybinding))return n.callback}return null},e}();t.KeybindingDispatcher=l;var u=function(){function e(e){void 0===e&&(e={clickBehavior:s.ON_MOUSE_DOWN,keyboardSupport:!0,openMode:a.SINGLE_CLICK});var t=this;this.options=e,this.downKeyBindingDispatcher=new l,this.upKeyBindingDispatcher=new l,("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.downKeyBindingDispatcher.set(16,function(e,n){return t.onUp(e,n)}),this.downKeyBindingDispatcher.set(18,function(e,n){return t.onDown(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)}),n.isMacintosh&&(this.downKeyBindingDispatcher.set(2064,function(e,n){return t.onLeft(e,n)}),this.downKeyBindingDispatcher.set(300,function(e,n){return t.onDown(e,n)}),this.downKeyBindingDispatcher.set(302,function(e,n){return t.onUp(e,n)})),this.downKeyBindingDispatcher.set(11,function(e,n){return t.onPageUp(e,n)}),this.downKeyBindingDispatcher.set(12,function(e,n){return t.onPageDown(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.downKeyBindingDispatcher.set(10,function(e,n){return t.onSpace(e,n)}),this.downKeyBindingDispatcher.set(9,function(e,n){return t.onEscape(e,n)}),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===s.ON_MOUSE_DOWN&&(n.leftButton||n.middleButton)){if(n.target){if(n.target.tagName&&"input"===n.target.tagName.toLowerCase())return!1;if(o.findParentWithClass(n.target,"scrollbar","monaco-tree"))return!1;if(o.findParentWithClass(n.target,"monaco-action-bar","row"))return!1}return this.onLeftClick(e,t,n,i)}return!1},e.prototype.onClick=function(e,t,i){return n.isMacintosh&&i.ctrlKey?(i.preventDefault(),i.stopPropagation(),!1):(!i.target||!i.target.tagName||"input"!==i.target.tagName.toLowerCase())&&((this.options.clickBehavior!==s.ON_MOUSE_DOWN||!i.leftButton&&!i.middleButton)&&this.onLeftClick(e,t,i))},e.prototype.onLeftClick=function(e,t,n,o){void 0===o&&(o="mouse");var r=n,s={origin:o,originalEvent:n,didClickOnTwistie:this.isClickOnTwistie(r)};if(e.getInput()===t)e.clearFocus(s),e.clearSelection(s);else{n&&r.browserEvent&&"mousedown"===r.browserEvent.type&&1===r.browserEvent.detail||n.preventDefault(),n.stopPropagation(),e.domFocus(),e.setSelection([t],s),e.setFocus(t,s), this.shouldToggleExpansion(t,r,o)&&(e.isExpanded(t)?e.collapse(t).done(null,i.onUnexpectedError):e.expand(t).done(null,i.onUnexpectedError))}return!0},e.prototype.shouldToggleExpansion=function(e,t,n){var i="mouse"===n&&2===t.detail;return this.openOnSingleClick||i||this.isClickOnTwistie(t)},e.prototype.setOpenMode=function(e){this.options.openMode=e},Object.defineProperty(e.prototype,"openOnSingleClick",{get:function(){return this.options.openMode===a.SINGLE_CLICK},enumerable:!0,configurable:!0}),e.prototype.isClickOnTwistie=function(e){var t=e.target;if(!o.hasClass(t,"content"))return!1;var n=window.getComputedStyle(t,":before");if("none"===n.backgroundImage||"none"===n.display)return!1;var i=parseInt(n.width)+parseInt(n.paddingRight);return e.browserEvent.offsetX<=i},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,i.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,i.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,i.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,i.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,i.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,i.onUnexpectedError)),!0},e.prototype.onLeft=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var o=e.getFocus();e.collapse(o).then(function(t){if(o&&!t)return e.focusParent(n),e.reveal(e.getFocus())}).done(null,i.onUnexpectedError)}return!0},e.prototype.onRight=function(e,t){var n={origin:"keyboard",originalEvent:t};if(e.getHighlight())e.clearHighlight(n);else{var o=e.getFocus() ;e.expand(o).then(function(t){if(o&&!t)return e.focusFirstChild(n),e.reveal(e.getFocus())}).done(null,i.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=u;var d=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=d;var c=function(){function e(){}return e.prototype.isVisible=function(e,t){return!0},e}();t.DefaultFilter=c;var h=function(){ function e(){}return e.prototype.getAriaLabel=function(e,t){return null},e}();t.DefaultAccessibilityProvider=h;var p=function(){function e(e,t){this.styleElement=e,this.selectorSuffix=t}return e.prototype.style=function(e){var t=this.selectorSuffix?"."+this.selectorSuffix:"",n=[];e.listFocusBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: "+e.listFocusBackground+"; }"),e.listFocusForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: "+e.listFocusForeground+"; }"),e.listActiveSelectionBackground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listActiveSelectionBackground+"; }"),e.listActiveSelectionForeground&&n.push(".monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listActiveSelectionForeground+"; }"), e.listFocusAndSelectionBackground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: "+e.listFocusAndSelectionBackground+"; }\n\t\t\t"),e.listFocusAndSelectionForeground&&n.push("\n\t\t\t\t.monaco-tree-drag-image,\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: "+e.listFocusAndSelectionForeground+"; }\n\t\t\t"),e.listInactiveSelectionBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+e.listInactiveSelectionBackground+"; }"),e.listInactiveSelectionForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+e.listInactiveSelectionForeground+"; }"), e.listHoverBackground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: "+e.listHoverBackground+"; }"),e.listHoverForeground&&n.push(".monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: "+e.listHoverForeground+"; }"),e.listDropBackground&&n.push("\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: "+e.listDropBackground+" !important; color: inherit !important; }\n\t\t\t"), e.listFocusOutline&&n.push("\n\t\t\t\t.monaco-tree-drag-image\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; background: #000; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row \t\t\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px solid transparent; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) \t\t\t\t\t\t{ border: 1px dotted "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+".focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) \t\t\t\t\t\t\t{ border: 1px solid "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) \t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-wrapper.drop-target,\n\t\t\t\t.monaco-tree"+t+" .monaco-tree-rows > .monaco-tree-row.drop-target\t\t\t\t\t\t\t\t\t\t\t\t{ border: 1px dashed "+e.listFocusOutline+"; }\n\t\t\t") ;var i=n.join("\n");i!==this.styleElement.innerHTML&&(this.styleElement.innerHTML=i)},e}();t.DefaultTreestyler=p}),define(t[454],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},e}();t.ElementsDragAndDropData=n;var i=function(){function e(e){this.elements=e}return e.prototype.update=function(e){},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}();t.DesktopDragAndDropData=o}),define(t[463],n([1,0,85,10,2,13,9]),function(e,t,n,i,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e){ this._onDispose=new a.Emitter,this.onDispose=this._onDispose.event,this._item=e}return Object.defineProperty(e.prototype,"item",{get:function(){return this._item},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose&&(this._onDispose.fire(),this._onDispose.dispose(),this._onDispose=null)},e}();t.LockData=l;var u=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 s.TPromise(function(r,s){o=a.once(i.onDispose)(function(){return n.run(e,t).then(r,s)})},function(){o.dispose()})}var r;return new s.TPromise(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=u;var d=function(){function e(){this._isDisposed=!1,this._onDidRevealItem=new a.EventMultiplexer,this.onDidRevealItem=this._onDidRevealItem.event,this._onExpandItem=new a.EventMultiplexer,this.onExpandItem=this._onExpandItem.event,this._onDidExpandItem=new a.EventMultiplexer,this.onDidExpandItem=this._onDidExpandItem.event,this._onCollapseItem=new a.EventMultiplexer,this.onCollapseItem=this._onCollapseItem.event,this._onDidCollapseItem=new a.EventMultiplexer,this.onDidCollapseItem=this._onDidCollapseItem.event,this._onDidAddTraitItem=new a.EventMultiplexer,this.onDidAddTraitItem=this._onDidAddTraitItem.event,this._onDidRemoveTraitItem=new a.EventMultiplexer,this.onDidRemoveTraitItem=this._onDidRemoveTraitItem.event,this._onDidRefreshItem=new a.EventMultiplexer,this.onDidRefreshItem=this._onDidRefreshItem.event,this._onRefreshItemChildren=new a.EventMultiplexer,this.onRefreshItemChildren=this._onRefreshItemChildren.event,this._onDidRefreshItemChildren=new a.EventMultiplexer, this.onDidRefreshItemChildren=this._onDidRefreshItemChildren.event,this._onDidDisposeItem=new a.EventMultiplexer,this.onDidDisposeItem=this._onDidDisposeItem.event,this.items={}}return e.prototype.register=function(e){n.ok(!this.isRegistered(e.id),"item already registered: "+e.id);var t=r.combinedDisposable([this._onDidRevealItem.add(e.onDidReveal),this._onExpandItem.add(e.onExpand),this._onDidExpandItem.add(e.onDidExpand),this._onCollapseItem.add(e.onCollapse),this._onDidCollapseItem.add(e.onDidCollapse),this._onDidAddTraitItem.add(e.onDidAddTrait),this._onDidRemoveTraitItem.add(e.onDidRemoveTrait),this._onDidRefreshItem.add(e.onDidRefresh),this._onRefreshItemChildren.add(e.onRefreshChildren),this._onDidRefreshItemChildren.add(e.onDidRefreshChildren),this._onDidDisposeItem.add(e.onDidDispose)]);this.items[e.id]={item:e,disposable:t}},e.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]}, e.prototype.isRegistered=function(e){return this.items.hasOwnProperty(e)},e.prototype.getItem=function(e){var t=this.items[e];return t?t.item:null},e.prototype.dispose=function(){this.items=null,this._onDidRevealItem.dispose(),this._onExpandItem.dispose(),this._onDidExpandItem.dispose(),this._onCollapseItem.dispose(),this._onDidCollapseItem.dispose(),this._onDidAddTraitItem.dispose(),this._onDidRemoveTraitItem.dispose(),this._onDidRefreshItem.dispose(),this._onRefreshItemChildren.dispose(),this._onDidRefreshItemChildren.dispose(),this._isDisposed=!0},e.prototype.isDisposed=function(){return this._isDisposed},e}();t.ItemRegistry=d;var c=function(){function e(e,t,n,i,o){this._onDidCreate=new a.Emitter,this._onDidReveal=new a.Emitter,this.onDidReveal=this._onDidReveal.event,this._onExpand=new a.Emitter,this.onExpand=this._onExpand.event,this._onDidExpand=new a.Emitter,this.onDidExpand=this._onDidExpand.event,this._onCollapse=new a.Emitter,this.onCollapse=this._onCollapse.event,this._onDidCollapse=new a.Emitter, this.onDidCollapse=this._onDidCollapse.event,this._onDidAddTrait=new a.Emitter,this.onDidAddTrait=this._onDidAddTrait.event,this._onDidRemoveTrait=new a.Emitter,this.onDidRemoveTrait=this._onDidRemoveTrait.event,this._onDidRefresh=new a.Emitter,this.onDidRefresh=this._onDidRefresh.event,this._onRefreshChildren=new a.Emitter,this.onRefreshChildren=this._onRefreshChildren.event,this._onDidRefreshChildren=new a.Emitter,this.onDidRefreshChildren=this._onDidRefreshChildren.event,this._onDidDispose=new a.Emitter,this.onDidDispose=this._onDidDispose.event,this.registry=t,this.context=n,this.lock=i,this.element=o,this.id=e,this.registry.register(this),this.doesHaveChildren=this.context.dataSource.hasChildren(this.context.tree,this.element),this.needsChildrenRefresh=!0,this.parent=null,this.previous=null,this.next=null,this.firstChild=null,this.lastChild=null,this.traits={},this.depth=0,this.expanded=this.context.dataSource.shouldAutoexpand&&this.context.dataSource.shouldAutoexpand(this.context.tree,o), this._onDidCreate.fire(this),this.visible=this._isVisible(),this.height=this._getHeight(),this._isDisposed=!1}return e.prototype.getElement=function(){return this.element},e.prototype.hasChildren=function(){return this.doesHaveChildren},e.prototype.getDepth=function(){return this.depth},e.prototype.isVisible=function(){return this.visible},e.prototype.setVisible=function(e){this.visible=e},e.prototype.isExpanded=function(){return this.expanded},e.prototype._setExpanded=function(e){this.expanded=e},e.prototype.reveal=function(e){void 0===e&&(e=null);var t={item:this,relativeTop:e};this._onDidReveal.fire(t)},e.prototype.expand=function(){var e=this;if(this.isExpanded()||!this.doesHaveChildren||this.lock.isLocked(this))return s.TPromise.as(!1);return this.lock.run(this,function(){var t={item:e};return e._onExpand.fire(t),(e.needsChildrenRefresh?e.refreshChildren(!1,!0,!0):s.TPromise.as(null)).then(function(){return e._setExpanded(!0),e._onDidExpand.fire(t),!0})}).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)})},e.prototype.collapse=function(e){var t=this;if(void 0===e&&(e=!1),e){var n=s.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)?s.TPromise.as(!1):this.lock.run(this,function(){var e={item:t};return t._onCollapse.fire(e),t._setExpanded(!1),t._onDidCollapse.fire(e),s.TPromise.as(!0)})},e.prototype.addTrait=function(e){var t={item:this,trait:e};this.traits[e]=!0,this._onDidAddTrait.fire(t)},e.prototype.removeTrait=function(e){var t={item:this,trait:e};delete this.traits[e],this._onDidRemoveTrait.fire(t)},e.prototype.hasTrait=function(e){return this.traits[e]||!1},e.prototype.getAllTraits=function(){var e,t=[] ;for(e in this.traits)this.traits.hasOwnProperty(e)&&this.traits[e]&&t.push(e);return t},e.prototype.getHeight=function(){return this.height},e.prototype.refreshChildren=function(t,n,o){var r=this;if(void 0===n&&(n=!1),void 0===o&&(o=!1),!o&&!this.isExpanded())return this.needsChildrenRefresh=!0,s.TPromise.as(this);this.needsChildrenRefresh=!1;var a=function(){var o={item:r,isNested:n};r._onRefreshChildren.fire(o);return(r.doesHaveChildren?r.context.dataSource.getChildren(r.context.tree,r.element):s.TPromise.as([])).then(function(n){if(r.isDisposed()||r.registry.isDisposed())return s.TPromise.as(null);if(!Array.isArray(n))return s.TPromise.wrapError(new Error("Please return an array of children."));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,a=n.length;o=0;r--)this.onInsertItem(u[r]);for(r=this.heightMap.length-1;r>=o;r--)this.onRefreshItem(this.heightMap[r]);return a},e.prototype.onInsertItem=function(e){},e.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]))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=n.top+n.height))return t;if(i===t)break;i=t}return this.heightMap.length},e.prototype.indexAfter=function(e){return Math.min(this.indexAt(e)+1,this.heightMap.length)}, e.prototype.itemAtIndex=function(e){return this.heightMap[e]},e.prototype.itemAfter=function(e){return this.heightMap[this.indexes[e.model.id]+1]||null},e.prototype.createViewItem=function(e){throw new Error("not implemented")},e.prototype.dispose=function(){this.heightMap=null,this.indexes=null},e}();t.HeightMap=i}),define(t[470],n([1,0,18,160]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function t(t,i,o,r,s){this.id=i,this.worker=function(t,i){if(n.globals.MonacoEnvironment){if("function"==typeof n.globals.MonacoEnvironment.getWorker)return n.globals.MonacoEnvironment.getWorker(t,i);if("function"==typeof n.globals.MonacoEnvironment.getWorkerUrl)return new Worker(n.globals.MonacoEnvironment.getWorkerUrl(t,i))}if("function"==typeof e)return new Worker(e.toUrl("./"+t)+"#"+i);throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",o),this.postMessage(t),this.worker.onmessage=function(e){ r(e.data)},"function"==typeof this.worker.addEventListener&&this.worker.addEventListener("error",s)}return t.prototype.getId=function(){return this.id},t.prototype.postMessage=function(e){this.worker&&this.worker.postMessage(e)},t.prototype.dispose=function(){this.worker.terminate(),this.worker=null},t}(),r=function(){function e(e){this._label=e,this._webWorkerFailedBeforeError=!1}return e.prototype.create=function(t,n,r){var s=this,a=++e.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new o(t,a,this._label||"anonymous"+a,n,function(e){i.logOnceWebWorkerWarning(e),s._webWorkerFailedBeforeError=e,r(e)})},e.LAST_WORKER_ID=0,e}();t.DefaultWorkerFactory=r}),define(t[472],n([8]),{}),define(t[56],n([1,0,33,2,6,85,7,472]),function(e,t,n,i,r,s,a){"use strict";function l(e){return e[f]||(e[f]={}),e[f]}function u(e){return!!e[f]}function d(e,t){return new g(e,t)}function c(){return new g(null,!0)}function h(e,t,n){l(e)[t]=n}function p(e,t,i){if(u(e)){var o=l(e)[t] ;if(!n.isUndefined(o))return o}return i}Object.defineProperty(t,"__esModule",{value:!0});var f="_msDataKey",g=function(){function e(e,t){this.offdom=t,this.container=e,this.currentElement=e,this.createdElements=[],this.toDispose={},this.captureToDispose={}}return e.prototype.clone=function(){var t=new e(this.container,this.offdom);return t.currentElement=this.currentElement,t.createdElements=this.createdElements,t.captureToDispose=this.captureToDispose,t.toDispose=this.toDispose,t},e.prototype.build=function(t,i){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,l=t,u=l.childNodes;if(n.isNumber(i)&&i=0){var n=e.split("-");e=n[0];for(var i=1;i=0){var t=e.split("-");e=t[0];for(var n=1;n=this.el.clientHeight-4&&(r=this.orthogonalEndSash):e.offsetX<=4?r=this.orthogonalStartSash:e.offsetX>=this.el.clientWidth-4&&(r=this.orthogonalEndSash),r&&(i=!0,e.__orthogonalSashEvent=!0,r.onMouseDown(e))}if(this.state){for(var s=0,l=u.getElementsByTagName("iframe");s0&&Math.abs(e.deltaY)>0)return 1;var t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return(Math.abs(e.deltaX-Math.round(e.deltaX))>0||Math.abs(e.deltaY-Math.round(e.deltaY))>0)&&(t+=.25),Math.min(Math.max(t,0),1)},e.INSTANCE=new e,e}();t.MouseWheelClassifier=m;var v=function(e){function t(t,n,i){var o=e.call(this)||this;o._onScroll=o._register(new p.Emitter),o.onScroll=o._onScroll.event,t.style.overflow="hidden",o._options=f(n),o._scrollable=i,o._register(o._scrollable.onScroll(function(e){o._onDidScroll(e),o._onScroll.fire(e)}));var r={onMouseWheel:function(e){return o._onMouseWheel(e)},onDragStart:function(){return o._onDragStart()},onDragEnd:function(){return o._onDragEnd()}};return o._verticalScrollbar=o._register(new a.VerticalScrollbar(o._scrollable,o._options,r)), o._horizontalScrollbar=o._register(new s.HorizontalScrollbar(o._scrollable,o._options,r)),o._domNode=document.createElement("div"),o._domNode.className="monaco-scrollable-element "+o._options.className,o._domNode.setAttribute("role","presentation"),o._domNode.style.position="relative",o._domNode.style.overflow="hidden",o._domNode.appendChild(t),o._domNode.appendChild(o._horizontalScrollbar.domNode.domNode),o._domNode.appendChild(o._verticalScrollbar.domNode.domNode),o._options.useShadows&&(o._leftShadowDomNode=h.createFastDomNode(document.createElement("div")),o._leftShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._leftShadowDomNode.domNode),o._topShadowDomNode=h.createFastDomNode(document.createElement("div")),o._topShadowDomNode.setClassName("shadow"),o._domNode.appendChild(o._topShadowDomNode.domNode),o._topLeftShadowDomNode=h.createFastDomNode(document.createElement("div")),o._topLeftShadowDomNode.setClassName("shadow top-left-corner"), o._domNode.appendChild(o._topLeftShadowDomNode.domNode)),o._listenOnDomNode=o._options.listenOnDomNode||o._domNode,o._mouseWheelToDispose=[],o._setListeningToMouseWheel(o._options.handleMouseWheel),o.onmouseover(o._listenOnDomNode,function(e){return o._onMouseOver(e)}),o.onnonbubblingmouseout(o._listenOnDomNode,function(e){return o._onMouseOut(e)}),o._hideTimeout=o._register(new c.TimeoutTimer),o._isDragging=!1,o._mouseIsOver=!1,o._shouldRender=!0,o._revealOnScroll=!0,o}return o(t,e),t.prototype.dispose=function(){this._mouseWheelToDispose=l.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.getScrollDimensions=function(){return this._scrollable.getScrollDimensions()}, t.prototype.setScrollDimensions=function(e){this._scrollable.setScrollDimensions(e)},t.prototype.updateClassName=function(e){this._options.className=e,i.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._options.lazyRender||this._render()},t.prototype._setListeningToMouseWheel=function(e){var t=this;if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=l.dispose(this._mouseWheelToDispose),e)){var i=function(e){var n=new r.StandardMouseWheelEvent(e);t._onMouseWheel(n)};this._mouseWheelToDispose.push(n.addDisposableListener(this._listenOnDomNode,"mousewheel",i)),this._mouseWheelToDispose.push(n.addDisposableListener(this._listenOnDomNode,"DOMMouseScroll",i))}}, t.prototype._onMouseWheel=function(e){var t,n=m.INSTANCE;if(n.accept(Date.now(),e.deltaX,e.deltaY),e.deltaY||e.deltaX){var o=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.flipAxes&&(o=(t=[r,o])[0],r=t[1]);var s=!i.isMacintosh&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||r||(r=o,o=0);var a=this._scrollable.getFutureScrollPosition(),l={};if(o){var u=a.scrollTop-50*o;this._verticalScrollbar.writeScrollPosition(l,u)}if(r){var d=a.scrollLeft-50*r;this._horizontalScrollbar.writeScrollPosition(l,d)}if(l=this._scrollable.validateScrollPosition(l),a.scrollLeft!==l.scrollLeft||a.scrollTop!==l.scrollTop){this._options.mouseWheelSmoothScroll&&n.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),this._shouldRender=!0}}(this._options.alwaysConsumeMouseWheel||this._shouldRender)&&(e.preventDefault(),e.stopPropagation())},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._revealOnScroll&&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.getCurrentScrollPosition(),t=e.scrollTop>0,n=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(n?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(n?" 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._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(function(){return e._hide()},500)},t}(d.Widget);t.AbstractScrollableElement=v;var _=function(e){function t(t,i){var o=this;(i=i||{}).mouseWheelSmoothScroll=!1;var r=new u.Scrollable(0,function(e){return n.scheduleAtNextAnimationFrame(e)});return(o=e.call(this,t,i,r)||this)._register(r),o}return o(t,e),t.prototype.setScrollPosition=function(e){this._scrollable.setScrollPositionNow(e)},t.prototype.getScrollPosition=function(){ return this._scrollable.getCurrentScrollPosition()},t}(v);t.ScrollableElement=_;var y=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return o(t,e),t}(v);t.SmoothScrollableElement=y;var C=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 o(t,e),t.prototype.scanDomNode=function(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})},t}(_);t.DomScrollableElement=C}),define(t[240],n([1,0,28,2,74,7,9,87,55,43,237,253,18,30,111,42]),function(e,t,n,i,o,r,s,l,u,d,c,h,p,f,g,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v={useShadows:!0,verticalScrollMode:d.ScrollbarVisibility.Auto },_=function(){function e(e,t,i,r){void 0===r&&(r=v),this.virtualDelegate=t,this.renderers=new Map,this.splicing=!1,this.items=[],this.itemId=0,this.rangeMap=new c.RangeMap;for(var a=0,p=i;a=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDblClick",{get:function(){var e=this;return s.filterEvent(s.mapEvent(l.domEvent(this.domNode,"dblclick"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMouseDown",{get:function(){var e=this;return s.filterEvent(s.mapEvent(l.domEvent(this.domNode,"mousedown"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this;return s.filterEvent(s.mapEvent(l.domEvent(this.domNode,"contextmenu"),function(t){return e.toMouseEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTouchStart",{get:function(){var e=this ;return s.filterEvent(s.mapEvent(l.domEvent(this.domNode,"touchstart"),function(t){return e.toTouchEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onTap",{get:function(){var e=this;return s.filterEvent(s.mapEvent(l.domEvent(this.rowsContainer,o.EventType.Tap),function(t){return e.toGestureEvent(t)}),function(e){return e.index>=0})},enumerable:!0,configurable:!0}),e.prototype.toMouseEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toTouchEvent=function(e){var t=this.getItemIndexFromEventTarget(e.target),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.toGestureEvent=function(e){var t=this.getItemIndexFromEventTarget(e.initialTarget),n=t<0?void 0:this.items[t];return{browserEvent:e,index:t,element:n&&n.element}},e.prototype.onScroll=function(e){try{this.render(e.scrollTop,e.height)}catch(t){ throw console.log("Got bad scroll event:",e),t}},e.prototype.onTouchChange=function(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY},e.prototype.onDragOver=function(e){this.setupDragAndDropScrollInterval(),this.dragAndDropMouseY=e.posy},e.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=r.getTopLeftOffset(this._domNode).top;this.dragAndDropScrollInterval||(this.dragAndDropScrollInterval=window.setInterval(function(){if(void 0!==e.dragAndDropMouseY){var n=e.dragAndDropMouseY-t,i=0,o=e.renderHeight-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))},e.prototype.cancelDragAndDropScrollInterval=function(){this.dragAndDropScrollInterval&&(window.clearInterval(this.dragAndDropScrollInterval),this.dragAndDropScrollInterval=null),this.cancelDragAndDropScrollTimeout()}, e.prototype.cancelDragAndDropScrollTimeout=function(){this.dragAndDropScrollTimeout&&(window.clearTimeout(this.dragAndDropScrollTimeout),this.dragAndDropScrollTimeout=null)},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.getNextToLastElement=function(e){var t=e[e.length-1];if(!t)return null;var n=this.items[t.end];return n&&n.row?n.row.domNode:null},e.prototype.dispose=function(){if(this.items){for(var e=0,t=this.items;e=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=Math.min(this.indexAt(this.lastRenderTop),this.indexAfter(l))-1,s=this.indexAt(a);r>=s;r--)this.insertItemInDOM(this.itemAtIndex(r));for(r=this.indexAt(this.lastRenderTop),s=Math.min(this.indexAt(a),this.indexAfter(u));r1e3,d=void 0,c=void 0;if(!u){c=(d=new l.LcsDiff({getLength:function(){return r.length},getElementAtIndex:function(e){return r[e]}},{getLength:function(){return s.length},getElementAtIndex:function(e){return s[e].id}},null).ComputeDiff(!1)).some(function(e){if(e.modifiedLength>0)for(var n=e.modifiedStart,i=e.modifiedStart+e.modifiedLength;n0&&this.onRemoveItems(new f.ArrayIterator(r,g.originalStart,g.originalStart+g.originalLength)),g.modifiedLength>0){var m=s[g.modifiedStart-1]||n;m=m.getDepth()>0?m:null,this.onInsertItems(new f.ArrayIterator(s,g.modifiedStart,g.modifiedStart+g.modifiedLength),m?m.id:null)}}else(u||d.length)&&(this.onRemoveItems(new f.ArrayIterator(r)),this.onInsertItems(new f.ArrayIterator(s),n.getDepth()>0?n.id:null));(u||d.length)&&this.onRowsChanged()}},t.prototype.onItemRefresh=function(e){ this.onItemsRefresh([e])},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 f.MappedIterator(t.getNavigator(),function(e){return e&&e.id})),this.onRowsChanged())},t.prototype.onItemReveal=function(e){var t=e.item,n=e.relativeTop,i=this.items[t.id];if(i)if(null!==n){n=(n=n<0?0: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=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&&(a.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&&(a.removeClass(this.domNode,n),this.highlightedItemWasDraggable&&(i.draggable=!0),this.highlightedItemWasDraggable=!1)},t.prototype.onModelFocusChange=function(){var e=this.model&&this.model.getFocus();a.toggleClass(this.domNode,"no-focused-item",!e),e?this.domNode.setAttribute("aria-activedescendant",d.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(),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,o=new h.StandardKeyboardEvent(e);if(n=this.model.getFocus()){var r=this.context.dataSource.getId(this.context.tree,n),s=this.items[r];i=a.getDomNodePagePosition(s.element)}else n=this.model.getInput(),i=a.getDomNodePagePosition(this.inputItem.element);t=new _.KeyboardContextMenuEvent(i.left+i.width,i.top,o)}else{ var l=new c.StandardMouseEvent(e),u=this.getItemAround(l.target);if(!u)return;n=u.model.getElement(),t=new _.MouseContextMenuEvent(l)}this.context.controller.onContextMenu(this.context.tree,n,t)},t.prototype.onKeyDown=function(e){var t=new h.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 h.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(C.DataTransfers.RESOURCES,JSON.stringify([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 p.ElementsDragAndDropData(i),t.currentExternalDragAndDropData=new p.ExternalElementsDragAndDropData(i),this.context.dnd.onDragStart(this.context.tree,this.currentDragAndDropData,new c.DragMouseEvent(n))}},t.prototype.setupDragAndDropScrollInterval=function(){var e=this,t=a.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),o=this.getItemAround(i.target);if(!o||0===i.posx&&0===i.posy&&i.browserEvent.type===a.EventType.DRAG_LEAVE)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 p.DesktopDragAndDropData}this.currentDragAndDropData.update(i);var s,l,u=o.model;do{if(s=u?u.getElement():this.model.getInput(),!(l=this.context.dnd.onDragOver(this.context.tree,this.currentDragAndDropData,s,i))||l.bubble!==_.DragOverBubble.BUBBLE_UP)break;u=u&&u.parent}while(u);if(!u)return this.currentDropElement=null,!1;var d=l&&l.accept;d?(this.currentDropElement=u.getElement(),i.preventDefault(),i.dataTransfer.dropEffect=l.effect===_.DragOverEffect.COPY?"copy":"move"):this.currentDropElement=null;var h=u.id===this.inputItem.id?this.inputItem:this.items[u.id];if((this.shouldInvalidateDropReaction||this.currentDropTarget!==h||!function(e,t){ return!e&&!t||!(!e||!t)&&e.accept===t.accept&&e.bubble===t.bubble&&e.effect===t.effect}(this.currentDropElementReaction,l))&&(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=h,this.currentDropElementReaction=l,d)){if(this.currentDropTarget&&(this.currentDropTarget.dropTarget=!0,this.currentDropTargets.push(this.currentDropTarget)),l.bubble===_.DragOverBubble.BUBBLE_DOWN)for(var f,g=u.getNavigator();f=g.next();)(o=this.items[f.id])&&(o.dropTarget=!0,this.currentDropTargets.push(o));l.autoExpand&&(this.currentDropPromise=r.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||a.addClass(this.domNode,"focused"),this._onDOMFocus.fire()},t.prototype.onBlur=function(){this.context.options.alwaysFocused||a.removeClass(this.domNode,"focused"),this.domNode.removeAttribute("aria-activedescendant"),this._onDOMBlur.fire()},t.prototype.onMsPointerDown=function(e){if(this.msGesture){var t=e.pointerType ;t!==(e.MSPOINTER_TYPE_MOUSE||"mouse")?t===(e.MSPOINTER_TYPE_TOUCH||"touch")&&(this.lastPointerType="touch",e.stopPropagation(),e.preventDefault(),this.msGesture.addPointer(e.pointerId)):this.lastPointerType="mouse"}},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&&e.removeFromDOM()},t.prototype.shouldBeRendered=function(e){return e.topthis.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=s.dispose(this.modelListeners),this.model=null)},t.prototype.dispose=function(){var t=this;this.scrollableElement.dispose(),this.releaseModel(),this.modelListeners=null,this.viewListeners=s.dispose(this.viewListeners),this._onDOMFocus.dispose(),this._onDOMBlur.dispose(),this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.domNode=null,this.items&&(Object.keys(this.items).forEach(function(e){return t.items[e].removeFromDOM()}),this.items=null),this.context.cache&&(this.context.cache.dispose(),this.context.cache=null),e.prototype.dispose.call(this)},t.BINDING="monaco-tree-row",t.LOADING_DECORATION_DELAY=800,t.counter=0,t.currentExternalDragAndDropData=null,t}(v.HeightMap);t.TreeView=x}),define(t[249],n([8]),{}),define(t[252],n([8]),{}),define(t[155],n([1,0,81,463,246,9,27,28,252]),function(e,t,n,i,o,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){return function(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,this.controller=t.controller||new n.DefaultController({clickBehavior:n.ClickBehavior.ON_MOUSE_UP,keyboardSupport:"boolean"!=typeof i.keyboardSupport||i.keyboardSupport}),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,this.styler=t.styler||null}}();t.TreeContext=l;var u={listFocusBackground:s.Color.fromHex("#073655"),listActiveSelectionBackground:s.Color.fromHex("#0E639C"),listActiveSelectionForeground:s.Color.fromHex("#FFFFFF"),listFocusAndSelectionBackground:s.Color.fromHex("#094771"),listFocusAndSelectionForeground:s.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:s.Color.fromHex("#3F3F46"),listHoverBackground:s.Color.fromHex("#2A2D2E"),listDropBackground:s.Color.fromHex("#383B3D") },d=function(){function e(e,t,n){void 0===n&&(n={}),this._onDidChangeFocus=new r.Relay,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeSelection=new r.Relay,this.onDidChangeSelection=this._onDidChangeSelection.event,this._onHighlightChange=new r.Relay,this._onDidExpandItem=new r.Relay,this._onDidCollapseItem=new r.Relay,this._onDispose=new r.Emitter,this.onDidDispose=this._onDispose.event,this.container=e,a.mixin(n,u,!1),n.twistiePixels="number"==typeof n.twistiePixels?n.twistiePixels:32,n.showTwistie=!1!==n.showTwistie,n.indentPixels="number"==typeof n.indentPixels?n.indentPixels:12,n.alwaysFocused=!0===n.alwaysFocused,n.useShadows=!1!==n.useShadows,n.paddingOnRow=!1!==n.paddingOnRow,n.showLoading=!1!==n.showLoading,this.context=new l(this,t,n),this.model=new i.TreeModel(this.context),this.view=new o.TreeView(this.context,this.container),this.view.setModel(this.model),this._onDidChangeFocus.input=this.model.onDidFocus,this._onDidChangeSelection.input=this.model.onDidSelect, this._onHighlightChange.input=this.model.onDidHighlight,this._onDidExpandItem.input=this.model.onDidExpandItem,this._onDidCollapseItem.input=this.model.onDidCollapseItem}return e.prototype.style=function(e){this.view.applyStyles(e)},Object.defineProperty(e.prototype,"onDidFocus",{get:function(){return this.view&&this.view.onDOMFocus},enumerable:!0,configurable:!0}),e.prototype.getHTMLElement=function(){return this.view.getHTMLElement()},e.prototype.layout=function(e,t){this.view.layout(e,t)},e.prototype.domFocus=function(){this.view.focus()},e.prototype.isDOMFocused=function(){return this.view.isFocused()},e.prototype.domBlur=function(){this.view.blur()},e.prototype.setInput=function(e){return this.model.setInput(e)},e.prototype.getInput=function(){return this.model.getInput()},e.prototype.refresh=function(e,t){return void 0===e&&(e=null),void 0===t&&(t=!0),this.model.refresh(e,t)},e.prototype.expand=function(e){return this.model.expand(e)},e.prototype.collapse=function(e,t){return void 0===t&&(t=!1), this.model.collapse(e,t)},e.prototype.toggleExpansion=function(e,t){return void 0===t&&(t=!1),this.model.toggleExpansion(e,t)},e.prototype.isExpanded=function(e){return this.model.isExpanded(e)},e.prototype.reveal=function(e,t){return void 0===t&&(t=null),this.model.reveal(e,t)},e.prototype.getHighlight=function(){return this.model.getHighlight()},e.prototype.clearHighlight=function(e){this.model.setHighlight(null,e)},e.prototype.setSelection=function(e,t){this.model.setSelection(e,t)},e.prototype.getSelection=function(){return this.model.getSelection()},e.prototype.clearSelection=function(e){this.model.setSelection([],e)},e.prototype.setFocus=function(e,t){this.model.setFocus(e,t)},e.prototype.getFocus=function(){return this.model.getFocus()},e.prototype.focusNext=function(e,t){this.model.focusNext(e,t)},e.prototype.focusPrevious=function(e,t){this.model.focusPrevious(e,t)},e.prototype.focusParent=function(e){this.model.focusParent(e)},e.prototype.focusFirstChild=function(e){this.model.focusFirstChild(e)}, e.prototype.focusFirst=function(e,t){this.model.focusFirst(e,t)},e.prototype.focusNth=function(e,t){this.model.focusNth(e,t)},e.prototype.focusLast=function(e,t){this.model.focusLast(e,t)},e.prototype.focusNextPage=function(e){this.view.focusNextPage(e)},e.prototype.focusPreviousPage=function(e){this.view.focusPreviousPage(e)},e.prototype.clearFocus=function(e){this.model.setFocus(null,e)},e.prototype.dispose=function(){this._onDispose.fire(),null!==this.model&&(this.model.dispose(),this.model=null),null!==this.view&&(this.view.dispose(),this.view=null),this._onDidChangeFocus.dispose(),this._onDidChangeSelection.dispose(),this._onHighlightChange.dispose(),this._onDidExpandItem.dispose(),this._onDidCollapseItem.dispose(),this._onDispose.dispose()},e}();t.Tree=d}),define(t[254],n([8]),{}),define(t[262],n([8]),{}),define(t[263],n([8]),{}),define(t[266],n([8]),{}),define(t[267],n([8]),{}),define(t[268],n([8]),{}),define(t[270],n([8]),{}),define(t[273],n([8]),{}),define(t[275],n([8]),{}),define(t[282],n([8]),{}), define(t[285],n([8]),{}),define(t[287],n([8]),{}),define(t[296],n([8]),{}),define(t[297],n([8]),{}),define(t[333],n([8]),{}),define(t[360],n([8]),{}),define(t[361],n([8]),{}),define(t[362],n([8]),{}),define(t[363],n([8]),{}),define(t[364],n([8]),{}),define(t[365],n([8]),{}),define(t[367],n([8]),{}),define(t[368],n([8]),{}),define(t[369],n([8]),{}),define(t[371],n([8]),{}),define(t[372],n([8]),{}),define(t[373],n([8]),{}),define(t[375],n([8]),{}),define(t[156],n([8]),{}),define(t[377],n([8]),{}),define(t[378],n([8]),{}),define(t[379],n([8]),{}),define(t[383],n([8]),{}),define(t[384],n([8]),{}),define(t[385],n([8]),{}),define(t[386],n([8]),{}),define(t[388],n([8]),{}),define(t[390],n([8]),{}),define(t[398],n([8]),{}),define(t[401],n([8]),{}),define(t[402],n([8]),{}),define(t[404],n([8]),{}),define(t[406],n([8]),{}),define(t[407],n([8]),{}),define(t[408],n([8]),{}),define(t[410],n([8]),{}),define(t[413],n([8]),{}),define(t[416],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}) ;var n=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=n;var i=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",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"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",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"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.letterSpacing=this._bareFontInfo.letterSpacing+"px",o.style.fontStyle="italic",t.appendChild(o);for(var r=[],s=0,a=this._requests.length;s0){n=o[0].getStartPosition();var r=t.getTopForPosition(n.lineNumber,n.column);i=t.getScrollTop()-r}}return new e(n,i)},e.prototype.restore=function(e){if(this._visiblePosition){ var t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}},e}();t.StableEditorScrollState=o}),define(t[116],n([1,0,2,42,7,73]),function(e,t,n,i,r,s){"use strict";function a(e){var t=r.getDomNodePagePosition(e);return new d(t.left,t.top,t.width,t.height)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.toClientCoordinates=function(){return new u(this.x-r.StandardWindow.scrollX,this.y-r.StandardWindow.scrollY)},e}();t.PageCoordinates=l;var u=function(){function e(e,t){this.clientX=e,this.clientY=t}return e.prototype.toPageCoordinates=function(){return new l(this.clientX+r.StandardWindow.scrollX,this.clientY+r.StandardWindow.scrollY)},e}();t.ClientCoordinates=u;var d=function(){return function(e,t,n,i){this.x=e,this.y=t,this.width=n,this.height=i}}();t.EditorPagePosition=d,t.createEditorPagePosition=a;var c=function(e){function t(t,n){var i=e.call(this,t)||this ;return i.pos=new l(i.posx,i.posy),i.editorPos=a(n),i}return o(t,e),t}(i.StandardMouseEvent);t.EditorMouseEvent=c;var h=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 r.addDisposableListener(e,"contextmenu",function(e){t(n._create(e))})},e.prototype.onMouseUp=function(e,t){var n=this;return r.addDisposableListener(e,"mouseup",function(e){t(n._create(e))})},e.prototype.onMouseDown=function(e,t){var n=this;return r.addDisposableListener(e,"mousedown",function(e){t(n._create(e))})},e.prototype.onMouseLeave=function(e,t){var n=this;return r.addDisposableNonBubblingMouseOutListener(e,function(e){t(n._create(e))})},e.prototype.onMouseMoveThrottled=function(e,t,n,i){var o=this;return r.addDisposableThrottledListener(e,"mousemove",t,function(e,t){return n(e,o._create(t))},i)},e}();t.EditorMouseEventFactory=h;var p=function(e){function t(t){var n=e.call(this)||this ;return n._editorViewDomNode=t,n._globalMouseMoveMonitor=n._register(new s.GlobalMouseMoveMonitor),n._keydownListener=null,n}return o(t,e),t.prototype.startMonitoring=function(e,t,n){var i=this;this._keydownListener=r.addStandardDisposableListener(document,"keydown",function(e){e.toKeybinding().isModifierKey()||i._globalMouseMoveMonitor.stopMonitoring(!0)},!0);this._globalMouseMoveMonitor.startMonitoring(function(t,n){return e(t,new c(n,i._editorViewDomNode))},t,function(){i._keydownListener.dispose(),n()})},t}(n.Disposable);t.GlobalEditorMouseMoveMonitor=p}),define(t[423],n([1,0,9]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._onCodeEditorAdd=new n.Emitter,this._onCodeEditorRemove=new n.Emitter,this._onDiffEditorAdd=new n.Emitter,this._onDiffEditorRemove=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)},e.prototype.listCodeEditors=function(){var e=this;return Object.keys(this._codeEditors).map(function(t){return e._codeEditors[t]})},e.prototype.addDiffEditor=function(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)},e.prototype.removeDiffEditor=function(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)},e.prototype.listDiffEditors=function(){var e=this;return Object.keys(this._diffEditors).map(function(t){return e._diffEditors[t]})},e.prototype.getFocusedCodeEditor=function(){for(var e=null,t=this.listCodeEditors(),n=0;nn||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.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))},e.prototype.containsRange=function(t){return e.containsRange(this,t)},e.containsRange=function(e,t){ return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))},e.prototype.plusRange=function(t){return e.plusRange(this,t)},e.plusRange=function(t,n){var i,o,r,s;return n.startLineNumbert.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,l=n.startColumn,u=n.endLineNumber,d=n.endColumn;return iu?(r=u,s=d):r===u&&(s=Math.min(s,d)),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.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.fromPositions=function(t,n){return void 0===n&&(n=t),new e(t.lineNumber,t.column,n.lineNumber,n.column)},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.endLineNumbere.startLineNumber},e}();t.Range=i}),define(t[185],n([1,0,85,28,3,2,9]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={followsCaret:!0,ignoreCharChanges:!0, alwaysRevealFirst:!0},l=function(){function e(e,t){void 0===t&&(t={});var n=this;this._onDidUpdate=new s.Emitter,this._editor=e,this._options=i.mixin(t,a,!1),this.disposed=!1,this._disposables=[],this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=this._options.alwaysRevealFirst,this._disposables.push(this._editor.onDidDispose(function(){return n.dispose()})),this._disposables.push(this._editor.onDidUpdateDiff(function(){return n._onDiffUpdated()})),this._options.followsCaret&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeCursorPosition(function(e){n.ignoreSelectionChange||(n.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._disposables.push(this._editor.getModifiedEditor().onDidChangeModel(function(e){n.revealFirst=!0})),this._init()}return e.prototype._init=function(){this._editor.getLineChanges()},e.prototype._onDiffUpdated=function(){this._init(),this._compute(this._editor.getLineChanges()), this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))},e.prototype._compute=function(e){var t=this;this.ranges=[],e&&e.forEach(function(e){!t._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(function(e){t.ranges.push({rhs:!0,range:new o.Range(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):t.ranges.push({rhs:!0,range:new o.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._onDidUpdate.fire(this)},e.prototype._initIdx=function(e){for(var t=!1,n=this._editor.getPosition(),i=0,o=this.ranges.length;i=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));var i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{var o=i.range.getStartPosition();this._editor.setPosition(o),this._editor.revealPositionInCenter(o,t)}finally{this.ignoreSelectionChange=!1}}},e.prototype.canNavigate=function(){return this.ranges&&this.ranges.length>0},e.prototype.next=function(e){void 0===e&&(e=0),this._move(!0,e)},e.prototype.previous=function(e){void 0===e&&(e=0),this._move(!1,e)},e.prototype.dispose=function(){r.dispose(this._disposables),this._disposables.length=0,this._onDidUpdate.dispose(),this.ranges=null,this.disposed=!0},e}();t.DiffNavigator=l}),define(t[53],n([1,0,3]),function(e,t,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){}return e.insert=function(e,t){return{range:new n.Range(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}},e.delete=function(e){return{range:e,text:null}},e.replace=function(e,t){return{range:e,text:t}},e.replaceMove=function(e,t){return{range:e,text:t,forceMoveMarkers:!0}},e}();t.EditOperation=i}),define(t[431],n([1,0,6,53,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,l=0,u=t.length,d=1,c=e.getLineCount();d<=c;d++){var h=e.getLineContent(d),p=h.length+1,f=0;if(!(l255?255:0|e},e}();t.RGBA8=n}),define(t[21],n([1,0,3,12]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r;!function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(r=t.SelectionDirection||(t.SelectionDirection={}));var s=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 o(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?r.LTR:r.RTL},t.prototype.setEndPosition=function(e,n){ return this.getDirection()===r.LTR?new t(this.startLineNumber,this.startColumn,e,n):new t(e,n,this.startLineNumber,this.startColumn)},t.prototype.getPosition=function(){return new i.Position(this.positionLineNumber,this.positionColumn)},t.prototype.setStartPosition=function(e,n){return this.getDirection()===r.LTR?new t(e,n,this.endLineNumber,this.endColumn):new t(this.endLineNumber,this.endColumn,e,n)},t.fromPositions=function(e,n){return void 0===n&&(n=e),new t(e.lineNumber,e.column,n.lineNumber,n.column)},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=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(var n=0;n=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]},e.prototype.onLinesDeleted=function(e,t){if(0===this.getCount())return null ;var n=this.getStartLineNumber(),i=this.getEndLineNumber();if(ti)return null;for(var r=0,s=0,a=n;a<=i;a++){var l=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===s?(r=l,s=1):s++)}if(e=n&&r<=i&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o},e.prototype.onLinesInserted=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){return this._lines.splice(e-this._rendLineNumberStart,o-e+1)}for(var r=[],s=0;sn))for(var a=Math.max(t,s.fromLineNumber),l=Math.min(n,s.toLineNumber),u=a;u<=l;u++){var d=u-this._rendLineNumberStart;this._lines[d].onTokensChanged(),i=!0}}return i},e}();t.RenderedLinesCollection=o;var r=function(){function e(e){var t=this;this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new o(function(){return t._host.createVisibleLine()})}return e.prototype._createDomNode=function(){var e=n.createFastDomNode(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"), e.domNode.setAttribute("aria-hidden","true"),e},e.prototype.onConfigurationChanged=function(e){return e.layoutInfo},e.prototype.onFlushed=function(e){return this._linesCollection.flush(),!0},e.prototype.onLinesChanged=function(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)},e.prototype.onLinesDeleted=function(e){var t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(var n=0,i=t.length;nt){(s=t)<=(a=Math.min(n,o.rendLineNumberStart-1))&&(this._insertLinesBefore(o,s,a,i,t),o.linesLength+=a-s+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,l),o.linesLength-=l)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1n){var s=Math.max(0,n-o.rendLineNumberStart+1),a=o.linesLength-1,l=a-s+1;l>0&&(this._removeLinesAfter(o,l),o.linesLength-=l)}return this._finishRendering(o,!1,i),o},e.prototype._renderUntouchedLines=function(e,t,n,i,o){for(var r=e.rendLineNumberStart,s=e.lines,a=t;a<=n;a++){var l=r+a;s[a].layoutLine(l,i[l-o])}},e.prototype._insertLinesBefore=function(e,t,n,i,o){ for(var r=[],s=0,a=t;a<=n;a++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)},e.prototype._removeLinesBefore=function(e,t){for(var n=0;n=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;for(var o=0;o4294967295?4294967295:0|e}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,n){for(var i=new Uint8Array(e*t),o=0,r=e*t;o255?255:0|e},t.toUint32=n,t.toUint32Array=function(e){for(var t=e.length,i=new Uint32Array(t),o=0;o=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(){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=o}),define(t[89],n([1,0,83]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){for(var n=e.call(this,0)||this,i=0,o=t.length;i1&&v>1;){if((S=f.charCodeAt(m-2))!==(w=g.charCodeAt(v-2)))break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(r,s+1,1,m,l+1,1,v);for(var _=a._getLastNonBlankColumn(f,1),y=a._getLastNonBlankColumn(g,1),C=f.length+1,b=g.length+1;_, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"},e.readFromTextArea=function(t){return new e(t.getValue(),t.getSelectionStart(),t.getSelectionEnd(),null,null)},e.prototype.collapseSelection=function(){return new e(this.value,this.value.length,this.value.length,null,null)},e.prototype.writeToTextArea=function(e,t,n){t.setValue(e,this.value),n&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)},e.prototype.deduceEditorPosition=function(e){if(e<=this.selectionStart){t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){ var t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}var n=this.value.substring(this.selectionStart,e);if(-1===n.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,n,1);var i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)},e.prototype._finishDeduceEditorPosition=function(e,t,n){for(var i=0,o=-1;-1!==(o=t.indexOf("\n",o+1));)i++;return[e,n*t.length,i]},e.selectedText=function(t){return new e(t,0,t.length,null,null)},e.deduceInput=function(e,t,n,i){if(!e)return{text:"",replaceCharCnt:0};var o=e.value,s=e.selectionStart,a=e.selectionEnd,l=t.value,u=t.selectionStart,d=t.selectionEnd;i&&o.length>0&&s===a&&u===d&&!r.startsWith(l,o)&&r.endsWith(l,o)&&(s=0,a=0);var c=o.substring(a),h=l.substring(d),p=r.commonSuffixLength(c,h);l=l.substring(0,l.length-p) ;var f=(o=o.substring(0,o.length-p)).substring(0,s),g=l.substring(0,u),m=r.commonPrefixLength(f,g);if(l=l.substring(m),o=o.substring(m),u-=m,s-=m,d-=m,a-=m,n&&u===d&&o.length>0){var v=null;if(u===l.length?r.startsWith(l,o)&&(v=l.substring(o.length)):r.endsWith(l,o)&&(v=l.substring(0,l.length-o.length)),null!==v&&v.length>0&&(/\uFE0F/.test(v)||r.containsEmoji(v)))return{text:v,replaceCharCnt:0}}if(u===d){if(o===l&&0===s&&a===o.length&&u===l.length&&-1===l.indexOf("\n")&&r.containsFullWidthCharacter(l))return{text:"",replaceCharCnt:0};return{text:l,replaceCharCnt:f.length-m}}return{text:l,replaceCharCnt:a-s}},e.EMPTY=new e("",0,0,null,null),e}();t.TextAreaState=s;var a=function(){function e(){}return e._getPageOfLine=function(t){return Math.floor((t-1)/e._LINES_PER_PAGE)},e._getRangeForPage=function(t){var i=t*e._LINES_PER_PAGE,o=i+1,r=i+e._LINES_PER_PAGE;return new n.Range(o,1,r+1,1)},e.fromEditorSelection=function(t,r,a,l){ var u=e._getPageOfLine(a.startLineNumber),d=e._getRangeForPage(u),c=e._getPageOfLine(a.endLineNumber),h=e._getRangeForPage(c),p=d.intersectRanges(new n.Range(1,1,a.startLineNumber,a.startColumn)),f=r.getValueInRange(p,o.EndOfLinePreference.LF),g=r.getLineCount(),m=r.getLineMaxColumn(g),v=h.intersectRanges(new n.Range(a.endLineNumber,a.endColumn,g,m)),_=r.getValueInRange(v,o.EndOfLinePreference.LF),y=null;if(u===c||u+1===c)y=r.getValueInRange(a,o.EndOfLinePreference.LF);else{var C=d.intersectRanges(a),b=h.intersectRanges(a);y=r.getValueInRange(C,o.EndOfLinePreference.LF)+String.fromCharCode(8230)+r.getValueInRange(b,o.EndOfLinePreference.LF)}if(l){f.length>500&&(f=f.substring(f.length-500,f.length)),_.length>500&&(_=_.substring(0,500)),y.length>1e3&&(y=y.substring(0,500)+String.fromCharCode(8230)+y.substring(y.length-500,y.length))}return new s(f+y+_,f.length,f.length+y.length,new i.Position(a.startLineNumber,a.startColumn),new i.Position(a.endLineNumber,a.endColumn))},e._LINES_PER_PAGE=10,e}() ;t.PagedScreenReaderStrategy=a}),define(t[165],n([1,0,14,21,6,9,2,164,30,18,7]),function(e,t,n,i,r,s,a,l,u,d,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyOptions={forceCopyWithSyntaxHighlighting:!1};var h=function(e){function a(t,o){var a=e.call(this)||this;a._onFocus=a._register(new s.Emitter),a.onFocus=a._onFocus.event,a._onBlur=a._register(new s.Emitter),a.onBlur=a._onBlur.event,a._onKeyDown=a._register(new s.Emitter),a.onKeyDown=a._onKeyDown.event,a._onKeyUp=a._register(new s.Emitter),a.onKeyUp=a._onKeyUp.event,a._onCut=a._register(new s.Emitter),a.onCut=a._onCut.event,a._onPaste=a._register(new s.Emitter),a.onPaste=a._onPaste.event,a._onType=a._register(new s.Emitter),a.onType=a._onType.event,a._onCompositionStart=a._register(new s.Emitter),a.onCompositionStart=a._onCompositionStart.event,a._onCompositionUpdate=a._register(new s.Emitter),a.onCompositionUpdate=a._onCompositionUpdate.event,a._onCompositionEnd=a._register(new s.Emitter),a.onCompositionEnd=a._onCompositionEnd.event, a._onSelectionChangeRequest=a._register(new s.Emitter),a.onSelectionChangeRequest=a._onSelectionChangeRequest.event,a._host=t,a._textArea=a._register(new f(o)),a._lastTextAreaEvent=0,a._asyncTriggerCut=a._register(new n.RunOnceScheduler(function(){return a._onCut.fire()},0)),a._textAreaState=l.TextAreaState.EMPTY,a.writeScreenReaderContent("ctor"),a._hasFocus=!1,a._isDoingComposition=!1,a._nextCommand=0,a._register(c.addStandardDisposableListener(o.domNode,"keydown",function(e){!a._isDoingComposition||109!==e.keyCode&&1!==e.keyCode||e.stopPropagation(),e.equals(9)&&e.preventDefault(),a._onKeyDown.fire(e)})),a._register(c.addStandardDisposableListener(o.domNode,"keyup",function(e){a._onKeyUp.fire(e)})),a._register(c.addDisposableListener(o.domNode,"compositionstart",function(e){a._lastTextAreaEvent=1,a._isDoingComposition||(a._isDoingComposition=!0,u.isEdgeOrIE||a._setAndWriteTextAreaState("compositionstart",l.TextAreaState.EMPTY),a._onCompositionStart.fire())}));var h=function(e,t){ var n=a._textAreaState,i=l.TextAreaState.readFromTextArea(a._textArea);return[i,l.TextAreaState.deduceInput(n,i,e,t)]},g=function(e){var t=a._textAreaState,n=l.TextAreaState.selectedText(e);return[n,{text:n.value,replaceCharCnt:t.selectionEnd-t.selectionStart}]},m=function(e){return!(!u.isEdgeOrIE||"ja"!==e)||!(!u.isIE||0!==e.indexOf("zh-Han"))};a._register(c.addDisposableListener(o.domNode,"compositionupdate",function(e){if(a._lastTextAreaEvent=2,m(e.locale)){var t=h(!1,!1),n=t[0],i=t[1];return a._textAreaState=n,a._onType.fire(i),void a._onCompositionUpdate.fire(e)}var o=g(e.data),r=o[0],s=o[1];a._textAreaState=r,a._onType.fire(s),a._onCompositionUpdate.fire(e)})),a._register(c.addDisposableListener(o.domNode,"compositionend",function(e){if(a._lastTextAreaEvent=3,m(e.locale)){var t=h(!1,!1),n=t[0],i=t[1];a._textAreaState=n,a._onType.fire(i)}else{var o=g(e.data),n=o[0],i=o[1];a._textAreaState=n,a._onType.fire(i)}(u.isEdgeOrIE||u.isChrome)&&(a._textAreaState=l.TextAreaState.readFromTextArea(a._textArea)), a._isDoingComposition&&(a._isDoingComposition=!1,a._onCompositionEnd.fire())})),a._register(c.addDisposableListener(o.domNode,"input",function(){var e=8===a._lastTextAreaEvent;if(a._lastTextAreaEvent=4,a._textArea.setIgnoreSelectionChangeTime("received input event"),!a._isDoingComposition){var t=h(d.isMacintosh,e&&d.isMacintosh),n=t[0],i=t[1];0===i.replaceCharCnt&&1===i.text.length&&r.isHighSurrogate(i.text.charCodeAt(0))||(a._textAreaState=n,0===a._nextCommand?""!==i.text&&a._onType.fire(i):(""!==i.text&&a._onPaste.fire({text:i.text}),a._nextCommand=0))}})),a._register(c.addDisposableListener(o.domNode,"cut",function(e){a._lastTextAreaEvent=5,a._textArea.setIgnoreSelectionChangeTime("received cut event"),a._ensureClipboardGetsEditorSelection(e),a._asyncTriggerCut.schedule()})),a._register(c.addDisposableListener(o.domNode,"copy",function(e){a._lastTextAreaEvent=6,a._ensureClipboardGetsEditorSelection(e)})),a._register(c.addDisposableListener(o.domNode,"paste",function(e){if(a._lastTextAreaEvent=7, a._textArea.setIgnoreSelectionChangeTime("received paste event"),p.canUseTextData(e)){var t=p.getTextData(e);""!==t&&a._onPaste.fire({text:t})}else a._textArea.getSelectionStart()!==a._textArea.getSelectionEnd()&&a._setAndWriteTextAreaState("paste",l.TextAreaState.EMPTY),a._nextCommand=1})),a._register(c.addDisposableListener(o.domNode,"focus",function(){a._lastTextAreaEvent=8,a._setHasFocus(!0)})),a._register(c.addDisposableListener(o.domNode,"blur",function(){a._lastTextAreaEvent=9,a._setHasFocus(!1)}));var v=0;return a._register(c.addDisposableListener(document,"selectionchange",function(e){if(a._hasFocus&&!a._isDoingComposition&&u.isChrome&&d.isWindows){var t=Date.now(),n=t-v;if(v=t,!(n<5)){var o=t-a._textArea.getIgnoreSelectionChangeTime();if(a._textArea.resetSelectionChangeTime(),!(o<100)&&a._textAreaState.selectionStartPosition&&a._textAreaState.selectionEndPosition){var r=a._textArea.getValue();if(a._textAreaState.value===r){var s=a._textArea.getSelectionStart(),l=a._textArea.getSelectionEnd() ;if(a._textAreaState.selectionStart!==s||a._textAreaState.selectionEnd!==l){var c=a._textAreaState.deduceEditorPosition(s),h=a._host.deduceModelPosition(c[0],c[1],c[2]),p=a._textAreaState.deduceEditorPosition(l),f=a._host.deduceModelPosition(p[0],p[1],p[2]),g=new i.Selection(h.lineNumber,h.column,f.lineNumber,f.column);a._onSelectionChangeRequest.fire(g)}}}}}})),a}return o(a,e),a.prototype.dispose=function(){e.prototype.dispose.call(this)},a.prototype.focusTextArea=function(){this._setHasFocus(!0)},a.prototype.isFocused=function(){return this._hasFocus},a.prototype._setHasFocus=function(e){this._hasFocus!==e&&(this._hasFocus=e,this._hasFocus&&(u.isEdge?this._setAndWriteTextAreaState("focusgain",l.TextAreaState.EMPTY):this.writeScreenReaderContent("focusgain")),this._hasFocus?this._onFocus.fire():this._onBlur.fire())},a.prototype._setAndWriteTextAreaState=function(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}, a.prototype.writeScreenReaderContent=function(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))},a.prototype._ensureClipboardGetsEditorSelection=function(e){var n=this._host.getPlainTextToCopy();if(p.canUseTextData(e)){var i=null;u.hasClipboardSupport()&&(n.length<65536||t.CopyOptions.forceCopyWithSyntaxHighlighting)&&(i=this._host.getHTMLToCopy()),p.setTextData(e,n,i)}else this._setAndWriteTextAreaState("copy or cut",l.TextAreaState.selectedText(n))},a}(a.Disposable);t.TextAreaInput=h;var p=function(){function e(){}return e.canUseTextData=function(e){return!!e.clipboardData||!!window.clipboardData},e.getTextData=function(e){if(e.clipboardData)return e.preventDefault(),e.clipboardData.getData("text/plain");if(window.clipboardData)return e.preventDefault(),window.clipboardData.getData("Text");throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")},e.setTextData=function(e,t,n){ if(e.clipboardData)return e.clipboardData.setData("text/plain",t),null!==n&&e.clipboardData.setData("text/html",n),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")},e}(),f=function(e){function t(t){var n=e.call(this)||this;return n._actual=t,n._ignoreSelectionChangeTime=0,n}return o(t,e),t.prototype.setIgnoreSelectionChangeTime=function(e){this._ignoreSelectionChangeTime=Date.now()},t.prototype.getIgnoreSelectionChangeTime=function(){return this._ignoreSelectionChangeTime},t.prototype.resetSelectionChangeTime=function(){this._ignoreSelectionChangeTime=0},t.prototype.getValue=function(){return this._actual.domNode.value},t.prototype.setValue=function(e,t){var n=this._actual.domNode;n.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),n.value=t)},t.prototype.getSelectionStart=function(){return this._actual.domNode.selectionStart}, t.prototype.getSelectionEnd=function(){return this._actual.domNode.selectionEnd},t.prototype.setSelectionRange=function(e,t,n){var i=this._actual.domNode,o=document.activeElement===i,r=i.selectionStart,s=i.selectionEnd;if(o&&r===t&&s===n)u.isFirefox&&window.parent!==window&&i.focus();else{if(o)return this.setIgnoreSelectionChangeTime("setSelectionRange"),i.setSelectionRange(t,n),void(u.isFirefox&&window.parent!==window&&i.focus());try{var a=c.saveParentsScrollTop(i);this.setIgnoreSelectionChangeTime("setSelectionRange"),i.focus(),i.setSelectionRange(t,n),c.restoreParentsScrollTop(i,a)}catch(e){}}},t}(a.Disposable)}),define(t[483],n([1,0,10,24]),function(e,t,n,i){"use strict";function o(e){return"\n"===e.getEOL()?i.EndOfLineSequence.LF:i.EndOfLineSequence.CRLF}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.beforeVersionId=e,this.beforeCursorState=t,this.afterCursorState=null,this.afterVersionId=-1,this.editOperations=[]}return e.prototype.undo=function(e){ for(var t=this.editOperations.length-1;t>=0;t--)this.editOperations[t]={operations:e.applyEdits(this.editOperations[t].operations)}},e.prototype.redo=function(e){for(var t=0;t0){var e=this.past.pop();try{e.undo(this.model)}catch(e){return n.onUnexpectedError(e), this.clear(),null}return this.future.push(e),{selections:e.beforeCursorState,recordedVersionId:e.beforeVersionId}}return null},e.prototype.canUndo=function(){return this.past.length>0},e.prototype.redo=function(){if(this.future.length>0){var e=this.future.pop();try{e.redo(this.model)}catch(e){return n.onUnexpectedError(e),this.clear(),null}return this.past.push(e),{selections:e.afterCursorState,recordedVersionId:e.afterVersionId}}return null},e.prototype.canRedo=function(){return this.future.length>0},e}();t.EditStack=a}),define(t[486],n([1,0]),function(e,t){"use strict";function n(e,t,n,i){var o;for(o=0;o0&&s>0)return 0;if(u>0&&d>0)return 0;var h=Math.abs(s-d),p=Math.abs(r-u);return 0===h?p:p%h==0?p/h:0}Object.defineProperty(t,"__esModule",{value:!0}),t.guessIndentation=function(e,t,i){ for(var o=Math.min(e.getLineCount(),1e4),r=0,s=0,a="",l=0,u=[0,0,0,0,0,0,0,0,0],d=1;d<=o;d++){for(var c=e.getLineLength(d),h=e.getLineContent(d),p=c<=65536,f=!1,g=0,m=0,v=0,_=0,y=c;_0?r++:m>1&&s++;var b=n(a,l,h,g);b<=8&&u[b]++,a=h,l=g}}var S=i;r!==s&&(S=rE&&(E=t,w=e)}),{insertSpaces:S,tabSize:w}}}),define(t[487],n([1,0]),function(e,t){"use strict";function n(e){return(1&e.metadata)>>>0}function i(e,t){e.metadata=254&e.metadata|t<<0}function o(e){return(2&e.metadata)>>>1==1}function r(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function s(e){return(4&e.metadata)>>>2==1}function a(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function l(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function u(e,t){e.metadata=207&e.metadata|t<<4}function d(e,t,n,i){return en)&&(1!==i&&(2===i||t))}function c(e,t,n,i,o){var r=function(e){ return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=n-t,u=i,c=Math.min(l,u),h=e.start,p=!1,f=e.end,g=!1,m=o?1:l>0?2:0;if(!p&&d(h,s,t,m)&&(p=!0),!g&&d(f,a,t,m)&&(g=!0),c>0&&!o){m=l>u?2:0;!p&&d(h,s,t+c,m)&&(p=!0),!g&&d(f,a,t+c,m)&&(g=!0)}m=o?1:0;!p&&d(h,s,n,m)&&(e.start=t+u,p=!0),!g&&d(f,a,n,m)&&(e.end=t+u,g=!0);var v=u-l;p||(e.start=Math.max(0,h+v),p=!0),g||(e.end=Math.max(0,f+v),g=!0),e.start>e.end&&(e.end=e.start)}function h(e,o){if(e.root===t.SENTINEL)return o.parent=t.SENTINEL,o.left=t.SENTINEL,o.right=t.SENTINEL,i(o,0),e.root=o,e.root;!function(e,n){var o=0,r=e.root,s=n.start,a=n.end;for(;;){if(C(s,a,r.start+o,r.end+o)<0){if(r.left===t.SENTINEL){n.start-=o,n.end-=o,n.maxEnd-=o,r.left=n;break}r=r.left}else{if(r.right===t.SENTINEL){n.start-=o+r.delta,n.end-=o+r.delta,n.maxEnd-=o+r.delta,r.right=n;break}o+=r.delta,r=r.right}}n.parent=r,n.left=t.SENTINEL,n.right=t.SENTINEL,i(n,1)}(e,o),y(o.parent);for(var r=o;r!==e.root&&1===n(r.parent);)if(r.parent===r.parent.parent.left){ 1===n(s=r.parent.parent.right)?(i(r.parent,0),i(s,0),i(r.parent.parent,1),r=r.parent.parent):(r===r.parent.right&&g(e,r=r.parent),i(r.parent,0),i(r.parent.parent,1),m(e,r.parent.parent))}else{var s=r.parent.parent.left;1===n(s)?(i(r.parent,0),i(s,0),i(r.parent.parent,1),r=r.parent.parent):(r===r.parent.left&&m(e,r=r.parent),i(r.parent,0),i(r.parent.parent,1),g(e,r.parent.parent))}return i(e.root,0),o}function p(e,o){var r,s;if(o.left===t.SENTINEL?(s=o,(r=o.right).delta+=o.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),r.start+=o.delta,r.end+=o.delta):o.right===t.SENTINEL?(r=o.left,s=o):((r=(s=function(e){for(;e.left!==t.SENTINEL;)e=e.left;return e}(o.right)).right).start+=s.delta,r.end+=s.delta,r.delta+=s.delta,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),s.start+=o.delta,s.end+=o.delta,s.delta=o.delta,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0)),s===e.root)return e.root=r,i(r,0),o.detach(),f(),_(r), void(e.root.parent=t.SENTINEL);var a=1===n(s);if(s===s.parent.left?s.parent.left=r:s.parent.right=r,s===o?r.parent=s.parent:(s.parent===o?r.parent=s:r.parent=s.parent,s.left=o.left,s.right=o.right,s.parent=o.parent,i(s,n(o)),o===e.root?e.root=s:o===o.parent.left?o.parent.left=s:o.parent.right=s,s.left!==t.SENTINEL&&(s.left.parent=s),s.right!==t.SENTINEL&&(s.right.parent=s)),o.detach(),a)return y(r.parent),s!==o&&(y(s),y(s.parent)),void f();y(r),y(r.parent),s!==o&&(y(s),y(s.parent));for(var l;r!==e.root&&0===n(r);)r===r.parent.left?(1===n(l=r.parent.right)&&(i(l,0),i(r.parent,1),g(e,r.parent),l=r.parent.right),0===n(l.left)&&0===n(l.right)?(i(l,1),r=r.parent):(0===n(l.right)&&(i(l.left,0),i(l,1),m(e,l),l=r.parent.right),i(l,n(r.parent)),i(r.parent,0),i(l.right,0),g(e,r.parent),r=e.root)):(1===n(l=r.parent.left)&&(i(l,0),i(r.parent,1),m(e,r.parent),l=r.parent.left),0===n(l.left)&&0===n(l.right)?(i(l,1),r=r.parent):(0===n(l.left)&&(i(l.right,0),i(l,1),g(e,l),l=r.parent.left),i(l,n(r.parent)),i(r.parent,0), i(l.left,0),m(e,r.parent),r=e.root));i(r,0),f()}function f(){t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.delta=0,t.SENTINEL.start=0,t.SENTINEL.end=0}function g(e,n){var i=n.right;i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=n.delta,i.end+=n.delta,n.right=i.left,i.left!==t.SENTINEL&&(i.left.parent=n),i.parent=n.parent,n.parent===t.SENTINEL?e.root=i:n===n.parent.left?n.parent.left=i:n.parent.right=i,i.left=n,n.parent=i,_(n),_(i)}function m(e,n){var i=n.left;n.delta-=i.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start-=i.delta,n.end-=i.delta,n.left=i.right,i.right!==t.SENTINEL&&(i.right.parent=n),i.parent=n.parent,n.parent===t.SENTINEL?e.root=i:n===n.parent.right?n.parent.right=i:n.parent.left=i,i.right=n,n.parent=i,_(n),_(i)}function v(e){var n=e.end;if(e.left!==t.SENTINEL){var i=e.left.maxEnd;i>n&&(n=i)}if(e.right!==t.SENTINEL){var o=e.right.maxEnd+e.delta;o>n&&(n=o)}return n}function _(e){e.maxEnd=v(e)}function y(e){ for(;e!==t.SENTINEL;){var n=v(e);if(e.maxEnd===n)return;e.maxEnd=n,e=e.parent}}function C(e,t,n,i){return e===n?t-i:e-n}Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeColor=n,t.getNodeIsInOverviewRuler=function(e){return(8&e.metadata)>>>3==1};var b=function(){function e(e,t,n){this.metadata=0,this.parent=null,this.left=null,this.right=null,i(this,1),this.start=t,this.end=n,this.delta=0,this.maxEnd=n,this.id=e,this.ownerId=0,this.options=null,a(this,!1),u(this,1),l(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=null,r(this,!1)}return e.prototype.reset=function(e,t,n,i){this.start=t,this.end=n,this.maxEnd=n,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=n,this.range=i},e.prototype.setOptions=function(e){this.options=e;var t=this.options.className;a(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),u(this,this.options.stickiness),l(this,!!this.options.overviewRuler.color)}, e.prototype.setCachedOffsets=function(e,t,n){this.cachedVersionId!==n&&(this.range=null),this.cachedVersionId=n,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t},e.prototype.detach=function(){this.parent=null,this.left=null,this.right=null},e}();t.IntervalNode=b,t.SENTINEL=new b(null,0,0),t.SENTINEL.parent=t.SENTINEL,t.SENTINEL.left=t.SENTINEL,t.SENTINEL.right=t.SENTINEL,i(t.SENTINEL,0);var S=function(){function e(){this.root=t.SENTINEL,this.requestNormalizeDelta=!1}return e.prototype.intervalSearch=function(e,n,i,a,l){return this.root===t.SENTINEL?[]:function(e,n,i,a,l,u){for(var d=e.root,c=0,h=0,p=0,f=[],g=0;d!==t.SENTINEL;)if(o(d))r(d.left,!1),r(d.right,!1),d===d.parent.right&&(c-=d.parent.delta),d=d.parent;else{if(!o(d.left)){if(c+d.maxEndi)r(d,!0);else{if((p=c+d.end)>=n){d.setCachedOffsets(h,p,u);var m=!0;a&&d.ownerId&&d.ownerId!==a&&(m=!1),l&&s(d)&&(m=!1),m&&(f[g++]=d)}r(d,!0), d.right===t.SENTINEL||o(d.right)||(c+=d.delta,d=d.right)}}return r(e.root,!1),f}(this,e,n,i,a,l)},e.prototype.search=function(e,n,i){return this.root===t.SENTINEL?[]:function(e,n,i,a){for(var l=e.root,u=0,d=0,c=0,h=[],p=0;l!==t.SENTINEL;)if(o(l))r(l.left,!1),r(l.right,!1),l===l.parent.right&&(u-=l.parent.delta),l=l.parent;else if(l.left===t.SENTINEL||o(l.left)){d=u+l.start,c=u+l.end,l.setCachedOffsets(d,c,a);var f=!0;n&&l.ownerId&&l.ownerId!==n&&(f=!1),i&&s(l)&&(f=!1),f&&(h[p++]=l),r(l,!0),l.right===t.SENTINEL||o(l.right)||(u+=l.delta,l=l.right)}else l=l.left;return r(e.root,!1),h}(this,e,n,i)},e.prototype.collectNodesFromOwner=function(e){return function(e,n){for(var i=e.root,s=[],a=0;i!==t.SENTINEL;)o(i)?(r(i.left,!1),r(i.right,!1),i=i.parent):i.left===t.SENTINEL||o(i.left)?(i.ownerId===n&&(s[a++]=i),r(i,!0),i.right===t.SENTINEL||o(i.right)||(i=i.right)):i=i.left;return r(e.root,!1),s}(this,e)},e.prototype.collectNodesPostOrder=function(){return function(e){ for(var n=e.root,i=[],s=0;n!==t.SENTINEL;)o(n)?(r(n.left,!1),r(n.right,!1),n=n.parent):n.left===t.SENTINEL||o(n.left)?n.right===t.SENTINEL||o(n.right)?(i[s++]=n,r(n,!0)):n=n.right:n=n.left;return r(e.root,!1),i}(this)},e.prototype.insert=function(e){h(this,e),this._normalizeDeltaIfNecessary()},e.prototype.delete=function(e){p(this,e),this._normalizeDeltaIfNecessary()},e.prototype.resolveNode=function(e,t){for(var n=e,i=0;e!==this.root;)e===e.parent.right&&(i+=e.parent.delta),e=e.parent;var o=n.start+i,r=n.end+i;n.setCachedOffsets(o,r,t)},e.prototype.acceptReplace=function(e,n,i,s){for(var a=function(e,n,i){for(var s=e.root,a=0,l=0,u=0,d=[],c=0;s!==t.SENTINEL;)if(o(s))r(s.left,!1),r(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!o(s.left)){if(a+s.maxEndi?r(s,!0):((u=a+s.end)>=n&&(s.setCachedOffsets(l,u,0),d[c++]=s),r(s,!0),s.right===t.SENTINEL||o(s.right)||(a+=s.delta,s=s.right))}return r(e.root,!1),d }(this,e,e+n),l=0,u=a.length;li?(a.start+=u,a.end+=u,a.delta+=u,(a.delta<-1073741824||a.delta>1073741824)&&(e.requestNormalizeDelta=!0),r(a,!0)):(r(a,!0),a.right===t.SENTINEL||o(a.right)||(l+=a.delta,a=a.right))}r(e.root,!1)}(this,e,e+n,i),this._normalizeDeltaIfNecessary();for(var l=0,u=a.length;l0){var s=t.charCodeAt(i);if(0!==e.get(s))return!0}return!1}(e,t,0,i,o)&&function(e,t,n,i,o){if(i+o===n)return!0;var r=t.charCodeAt(i+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){var s=t.charCodeAt(i+o-1);if(0!==e.get(s))return!0}return!1}(e,t,n,i,o)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t,n,i){this.searchString=e,this.isRegex=t,this.matchCase=n, this.wordSeparators=i}return e._isMultilineRegexSource=function(e){if(!e||0===e.length)return!1;for(var t=0,n=e.length;t=n)break;var i=e.charCodeAt(t);if(110===i||114===i)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:!1,multiline:t,global:!0})}catch(e){return null}if(!i)return null;var o=!this.isRegex&&!t;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new d(i,this.wordSeparators?s.getMapForWordSeparators(this.wordSeparators):null,o?this.searchString:null)},e}();t.SearchParams=u;var d=function(){return function(e,t,n){this.regex=e,this.wordSeparators=t,this.simpleSearch=n}}();t.SearchData=d,t.createFindMatch=a;var c=function(){function e(e){ for(var t=[],n=0,i=0,o=e.length;i>0);t[o]>=e?i=o-1:t[o+1]>=e?(n=o,i=o):n=o+1}return n+1},e}(),h=function(){function e(){}return e.findMatches=function(e,t,n,i,o){var r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,n,new p(r.wordSeparators,r.regex),i,o):this._doFindMatchesLineByLine(e,n,r,i,o):[]},e._getMultilineMatchRange=function(e,t,n,i,r,s){var a,l=0;a="\r\n"===e.getEOL()?t+r+(l=i.findLineFeedCountBeforeOffset(r)):t+r;var u;if("\r\n"===e.getEOL()){var d=i.findLineFeedCountBeforeOffset(r+s.length)-l;u=a+s.length+d}else u=a+s.length;var c=e.getPositionAt(a),h=e.getPositionAt(u);return new o.Range(c.lineNumber,c.column,h.lineNumber,h.column)},e._doFindMatchesMultiline=function(e,t,n,i,o){ var s,l=e.getOffsetAt(t.getStartPosition()),u=e.getValueInRange(t,r.EndOfLinePreference.LF),d="\r\n"===e.getEOL()?new c(u):null,h=[],p=0;for(n.reset(0);s=n.next(u);)if(h[p++]=a(this._getMultilineMatchRange(e,l,u,d,s.index,s[0]),s,i),p>=o)return h;return h},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 l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(n,l,t.startLineNumber,t.startColumn-1,s,r,i,o);for(var u=t.startLineNumber+1;u=c))return s;return s}var _,y=new p(e.wordSeparators,e.regex);y.reset(0);do{if((_=y.next(t))&&(u[s++]=a(new o.Range(n,_.index+1+i,n,_.index+1+_[0].length+i),_,d),s>=c))return s}while(_);return s},e.findNextMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,n,r,i):this._doFindNextMatchLineByLine(e,n,r,i)},e._doFindNextMatchMultiline=function(e,t,n,s){var l=new i.Position(t.lineNumber,1),u=e.getOffsetAt(l),d=e.getLineCount(),h=e.getValueInRange(new o.Range(l.lineNumber,l.column,d,e.getLineMaxColumn(d)),r.EndOfLinePreference.LF),p="\r\n"===e.getEOL()?new c(h):null;n.reset(t.column-1);var f=n.next(h) ;return f?a(this._getMultilineMatchRange(e,u,h,p,f.index,f[0]),f,s):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new i.Position(1,1),n,s):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 l=1;l<=o;l++){var u=(r+l-1)%o,d=e.getLineContent(u+1),c=this._findFirstMatchInLine(n,d,u+1,1,i);if(c)return c}return null},e._findFirstMatchInLine=function(e,t,n,i,r){e.reset(i-1);var s=e.next(t);return s?a(new o.Range(n,s.index+1,n,s.index+1+s[0].length),s,r):null},e.findPreviousMatch=function(e,t,n,i){var o=t.parseSearchRequest();if(!o)return null;var r=new p(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,n,r,i):this._doFindPreviousMatchLineByLine(e,n,r,i)},e._doFindPreviousMatchMultiline=function(e,t,n,r){var s=this._doFindMatchesMultiline(e,new o.Range(1,1,t.lineNumber,t.column),n,r,9990);if(s.length>0)return s[s.length-1] ;var a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new i.Position(a,e.getLineMaxColumn(a)),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 l=1;l<=o;l++){var u=(o+r-l-1)%o,d=e.getLineContent(u+1),c=this._findLastMatchInLine(n,d,u+1,i);if(c)return c}return null},e._findLastMatchInLine=function(e,t,n,i){var r,s=null;for(e.reset(0);r=e.next(t);)s=a(new o.Range(n,r.index+1,n,r.index+1+r[0].length),r,i);return s},e}();t.TextModelSearch=h,t.isValidMatch=l;var p=function(){function e(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}return e.prototype.reset=function(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0},e.prototype.next=function(e){var t,n=e.length;do{ if(this._prevMatchStartIndex+this._prevMatchLength===n)return null;if(!(t=this._searchRegex.exec(e)))return null;var i=t.index,o=t[0].length;if(i===this._prevMatchStartIndex&&o===this._prevMatchLength)return null;if(this._prevMatchStartIndex=i,this._prevMatchLength=o,!this._wordSeparators||l(this._wordSeparators,e,n,i,o))return t}while(t);return null},e}();t.Searcher=p}),define(t[167],n([1,0,12,3,495,136,24]),function(e,t,n,i,o,r,s){"use strict";function a(e){var t;return(t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length)).set(e,0),t}function l(e,t){void 0===t&&(t=!0);for(var n=[0],i=1,o=0,r=e.length;o126)&&(s=!1)}var h=new u(a(e),i,o,r,s);return e.length=0,h};var d=function(){return function(e,t,n,i,o){this.bufferIndex=e,this.start=t,this.end=n,this.lineFeedCnt=i,this.length=o}}();t.Piece=d;var c=function(){return function(e,t){this.buffer=e,this.lineStarts=t}}();t.StringBuffer=c;var h=function(){function e(e){this._limit=e,this._cache=[]}return e.prototype.get=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartOffset<=e&&n.nodeStartOffset+n.node.piece.length>=e)return n}return null},e.prototype.get2=function(e){for(var t=this._cache.length-1;t>=0;t--){var n=this._cache[t];if(n.nodeStartLineNumber&&n.nodeStartLineNumber=e)return n}return null},e.prototype.set=function(e){ this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)},e.prototype.valdiate=function(e){for(var t=!1,n=0;n=e)&&(this._cache[n]=null,t=!0)}if(t){for(var o=[],n=0;n0){e[r].lineStarts||(e[r].lineStarts=l(e[r].buffer));var a=new d(r+1,{line:0,column:0},{line:e[r].lineStarts.length-1,column:e[r].buffer.length-e[r].lineStarts[e[r].lineStarts.length-1]},e[r].lineStarts.length-1,e[r].buffer.length);this._buffers.push(e[r]),i=this.rbInsertRight(i,a)}this._searchCache=new h(1), this._lastVisitedLine={lineNumber:0,value:null},this.computeBufferMetadata()},e.prototype.normalizeEOL=function(e){var n=this,i=t.AverageBufferSize,o=i-Math.floor(i/3),r=2*o,s="",a=0,u=[];if(this.iterate(this.root,function(t){var i=n.getNodeContent(t),d=i.length;if(a<=o||a+d0){var d=s.replace(/\r\n|\r|\n/g,e);u.push(new c(d,l(d)))}this.create(u,e,!0)},e.prototype.getEOL=function(){return this._EOL},e.prototype.setEOL=function(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)},e.prototype.getOffsetAt=function(e,t){for(var n=0,i=this.root;i!==o.SENTINEL;)if(i.left!==o.SENTINEL&&i.lf_left+1>=e)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt+1>=e){n+=i.size_left;return n+=this.getAccumulatedValue(i,e-i.lf_left-2)+t-1}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}return n},e.prototype.getPositionAt=function(e){e=Math.floor(e),e=Math.max(0,e) ;for(var t=this.root,i=0,r=e;t!==o.SENTINEL;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){var s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){l=r-(a=this.getOffsetAt(i+1,1));return new n.Position(i+1,l+1)}return new n.Position(i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===o.SENTINEL){var a=this.getOffsetAt(i+1,1),l=r-e-a;return new n.Position(i+1,l+1)}t=t.right}return new n.Position(1,1)},e.prototype.getValueInRange=function(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";var n=this.nodeAt2(e.startLineNumber,e.startColumn),i=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(n,i);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o},e.prototype.getValueInRange2=function(e,t){if(e.node===t.node){ var n=e.node,i=this._buffers[n.piece.bufferIndex].buffer,r=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i.substring(r+e.remainder,r+t.remainder)}var s=e.node,a=this._buffers[s.piece.bufferIndex].buffer,l=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start),u=a.substring(l+e.remainder,l+s.piece.length);for(s=s.next();s!==o.SENTINEL;){var d=this._buffers[s.piece.bufferIndex].buffer,c=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);if(s===t.node){u+=d.substring(c,c+t.remainder);break}u+=d.substr(c,s.piece.length),s=s.next()}return u},e.prototype.getLinesContent=function(){return this.getContentOfSubTree(this.root).split(/\r\n|\r|\n/)},e.prototype.getLength=function(){return this._length},e.prototype.getLineCount=function(){return this._lineCnt},e.prototype.getLineContent=function(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e, e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)},e.prototype.getLineCharCode=function(e,t){var n=this.nodeAt2(e,t+1);if(n.remainder===n.node.piece.length){var i=n.node.next();if(!i)return 0;var o=this._buffers[i.piece.bufferIndex],r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o.buffer.charCodeAt(r)}var o=this._buffers[n.node.piece.bufferIndex],s=(r=this.offsetInBuffer(n.node.piece.bufferIndex,n.node.piece.start))+n.remainder;return o.buffer.charCodeAt(s)},e.prototype.getLineLength=function(e){if(e===this.getLineCount()){var t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength},e.prototype.findMatchesInNode=function(e,t,n,o,s,a,l,u,d,c,h){ var p,f=this._buffers[e.piece.bufferIndex],g=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),m=this.offsetInBuffer(e.piece.bufferIndex,s),v=this.offsetInBuffer(e.piece.bufferIndex,a);t.reset(m);var _={line:0,column:0};do{if(p=t.next(f.buffer)){if(p.index>=v)return c;this.positionInBuffer(e,p.index-g,_);var y=this.getLineFeedCnt(e.piece.bufferIndex,s,_),C=_.line===s.line?_.column-s.column+o:_.column+1,b=C+p[0].length;if(h[c++]=r.createFindMatch(new i.Range(n+y,C,n+y,b),p,u),p.index+p[0].length>=v)return c;if(c>=d)return c}}while(p);return c},e.prototype.findMatchesLineByLine=function(e,t,n,i){var o=[],s=0,a=new r.Searcher(t.wordSeparators,t.regex),l=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===l)return[];var u=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===u)return[];var d=this.positionInBuffer(l.node,l.remainder),c=this.positionInBuffer(u.node,u.remainder);if(l.node===u.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,c,t,n,i,s,o),o ;for(var h=e.startLineNumber,p=l.node;p!==u.node;){var f=this.getLineFeedCnt(p.piece.bufferIndex,d,p.piece.end);if(f>=1){var g=this._buffers[p.piece.bufferIndex].lineStarts,m=this.offsetInBuffer(p.piece.bufferIndex,p.piece.start),v=g[d.line+f],_=h===e.startLineNumber?e.startColumn:1;if((s=this.findMatchesInNode(p,a,h,_,d,this.positionInBuffer(p,v-m),t,n,i,s,o))>=i)return o;h+=f}var y=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){b=this.getLineContent(h).substring(y,e.endColumn-1);return s=this._findMatchesInLine(t,a,b,e.endLineNumber,y,s,o,n,i),o}if((s=this._findMatchesInLine(t,a,this.getLineContent(h).substr(y),h,y,s,o,n,i))>=i)return o;h++,p=(l=this.nodeAt2(h,1)).node,d=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){var C=h===e.startLineNumber?e.startColumn-1:0,b=this.getLineContent(h).substring(C,e.endColumn-1);return s=this._findMatchesInLine(t,a,b,e.endLineNumber,C,s,o,n,i),o}var S=h===e.startLineNumber?e.startColumn:1 ;return s=this.findMatchesInNode(u.node,a,h,S,d,c,t,n,i,s,o),o},e.prototype._findMatchesInLine=function(e,t,n,o,a,l,u,d,c){var h=e.wordSeparators;if(!d&&e.simpleSearch){for(var p=e.simpleSearch,f=p.length,g=n.length,m=-f;-1!==(m=n.indexOf(p,m+f));)if((!h||r.isValidMatch(h,n,g,m,f))&&(u[l++]=new s.FindMatch(new i.Range(o,m+1+a,o,m+1+f+a),null),l>=c))return l;return l}var v;t.reset(0);do{if((v=t.next(n))&&(u[l++]=r.createFindMatch(new i.Range(o,v.index+1+a,o,v.index+1+v[0].length+a),v,d),l>=c))return l}while(v);return l},e.prototype.insert=function(e,n,i){if(void 0===i&&(i=!1),this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value=null,this.root!==o.SENTINEL){var r=this.nodeAt(e),s=r.node,a=r.remainder,l=r.nodeStartOffset,u=s.piece,c=u.bufferIndex,h=this.positionInBuffer(s,a) ;if(0===s.piece.bufferIndex&&u.end.line===this._lastChangeBufferPos.line&&u.end.column===this._lastChangeBufferPos.column&&l+u.length===e&&n.lengthe){var p=[],f=new d(u.bufferIndex,h,u.end,this.getLineFeedCnt(u.bufferIndex,h,u.end),this.offsetInBuffer(c,u.end)-this.offsetInBuffer(c,h));if(this.shouldCheckCRLF()&&this.endWithCR(n)){if(10===this.nodeCharCodeAt(s,a)){var g={line:f.start.line+1,column:0};f=new d(f.bufferIndex,g,f.end,this.getLineFeedCnt(f.bufferIndex,g,f.end),f.length-1),n+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(n)){if(13===this.nodeCharCodeAt(s,a-1)){var m=this.positionInBuffer(s,a-1);this.deleteNodeTail(s,m),n="\r"+n,0===s.piece.length&&p.push(s)}else this.deleteNodeTail(s,h)}else this.deleteNodeTail(s,h);var v=this.createNewPieces(n);f.length>0&&this.rbInsertRight(s,f) ;for(var _=s,y=0;y=0;u--)l=this.rbInsertLeft(l,a[u]);this.validateCRLFWithPrevNode(l),this.deleteNodes(n)},e.prototype.insertContentToNodeRight=function(e,t){ this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");for(var n=this.createNewPieces(e),i=this.rbInsertRight(t,n[0]),o=i,r=1;r=o))break;d=i+1}return n?(n.line=i,n.column=u-r,null):{line:i,column:u-r}},e.prototype.getLineFeedCnt=function(e,t,n){if(0===n.column)return n.line-t.line;var i=this._buffers[e].lineStarts;if(n.line===i.length-1)return n.line-t.line;var o=i[n.line+1],r=i[n.line]+n.column;if(o>r+1)return n.line-t.line;var s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?n.line-t.line+1:n.line-t.line},e.prototype.offsetInBuffer=function(e,t){return this._buffers[e].lineStarts[t.line]+t.column},e.prototype.deleteNodes=function(e){for(var t=0;tt.AverageBufferSize){for(var n=[];e.length>t.AverageBufferSize;){var i=e.charCodeAt(t.AverageBufferSize-1),o=void 0;13===i||i>=55296&&i<=56319?(o=e.substring(0,t.AverageBufferSize-1),e=e.substring(t.AverageBufferSize-1)):(o=e.substring(0,t.AverageBufferSize),e=e.substring(t.AverageBufferSize));var r=l(o);n.push(new d(this._buffers.length,{line:0,column:0},{line:r.length-1,column:o.length-r[r.length-1]},r.length-1,o.length)),this._buffers.push(new c(o,r))}var s=l(e);return n.push(new d(this._buffers.length,{line:0,column:0},{line:s.length-1,column:e.length-s[s.length-1]},s.length-1,e.length)),this._buffers.push(new c(e,s)),n}var a=this._buffers[0].buffer.length,u=l(e,!1),h=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===a&&0!==a&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1}, h=this._lastChangeBufferPos;for(p=0;p=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var s=this.getAccumulatedValue(n,e-n.lf_left-2),c=this.getAccumulatedValue(n,e-n.lf_left-1),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return u+=n.size_left,this._searchCache.set({node:n,nodeStartOffset:u,nodeStartLineNumber:d-(e-1-n.lf_left)}),a.substring(l+s,l+c-t)}if(n.lf_left+n.piece.lineFeedCnt===e-1){var s=this.getAccumulatedValue(n,e-n.lf_left-2),a=this._buffers[n.piece.bufferIndex].buffer,l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i=a.substring(l+s,l+n.piece.length);break}e-=n.lf_left+n.piece.lineFeedCnt,u+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==o.SENTINEL;){a=this._buffers[n.piece.bufferIndex].buffer;if(n.piece.lineFeedCnt>0){var c=this.getAccumulatedValue(n,0),l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);return i+=a.substring(l,l+c-t)} l=this.offsetInBuffer(n.piece.bufferIndex,n.piece.start);i+=a.substr(l,n.piece.length),n=n.next()}return i},e.prototype.computeBufferMetadata=function(){for(var e=this.root,t=1,n=0;e!==o.SENTINEL;)t+=e.lf_left+e.piece.lineFeedCnt,n+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=n,this._searchCache.valdiate(this._length)},e.prototype.getIndexOf=function(e,t){var n=e.piece,i=this.positionInBuffer(e,t),o=i.line-n.start.line;if(this.offsetInBuffer(n.bufferIndex,n.end)-this.offsetInBuffer(n.bufferIndex,n.start)===t){var r=this.getLineFeedCnt(e.piece.bufferIndex,n.start,i);if(r!==o)return{index:r,remainder:0}}return{index:o,remainder:i.column}},e.prototype.getAccumulatedValue=function(e,t){if(t<0)return 0;var n=e.piece,i=this._buffers[n.bufferIndex].lineStarts,o=n.start.line+t+1;return o>n.end.line?i[n.end.line]+n.end.column-i[n.start.line]-n.start.column:i[o]-i[n.start.line]-n.start.column},e.prototype.deleteNodeTail=function(e,t){ var n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.end),s=t,a=this.offsetInBuffer(n.bufferIndex,s),l=this.getLineFeedCnt(n.bufferIndex,n.start,s),u=l-i,c=a-r,h=n.length+c;e.piece=new d(n.bufferIndex,n.start,s,l,h),o.updateTreeMetadata(this,e,c,u)},e.prototype.deleteNodeHead=function(e,t){var n=e.piece,i=n.lineFeedCnt,r=this.offsetInBuffer(n.bufferIndex,n.start),s=t,a=this.getLineFeedCnt(n.bufferIndex,s,n.end),l=a-i,u=r-this.offsetInBuffer(n.bufferIndex,s),c=n.length+u;e.piece=new d(n.bufferIndex,s,n.end,a,c),o.updateTreeMetadata(this,e,u,l)},e.prototype.shrinkNode=function(e,t,n){var i=e.piece,r=i.start,s=i.end,a=i.length,l=i.lineFeedCnt,u=t,c=this.getLineFeedCnt(i.bufferIndex,i.start,u),h=this.offsetInBuffer(i.bufferIndex,t)-this.offsetInBuffer(i.bufferIndex,r);e.piece=new d(i.bufferIndex,i.start,u,c,h),o.updateTreeMetadata(this,e,h-a,c-l) ;var p=new d(i.bufferIndex,n,s,this.getLineFeedCnt(i.bufferIndex,n,s),this.offsetInBuffer(i.bufferIndex,s)-this.offsetInBuffer(i.bufferIndex,n)),f=this.rbInsertRight(e,p);this.validateCRLFWithPrevNode(f)},e.prototype.appendToNode=function(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");var n=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),i=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;for(var r=l(t,!1),s=0;se)t=t.left;else{if(t.size_left+t.piece.length>=e){i+=t.size_left;var r={node:t,remainder:e-t.size_left,nodeStartOffset:i};return this._searchCache.set(r),r}e-=t.size_left+t.piece.length,i+=t.size_left+t.piece.length,t=t.right}return null},e.prototype.nodeAt2=function(e,t){for(var n=this.root,i=0;n!==o.SENTINEL;)if(n.left!==o.SENTINEL&&n.lf_left>=e-1)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt>e-1){var r=this.getAccumulatedValue(n,e-n.lf_left-2),s=this.getAccumulatedValue(n,e-n.lf_left-1);return i+=n.size_left,{node:n,remainder:Math.min(r+t-1,s),nodeStartOffset:i}}if(n.lf_left+n.piece.lineFeedCnt===e-1){if((r=this.getAccumulatedValue(n,e-n.lf_left-2))+t-1<=n.piece.length)return{node:n,remainder:r+t-1,nodeStartOffset:i} ;t-=n.piece.length-r;break}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}for(n=n.next();n!==o.SENTINEL;){if(n.piece.lineFeedCnt>0){var s=this.getAccumulatedValue(n,0),a=this.offsetOfNode(n);return{node:n,remainder:Math.min(t-1,s),nodeStartOffset:a}}if(n.piece.length>=t-1){return{node:n,remainder:t-1,nodeStartOffset:this.offsetOfNode(n)}}t-=n.piece.length,n=n.next()}return null},e.prototype.nodeCharCodeAt=function(e,t){if(e.piece.lineFeedCnt<1)return-1;var n=this._buffers[e.piece.bufferIndex],i=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return n.buffer.charCodeAt(i)},e.prototype.offsetOfNode=function(e){if(!e)return 0;for(var t=e.size_left;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t},e.prototype.shouldCheckCRLF=function(){return!(this._EOLNormalized&&"\n"===this._EOL)},e.prototype.startWithLF=function(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===o.SENTINEL||0===e.piece.lineFeedCnt)return!1 ;var t=e.piece,n=this._buffers[t.bufferIndex].lineStarts,i=t.start.line,r=n[i]+t.start.column;if(i===n.length-1)return!1;return!(n[i+1]>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r)},e.prototype.endWithCR=function(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==o.SENTINEL&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)},e.prototype.validateCRLFWithPrevNode=function(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){var t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}},e.prototype.validateCRLFWithNextNode=function(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){var t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}},e.prototype.fixCRLF=function(e,t){var n,i=[],r=this._buffers[e.piece.bufferIndex].lineStarts;n=0===e.piece.end.column?{line:e.piece.end.line-1,column:r[e.piece.end.line]-r[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};var s=e.piece.length-1,a=e.piece.lineFeedCnt-1 ;e.piece=new d(e.piece.bufferIndex,e.piece.start,n,a,s),o.updateTreeMetadata(this,e,-1,-1),0===e.piece.length&&i.push(e);var l={line:t.piece.start.line+1,column:0},u=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new d(t.piece.bufferIndex,l,t.piece.end,c,u),o.updateTreeMetadata(this,t,-1,-1),0===t.piece.length&&i.push(t);var h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(var p=0;p0){m.sort(function(e,t){return t.lineNumber-e.lineNumber}),S=[];for(var u=0,w=m.length;u0&&m[u-1].lineNumber===E)){var L=m[u].oldContent,x=this.getLineContent(E);0!==x.length&&x!==L&&-1===i.firstNonWhitespaceIndex(x)&&S.push(E)}}}return new r.ApplyEditsResult(C,b,S)},e.prototype._reduceOperations=function(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]},e.prototype._toSingleEditOperation=function(e){for(var t=!1,i=e[0].range,o=e[e.length-1].range,s=new n.Range(i.startLineNumber,i.startColumn,o.endLineNumber,o.endColumn),a=i.startLineNumber,l=i.startColumn,u=[],d=0,c=e.length;d0){var h=l.lines.length,p=l.lines[0],f=l.lines[h-1];c=1===h?new n.Range(u,d,u,d+p.length):new n.Range(u,d,u+h-1,f.length+1)}else c=new n.Range(u,d,u,d);t=c.endLineNumber,i=c.endColumn,o.push(c),r=l}return o},e._sortOpsAscending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i},e._sortOpsDescending=function(e,t){var i=n.Range.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i},e}();t.PieceTreeTextBuffer=s}), define(t[515],n([1,0,6,24,508,167]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t,n,i,o,r,s,a){this._chunks=e,this._bom=t,this._cr=n,this._lf=i,this._crlf=o,this._containsRTL=r,this._isBasicASCII=s,this._normalizeEOL=a}return e.prototype._getEOL=function(e){var t=this._cr+this._lf+this._crlf,n=this._cr+this._crlf;return 0===t?e===i.DefaultEndOfLine.LF?"\n":"\r\n":n>t/2?"\r\n":"\n"},e.prototype.create=function(e){var t=this._getEOL(e),n=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(var i=0,s=n.length;i=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}},e.prototype._acceptChunk1=function(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))},e.prototype._acceptChunk2=function(e){var t=r.createLineStarts(this._tmpLineStarts,e);this.chunks.push(new r.StringBuffer(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=n.containsRTL(e))},e.prototype.finish=function(e){return void 0===e&&(e=!0),this._finish(), new s(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.isBasicASCII,e)},e.prototype._finish=function(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;var e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);var t=r.createLineStartsFast(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}},e}();t.PieceTreeTextBufferBuilder=a}),define(t[100],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",t.DEFAULT_WORD_REGEXP=function(e){void 0===e&&(e="");for(var n="(-?\\d*\\.\\d\\w*)|([^",i=0;i=0||(n+="\\"+t.USUAL_WORD_SEPARATORS[i]);return n+="\\s]+)",new RegExp(n,"g")}(),t.ensureValidWordDefinition=function(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},t.getWordAtText=function(e,t,n,i){t.lastIndex=0;var o=t.exec(n);if(!o)return null;var r=o[0].indexOf(" ")>=0?function(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}(e,t,n,i):function(e,t,n,i){var o=e-1-i,r=n.lastIndexOf(" ",o-1)+1,s=n.indexOf(" ",o);-1===s&&(s=n.length),t.lastIndex=r;for(var a;a=t.exec(n);)if(a.index<=o&&t.lastIndex>=o)return{word:a[0],startColumn:i+1+a.index,endColumn:i+1+t.lastIndex};return null}(e,t,n,i);return t.lastIndex=0,r}}),define(t[528],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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(t[58],n([1,0]),function(e,t){ "use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(t.IndentAction||(t.IndentAction={}));var n=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;ts&&(s=u)}return s}if("string"==typeof e)return r?"*"===e?5:e===o?10:0:0;if(e){var d=e.language,c=e.pattern,h=e.scheme,p=e.hasAccessToAllModels;if(!r&&!p)return 0;s=0;if(h)if(h===t.scheme)s=10;else{ if("*"!==h)return 0;s=5}if(d)if(d===o)s=10;else{if("*"!==d)return 0;s=Math.max(s,5)}if(c){if(c!==t.fsPath&&!n.match(c,t.fsPath))return 0;s=10}return s}return 0}Object.defineProperty(t,"__esModule",{value:!0}),t.score=i}),define(t[544],n([1,0,83,94]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){for(var t=0,n=0,o=0,r=e.length;ot&&(t=l),a>n&&(n=a),u>n&&(n=u)}t++,n++;for(var d=new i.Uint8Matrix(n,t,0),o=0,r=e.length;o=this._maxCharCode?0:this._states.get(e,t)},e}(),r=null,s=null,a=function(){function e(){}return e._createLink=function(e,t,n,i,o){var r=o-1;do{var s=t.charCodeAt(r);if(2!==e.get(s))break;r--}while(r>i);if(i>0){var a=t.charCodeAt(i-1),l=t.charCodeAt(r);(40===a&&41===l||91===a&&93===l||123===a&&125===l)&&r--}return{range:{startLineNumber:n, startColumn:i+1,endLineNumber:n,endColumn:r+2},url:t.substring(i,r+1)}},e.computeLinks=function(t){for(var i=(null===r&&(r=new o([[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]])),r),a=function(){if(null===s){for(s=new n.CharacterClassifier(0),e=0;e<" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".length;e++)s.set(" \t<>'\"、。。、,.:;?!@#$%&*‘“〈《「『【〔([{「」}])〕】』」》〉”’`~…".charCodeAt(e),1);for(var e=0;e<".,;".length;e++)s.set(".,;".charCodeAt(e),2)}return s}(),l=[],u=1,d=t.getLineCount();u<=d;u++){for(var c=t.getLineContent(u),h=c.length,p=0,f=0,g=0,m=1,v=!1,_=!1,y=!1;p0&&e.getLanguageId(a-1)===r;)a--;return new n(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))};var n=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(){ return this._actual.getLineContent().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.getStandardTokenType=function(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)},e}();t.ScopedLineTokens=n,t.ignoreBracketsInToken=function(e){return 0!=(7&e)}}),define(t[550],n([1,0,58]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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=0?((i+=n?1:-1)<0?i=e.length-1:i%=e.length,e[i]):null},e.INSTANCE=new e,e}();t.BasicInplaceReplace=n}),define(t[553],n([1,0,10,6,58]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(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||[]}return e.prototype.onEnter=function(e,t,n){for(var i=0,r=this._regExpRules.length;i0&&n.length>0)for(var i=0,r=this._brackets.length;i0)for(var i=0,r=this._brackets.length;i=0;n--)t+=e.charAt(n);return t}(e=n)),t}}(),f=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,l=o+s;return new i.Range(t,l-a+1,t,l+1)},e.findPrevBracketInToken=function(e,t,n,i,o){var r=p(n).substring(n.length-o,n.length-i);return this._findPrevBracketInText(e,t,r,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;if(0===a)return null;var l=o+s;return new i.Range(t,l+1,t,l+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=f}),define(t[560],n([1,0,91,105,58]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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=0))return{appendText:s.close}}}}return null},e}();t.BracketElectricCharacterSupport=r}),define(t[41],n([1,0,550,560,553,551,105,9,10,6,2,100,91,3,58]),function(e,t,n,i,o,r,s,a,l,u,d,c,h,p,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var g=function(){function e(t,i,o){this._languageIdentifier=t,this._brackets=null,this._electricCharacter=null;var s=null;i&&(s=i._conf),this._conf=e._mergeConf(s,o),this.onEnter=e._handleOnEnter(this._conf), this.comments=e._handleComments(this._conf),this.characterPair=new n.CharacterPairSupport(this._conf),this.wordDefinition=this._conf.wordPattern||c.DEFAULT_WORD_REGEXP,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules&&(this.indentRulesSupport=new r.IndentRulesSupport(this._conf.indentationRules)),this.foldingRules=this._conf.folding||{}}return Object.defineProperty(e.prototype,"brackets",{get:function(){return!this._brackets&&this._conf.brackets&&(this._brackets=new s.RichEditBrackets(this._languageIdentifier,this._conf.brackets)),this._brackets},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"electricCharacter",{get:function(){if(!this._electricCharacter){var e=[];this._conf.autoClosingPairs?e=this._conf.autoClosingPairs:this._conf.brackets&&(e=this._conf.brackets.map(function(e){return{open:e[0],close:e[1]}})),this._electricCharacter=new i.BracketElectricCharacterSupport(this.brackets,e,this._conf.__electricCharacterSupport)}return this._electricCharacter}, enumerable:!0,configurable:!0}),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,folding:e?t.folding||e.folding:t.folding,__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),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=g;var m=function(){return function(){}}();t.LanguageConfigurationChangeEvent=m;var v=function(){function e(){this._onDidChange=new a.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 g(e,i,t);return this._entries[e.id]=o,this._onDidChange.fire({languageIdentifier:e}),d.toDisposable(function(){n._entries[e.id]===o&&(n._entries[e.id]=i,n._onDidChange.fire({languageIdentifier:e}))})},e.prototype._getRichEditSupport=function(e){return this._entries[e]||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=h.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=h.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?c.ensureValidWordDefinition(t.wordDefinition||null):c.ensureValidWordDefinition(null)},e.prototype.getFoldingRules=function(e){ var t=this._getRichEditSupport(e);return t?t.foldingRules:{}},e.prototype.getIndentRulesSupport=function(e){var t=this._getRichEditSupport(e);return t?t.indentRulesSupport||null:null},e.prototype.getPrecedingValidLine=function(e,t,n){var i=e.getLanguageIdAtPosition(t,0);if(t>1){var o=t-1,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==i)return r;var s=e.getLineContent(o);if(!n.shouldIgnore(s)&&!/^\s+$/.test(s)&&""!==s)return o;r=o}}return-1},e.prototype.getInheritIndentForLine=function(e,t,n){void 0===n&&(n=!0);var i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);if(!i)return null;if(t<=1)return{indentation:"",action:null};var o=this.getPrecedingValidLine(e,t,i);if(o<0)return null;if(o<1)return{indentation:"",action:null};var r=e.getLineContent(o);if(i.shouldIncrease(r)||i.shouldIndentNextLine(r))return{indentation:u.getLeadingWhitespace(r),action:f.IndentAction.Indent,line:o};if(i.shouldDecrease(r))return{indentation:u.getLeadingWhitespace(r),action:null,line:o};if(1===o)return{ indentation:u.getLeadingWhitespace(e.getLineContent(o)),action:null,line:o};var s=o-1,a=i.getIndentMetadata(e.getLineContent(s));if(!(3&a)&&4&a){for(var l=0,d=s-1;d>0;d--)if(!i.shouldIndentNextLine(e.getLineContent(d))){l=d;break}return{indentation:u.getLeadingWhitespace(e.getLineContent(l+1)),action:null,line:l+1}}if(n)return{indentation:u.getLeadingWhitespace(e.getLineContent(o)),action:null,line:o};for(d=o;d>0;d--){var c=e.getLineContent(d);if(i.shouldIncrease(c))return{indentation:u.getLeadingWhitespace(c),action:f.IndentAction.Indent,line:d};if(i.shouldIndentNextLine(c)){for(var l=0,h=d-1;h>0;h--)if(!i.shouldIndentNextLine(e.getLineContent(d))){l=h;break}return{indentation:u.getLeadingWhitespace(e.getLineContent(l+1)),action:null,line:l+1}}if(i.shouldDecrease(c))return{indentation:u.getLeadingWhitespace(c),action:null,line:d}}return{indentation:u.getLeadingWhitespace(e.getLineContent(1)),action:null,line:1}},e.prototype.getGoodIndentForLine=function(e,t,n,i){var o=this.getIndentRulesSupport(t) ;if(!o)return null;var r=this.getInheritIndentForLine(e,n),s=e.getLineContent(n);if(r){var a=r.line;if(void 0!==a){var d=this._getOnEnterSupport(t),c=null;try{c=d.onEnter("",e.getLineContent(a),"")}catch(e){l.onUnexpectedError(e)}if(c){var h=u.getLeadingWhitespace(e.getLineContent(a));return c.removeText&&(h=h.substring(0,h.length-c.removeText)),c.indentAction===f.IndentAction.Indent||c.indentAction===f.IndentAction.IndentOutdent?h=i.shiftIndent(h):c.indentAction===f.IndentAction.Outdent&&(h=i.unshiftIndent(h)),o.shouldDecrease(s)&&(h=i.unshiftIndent(h)),c.appendText&&(h+=c.appendText),u.getLeadingWhitespace(h)}}return o.shouldDecrease(s)?r.action===f.IndentAction.Indent?r.indentation:i.unshiftIndent(r.indentation):r.action===f.IndentAction.Indent?i.shiftIndent(r.indentation):r.indentation}return null},e.prototype.getIndentForEnter=function(e,t,n,i){e.forceTokenization(t.startLineNumber);var o,r,s=e.getLineTokens(t.startLineNumber),a=h.createScopedLineTokens(s,t.startColumn-1),l=a.getLineContent(),d=!1 ;if(a.firstCharOffset>0&&s.getLanguageId(0)!==a.languageId?(d=!0,o=l.substr(0,t.startColumn-1-a.firstCharOffset)):o=s.getLineContent().substring(0,t.startColumn-1),t.isEmpty())r=l.substr(t.startColumn-1-a.firstCharOffset);else{r=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-a.firstCharOffset)}var c=this.getIndentRulesSupport(a.languageId);if(!c)return null;var p=o,g=u.getLeadingWhitespace(o);if(!i&&!d){var m=this.getInheritIndentForLine(e,t.startLineNumber);c.shouldDecrease(o)&&m&&(g=m.indentation,m.action!==f.IndentAction.Indent&&(g=n.unshiftIndent(g))),p=g+u.ltrim(u.ltrim(o," "),"\t")}var v={getLineTokens:function(t){return e.getLineTokens(t)},getLanguageIdentifier:function(){return e.getLanguageIdentifier()},getLanguageIdAtPosition:function(t,n){return e.getLanguageIdAtPosition(t,n)},getLineContent:function(n){return n===t.startLineNumber?p:e.getLineContent(n)}},_=u.getLeadingWhitespace(s.getLineContent()),y=this.getInheritIndentForLine(v,t.startLineNumber+1) ;if(!y){var C=d?_:g;return{beforeEnter:C,afterEnter:C}}var b=d?_:y.indentation;return y.action===f.IndentAction.Indent&&(b=n.shiftIndent(b)),c.shouldDecrease(r)&&(b=n.unshiftIndent(b)),{beforeEnter:d?_:g,afterEnter:b}},e.prototype.getIndentActionForType=function(e,t,n,i){var o=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),r=this.getIndentRulesSupport(o.languageId);if(!r)return null;var s,a=o.getLineContent(),l=a.substr(0,t.startColumn-1-o.firstCharOffset);if(t.isEmpty())s=a.substr(t.startColumn-1-o.firstCharOffset);else{s=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-o.firstCharOffset)}if(!r.shouldDecrease(l+s)&&r.shouldDecrease(l+n+s)){var u=this.getInheritIndentForLine(e,t.startLineNumber,!1);if(!u)return null;var d=u.indentation;return u.action!==f.IndentAction.Indent&&(d=i.unshiftIndent(d)),d}return null},e.prototype.getIndentMetadata=function(e,t){var n=this.getIndentRulesSupport(e.getLanguageIdentifier().id) ;return n?t<1||t>e.getLineCount()?null:n.getIndentMetadata(e.getLineContent(t)):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 p.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=this.getScopedLineTokens(e,t.startLineNumber,t.startColumn),o=this._getOnEnterSupport(i.languageId);if(!o)return null;var r,s=i.getLineContent(),a=s.substr(0,t.startColumn-1-i.firstCharOffset);if(t.isEmpty())r=s.substr(t.startColumn-1-i.firstCharOffset);else{r=this.getScopedLineTokens(e,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-i.firstCharOffset)}var u=t.startLineNumber,d="";if(u>1&&0===i.firstCharOffset){var c=this.getScopedLineTokens(e,u-1);c.languageId===i.languageId&&(d=c.getLineContent())}var h=null;try{h=o.onEnter(d,a,r)}catch(e){ l.onUnexpectedError(e)}return h?(h.appendText||(h.indentAction===f.IndentAction.Indent||h.indentAction===f.IndentAction.IndentOutdent?h.appendText="\t":h.appendText=""),h.removeText&&(n=n.substring(0,n.length-h.removeText)),{enterAction:h,indentation:n}):null},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.getScopedLineTokens=function(e,t,n){e.forceTokenization(t);var i=e.getLineTokens(t),o=isNaN(n)?e.getLineMaxColumn(t)-1:n-1;return h.createScopedLineTokens(i,o)},e.prototype.getBracketsSupport=function(e){var t=this._getRichEditSupport(e);return t?t.brackets||null:null},e}();t.LanguageConfigurationRegistryImpl=v,t.LanguageConfigurationRegistry=new v}),define(t[204],n([1,0,27]),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=1&&""===e[0].token;){var r=e.shift();-1!==r.fontStyle&&(n=r.fontStyle),null!==r.foreground&&(i=r.foreground),null!==r.background&&(o=r.background)}for(var a=new u,l=0,c=t;lt?1:0}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){return function(e,t,n,i,o){this.token=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}}();t.ParsedTokenThemeRule=a,t.parseTokenTheme=i;var l=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/,u=function(){function e(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}return e.prototype.getId=function(e){if(null===e)return 0;var t=e.match(l);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();var i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=n.Color.fromHex("#"+e),i)},e.prototype.getColorMap=function(){return this._id2color.slice(0)},e}();t.ColorMap=u;var d=function(){function e(e,t){this._colorMap=e,this._root=t,this._cache=new Map}return e.createFromRawTokenTheme=function(e,t){return this.createFromParsedTokenTheme(i(e),t)},e.createFromParsedTokenTheme=function(e,t){return o(e,t)}, e.prototype.getColorMap=function(){return this._colorMap.getColorMap()},e.prototype._match=function(e){return this._root.match(e)},e.prototype.match=function(e,t){var n=this._cache.get(t);if(void 0===n){var i=this._match(t),o=r(t);n=(i.metadata|o<<8)>>>0,this._cache.set(t,n)}return(n|e<<0)>>>0},e}();t.TokenTheme=d;var c=/\b(comment|string|regex)\b/;t.toStandardTokenType=r,t.strcmp=s;var h=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.prototype.acceptOverwrite=function(e,t,n){-1!==e&&(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=h;var p=function(){function e(e){this._mainRule=e,this._children=new Map}return e.prototype.match=function(e){ if(""===e)return this._mainRule;var t,n,i=e.indexOf(".");-1===i?(t=e,n=""):(t=e.substring(0,i),n=e.substring(i+1));var o=this._children.get(t);return void 0!==o?o.match(n):this._mainRule},e.prototype.insert=function(t,n,i,o){if(""!==t){var r,s,a=t.indexOf(".");-1===a?(r=t,s=""):(r=t.substring(0,a),s=t.substring(a+1));var l=this._children.get(r);void 0===l&&(l=new e(this._mainRule.clone()),this._children.set(r,l)),l.insert(s,n,i,o)}else this._mainRule.acceptOverwrite(n,i,o)},e}();t.ThemeTrieElement=p,t.generateTokensCSSForColorMap=function(e){for(var t=[],n=1,i=e.length;ni&&(p=i-f);var g=u.color,m=this._color2Id[g] ;m||(m=++this._lastAssignedId,this._color2Id[g]=m,this._id2Color[m]=g);var v=new n(p-f,p+f,m);u.setColorZone(v),s.push(v)}return this._colorZonesInvalid=!1,s.sort(n.compare),s},e}();t.OverviewZoneManager=o}),define(t[88],n([1,0,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;var n=this._viewLayout.getCurrentViewport();this.scrollTop=n.top,this.scrollLeft=n.left,this.viewportWidth=n.width,this.viewportHeight=n.height}return e.prototype.getScrolledTopFromAbsoluteTop=function(e){return e-this.scrollTop},e.prototype.getVerticalOffsetForLineNumber=function(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)},e.prototype.getDecorationsInViewport=function(){ return this.viewportData.getDecorationsInViewport()},e}();t.RestrictedRenderingContext=i;var r=function(e){function t(t,n,i){var o=e.call(this,t,n)||this;return o._viewLines=i,o}return o(t,e),t.prototype.linesVisibleRangesForRange=function(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)},t.prototype.visibleRangeForPosition=function(e){var t=this._viewLines.visibleRangesForRange2(new n.Range(e.lineNumber,e.column,e.lineNumber,e.column));return t?t[0]:null},t}(i);t.RenderingContext=r;var s=function(){return function(e,t){this.lineNumber=e,this.ranges=t}}();t.LineVisibleRanges=s;var a=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=a}),define(t[209],n([1,0,88]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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,l=e.length;a=d?s=Math.max(s,d+c-r):(t[o++]=new n.HorizontalRange(r,s),r=d,s=c)}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;oa)return null;(t=Math.min(a,Math.max(0,t)))!==(i=Math.min(a,Math.max(0,i)))&&i>0&&0===o&&(i--,o=Number.MAX_VALUE);var l=e.children[t].firstChild,u=e.children[i].firstChild;if(l&&u||(!l&&0===n&&t>0&&(l=e.children[t-1].firstChild,n=1073741824),!u&&0===o&&i>0&&(u=e.children[i-1].firstChild,o=1073741824)),!l||!u)return null;n=Math.min(l.textContent.length,Math.max(0,n)),o=Math.min(u.textContent.length,Math.max(0,o));var d=this._readClientRects(l,n,u,o,s);return this._createHorizontalRangesFromClientRects(d,r)},e}();t.RangeUtil=o}),define(t[210],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t,n,i){this.configuration=e,this.theme=t,this.model=n,this.viewLayout=n.viewLayout,this.privateViewEventBus=i}return e.prototype.addEventHandler=function(e){this.privateViewEventBus.addEventHandler(e)},e.prototype.removeEventHandler=function(e){ this.privateViewEventBus.removeEventHandler(e)},e}();t.ViewContext=n}),define(t[211],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=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;t0&&this._emit(e)}},t.prototype._emit=function(e){for(var t=this._listeners.slice(0),i=0,o=t.length;in)&&(!d.isEmpty()||0!==u.type&&3!==u.type)){var c=d.startLineNumber===n?d.startColumn:i,h=d.endLineNumber===n?d.endColumn:o;r[s++]=new e(c,h,u.inlineClassName,u.type)}}return r},e.compare=function(e,t){return e.startColumn===t.startColumn?e.endColumn===t.endColumn?e.classNamet.className?1:0:e.endColumn-t.endColumn:e.startColumn-t.startColumn},e}();t.LineDecoration=i;var o=function(){return function(e,t,n){this.startOffset=e,this.endOffset=t,this.className=n}}();t.DecorationSegment=o;var r=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]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t);break}this.count++},e}(),s=function(){function e(){}return e.normalize=function(e,t){if(0===t.length)return[];for(var i=[],o=new r,s=0,a=0,l=t.length;a1){p=e.charCodeAt(d-2);n.isHighSurrogate(p)&&d--}if(c>1){var p=e.charCodeAt(c-2);n.isHighSurrogate(p)&&c--} var f=d-1,g=c-2;s=o.consumeLowerThan(f,s,i),0===o.count&&(s=f),o.insert(g,h)}return o.consumeLowerThan(1073741824,s,i),i},e}();t.LineDecorationsNormalizer=s}),define(t[96],n([1,0,125,6,112]),function(e,t,n,i,o){"use strict";function r(e,t){if(0===e.lineContent.length){var o=0,r=" ";if(e.lineDecorations.length>0){for(var a=[],d=0,h=e.lineDecorations.length;d')}return t.appendASCIIString(r),new u(new l(0,0),!1,o)}return function(e,t){var n=e.fontIsMonospace,o=e.containsForeignElements,r=e.lineContent,s=e.len,a=e.isOverflowing,d=e.parts,c=e.tabSize,h=e.containsRTL,p=e.spaceWidth,f=e.renderWhitespace,g=e.renderControlCharacters,m=new l(s+1,d.length),v=0,_=0,y=0,C=0,b=0;t.appendASCIIString("");for(var S=0,w=d.length;S=0;if(y=0,t.appendASCIIString('0&&(k>1?t.write1(8594):t.write1(65515),k--);k>0;)t.write1(160),k--}else t.write1(183);y++}C=I}else{I=0;for(h&&t.appendASCIIString(' dir="ltr"'),t.appendASCII(62);v0;)t.write1(160),I++,k--;break;case 32:t.write1(160),I++;break;case 60:t.appendASCIIString("<"),I++;break;case 62:t.appendASCIIString(">"),I++;break;case 38:t.appendASCIIString("&"),I++;break;case 0:t.appendASCIIString("�"),I++;break ;case 65279:case 8232:t.write1(65533),I++;break;default:i.isFullWidthCharacter(T)&&_++,g&&T<32?(t.write1(9216+T),I++):(t.write1(T),I++)}y++}C=I}t.appendASCIIString("")}m.setPartData(s,d.length-1,y,b),a&&t.appendASCIIString("");return t.appendASCIIString(""),new u(m,h,o)}(function(e){var t,o,r=e.useMonospaceOptimizations,a=e.lineContent;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(i[o++]=new s(t,""));for(var r=0,a=e.getCount();r=n){i[o++]=new s(n,u);break}i[o++]=new s(l,u)}}return i}(e.lineTokens,e.fauxIndentLength,o);2!==e.renderWhitespace&&1!==e.renderWhitespace||(l=function(e,t,n,o,r,a,l,u){var d,c=[],h=0,p=0,f=o[p].type,g=o[p].endIndex,m=i.firstNonWhitespaceIndex(e);-1===m?(m=t,d=t):d=i.lastNonWhitespaceIndex(e);for(var v=0,_=0;_d)b=!0;else if(9===C)b=!0;else if(32===C)if(u)if(y)b=!0;else{var S=_+1=a)&&(c[h++]=new s(_,"vs-whitespace"),v%=a):(_===g||b&&_>r)&&(c[h++]=new s(_,f),v%=a),9===C?v=a:i.isFullWidthCharacter(C)?v+=2:v++,y=b,_===g&&(f=o[++p].type,g=o[p].endIndex)}var w=!1;if(y)if(n&&u){var E=t>0?e.charCodeAt(t-1):0,L=t>1?e.charCodeAt(t-2):0;32===E&&32!==L&&9!==L||(w=!0)}else w=!0;return c[h++]=new s(t,w?"vs-whitespace":f),c}(a,o,e.continuesWithWrappedLine,l,e.fauxIndentLength,e.tabSize,r,1===e.renderWhitespace));var u=0;if(e.lineDecorations.length>0){for(var d=0,h=e.lineDecorations.length;dc&&(c=v.startOffset,u[d++]=new s(c,m)),!(v.endOffset+1<=g)){c=g,u[d++]=new s(c,m+" "+v.className);break}c=v.endOffset+1,u[d++]=new s(c,m+" "+v.className),l++}g>c&&(c=g,u[d++]=new s(c,m))}var _=i[i.length-1].endIndex;if(l50){for(var c=l.type,h=Math.ceil(d/50),p=1;p>>16},e.getCharIndex=function(e){return(65535&e)>>>0},e.prototype.setPartData=function(e,t,n,i){var o=(t<<16|n<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=i+n}, e.prototype.getAbsoluteOffsets=function(){return this._absoluteOffsets},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>>1,l=this._data[a];if(l===o)return a;l>o?s=a:r=a}if(r===s)return r;var u=this._data[r],d=this._data[s];if(u===o)return r;if(d===o)return s;var c=e.getPartIndex(u);return i-e.getCharIndex(u)<=(c!==e.getPartIndex(d)?n:e.getCharIndex(d))-i?r:s},e}();t.CharacterMapping=l;var u=function(){return function(e,t,n){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=n}}();t.RenderLineOutput=u,t.renderViewLine=r;var d=function(){return function(e,t,n,i){this.characterMapping=e,this.html=t,this.containsRTL=n,this.containsForeignElements=i}}();t.RenderLineOutput2=d,t.renderViewLine2=function(e){var t=o.createStringBuilder(1e4),n=r(e,t) ;return new d(n.characterMapping,t.build(),n.containsRTL,n.containsForeignElements)};var c=function(){return function(e,t,n,i,o,r,s,a,l,u,d){this.fontIsMonospace=e,this.lineContent=t,this.len=n,this.isOverflowing=i,this.parts=o,this.containsForeignElements=r,this.tabSize=s,this.containsRTL=a,this.spaceWidth=l,this.renderWhitespace=u,this.renderControlCharacters=d}}()}),define(t[215],n([1,0,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t,i,o){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=o,this.visibleRange=new n.Range(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}return e.prototype.getViewLineRenderingData=function(e){ return this._model.getViewLineRenderingData(this.visibleRange,e)},e.prototype.getDecorationsInViewport=function(){return this._model.getDecorationsInViewport(this.visibleRange)},e}();t.ViewportData=i}),define(t[216],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this._heights=[],this._minWidths=[],this._ids=[],this._afterLineNumbers=[],this._ordinals=[],this._prefixSum=[],this._prefixSumValidIndex=-1,this._whitespaceId2Index={},this._lastWhitespaceId=0,this._minWidth=-1}return e.findInsertionIndex=function(e,t,n,i){for(var o=0,r=e.length;o>>1;t===e[s]?i=t&&(this._whitespaceId2Index[u]=d+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){t|=0;var n=(e|=0).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){n|=0;var i=(t|=0).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],a=this._minWidths[o];this.removeWhitespace(t);var l=e.findInsertionIndex(this._afterLineNumbers,n,this._ordinals,r);return this._insertWhitespaceAtIndex(t,l,n,r,s,a),!0}}return!1},e.prototype.removeWhitespace=function(e){var t=(e|=0).toString();if(this._whitespaceId2Index.hasOwnProperty(t)){var n=this._whitespaceId2Index[t];return delete this._whitespaceId2Index[t],this._removeWhitespaceAtIndex(n),this._minWidth=-1,!0}return!1},e.prototype._removeWhitespaceAtIndex=function(e){e|=0,this._heights.splice(e,1),this._minWidths.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=e&&(this._whitespaceId2Index[o]=r-1)}}, e.prototype.onLinesDeleted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;nt&&(this._afterLineNumbers[n]-=t-e+1)}},e.prototype.onLinesInserted=function(e,t){e|=0,t|=0;for(var n=0,i=this._afterLineNumbers.length;n=t.length||t[o+1]>=e)return o;n=o+1|0}else i=o-1|0}return-1},e.prototype._findFirstWhitespaceAfterLineNumber=function(e){e|=0;var t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0)+this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceAccumulatedHeightBeforeLineNumber=function(e){return this._whitespaces.getAccumulatedHeightBeforeLineNumber(e)},e.prototype.getWhitespaceMinWidth=function(){return this._whitespaces.getMinWidth()},e.prototype.isAfterLines=function(e){return e>this.getLinesTotalHeight()},e.prototype.getLineNumberAtOrAfterVerticalOffset=function(e){if((e|=0)<0)return 1;for(var t=0|this._lineCount,n=this._lineHeight,i=1,o=t;i=s+n)i=r+1;else{if(e>=s)return r;o=r}}return i>t?t:i},e.prototype.getLinesViewportData=function(e,t){e|=0,t|=0 ;var n,i,o=this._lineHeight,r=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(r),a=0|this._lineCount,l=0|this._whitespaces.getFirstWhitespaceIndexAfterLineNumber(r),u=0|this._whitespaces.getCount();-1===l?(l=u,i=a+1,n=0):(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),n=0|this._whitespaces.getHeightForWhitespaceIndex(l));var d=s,c=d,h=0;s>=5e5&&(h=5e5*Math.floor(s/5e5),c-=h=Math.floor(h/o)*o);for(var p=[],f=e+(t-e)/2,g=-1,m=r;m<=a;m++){if(-1===g){var v=d;(v<=f&&ff)&&(g=m)}for(d+=o,p[m-r]=c,c+=o;i===m;)c+=n,d+=n,++l>=u?i=a+1:(i=0|this._whitespaces.getAfterLineNumberForWhitespaceIndex(l),n=0|this._whitespaces.getHeightForWhitespaceIndex(l));if(d>=t){a=m;break}}-1===g&&(g=a);var _=0|this.getVerticalOffsetForLineNumber(a),y=r,C=a;return yt&&C--,{bigNumbersDelta:h,startLineNumber:r,endLineNumber:a,relativeVerticalOffset:p,centeredLineNumber:g,completelyVisibleStartLineNumber:y,completelyVisibleEndLineNumber:C}}, e.prototype.getVerticalOffsetForWhitespaceIndex=function(e){e|=0;var t,n=this._whitespaces.getAfterLineNumberForWhitespaceIndex(e);t=n>=1?this._lineHeight*n:0;var i;return i=e>0?this._whitespaces.getAccumulatedHeight(e-1):0,t+i},e.prototype.getWhitespaceIndexAtOrAfterVerticallOffset=function(e){e|=0;var t,n,i,o=0,r=this._whitespaces.getCount()-1;if(r<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(r)+this._whitespaces.getHeightForWhitespaceIndex(r))return-1;for(;o=n+i)o=t+1;else{if(e>=n)return t;r=t}return o},e.prototype.getWhitespaceAtVerticalOffset=function(e){e|=0;var t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this._whitespaces.getCount())return null;var n=this.getVerticalOffsetForWhitespaceIndex(t);if(n>e)return null;var i=this._whitespaces.getHeightForWhitespaceIndex(t);return{id:this._whitespaces.getIdForWhitespaceIndex(t), afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:n,height:i}},e.prototype.getWhitespaceViewportData=function(e,t){e|=0,t|=0;var n=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),i=this._whitespaces.getCount()-1;if(n<0)return[];for(var o=[],r=n;r<=i;r++){var s=this.getVerticalOffsetForWhitespaceIndex(r),a=this._whitespaces.getHeightForWhitespaceIndex(r);if(s>=t)break;o.push({id:this._whitespaces.getIdForWhitespaceIndex(r),afterLineNumber:this._whitespaces.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:s,height:a})}return o},e.prototype.getWhitespaces=function(){return this._whitespaces.getWhitespaces(this._lineHeight)},e}();t.LinesLayout=i}),define(t[129],n([1,0,94]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t){this.index=e,this.remainder=t}}();t.PrefixSumIndexOfResult=i;var o=function(){function e(e){this.values=e,this.prefixSum=new Uint32Array(e.length), this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-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;return 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=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.changeValue=function(e,t){return e=n.toUint32(e),t=n.toUint32(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;var r=i.length-e;return 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=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)},e.prototype.getTotalValue=function(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)},e.prototype.getAccumulatedValue=function(e){return e<0?0:(e=n.toUint32(e),this._getAccumulatedValue(e))},e.prototype._getAccumulatedValue=function(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];var t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(var n=t;n<=e;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]},e.prototype.getIndexOf=function(e){e=Math.floor(e),this.getTotalValue() ;for(var t,n,o,r=0,s=this.values.length-1;r<=s;)if(t=r+(s-r)/2|0,n=this.prefixSum[t],o=n-this.values[t],e=n))break;r=t+1}return new i(t,e-o)},e}();t.PrefixSumComputer=o;var r=function(){function e(e){this._cacheAccumulatedValueStart=0,this._cache=null,this._actual=new o(e),this._bustCache()}return e.prototype._bustCache=function(){this._cacheAccumulatedValueStart=0,this._cache=null},e.prototype.insertValues=function(e,t){this._actual.insertValues(e,t)&&this._bustCache()},e.prototype.changeValue=function(e,t){this._actual.changeValue(e,t)&&this._bustCache()},e.prototype.removeValues=function(e,t){this._actual.removeValues(e,t)&&this._bustCache()},e.prototype.getTotalValue=function(){return this._actual.getTotalValue()},e.prototype.getAccumulatedValue=function(e){return this._actual.getAccumulatedValue(e)},e.prototype.getIndexOf=function(e){if(e=Math.floor(e),null!==this._cache){var t=e-this._cacheAccumulatedValueStart;if(t>=0&&t=n._lines.length))return t=n._lines[o],s=n._wordenize(t,e),r=0,o+=1,a() ;i.done=!0,i.value=void 0}return i};return{next:a}},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)).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;rthis._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.MirrorTextModel),m=function(){function t(e){this._foreignModuleFactory=e,this._foreignModule=null}return t.prototype.computeDiff=function(e,t,n){var o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null ;var a=o.getLinesContent(),l=r.getLinesContent(),u=new s.DiffComputer(a,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0});return i.TPromise.as(u.computeDiff())},t.prototype.computeMoreMinimalEdits=function(e,n){var o=this._getModel(e);if(!o)return i.TPromise.as(n);for(var s,l=[],u=0,d=n;ut._diffLimit)l.push({range:h,text:p});else for(var m=a.stringDiff(g,p,!1),v=o.offsetAt(r.Range.lift(h).getStartPosition()),_=0,y=m;_=n,u=s,d=i.viewportHeight-s>=n,c=e.left;return c+t>i.scrollLeft+i.viewportWidth&&(c=i.scrollLeft+i.viewportWidth-t),cthis._contentWidth)return null;var s=e.top-i,a=e.top+this._lineHeight,l=r+this._contentLeft,u=n.getDomNodePagePosition(this._viewDomNode.domNode),d=u.top+s-n.StandardWindow.scrollY,c=u.top+a-n.StandardWindow.scrollY,h=u.left+l-n.StandardWindow.scrollX,p=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=d>=22,g=c+i<=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-22;if(h+t+20>p){h-=m=h-(p-t-20),l-=m}if(h<0){var m=h;h-=m,l-=m}return this._fixedOverflowWidgets&&(s=d,a=c,l=h),{aboveTop:s,fitsAbove:f,belowTop:a,fitsBelow:g,left:l}},e.prototype._prepareRenderWidgetAtExactPositionOverflowing=function(e){return new a(e.top,e.left+this._contentLeft)},e.prototype._getTopLeft=function(e){if(!this._viewPosition)return null;var t=e.visibleRangeForPosition(this._viewPosition);if(!t)return null ;var n=e.getVerticalOffsetForLineNumber(this._viewPosition.lineNumber)-e.scrollTop;return new a(n,t.left)},e.prototype._prepareRenderWidget=function(e,t){var n=this;if(!e)return null;for(var i=null,o=function(){if(!i){if(-1===n._cachedDomNodeClientWidth||-1===n._cachedDomNodeClientHeight){var o=n.domNode.domNode;n._cachedDomNodeClientWidth=o.clientWidth,n._cachedDomNodeClientHeight=o.clientHeight}i=n.allowEditorOverflow?n._layoutBoxInPage(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t):n._layoutBoxInViewport(e,n._cachedDomNodeClientWidth,n._cachedDomNodeClientHeight,t)}},s=1;s<=2;s++)for(var l=0;le.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))},e.prototype.prepareRender=function(e){var t=this._getTopLeft(e);this._renderData=this._prepareRenderWidget(t,e)},e.prototype.render=function(e){this._renderData?(this.allowEditorOverflow?(this.domNode.setTop(this._renderData.top),this.domNode.setLeft(this._renderData.left)):(this.domNode.setTop(this._renderData.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0)):this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden"))},e}()}),define(t[225],n([1,0,59,3,88,266]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{ value:!0});var s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._renderResult=null,n._context.addEventHandler(n),n}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){ return e.scrollTopChanged||e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){for(var t=e.getDecorationsInViewport(),n=[],o=0,r=0,s=t.length;rt.options.zIndex)return 1;var n=e.options.className,o=t.options.className;return no?1:i.Range.compareRangesUsingStarts(e.range,t.range)});for(var l=e.visibleRange.startLineNumber,u=e.visibleRange.endLineNumber,d=[],c=l;c<=u;c++){d[c-l]=""}this._renderWholeLineDecorations(e,n,d),this._renderNormalDecorations(e,n,d),this._renderResult=d},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',d=Math.max(l.range.startLineNumber,o),c=Math.min(l.range.endLineNumber,r),h=d;h<=c;h++){n[h-o]+=u}}},t.prototype._renderNormalDecorations=function(e,t,n){for(var o=String(this._lineHeight),r=e.visibleRange.startLineNumber,s=null,a=!1,l=null,u=0,d=t.length;u';a[h]+=v}}},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(n.DynamicViewOverlay);t.DecorationsOverlay=s}),define(t[134],n([1,0,59,267]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){return function(e,t,n){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(n)}}();t.DecorationToRender=i;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._render=function(e,t,n){for(var i=[],o=e;o<=t;o++){i[o-e]=[]}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',s=[],a=t;a<=n;a++){var l=a-t,u=i[l];0===u.length?s[l]="":s[l]='
    =this._renderResult.length?"":this._renderResult[n]},t}(r);t.GlyphMarginOverlay=s}),define(t[227],n([1,0,134,275]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._decorationsLeft=n._context.configuration.editor.layoutInfo.decorationsLeft, n._decorationsWidth=n._context.configuration.editor.layoutInfo.decorationsWidth,n._renderResult=null,n._context.addEventHandler(n),n}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.layoutInfo&&(this._decorationsLeft=this._context.configuration.editor.layoutInfo.decorationsLeft,this._decorationsWidth=this._context.configuration.editor.layoutInfo.decorationsWidth),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getDecorations=function(e){for(var t=e.getDecorationsInViewport(),i=[],o=0,r=0,s=t.length;r
    ',r=[],s=t;s<=n;s++){for(var a=s-t,l=i[a],u="",d=0,c=l.length;d';o[s]=l}this._renderResult=o},t.prototype.render=function(e,t){return this._renderResult?this._renderResult[t-e]:""},t}(n.DedupOverlay);t.MarginViewLineDecorationsOverlay=i}),define(t[230],n([1,0,26,23,36,287]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var i=e.call(this,t)||this;return i._widgets={},i._verticalScrollbarWidth=i._context.configuration.editor.layoutInfo.verticalScrollbarWidth,i._minimapWidth=i._context.configuration.editor.layoutInfo.minimapWidth,i._horizontalScrollbarHeight=i._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,i._editorHeight=i._context.configuration.editor.layoutInfo.height,i._editorWidth=i._context.configuration.editor.layoutInfo.width, i._domNode=n.createFastDomNode(document.createElement("div")),r.PartFingerprints.write(i._domNode,4),i._domNode.setClassName("overlayWidgets"),i}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._widgets=null},t.prototype.getDomNode=function(){return this._domNode},t.prototype.onConfigurationChanged=function(e){return!!e.layoutInfo&&(this._verticalScrollbarWidth=this._context.configuration.editor.layoutInfo.verticalScrollbarWidth,this._minimapWidth=this._context.configuration.editor.layoutInfo.minimapWidth,this._horizontalScrollbarHeight=this._context.configuration.editor.layoutInfo.horizontalScrollbarHeight,this._editorHeight=this._context.configuration.editor.layoutInfo.height,this._editorWidth=this._context.configuration.editor.layoutInfo.width,!0)},t.prototype.addWidget=function(e){var t=n.createFastDomNode(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("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].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}},t.prototype._renderWidget=function(e){var t=e.domNode;if(null!==e.preference)if(e.preference===i.OverlayWidgetPositionPreference.TOP_RIGHT_CORNER)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===i.OverlayWidgetPositionPreference.BOTTOM_RIGHT_CORNER){var n=t.domNode.clientHeight;t.setTop(this._editorHeight-n-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===i.OverlayWidgetPositionPreference.TOP_CENTER&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()},t.prototype.prepareRender=function(e){}, t.prototype.render=function(e){this._domNode.setWidth(this._editorWidth);for(var t=Object.keys(this._widgets),n=0,i=t.length;n0&&this._renderOneLane(o,n,i,e),!0},t.prototype._renderOneLane=function(e,t,n,i){for(var o=0,r=0,s=0,a=0,l=t.length;a=c?s=Math.max(s,h):(e.fillRect(0,r,i,s-r),r=c,s=h)}e.fillRect(0,r,i,s-r)},t}(n.ViewEventHandler);t.OverviewRuler=s}),define(t[232],n([1,0,10,26,36,12]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n._lineHeight=n._context.configuration.editor.lineHeight,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode=i.createFastDomNode(document.createElement("div")),n.domNode.setClassName("view-zones"),n.domNode.setPosition("absolute"),n.domNode.setAttribute("role","presentation"),n.domNode.setAttribute("aria-hidden","true"),n.marginDomNode=i.createFastDomNode(document.createElement("div")),n.marginDomNode.setClassName("margin-view-zones"),n.marginDomNode.setPosition("absolute"),n.marginDomNode.setAttribute("role","presentation"),n.marginDomNode.setAttribute("aria-hidden","true"),n._zones={}, n}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._zones={}},t.prototype._recomputeWhitespacesProps=function(){for(var e=!1,t=Object.keys(this._zones),n=0,i=t.length;n=e.scrollWidth?0:this._configuration.editor.viewInfo.scrollbar.horizontalScrollbarSize},t.prototype._getTotalHeight=function(){var e=this.scrollable.getScrollDimensions(),t=this._linesLayout.getLinesTotalHeight();return this._configuration.editor.viewInfo.scrollBeyondLastLine?t+=e.height-this._configuration.editor.lineHeight:t+=this._getHorizontalScrollbarHeight(e),Math.max(e.height,t)}, t.prototype._updateHeight=function(){this.scrollable.setScrollDimensions({scrollHeight:this._getTotalHeight()})},t.prototype.getCurrentViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getCurrentScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype.getFutureViewport=function(){var e=this.scrollable.getScrollDimensions(),t=this.scrollable.getFutureScrollPosition();return new s.Viewport(t.scrollTop,t.scrollLeft,e.width,e.height)},t.prototype._computeScrollWidth=function(e,t){if(!this._configuration.editor.wrappingInfo.isViewportWrapping){var n=this._configuration.editor.viewInfo.scrollBeyondLastColumn*this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+n,t,i)}return Math.max(e,t)},t.prototype.onMaxLineWidthChanged=function(e){var t=this._computeScrollWidth(e,this.getCurrentViewport().width);this.scrollable.setScrollDimensions({scrollWidth:t}),this._updateHeight() },t.prototype.saveState=function(){var e=this.scrollable.getFutureScrollPosition(),t=e.scrollTop,n=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(n),scrollLeft:e.scrollLeft}},t.prototype.addWhitespace=function(e,t,n,i){return this._linesLayout.insertWhitespace(e,t,n,i)},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.isAfterLines=function(e){return this._linesLayout.isAfterLines(e)},t.prototype.getLineNumberAtVerticalOffset=function(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)},t.prototype.getWhitespaceAtVerticalOffset=function(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}, t.prototype.getLinesViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)},t.prototype.getLinesViewportDataAtScrollTop=function(e){var t=this.scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)},t.prototype.getWhitespaceViewportData=function(){var e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)},t.prototype.getWhitespaces=function(){return this._linesLayout.getWhitespaces()},t.prototype.getScrollWidth=function(){return this.scrollable.getScrollDimensions().scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollable.getScrollDimensions().scrollHeight},t.prototype.getCurrentScrollLeft=function(){return this.scrollable.getCurrentScrollPosition().scrollLeft},t.prototype.getCurrentScrollTop=function(){return this.scrollable.getCurrentScrollPosition().scrollTop}, t.prototype.validateScrollPosition=function(e){return this.scrollable.validateScrollPosition(e)},t.prototype.setScrollPositionNow=function(e){this.scrollable.setScrollPositionNow(e)},t.prototype.setScrollPositionSmooth=function(e){this.scrollable.setScrollPositionSmooth(e)},t.prototype.deltaScrollNow=function(e,t){var n=this.scrollable.getCurrentScrollPosition();this.scrollable.setScrollPositionNow({scrollLeft:n.scrollLeft+e,scrollTop:n.scrollTop+t})},t}(n.Disposable);t.ViewLayout=a}),define(t[235],n([1,0,3,12,63]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,i,o){this.editorId=e,this.model=t,this.configuration=n,this._linesCollection=i,this._coordinatesConverter=o,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(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype.onLineMappingChanged=function(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()},e.prototype._getOrCreateViewModelDecoration=function(e){var t=e.id,r=this._decorationsCache[t];if(!r){var s=e.range,a=e.options,l=void 0;if(a.isWholeLine){var u=this._coordinatesConverter.convertModelPositionToViewPosition(new i.Position(s.startLineNumber,1)),d=this._coordinatesConverter.convertModelPositionToViewPosition(new i.Position(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)));l=new n.Range(u.lineNumber,u.column,d.lineNumber,d.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(s);r=new o.ViewModelDecoration(l,a), this._decorationsCache[t]=r}return r},e.prototype.getDecorationsViewportData=function(e){var t=!0;return t=t&&null!==this._cachedModelDecorationsResolver,(t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange))||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver},e.prototype._getDecorationsViewportData=function(e){for(var t=this._linesCollection.getDecorationsInRange(e,this.editorId,this.configuration.editor.readOnly),i=e.startLineNumber,r=e.endLineNumber,s=[],a=0,l=[],u=i;u<=r;u++)l[u-i]=[];for(var d=0,c=t.length;de.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)},enumerable:!0,configurable:!0}),e.prototype.selectNextColorPresentation=function(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length, this.flushColor(),this._onDidChangePresentation.fire(this.presentation)},e.prototype.guessColorPresentation=function(e,t){for(var n=0;ne.length)return!1;for(var o=0;o=65&&r<=90&&r+32===s||s>=65&&s<=90&&s+32===r))return!1}return!0},e.prototype._createOperationsForBlockComment=function(t,n,i,r){ var s=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,u=t.endColumn,d=i.getLineContent(s),c=i.getLineContent(l),h=n.blockCommentStartToken,p=n.blockCommentEndToken,f=d.lastIndexOf(h,a-1+h.length),g=c.indexOf(p,u-1-p.length);if(-1!==f&&-1!==g)if(s===l){d.substring(f+h.length,g).indexOf(p)>=0&&(f=-1,g=-1)}else{var m=d.substring(f+h.length),v=c.substring(0,g);(m.indexOf(p)>=0||v.indexOf(p)>=0)&&(f=-1,g=-1)}var _;-1!==f&&-1!==g?(f+h.length0&&32===c.charCodeAt(g-1)&&(p=" "+p,g-=1),_=e._createRemoveBlockCommentOperations(new o.Range(s,f+h.length+1,l,g+1),h,p)):(_=e._createAddBlockCommentOperations(t,h,p),this._usedEndToken=1===_.length?p:null);for(var y=0;y<_.length;y++)r.addTrackedEditOperation(_[y].range,_[y].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;e.tokenizeIfCheap(n);var o=e.getLanguageIdAtPosition(n,i),r=s.LanguageConfigurationRegistry.getComments(o) ;r&&r.blockCommentStartToken&&r.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,r,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-1:0;return new r.Selection(s.endLineNumber,s.endColumn+a,s.endLineNumber,s.endColumn+a)},e}();t.BlockCommentCommand=a}),define(t[241],n([1,0,6,53,12,3,21,149,41]),function(e,t,n,i,o,r,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=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){e.tokenizeIfCheap(t);var i=e.getLanguageIdAtPosition(t,1),o=l.LanguageConfigurationRegistry.getComments(i),r=o?o.lineCommentToken:null;if(!r)return null;for(var s=[],a=0,u=n-t+1;aa?r-1:r}},e}();t.LineCommentCommand=u}),define(t[242],n([1,0,21,3]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){this.selection=e,this.targetPosition=t,this.copy=n}return e.prototype.getEditOperations=function(e,t){var o=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new i.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),o), !this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new n.Selection(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new n.Selection(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumbert&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,o.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,o.matchesCount=!0,r=!0),void 0!==n&&(i.Range.equalsRange(this._currentMatch,n)||(this._currentMatch=n,o.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(o)},e.prototype.change=function(e,t,n){void 0===n&&(n=!0);var o={moveCursor:t,updateHistory:n,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1, currentMatch:!1},r=!1,s=this.isRegex,a=this.wholeWord,l=this.matchCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.searchScope&&(i.Range.equalsRange(this._searchScope,e.searchScope)||(this._searchScope=e.searchScope,o.searchScope=!0,r=!0)),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0, this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,s!==this.isRegex&&(r=!0,o.isRegex=!0),a!==this.wholeWord&&(r=!0,o.wholeWord=!0),l!==this.matchCase&&(r=!0,o.matchCase=!0),r&&this._onFindReplaceStateChange.fire(o)},e}();t.FindReplaceState=r}),define(t[244],n([1,0,3]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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;o0;){if(e=r)break;if(36===(u=e.charCodeAt(i))){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(48===u||38===u){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1);continue}if(49<=u&&u<=57){var a=u-48;if(i+1=r)break;var u;switch(u=e.charCodeAt(i)){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic("\n",i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic("\t",i+1)}}} return t.finalize()}}),define(t[109],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_FOLDING_REGIONS=65535,t.MAX_LINE_NUMBER=16777215;var n=function(){function e(e,n,i){if(e.length!==n.length||e.length>t.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=n,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i}return e.prototype.ensureParentIndices=function(){var e=this;if(!this._parentsComputed){this._parentsComputed=!0;for(var n=[],i=function(t,i){var o=n[n.length-1];return e.getStartLineNumber(o)<=t&&e.getEndLineNumber(o)>=i},o=0,r=this._startIndexes.length;ot.MAX_LINE_NUMBER||a>t.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+t.MAX_LINE_NUMBER);for(;n.length>0&&!i(s,a);)n.pop();var l=n.length>0?n[n.length-1]:-1;n.push(o),this._startIndexes[o]=s+((255&l)<<24), this._endIndexes[o]=a+((65280&l)<<16)}}},Object.defineProperty(e.prototype,"length",{get:function(){return this._startIndexes.length},enumerable:!0,configurable:!0}),e.prototype.getStartLineNumber=function(e){return this._startIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getEndLineNumber=function(e){return this._endIndexes[e]&t.MAX_LINE_NUMBER},e.prototype.getType=function(e){return this._types?this._types[e]:void 0},e.prototype.hasTypes=function(){return!!this._types},e.prototype.isCollapsed=function(e){var t=e/32|0,n=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((4278190080&this._endIndexes[e])>>>16);return n===t.MAX_FOLDING_REGIONS?-1:n},e.prototype.contains=function(e,t){ return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t},e.prototype.findIndex=function(e){var t=0,n=this._startIndexes.length;if(0===n)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1},e.prototype.toString=function(){for(var e=[],t=0;t=this.endLineNumber},e.prototype.containsLine=function(e){return this.startLineNumber<=e&&e<=this.endLineNumber},e}();t.FoldingRegion=i}),define(t[247],n([1,0,9,109]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._updateEventEmitter=new n.Emitter,this._textModel=e,this._decorationProvider=t,this._regions=new i.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1} return Object.defineProperty(e.prototype,"regions",{get:function(){return this._regions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"textModel",{get:function(){return this._textModel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this._isInitialized},enumerable:!0,configurable:!0}),e.prototype.toggleCollapseState=function(e){var t=this;if(e.length){var n={};this._decorationProvider.changeDecorations(function(i){for(var o=0,r=e;o=c))break;o(a,d===c),a++}}l=s()}for(;a0?e:null},e.prototype.applyMemento=function(e){if(Array.isArray(e)){for(var t=[],n=0,i=e;n=0;){var r=this._regions.toRegion(i);t&&!t(r,o)||n.push(r),o++,i=r.parentIndex}return n},e.prototype.getRegionAtLine=function(e){if(this._regions){var t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}, e.prototype.getRegionsInside=function(e,t){for(var n=[],i=t&&2===t.length,o=i?[]:null,r=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE,a=r,l=this._regions.length;a0&&!u.containedBy(o[o.length-1]);)o.pop();o.push(u),t(u,o.length)&&n.push(u)}else t&&!t(u)||n.push(u)}return n},e}();t.FoldingModel=o,t.setCollapseStateLevelsDown=function(e,t,n,i){void 0===n&&(n=Number.MAX_VALUE);var o=[];if(i&&i.length>0)for(var r=0,s=i;r1)&&(u=e.getRegionsInside(l,function(e,i){return e.isCollapsed!==t&&i=0;s--)if(n!==o.isCollapsed(s)){var a=o.getStartLineNumber(s);t.test(i.getLineContent(a))&&r.push(o.toRegion(s))}e.toggleCollapseState(r)},t.setCollapseStateForType=function(e,t,n){for(var i=e.regions,o=[],r=i.length-1;r>=0;r--)n!==i.isCollapsed(r)&&t===i.getType(r)&&o.push(i.toRegion(r));e.toggleCollapseState(o)}}),define(t[248],n([1,0,9,3,25]),function(e,t,n,i,o){"use strict";function r(e,t){var n=o.findFirstInSorted(e,function(e){return t=0&&e[n].endLineNumber>=t?e[n]:null}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){var t=this;this._updateEventEmitter=new n.Emitter,this._foldingModel=e, this._foldingModelListener=e.onDidChange(function(e){return t.updateHiddenRanges()}),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._updateEventEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hiddenRanges",{get:function(){return this._hiddenRanges},enumerable:!0,configurable:!0}),e.prototype.updateHiddenRanges=function(){for(var e=!1,t=[],n=0,o=0,r=Number.MAX_VALUE,s=-1,a=this._foldingModel.regions;n0},e.prototype.isHidden=function(e){return null!==r(this._hiddenRanges,e)},e.prototype.adjustSelections=function(e){for(var t=this,n=!1,i=this._foldingModel.textModel,o=null,s=function(e){return o&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,o)||(o=r(t._hiddenRanges,e)),o?o.startLineNumber-1:null},a=0,l=e.length;a0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)},e}();t.HiddenRangeModel=s}),define(t[168],n([1,0,10,14,13,109]),function(e,t,n,i,o,r){"use strict";function s(e,t){for(var n=e.sort(function(e,t){var n=e.start-t.start;return 0===n&&(n=e.rank-t.rank),n}),i=new d(t),o=null,r=[],s=0,a=n;so.start)if(l.end<=o.end)r.push(o),o=l,i.add(l.start,l.end,l.kind&&l.kind.value,r.length);else{if(l.start>o.end){do{o=r.pop()}while(o&&l.start>o.end);o&&r.push(o),o=l}i.add(l.start,l.end,l.kind&&l.kind.value,r.length)}}else o=l,i.add(l.start,l.end,l.kind&&l.kind.value,r.length)}return i.toIndentRanges()}Object.defineProperty(t,"__esModule",{value:!0});var a=5e3,l={};t.ID_SYNTAX_PROVIDER="syntax";var u=function(){function e(e,n,i){void 0===i&&(i=a),this.editorModel=e,this.providers=n,this.limit=i, this.id=t.ID_SYNTAX_PROVIDER}return e.prototype.compute=function(e){var t=this;return function(e,t,r){var s=null,a=e.map(function(e,o){return i.toThenable(e.provideFoldingRanges(t,l,r)).then(function(e){if(!r.isCancellationRequested&&Array.isArray(e)){Array.isArray(s)||(s=[]);for(var n=t.getLineCount(),i=0,a=e;i0&&l.end>l.start&&l.end<=n&&s.push({start:l.start,end:l.end,rank:o,kind:l.kind})}}},n.onUnexpectedExternalError)});return o.TPromise.join(a).then(function(e){return s})}(this.providers,this.editorModel,e).then(function(e){if(e){return s(e,t.limit)}return null})},e.prototype.dispose=function(){},e}();t.SyntaxRangeProvider=u;var d=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.add=function(e,t,n,i){if(!(e>r.MAX_LINE_NUMBER||t>r.MAX_LINE_NUMBER)){var o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t, this._nestingLevels[o]=i,this._types[o]=n,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}},e.prototype.toIndentRanges=function(){if(this._length<=this._foldingRangesLimit){for(var e=new Uint32Array(this._length),t=new Uint32Array(this._length),n=0;nthis._foldingRangesLimit){o=n;break}i+=s}}for(var e=new Uint32Array(this._foldingRangesLimit),t=new Uint32Array(this._foldingRangesLimit),a=[],n=0,l=0;n0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()},t.prototype._renderMessages=function(e,t){var n=this;a.dispose(this._renderDisposeables),this._renderDisposeables=[];var i=document.createDocumentFragment();t.forEach(function(e){var t=n._markdownRenderer.render(e.value);n._renderDisposeables.push(t),i.appendChild(r.$("div.hover-row",null,t.element))}),this.updateContents(i),this.showAt(e)},t.ID="editor.contrib.modesGlyphHoverWidget",t}(i.GlyphHoverWidget);t.ModesGlyphHoverWidget=u}),define(t[256],n([1,0,21]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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.addTrackedEditOperation(this._editRange,this._text)}, e.prototype.computeCursorState=function(e,t){var i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new n.Selection(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new n.Selection(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)},e}();t.InPlaceReplaceCommand=i}),define(t[257],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSpaceCnt=function(e,t){for(var n=0,i=0;i1&&(i-=1,r=e.getLineMaxColumn(i)),t.addTrackedEditOperation(new n.Range(i,r,o,s),null)}},e.prototype.computeCursorState=function(e,t){var n=t.getInverseEditOperations()[0].range;return new i.Selection(n.endLineNumber,this.restoreCursorToColumn,n.endLineNumber,this.restoreCursorToColumn)},e}();t.DeleteLinesCommand=o}), define(t[260],n([1,0,53,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())}),!0===n&&(a=a.reverse()),{startLineNumber:i,endLineNumber:o,before:r,after:a}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){this.selection=e,this.descending=t}return e.prototype.getEditOperations=function(e,t){var r=function(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}(e,this.selection,this.descending);r&&t.addEditOperation(r.range,r.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;r0},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}(u);t.NodeList=d;var c=function(e){function t(){var t=e.call(this)||this;return t.elements=new d,t.elements.parent=t,t}return o(t,e),t}(u);t.Block=c;var h=function(){return function(e,t,n){this.range=e,this.bracket=t,this.bracketType=n}}(),p=function(){return function(e,t,n){this.lineNumber=n,this.lineText=e.getLineContent(),this.startOffset=e.getStartOffset(t),this.endOffset=e.getEndOffset(t),this.type=e.getStandardTokenType(t),this.languageId=e.getLanguageId(t)}}(),f=function(){function e(e){this._model=e,this._lineCount=this._model.getLineCount(),this._versionId=this._model.getVersionId(), this._lineNumber=0,this._tokenIndex=0,this._lineTokens=null,this._advance()}return e.prototype._advance=function(){for(this._lineTokens&&(this._tokenIndex++,this._tokenIndex>=this._lineTokens.getCount()&&(this._lineTokens=null));this._lineNumber0)return this._nextBuff.shift();var e=this._rawTokenScanner.next();if(!e)return null ;var t=e.lineNumber,o=e.lineText,a=e.type,l=e.startOffset,u=e.endOffset;this._cachedLanguageId!==e.languageId&&(this._cachedLanguageId=e.languageId,this._cachedLanguageBrackets=s.LanguageConfigurationRegistry.getBracketsSupport(this._cachedLanguageId));var d=this._cachedLanguageBrackets;if(!d||i.ignoreBracketsInToken(a))return new h(new n.Range(t,l+1,t,u+1),0,null);var c;do{if(c=r.BracketsUtils.findNextBracketInToken(d.forwardRegex,t,o,l,u)){var p=c.startColumn-1,f=c.endColumn-1;l0;){var i=n.shift();if(!t(i))break;n.unshift.apply(n,i.children)}}Object.defineProperty(t,"__esModule",{value:!0});var i,r=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:14,pos:this.pos,len:0};var t,n=this.pos,i=0,o=this.value.charCodeAt(n);if("number"==typeof(t=e._table[o]))return this.pos+=1,{type:t,pos:n,len:1};if(e.isDigitCharacter(o)){t=8;do{i+=1,o=this.value.charCodeAt(n+i) }while(e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}if(e.isVariableCharacter(o)){t=9;do{o=this.value.charCodeAt(n+ ++i)}while(e.isVariableCharacter(o)||e.isDigitCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}}t=10;do{i+=1,o=this.value.charCodeAt(n+i)}while(!isNaN(o)&&void 0===e._table[o]&&!e.isDigitCharacter(o)&&!e.isVariableCharacter(o));return this.pos+=i,{type:t,pos:n,len:i}},e._table=(i={},i[36]=0,i[58]=1,i[44]=2,i[123]=3,i[125]=4,i[92]=5,i[47]=6,i[124]=7,i[43]=11,i[45]=12,i[63]=13,i),e}();t.Scanner=r;var s=function(){function e(){this._children=[]}return e.prototype.appendChild=function(e){return e instanceof a&&this._children[this._children.length-1]instanceof a?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this},e.prototype.replace=function(e,t){var n=e.parent,i=n.children.indexOf(e),o=n.children.slice(0);o.splice.apply(o,[i,1].concat(t)),n._children=o,t.forEach(function(e){return e.parent=n})}, Object.defineProperty(e.prototype,"children",{get:function(){return this._children},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"snippet",{get:function(){for(var e=this;;){if(!e)return;if(e instanceof f)return e;e=e.parent}},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.children.reduce(function(e,t){return e+t.toString()},"")},e.prototype.len=function(){return 0},e}();t.Marker=s;var a=function(e){function t(t){var n=e.call(this)||this;return n.value=t,n}return o(t,e),t.prototype.toString=function(){return this.value},t.prototype.len=function(){return this.value.length},t.prototype.clone=function(){return new t(this.value)},t}(s);t.Text=a;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s);t.TransformableMarker=l;var u=function(e){function t(t){var n=e.call(this)||this;return n.index=t,n}return o(t,e),t.compareByIndex=function(e,t){ return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop?-1:e.indext.index?1:0},Object.defineProperty(t.prototype,"isFinalTabstop",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return 1===this._children.length&&this._children[0]instanceof d?this._children[0]:void 0},enumerable:!0,configurable:!0}),t.prototype.clone=function(){var e=new t(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(function(e){return e.clone()}),e},t}(l);t.Placeholder=u;var d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=[],t}return o(t,e),t.prototype.appendChild=function(e){return e instanceof a&&(e.parent=this,this.options.push(e)),this},t.prototype.toString=function(){return this.options[0].value},t.prototype.len=function(){return this.options[0].len()},t.prototype.clone=function(){var e=new t ;return this.options.forEach(e.appendChild,e),e},t}(s);t.Choice=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.resolve=function(e){var t=this;return e.replace(this.regexp,function(){for(var e="",n=0,i=t._children;no.index?arguments[o.index]:"";e+=r=o.resolve(r)}else e+=o.toString()}return e})},t.prototype.toString=function(){return""},t.prototype.clone=function(){var e=new t;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(function(e){return e.clone()}),e},t}(s);t.Transform=c;var h=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r.index=t,r.shorthandName=n,r.ifValue=i,r.elseValue=o,r}return o(t,e),t.prototype.resolve=function(e){ return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue},t.prototype.clone=function(){return new t(this.index,this.shorthandName,this.ifValue,this.elseValue)},t}(s);t.FormatString=h;var p=function(e){function t(t){var n=e.call(this)||this;return n.name=t,n}return o(t,e),t.prototype.resolve=function(e){var t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new a(t)],!0)},t.prototype.clone=function(){var e=new t(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(function(e){return e.clone()}),e},t}(l);t.Variable=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e), Object.defineProperty(t.prototype,"placeholderInfo",{get:function(){if(!this._placeholders){var e,t=[];this.walk(function(n){return n instanceof u&&(t.push(n),e=!e||e.index0?o.set(e.index,e.children):r.push(e)),!0});for(var a=0,l=r;a0&&t),!o.has(0)&&n&&i.appendChild(new u(0)),i},e.prototype._accept=function(e,t){ if(void 0===e||this._token.type===e){var n=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),n}return!1},e.prototype._backTo=function(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1},e.prototype._until=function(e){if(14===this._token.type)return!1;for(var t=this._token;this._token.type!==e;)if(this._token=this._scanner.next(),14===this._token.type)return!1;var n=this._scanner.value.substring(t.pos,this._token.pos);return this._token=this._scanner.next(),n},e.prototype._parse=function(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)},e.prototype._parseEscaped=function(e){var t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new a(t)),!0)},e.prototype._parseTabstopOrVariableName=function(e){var t,n=this._token ;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new u(Number(t)):new p(t)),!0):this._backTo(n)},e.prototype._parseComplexPlaceholder=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(n);var i=new u(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new a("${"+t+":")),i.children.forEach(e.appendChild,e),!0}else{if(!(i.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(var o=new d;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(i.appendChild(o),this._accept(4)))return e.appendChild(i),!0}return this._backTo(n),!1}}},e.prototype._parseChoiceElement=function(e){for(var t=this._token,n=[];;){if(2===this._token.type||7===this._token.type)break;var i=void 0 ;if(!(i=(i=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||i:this._accept(void 0,!0)))return this._backTo(t),!1;n.push(i)}return 0===n.length?(this._backTo(t),!1):(e.appendChild(new a(n.join(""))),!0)},e.prototype._parseComplexVariable=function(e){var t,n=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(n);var i=new p(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(i)?(e.appendChild(i),!0):(this._backTo(n),!1):this._accept(4)?(e.appendChild(i),!0):this._backTo(n);for(;;){if(this._accept(4))return e.appendChild(i),!0;if(!this._parse(i))return e.appendChild(new a("${"+t+":")),i.children.forEach(e.appendChild,e),!0}},e.prototype._parseTransform=function(e){for(var t=new c,n="",i="";;){if(this._accept(6))break;o=void 0;if(o=this._accept(5,!0))n+=o=this._accept(6,!0)||o;else{if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}}for(;;){if(this._accept(6))break;var o=void 0;if(o=this._accept(5,!0))o=this._accept(6,!0)||o, t.appendChild(new a(o));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;;){if(this._accept(4))break;if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}try{t.regexp=new RegExp(n,i)}catch(e){return!1}return e.transform=t,!0},e.prototype._parseFormatString=function(e){var t=this._token;if(!this._accept(0))return!1;var n=!1;this._accept(3)&&(n=!0);var i=this._accept(8,!0);if(!i)return this._backTo(t),!1;if(!n)return e.appendChild(new h(Number(i))),!0;if(this._accept(4))return e.appendChild(new h(Number(i))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){var o=this._accept(9,!0);return o&&this._accept(4)?(e.appendChild(new h(Number(i),o)),!0):(this._backTo(t),!1)}if(this._accept(11)){if(r=this._until(4))return e.appendChild(new h(Number(i),void 0,r,void 0)),!0}else if(this._accept(12)){if(s=this._until(4))return e.appendChild(new h(Number(i),void 0,void 0,s)),!0}else if(this._accept(13)){var r=this._until(1);if(r){ if(s=this._until(4))return e.appendChild(new h(Number(i),void 0,r,s)),!0}}else{var s=this._until(4);if(s)return e.appendChild(new h(Number(i),void 0,void 0,s)),!0}return this._backTo(t),!1},e.prototype._parseAnything=function(e){return 14!==this._token.type&&(e.appendChild(new a(this._scanner.tokenText(this._token))),this._accept(void 0),!0)},e}();t.SnippetParser=g}),define(t[190],n([1,0]),function(e,t){"use strict";function n(e){return Array.isArray(e)}function i(e){return"string"==typeof e}function o(e){return!e}function r(e,t){return e.ignoreCase&&t?t.toLowerCase():t}Object.defineProperty(t,"__esModule",{value:!0}),t.isFuzzyActionArr=n,t.isFuzzyAction=function(e){return!n(e)},t.isString=i,t.isIAction=function(e){return!i(e)},t.empty=o,t.fixCase=r,t.sanitize=function(e){return e.replace(/[&<>'"_]/g,"-")},t.log=function(e,t){console.log(e.languageId+": "+t)},t.throwError=function(e,t){throw new Error(e.languageId+": "+t)},t.substituteMatches=function(e,t,n,i,s){var a=null ;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,function(t,l,u,d,c,h,p,f,g){return o(u)?o(d)?!o(c)&&c0;){var n=e.tokenizer[t];if(n)return n;var i=t.lastIndexOf(".");t=i<0?null:t.substr(0,i)}return null},t.stateExists=function(e,t){for(;t&&t.length>0;){if(e.stateNames[t])return!0;var n=t.lastIndexOf(".");t=n<0?null:t.substr(0,n)}return!1}}),define(t[264],n([1,0,28,190]),function(e,t,n,i){"use strict";function o(e,t,n){return"boolean"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function r(e,t,n){return"string"==typeof e?e:(n&&(e||void 0===t)&&n(),void 0===t?null:t)}function s(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 a(e,t,o,r){var a=-1,l=o,u=o.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);u&&(u[3]&&(a=parseInt(u[3]),u[2]&&(a+=100)),l=u[4]);var d="~",c=l;l&&0!==l.length?/^\w*$/.test(c)?d="==":(u=l.match(/^(@|!@|~|!~|==|!=)(.*)$/))&&(d=u[1],c=u[2]):(d="!=",c="");var h;if("~"!==d&&"!~"!==d||!/^(\w|\|)*$/.test(c))if("@"===d||"!@"===d){var p=e[c];p||i.throwError(e,"the @ match target '"+c+"' is not defined, in rule: "+t),function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(var n in t)if(t.hasOwnProperty(n)&&!e(t[n]))return!1;return!0}(function(e){return"string"==typeof e},p)||i.throwError(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t) ;var f=n.createKeywordMatcher(p,e.ignoreCase);h=function(e){return"@"===d?f(e):!f(e)}}else if("~"===d||"!~"===d)if(c.indexOf("$")<0){var g=s(e,"^"+c+"$");h=function(e){return"~"===d?g.test(e):!g.test(e)}}else h=function(t,n,o,r){return s(e,"^"+i.substituteMatches(e,c,n,o,r)+"$").test(t)};else if(c.indexOf("$")<0){var m=i.fixCase(e,c);h=function(e){return"=="===d?e===m:e!==m}}else{var v=i.fixCase(e,c);h=function(t,n,o,r,s){var a=i.substituteMatches(e,v,n,o,r);return"=="===d?t===a:t!==a}}else{var _=n.createKeywordMatcher(c.split("|"),e.ignoreCase);h=function(e){return"~"===d?_(e):!_(e)}}return-1===a?{name:o,value:r,test:function(e,t,n,i){return h(e,e,t,n,i)}}:{name:o,value:r,test:function(e,t,n,i){var o=function(e,t,n,i){if(i<0)return e;if(i=100){i-=100;var o=n.split(".");if(o.unshift(n),i=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=[];for(var u in n)n.hasOwnProperty(u)&&(s[u]=l(e,t,n[u])) ;return{group:s}}if(n.cases){var d=[];for(var c in n.cases)if(n.cases.hasOwnProperty(c)){var h=l(e,t,n.cases[c]);"@default"===c||"@"===c||""===c?d.push({test:null,value:h,name:c}):"@eos"===c?d.push({test:function(e,t,n,i){return i},value:h,name:c}):d.push(a(e,t,c,h))}var p=e.defaultToken;return{test:function(e,t,n,i){for(var o in d)if(d.hasOwnProperty(o)){if(!d[o].test||d[o].test(e,t,n,i))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:""}}Object.defineProperty(t,"__esModule",{value:!0});var u=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=s(e,"^(?:"+(this.matchOnlyAtLineStart?n.substr(1):n)+")")},e.prototype.setAction=function(e,t){this.action=l(e,this.name,t)},e}();t.compile=function(e,t){function n(e,l,d){for(var c in d)if(d.hasOwnProperty(c)){var h=d[c],p=h.include;if(p)"string"!=typeof p&&i.throwError(s,"an 'include' attribute must be a string at: "+e),"@"===p[0]&&(p=p.substr(1)),t.tokenizer[p]||i.throwError(s,"include target '"+p+"' is not defined at: "+e),n(e+"."+p,l,t.tokenizer[p]);else{var f=new u(e);if(Array.isArray(h)&&h.length>=1&&h.length<=3)if(f.setRegex(a,h[0]),h.length>=3)if("string"==typeof h[1])f.setAction(a,{token:h[1],next:h[2]});else if("object"==typeof h[1]){var g=h[1];g.next=h[2],f.setAction(a,g)}else i.throwError(s,"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,h[1]);else h.regex||i.throwError(s,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e), h.name&&(f.name=r(h.name)),h.matchOnlyAtStart&&(f.matchOnlyAtLineStart=o(h.matchOnlyAtLineStart)),f.setRegex(a,h.regex),f.setAction(a,h.action);l.push(f)}}}if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");var s={};s.languageId=e,s.noThrow=!1,s.maxStack=100,s.start=r(t.start),s.ignoreCase=o(t.ignoreCase,!1),s.tokenPostfix=r(t.tokenPostfix,"."+s.languageId),s.defaultToken=r(t.defaultToken,"source",function(){i.throwError(s,"the 'defaultToken' must be a string")}),s.usesEmbedded=!1;var a=t;a.languageId=e,a.ignoreCase=s.ignoreCase,a.noThrow=s.noThrow,a.usesEmbedded=s.usesEmbedded,a.stateNames=t.tokenizer,a.defaultToken=s.defaultToken,t.tokenizer&&"object"==typeof t.tokenizer||i.throwError(s,"a language definition must define the 'tokenizer' attribute as an object"),s.tokenizer=[];for(var l in t.tokenizer)if(t.tokenizer.hasOwnProperty(l)){s.start||(s.start=l);var d=t.tokenizer[l];s.tokenizer[l]=new Array,n("tokenizer."+l,s.tokenizer[l],d)}s.usesEmbedded=a.usesEmbedded, t.brackets?Array.isArray(t.brackets)||i.throwError(s,"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 h in t.brackets)if(t.brackets.hasOwnProperty(h)){var p=t.brackets[h];p&&Array.isArray(p)&&3===p.length&&(p={token:p[2],open:p[0],close:p[1]}),p.open===p.close&&i.throwError(s,"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:r(p.token)+s.tokenPostfix,open:i.fixCase(s,r(p.open)),close:i.fixCase(s,r(p.close))}):i.throwError(s,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return s.brackets=c,s.noThrow=!0,s}}),define(t[265],n([5,4]),function(e,t){ return e.create("vs/base/browser/ui/actionbar/actionbar",t)}),define(t[69],n([1,0,18,265,2,56,67,7,33,74,57,9,481]),function(e,t,n,i,r,s,a,l,u,d,c,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t,n){var i=this;this.options=n,this._callOnDispose=[],this._context=e||this,this._action=t,t instanceof a.Action&&this._callOnDispose.push(t.onDidChange(function(e){i.builder&&i._handleActionChangeEvent(e)}))}return e.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(e.prototype,"actionRunner",{get:function(){return this._actionRunner},set:function(e){this._actionRunner=e},enumerable:!0,configurable:!0}),e.prototype.getAction=function(){return this._action},e.prototype.isEnabled=function(){return this._action.enabled}, e.prototype.setActionContext=function(e){this._context=e},e.prototype.render=function(e){var t=this;this.builder=s.$(e),d.Gesture.addTarget(e);var i=this.options&&this.options.draggable;i&&(e.draggable=!0),this.builder.on(d.EventType.Tap,function(e){return t.onClick(e)}),this.builder.on(l.EventType.MOUSE_DOWN,function(e){i||l.EventHelper.stop(e,!0);var n=e;t._action.enabled&&0===n.button&&t.builder.addClass("active")}),this.builder.on(l.EventType.CLICK,function(e){l.EventHelper.stop(e,!0),t.options&&t.options.isMenu?t.onClick(e):n.setImmediate(function(){return t.onClick(e)})}),this.builder.on([l.EventType.MOUSE_UP,l.EventType.MOUSE_OUT],function(e){l.EventHelper.stop(e),t.builder.removeClass("active")})},e.prototype.onClick=function(e){l.EventHelper.stop(e,!0);var t;u.isUndefinedOrNull(this._context)||!u.isObject(this._context)?t=e:(t=this._context).event=e,this._actionRunner.run(this._action,t)},e.prototype._updateEnabled=function(){},e.prototype._updateLabel=function(){}, e.prototype._updateTooltip=function(){},e.prototype._updateClass=function(){},e.prototype._updateChecked=function(){},e.prototype.dispose=function(){this.builder&&(this.builder.destroy(),this.builder=null),this._callOnDispose=r.dispose(this._callOnDispose)},e}();t.BaseActionItem=p;var f=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 o(t,e),t.ID="vs.actions.separator",t}(a.Action);t.Separator=f;var g=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 o(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=s.$("a.action-label").appendTo(this.builder),this._action.id===f.ID?this.$e.attr({role:"presentation"}):this.options.isMenu?this.$e.attr({role:"menuitem"}):this.$e.attr({role:"button"}), this.options.label&&this.options.keybinding&&s.$("span.keybinding").text(this.options.keybinding).appendTo(this.builder),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},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=i.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"),l.removeTabIndexAndUpdateFocus(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$e.addClass("checked"):this.$e.removeClass("checked")},t}(p);t.ActionItem=g;var m;!function(e){e[e.HORIZONTAL=0]="HORIZONTAL",e[e.HORIZONTAL_REVERSE=1]="HORIZONTAL_REVERSE",e[e.VERTICAL=2]="VERTICAL",e[e.VERTICAL_REVERSE=3]="VERTICAL_REVERSE"}(m=t.ActionsOrientation||(t.ActionsOrientation={}));var v={orientation:m.HORIZONTAL,context:null},_=function(){function e(e,t){void 0===t&&(t=v);var n=this;this._onDidBlur=new h.Emitter,this._onDidCancel=new h.Emitter,this._onDidRun=new h.Emitter,this._onDidBeforeRun=new h.Emitter,this.options=t,this._context=t.context,this.toDispose=[],this._actionRunner=this.options.actionRunner,this._actionRunner||(this._actionRunner=new a.ActionRunner,this.toDispose.push(this._actionRunner)),this.toDispose.push(this._actionRunner.onDidRun(function(e){ return n._onDidRun.fire(e)})),this.toDispose.push(this._actionRunner.onDidBeforeRun(function(e){return n._onDidBeforeRun.fire(e)})),this.items=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&l.addClass(this.domNode,"animated");var i,o;switch(this.options.orientation){case m.HORIZONTAL:i=15,o=17;break;case m.HORIZONTAL_REVERSE:i=17,o=15,this.domNode.className+=" reverse";break;case m.VERTICAL:i=16,o=18,this.domNode.className+=" vertical";break;case m.VERTICAL_REVERSE:i=18,o=16,this.domNode.className+=" vertical reverse"}s.$(this.domNode).on(l.EventType.KEY_DOWN,function(e){var t=new c.StandardKeyboardEvent(e),r=!0;t.equals(i)?n.focusPrevious():t.equals(o)?n.focusNext():t.equals(9)?n.cancel():t.equals(3)||t.equals(10)||(r=!1),r&&(t.preventDefault(),t.stopPropagation())}),s.$(this.domNode).on(l.EventType.KEY_UP,function(e){var t=new c.StandardKeyboardEvent(e);t.equals(3)||t.equals(10)?(n.doTrigger(t),t.preventDefault(), t.stopPropagation()):(t.equals(2)||t.equals(1026))&&n.updateFocusedItem()}),this.focusTracker=l.trackFocus(this.domNode),this.toDispose.push(this.focusTracker.onDidBlur(function(){document.activeElement!==n.domNode&&l.isAncestor(document.activeElement,n.domNode)||(n._onDidBlur.fire(),n.focusedItem=void 0)})),this.toDispose.push(this.focusTracker.onDidFocus(function(){return n.updateFocusedItem()})),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.isMenu?this.actionsList.setAttribute("role","menu"):this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.options.isMenu&&(this.domNode.tabIndex=0,s.$(this.domNode).on(l.EventType.MOUSE_OUT,function(e){var t=e.relatedTarget;l.isAncestor(t,n.domNode)||(n.focusedItem=void 0,n.updateFocus(),e.stopPropagation())}),s.$(this.actionsList).on(l.EventType.MOUSE_OVER,function(e){var t=e.target ;if(t&&l.isAncestor(t,n.actionsList)&&t!==n.actionsList){for(;t.parentElement!==n.actionsList;)t=t.parentElement;if(l.hasClass(t,"action-item")){var i=n.focusedItem;n.setFocusedItem(t),i!==n.focusedItem&&n.updateFocus()}}})),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}return Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this._onDidBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this._onDidCancel.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidRun",{get:function(){return this._onDidRun.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBeforeRun",{get:function(){return this._onDidBeforeRun.event},enumerable:!0,configurable:!0}),e.prototype.setFocusedItem=function(e){for(var t=0;t=n.actionsList.children.length?(n.actionsList.appendChild(i), n.items.push(r)):(n.actionsList.insertBefore(i,n.actionsList.children[o]),n.items.splice(o,0,r),o++)})},e.prototype.clear=function(){this.items=r.dispose(this.items),s.$(this.actionsList).empty()},e.prototype.isEmpty=function(){return 0===this.items.length},e.prototype.focus=function(e){e&&void 0===this.focusedItem?(this.focusedItem=this.items.length-1,this.focusNext()):this.updateFocus()},e.prototype.focusNext=function(){void 0===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()},e.prototype.focusPrevious=function(){void 0===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(!0)},e.prototype.updateFocus=function(e){void 0===this.focusedItem&&this.domNode.focus();for(var t=0;t=0){var n=void 0;e.equals(17)?n=(t+1)%a.length:e.equals(15)&&(n=0===t?a.length-1:t-1),e.equals(9)?a[t].blur():n>=0&&a[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.dispose=function(){e.prototype.dispose.call(this)},t}(s.Widget);t.FindInput=d}),define(t[277],n([5,4]),function(e,t){return e.create("vs/base/browser/ui/list/listWidget",t)}),define(t[278],n([1,0,277,2,33,25,111,7,18,74,57,9,87,240,27,28,425,473,218]),function(e,t,n,i,r,s,l,u,d,c,h,p,f,g,m,v,_,y){"use strict";function C(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function b(e){return d.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function S(e){return e.browserEvent.shiftKey}function w(e){return e instanceof MouseEvent&&2===e.button}function E(e,t){for(var n=[],i=0,o=0;i=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){n.push(e[i]),i++,o++;continue}e[i]=0){o=this.renderedElements[i];this.trait.unrender(n),o.index=t}else{var o={index:t,templateData:n};this.renderedElements.push(o)}this.trait.renderIndex(t,n)},e.prototype.disposeElement=function(){},e.prototype.splice=function(e,t,n){for(var i=[],o=0;o=e+t&&i.push({index:r.index+n-t,templateData:r.templateData})}this.renderedElements=i},e.prototype.renderIndexes=function(e){for(var t=0,n=this.renderedElements;t-1&&this.trait.renderIndex(o,r)}},e.prototype.disposeTemplate=function(e){ var t=s.firstIndex(this.renderedElements,function(t){return t.templateData===e});t<0||this.renderedElements.splice(t,1)},e}(),x=function(){function e(e){this._trait=e,this._onChange=new p.Emitter,this.indexes=[]}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"trait",{get:function(){return this._trait},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderer",{get:function(){return new L(this)},enumerable:!0,configurable:!0}),e.prototype.splice=function(e,t,n){var i=n.length-t,o=e+t,r=this.indexes.filter(function(t){return t=o}).map(function(e){return e+i}));this.renderer.splice(e,t,n.length),this.set(r)},e.prototype.renderIndex=function(e,t){u.toggleClass(t,this._trait,this.contains(e))},e.prototype.unrender=function(e){u.removeClass(e,this._trait)}, e.prototype.set=function(e){var t=this.indexes;this.indexes=e;var n=E(t,e);return this.renderer.renderIndexes(n),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.dispose=function(){this.indexes=null,this._onChange=i.dispose(this._onChange)},a([l.memoize],e.prototype,"renderer",null),e}(),N=function(e){function t(t){var n=e.call(this,"focused")||this;return n.getDomId=t,n}return o(t,e),t.prototype.renderIndex=function(t,n){e.prototype.renderIndex.call(this,t,n),n.setAttribute("role","treeitem"),n.setAttribute("id",this.getDomId(t))},t}(x),I=function(){function e(e,t,n){this.trait=e,this.view=t,this.getId=n}return e.prototype.splice=function(e,t,n){var i=this;if(!this.getId)return this.trait.splice(e,t,n.map(function(e){return!1}));var o=this.trait.get().map(function(e){return i.getId(i.view.element(e))}),r=n.map(function(e){return o.indexOf(i.getId(e))>-1}) ;this.trait.splice(e,t,r)},e}(),M=function(){function e(e,t,n){this.list=e,this.view=t;var i=!(!1===n.multipleSelectionSupport);this.disposables=[],this.openController=n.openController||k;var o=p.chain(f.domEvent(t.domNode,"keydown")).filter(function(e){return!C(e.target)}).map(function(e){return new h.StandardKeyboardEvent(e)});o.filter(function(e){return 3===e.keyCode}).on(this.onEnter,this,this.disposables),o.filter(function(e){return 16===e.keyCode}).on(this.onUpArrow,this,this.disposables),o.filter(function(e){return 18===e.keyCode}).on(this.onDownArrow,this,this.disposables),o.filter(function(e){return 11===e.keyCode}).on(this.onPageUpArrow,this,this.disposables),o.filter(function(e){return 12===e.keyCode}).on(this.onPageDownArrow,this,this.disposables),o.filter(function(e){return 9===e.keyCode}).on(this.onEscape,this,this.disposables),i&&o.filter(function(e){return(d.isMacintosh?e.metaKey:e.ctrlKey)&&31===e.keyCode}).on(this.onCtrlA,this,this.disposables)}return e.prototype.onEnter=function(e){ e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus()),this.openController.shouldOpen(e.browserEvent)&&this.list.open(this.list.getFocus(),e.browserEvent)},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.onCtrlA=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(s.range(this.list.length)),this.view.domNode.focus()}, e.prototype.onEscape=function(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection([]),this.view.domNode.focus()},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},e}(),D=function(){function e(e,t){this.list=e,this.view=t,this.disposables=[],this.disposables=[];p.chain(f.domEvent(t.domNode,"keydown")).filter(function(e){return!C(e.target)}).map(function(e){return new h.StandardKeyboardEvent(e)}).filter(function(e){return!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)}).on(this.onTab,this,this.disposables)}return e.prototype.onTab=function(e){if(e.target===this.view.domNode){var t=this.list.getFocus();if(0!==t.length){var n=this.view.domElement(t[0]).querySelector("[tabIndex]");if(n&&n instanceof HTMLElement){var i=window.getComputedStyle(n);"hidden"!==i.visibility&&"none"!==i.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}}}},e.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},e}();t.isSelectionSingleChangeEvent=b, t.isSelectionRangeChangeEvent=S;var T={isSelectionSingleChangeEvent:b,isSelectionRangeChangeEvent:S},k={shouldOpen:function(e){return!(e instanceof MouseEvent)||!w(e)}},R=function(){function e(e,t,n){void 0===n&&(n={}),this.list=e,this.view=t,this.options=n,this.didJustPressContextMenuKey=!1,this.disposables=[],this.multipleSelectionSupport=!(!1===n.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=n.multipleSelectionController||T),this.openController=n.openController||k,t.onMouseDown(this.onMouseDown,this,this.disposables),t.onMouseClick(this.onPointer,this,this.disposables),t.onMouseDblClick(this.onDoubleClick,this,this.disposables),t.onTouchStart(this.onMouseDown,this,this.disposables),t.onTap(this.onPointer,this,this.disposables),c.Gesture.addTarget(t.domNode)}return Object.defineProperty(e.prototype,"onContextMenu",{get:function(){var e=this,t=p.chain(f.domEvent(this.view.domNode,"keydown")).map(function(e){return new h.StandardKeyboardEvent(e) }).filter(function(t){return e.didJustPressContextMenuKey=58===t.keyCode||t.shiftKey&&68===t.keyCode}).filter(function(e){return e.preventDefault(),e.stopPropagation(),!1}).event,n=p.chain(f.domEvent(this.view.domNode,"keyup")).filter(function(){var t=e.didJustPressContextMenuKey;return e.didJustPressContextMenuKey=!1,t}).filter(function(){return e.list.getFocus().length>0}).map(function(){var t=e.list.getFocus()[0];return{index:t,element:e.view.element(t),anchor:e.view.domElement(t)}}).filter(function(e){return!!e.anchor}).event,i=p.chain(this.view.onContextMenu).filter(function(){return!e.didJustPressContextMenuKey}).map(function(e){var t=e.element,n=e.index,i=e.browserEvent;return{element:t,index:n,anchor:{x:i.clientX+1,y:i.clientY}}}).event;return p.anyEvent(t,n,i)},enumerable:!0,configurable:!0}),e.prototype.isSelectionSingleChangeEvent=function(e){ return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):d.isMacintosh?e.browserEvent.metaKey:e.browserEvent.ctrlKey},e.prototype.isSelectionRangeChangeEvent=function(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey},e.prototype.isSelectionChangeEvent=function(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)},e.prototype.onMouseDown=function(e){!1===this.options.focusOnMouseDown?(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation()):document.activeElement!==e.browserEvent.target&&this.view.domNode.focus();var t=this.list.getFocus()[0],n=this.list.getSelection();if(t=void 0===t?n[0]:t,this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e))return this.changeSelection(e,t);var i=e.index;if(n.every(function(e){return e!==i})&&this.list.setFocus([i]), this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return this.changeSelection(e,t);this.options.selectOnMouseDown&&!w(e.browserEvent)&&(this.list.setSelection([i]),this.openController.shouldOpen(e.browserEvent)&&this.list.open([i],e.browserEvent))},e.prototype.onPointer=function(e){if(!(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)||this.options.selectOnMouseDown)){var t=this.list.getFocus();this.list.setSelection(t),this.openController.shouldOpen(e.browserEvent)&&this.list.open(t,e.browserEvent)}},e.prototype.onDoubleClick=function(e){if(!this.multipleSelectionSupport||!this.isSelectionChangeEvent(e)){var t=this.list.getFocus();this.list.setSelection(t),this.list.pin(t)}},e.prototype.changeSelection=function(e,t){var n=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){var i=Math.min(t,n),o=Math.max(t,n),r=s.range(i,o+1),a=function(e,t){var n=e.indexOf(t);if(-1===n)return[];for(var i=[],o=n-1;o>=0&&e[o]===t-(n-o);)i.push(e[o--]);for(i.reverse(), o=n;o=e.length)n.push(t[o++]);else if(o>=t.length)n.push(e[i++]);else{if(e[i]===t[o]){i++,o++;continue}e[i]this.view.length)throw new Error("Invalid start index: "+e);if(t<0)throw new Error("Invalid delete count: "+t);0===t&&0===n.length||this.eventBufferer.bufferEvents(function(){return i.spliceable.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}),e.prototype.layout=function(e){this.view.layout(e)},e.prototype.setSelection=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}e=e.sort(F),this.selection.set(e)},e.prototype.getSelection=function(){return this.selection.get()},e.prototype.setFocus=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}e=e.sort(F),this.focus.set(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);if(this.getFocusedElements()[0]!==n)this.setFocus([t]);else{var i=this.view.getScrollTop() ;this.view.setScrollTop(i+this.view.renderHeight-this.view.elementHeight(t)),this.view.getScrollTop()!==i&&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);if(this.getFocusedElements()[0]!==i)this.setFocus([e]);else{var o=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==o&&setTimeout(function(){return t.focusPreviousPage()},0)}},e.prototype.focusLast=function(){0!==this.length&&this.setFocus([this.length-1])},e.prototype.focusFirst=function(){0!==this.length&&this.setFocus([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){if(e<0||e>=this.length)throw new Error("Invalid index "+e) ;var n=this.view.getScrollTop(),i=this.view.elementTop(e),o=this.view.elementHeight(e);if(r.isNumber(t)){var s=o-this.view.renderHeight;this.view.setScrollTop(s*y.clamp(t,0,1)+i)}else{var a=i+o,l=n+this.view.renderHeight;i=l&&this.view.setScrollTop(a-this.view.renderHeight)}},e.prototype.getElementDomId=function(e){return this.idPrefix+"_"+e},e.prototype.isDOMFocused=function(){return this.view.domNode===document.activeElement},e.prototype.getHTMLElement=function(){return this.view.domNode},e.prototype.open=function(e,t){for(var n=this,i=0,o=e;i=this.length)throw new Error("Invalid index "+r)}this._onOpen.fire({indexes:e,elements:e.map(function(e){return n.view.element(e)}),browserEvent:t})},e.prototype.pin=function(e){for(var t=0,n=e;t=this.length)throw new Error("Invalid index "+i)}this._onPin.fire(e)},e.prototype.style=function(e){this.styleController.style(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.getElementDomId(e[0])):this.view.domNode.removeAttribute("aria-activedescendant"),this.view.domNode.setAttribute("role","tree"),u.toggleClass(this.view.domNode,"element-focused",e.length>0)},e.prototype._onSelectionChange=function(){var e=this.selection.get();u.toggleClass(this.view.domNode,"selection-none",0===e.length),u.toggleClass(this.view.domNode,"selection-single",1===e.length),u.toggleClass(this.view.domNode,"selection-multiple",e.length>1)},e.prototype.dispose=function(){this._onDidDispose.fire(),this.disposables=i.dispose(this.disposables)},e.InstanceCount=0,a([l.memoize],e.prototype,"onFocusChange",null),a([l.memoize],e.prototype,"onSelectionChange",null),e}();t.List=V}),define(t[279],n([5,4]),function(e,t){return e.create("vs/base/browser/ui/menu/menu",t)}), define(t[280],n([1,0,279,67,69,7,57,56,14,221]),function(e,t,n,i,r,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(e){function t(t,n,i){var o=e.call(this,i||"submenu",t,"",!0)||this;return o.entries=n,o}return o(t,e),t}(i.Action);t.SubmenuAction=d;var c=function(){function e(e,t,n){void 0===n&&(n={});var i=this;s.addClass(e,"monaco-menu-container"),e.setAttribute("role","presentation");var o=document.createElement("div");s.addClass(o,"monaco-menu"),o.setAttribute("role","presentation"),e.appendChild(o);var a={parent:this};this.actionBar=new r.ActionBar(o,{orientation:r.ActionsOrientation.VERTICAL,actionItemProvider:function(e){return i.doGetActionItem(e,n,a)},context:n.context,actionRunner:n.actionRunner,isMenu:!0,ariaLabel:n.ariaLabel}),this.actionBar.push(t,{icon:!0,label:!0,isMenu:!0})}return e.prototype.doGetActionItem=function(e,t,n){if(e instanceof r.Separator)return new r.ActionItem(t.context,e,{icon:!0});if(e instanceof d)return new p(e,e.entries,n,t);var i={} ;if(t.getKeyBinding){var o=t.getKeyBinding(e);o&&(i.keybinding=o.getLabel())}return new h(t.context,e,i)},Object.defineProperty(e.prototype,"onDidCancel",{get:function(){return this.actionBar.onDidCancel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onDidBlur",{get:function(){return this.actionBar.onDidBlur},enumerable:!0,configurable:!0}),e.prototype.focus=function(e){void 0===e&&(e=!0),this.actionBar&&this.actionBar.focus(e)},e.prototype.dispose=function(){this.actionBar&&(this.actionBar.dispose(),this.actionBar=null),this.listener&&(this.listener.dispose(),this.listener=null)},e}();t.Menu=c;var h=function(e){function t(t,n,i){void 0===i&&(i={});var o=this;return i.isMenu=!0,o=e.call(this,n,n,i)||this,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 o(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),this.$e=l.$("a.action-menu-item").appendTo(this.builder), this._action.id===r.Separator.ID?this.$e.attr({role:"presentation"}):this.$e.attr({role:"menuitem"}),this.$label=l.$("span.action-label").appendTo(this.$e),this.options.label&&this.options.keybinding&&l.$("span.keybinding").text(this.options.keybinding).appendTo(this.$e),this._updateClass(),this._updateLabel(),this._updateTooltip(),this._updateEnabled(),this._updateChecked()},t.prototype._updateLabel=function(){if(this.options.label){var e=this.getAction().label;if(e){var n=t.MNEMONIC_REGEX.exec(e);if(n&&2===n.length){var i=n[1],o=e.replace(t.MNEMONIC_REGEX,i);this.$e.getHTMLElement().accessKey=i.toLocaleLowerCase(),this.$label.attr("aria-label",o)}else this.$label.attr("aria-label",e);e=e.replace(t.MNEMONIC_REGEX,"$1̲")}this.$label.text(e)}},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.$label.addClass("icon"),this.cssClass&&this.$label.addClass(this.cssClass),this._updateEnabled()):this.$label.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"),s.removeTabIndexAndUpdateFocus(this.$e.getHTMLElement()))},t.prototype._updateChecked=function(){this.getAction().checked?this.$label.addClass("checked"):this.$label.removeClass("checked")},t.MNEMONIC_REGEX=/&&(.)/g,t}(r.BaseActionItem),p=function(e){function t(t,n,i,o){var r=e.call(this,t,t,{label:!0,isMenu:!0})||this;return r.submenuActions=n,r.parentData=i,r.submenuOptions=o,r.showScheduler=new u.RunOnceScheduler(function(){r.mouseOver&&(r.cleanupExistingSubmenu(!1), r.createSubmenu(!1))},250),r.hideScheduler=new u.RunOnceScheduler(function(){s.isAncestor(document.activeElement,r.builder.getHTMLElement())||r.parentData.submenu!==r.mysubmenu||(r.parentData.parent.focus(!1),r.cleanupExistingSubmenu(!0))},750),r}return o(t,e),t.prototype.render=function(t){var n=this;e.prototype.render.call(this,t),this.$e.addClass("monaco-submenu-item"),this.$e.attr("aria-haspopup","true"),l.$("span.submenu-indicator").text("▶").appendTo(this.$e),l.$(this.builder).on(s.EventType.KEY_UP,function(e){new a.StandardKeyboardEvent(e).equals(17)&&(s.EventHelper.stop(e,!0),n.createSubmenu(!0))}),l.$(this.builder).on(s.EventType.KEY_DOWN,function(e){new a.StandardKeyboardEvent(e).equals(17)&&s.EventHelper.stop(e,!0)}),l.$(this.builder).on(s.EventType.MOUSE_OVER,function(e){n.mouseOver||(n.mouseOver=!0,n.showScheduler.schedule())}),l.$(this.builder).on(s.EventType.MOUSE_LEAVE,function(e){n.mouseOver=!1}),l.$(this.builder).on(s.EventType.FOCUS_OUT,function(e){ s.isAncestor(document.activeElement,n.builder.getHTMLElement())||n.hideScheduler.schedule()})},t.prototype.onClick=function(e){s.EventHelper.stop(e,!0),this.createSubmenu(!1)},t.prototype.cleanupExistingSubmenu=function(e){this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)&&(this.parentData.submenu.dispose(),this.parentData.submenu=null,this.submenuContainer&&(this.submenuContainer.dispose(),this.submenuContainer=null))},t.prototype.createSubmenu=function(e){var t=this;void 0===e&&(e=!0),this.parentData.submenu?this.parentData.submenu.focus(!1):(this.submenuContainer=l.$(this.builder).div({class:"monaco-submenu menubar-menu-items-holder context-view"}),l.$(this.submenuContainer).style({left:l.$(this.builder).getClientArea().width+"px"}),l.$(this.submenuContainer).on(s.EventType.KEY_UP,function(e){new a.StandardKeyboardEvent(e).equals(15)&&(s.EventHelper.stop(e,!0),t.parentData.parent.focus(),t.parentData.submenu.dispose(),t.parentData.submenu=null,t.submenuContainer.dispose(), t.submenuContainer=null)}),l.$(this.submenuContainer).on(s.EventType.KEY_DOWN,function(e){new a.StandardKeyboardEvent(e).equals(15)&&s.EventHelper.stop(e,!0)}),this.parentData.submenu=new c(this.submenuContainer.getHTMLElement(),this.submenuActions,this.submenuOptions),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu)},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer.dispose(),this.submenuContainer=null)},t}(h)}),define(t[281],n([5,4]),function(e,t){return e.create("vs/base/common/keybindingLabels",t)}),define(t[162],n([1,0,281]),function(e,t,n){"use strict";function i(e,t,n){if(null===t)return"";var i=[];return e.ctrlKey&&i.push(n.ctrlKey),e.shiftKey&&i.push(n.shiftKey),e.altKey&&i.push(n.altKey),e.metaKey&&i.push(n.metaKey),i.push(t),i.join(n.separator)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n){ void 0===n&&(n=t),this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=n}return e.prototype.toLabel=function(e,t,n,o,r){return null===t&&null===o?null:function(e,t,n,o,r){var s=i(e,t,r);return null!==o&&(s+=" ",s+=i(n,o,r)),s}(e,t,n,o,this.modifierLabels[r])},e}();t.ModifierLabelProvider=o,t.UILabelProvider=new o({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:n.localize(0,null),shiftKey:n.localize(1,null),altKey:n.localize(2,null),metaKey:n.localize(3,null),separator:"+"},{ctrlKey:n.localize(4,null),shiftKey:n.localize(5,null),altKey:n.localize(6,null),metaKey:n.localize(7,null),separator:"+"}),t.AriaLabelProvider=new o({ctrlKey:n.localize(8,null),shiftKey:n.localize(9,null),altKey:n.localize(10,null),metaKey:n.localize(11,null),separator:"+"},{ctrlKey:n.localize(12,null),shiftKey:n.localize(13,null),altKey:n.localize(14,null),metaKey:n.localize(15,null),separator:"+"},{ctrlKey:n.localize(16,null),shiftKey:n.localize(17,null), altKey:n.localize(18,null),metaKey:n.localize(19,null),separator:"+"})}),define(t[283],n([1,0,28,162,7,214]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o.$,s=function(){function e(e,t){this.os=t,this.domNode=o.append(e,r(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}return e.prototype.set=function(t,n){this.didEverRender&&this.keybinding===t&&e.areSame(this.matches,n)||(this.keybinding=t,this.matches=n,this.render())},e.prototype.render=function(){if(o.clearNode(this.domNode),this.keybinding){var e=this.keybinding.getParts(),t=e[0],n=e[1];t&&this.renderPart(this.domNode,t,this.matches?this.matches.firstPart:null),n&&(o.append(this.domNode,r("span.monaco-keybinding-key-chord-separator",null," ")),this.renderPart(this.domNode,n,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()}this.didEverRender=!0},e.prototype.renderPart=function(e,t,n){var o=i.UILabelProvider.modifierLabels[this.os] ;t.ctrlKey&&this.renderKey(e,o.ctrlKey,n&&n.ctrlKey,o.separator),t.shiftKey&&this.renderKey(e,o.shiftKey,n&&n.shiftKey,o.separator),t.altKey&&this.renderKey(e,o.altKey,n&&n.altKey,o.separator),t.metaKey&&this.renderKey(e,o.metaKey,n&&n.metaKey,o.separator);var r=t.keyLabel;r&&this.renderKey(e,r,n&&n.keyCode,"")},e.prototype.renderKey=function(e,t,n,i){o.append(e,r("span.monaco-keybinding-key"+(n?".highlight":""),null,t)),i&&o.append(e,r("span.monaco-keybinding-key-separator",null,i))},e.prototype.dispose=function(){this.keybinding=null},e.areSame=function(e,t){return e===t||!e&&!t||!!e&&!!t&&n.equals(e.firstPart,t.firstPart)&&n.equals(e.chordPart,t.chordPart)},e}();t.KeybindingLabel=s}),define(t[284],n([5,4]),function(e,t){return e.create("vs/base/common/severity",t)}),define(t[118],n([1,0,284,6]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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){ var t="error",o="warning",r="warn",s="info",a=Object.create(null);a[e.Error]=n.localize(0,null),a[e.Warning]=n.localize(1,null),a[e.Info]=n.localize(2,null),e.fromValue=function(n){return n?i.equalsIgnoreCase(t,n)?e.Error:i.equalsIgnoreCase(o,n)||i.equalsIgnoreCase(r,n)?e.Warning:i.equalsIgnoreCase(s,n)?e.Info:e.Ignore:e.Ignore}}(o||(o={})),t.default=o}),define(t[286],n([5,4]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenModel",t)}),define(t[119],n([1,0,286,13,199,69,138,7,283,18]),function(e,t,n,i,r,s,a,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=0,h=function(){function e(e){void 0===e&&(e=[]),this.id=(c++).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(),this.getDescription(),this.getDetail()].filter(function(e){return!!e }).join(", ")},e.prototype.getDetail=function(){return null},e.prototype.getIcon=function(){return null},e.prototype.getDescription=function(){return null},e.prototype.getTooltip=function(){return null},e.prototype.getDescriptionTooltip=function(){return null},e.prototype.getKeybinding=function(){return null},e.prototype.isHidden=function(){return this.hidden},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}();t.QuickOpenEntry=h;var p=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 o(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.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.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.run=function(t,n){return this.entry?this.entry.run(t,n):e.prototype.run.call(this,t,n)},t}(h);t.QuickOpenEntryGroup=p;var f=function(){function e(){}return e.prototype.hasActions=function(e,t){return!1},e.prototype.getActions=function(e,t){return i.TPromise.as(null)},e}(),g=function(){function e(e,t){void 0===e&&(e=new f),void 0===t&&(t=null),this.actionProvider=e,this.actionRunner=t}return e.prototype.getHeight=function(e){return e.getDetail()?44:22},e.prototype.getTemplateId=function(e){return e instanceof p?"quickOpenEntryGroup":"quickOpenEntry"},e.prototype.renderTemplate=function(e,t,n){var i=document.createElement("div");l.addClass(i,"sub-content"),t.appendChild(i);var o=l.$(".quick-open-row"),c=l.$(".quick-open-row"),h=l.$(".quick-open-entry",null,o,c);i.appendChild(h);var p=document.createElement("span");o.appendChild(p);var f=new r.IconLabel(o,{supportHighlights:!0,supportDescriptionHighlights:!0 }),g=document.createElement("span");o.appendChild(g),l.addClass(g,"quick-open-entry-keybinding");var m=new u.KeybindingLabel(g,d.OS),v=document.createElement("div");c.appendChild(v),l.addClass(v,"quick-open-entry-meta");var _,y=new a.HighlightedLabel(v);"quickOpenEntryGroup"===e&&(_=document.createElement("div"),l.addClass(_,"results-group"),t.appendChild(_)),l.addClass(t,"actions");var C=document.createElement("div");l.addClass(C,"primary-action-bar"),t.appendChild(C);return{container:t,entry:h,icon:p,label:f,detail:y,keybinding:m,group:_,actionBar:new s.ActionBar(C,{actionRunner:this.actionRunner})}},e.prototype.renderElement=function(e,t,n,i){if(this.actionProvider.hasActions(null,e)?l.addClass(n.container,"has-actions"):l.removeClass(n.container,"has-actions"),n.actionBar.context=e,this.actionProvider.getActions(null,e).then(function(e){n.actionBar.isEmpty()&&e&&e.length>0?n.actionBar.push(e,{icon:!0,label:!1}):n.actionBar.isEmpty()||e&&0!==e.length||n.actionBar.clear()}), e instanceof p&&e.getGroupLabel()?l.addClass(n.container,"has-group-label"):l.removeClass(n.container,"has-group-label"),e instanceof p){var o=e,r=n;o.showBorder()?(l.addClass(r.container,"results-group-separator"),r.container.style.borderTopColor=i.pickerGroupBorder.toString()):(l.removeClass(r.container,"results-group-separator"),r.container.style.borderTopColor=null);var s=o.getGroupLabel()||"";r.group.textContent=s,r.group.style.color=i.pickerGroupForeground.toString()}if(e instanceof h){var a=e.getHighlights(),u=a[0],d=a[1],c=a[2],f=e.getIcon()?"quick-open-entry-icon "+e.getIcon():"";n.icon.className=f;var g=e.getLabelOptions()||Object.create(null);g.matches=u||[],g.title=e.getTooltip(),g.descriptionTitle=e.getDescriptionTooltip()||e.getDescription(),g.descriptionMatches=d||[],n.label.setValue(e.getLabel(),e.getDescription(),g),n.detail.set(e.getDetail(),c),n.keybinding.set(e.getKeybinding(),null)}},e.prototype.disposeTemplate=function(e,t){var n=t;n.actionBar.dispose(),n.actionBar=null,n.container=null, n.entry=null,n.keybinding.dispose(),n.keybinding=null,n.detail.dispose(),n.detail=null,n.group=null,n.icon=null,n.label.dispose(),n.label=null},e}(),m=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=new f),this._entries=e,this._dataSource=this,this._renderer=new g(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.getId=function(e){return e.getId()},e.prototype.getLabel=function(e){return e.getLabel()},e.prototype.getAriaLabel=function(e){return e.getAriaLabel()?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=m}),define(t[288],n([5,4]),function(e,t){return e.create("vs/base/parts/quickopen/browser/quickOpenWidget",t)}),define(t[289],n([1,0,288,13,18,33,10,93,443,56,115,155,223,57,81,7,2,43,27,28,42,249]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y,C,b){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var S=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.onContextMenu=function(t,n,i){return r.isMacintosh?this.onLeftClick(t,n,i):e.prototype.onContextMenu.call(this,t,n,i)},t}(g.DefaultController);t.QuickOpenController=S;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 E={background:y.Color.fromHex("#1E1E1E"),foreground:y.Color.fromHex("#CCCCCC"),pickerGroupForeground:y.Color.fromHex("#0097FB"),pickerGroupBorder:y.Color.fromHex("#3F3F46"),widgetShadow:y.Color.fromHex("#000000"),progressBarBackground:y.Color.fromHex("#0E70C0")},L=n.localize(0,null),x=function(e){function t(t,n,i){var o=e.call(this)||this;return o.isDisposed=!1,o.container=t,o.callbacks=n,o.options=i,o.styles=i||Object.create(null),C.mixin(o.styles,E,!1),o.model=null,o}return o(t,e),t.prototype.getModel=function(){return this.model},t.prototype.create=function(){var e=this;return this.builder=d.$().div(function(t){t.on(m.EventType.KEY_DOWN,function(t){var n=new f.StandardKeyboardEvent(t);if(9===n.keyCode)m.EventHelper.stop(t,!0),e.hide(w.CANCELED);else if(2===n.keyCode&&!n.altKey&&!n.ctrlKey&&!n.metaKey){ var i=t.currentTarget.querySelectorAll("input, .monaco-tree, .monaco-tree-row.focused .action-label.icon");n.shiftKey&&n.target===i[0]?(m.EventHelper.stop(t,!0),i[i.length-1].focus()):n.shiftKey||n.target!==i[i.length-1]||(m.EventHelper.stop(t,!0),i[0].focus())}}).on(m.EventType.CONTEXT_MENU,function(e){return m.EventHelper.stop(e,!0)}).on(m.EventType.FOCUS,function(t){return e.gainingFocus()},null,!0).on(m.EventType.BLUR,function(t){return e.loosingFocus(t)},null,!0),e.progressBar=e._register(new p.ProgressBar(t.clone(),{progressBarBackground:e.styles.progressBarBackground})),e.progressBar.hide(),t.div({class:"quick-open-input"},function(t){e.inputContainer=t,e.inputBox=e._register(new c.InputBox(t.getHTMLElement(),null,{placeholder:e.options.inputPlaceHolder||"",ariaLabel:L,inputBackground:e.styles.inputBackground,inputForeground:e.styles.inputForeground,inputBorder:e.styles.inputBorder,inputValidationInfoBackground:e.styles.inputValidationInfoBackground, inputValidationInfoBorder:e.styles.inputValidationInfoBorder,inputValidationWarningBackground:e.styles.inputValidationWarningBackground,inputValidationWarningBorder:e.styles.inputValidationWarningBorder,inputValidationErrorBackground:e.styles.inputValidationErrorBackground,inputValidationErrorBorder:e.styles.inputValidationErrorBorder})),e.inputElement=e.inputBox.inputElement,e.inputElement.setAttribute("role","combobox"),e.inputElement.setAttribute("aria-haspopup","false"),e.inputElement.setAttribute("aria-autocomplete","list"),m.addDisposableListener(e.inputBox.inputElement,m.EventType.KEY_DOWN,function(t){var n=new f.StandardKeyboardEvent(t),i=e.shouldOpenInBackground(n);if(2!==n.keyCode)if(18===n.keyCode||16===n.keyCode||12===n.keyCode||11===n.keyCode)m.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.inputBox.inputElement.selectionStart===e.inputBox.inputElement.selectionEnd&&(e.inputBox.inputElement.selectionStart=e.inputBox.value.length);else if(3===n.keyCode||i){m.EventHelper.stop(t,!0) ;var o=e.tree.getFocus();o&&e.elementSelected(o,t,i?l.Mode.OPEN_IN_BACKGROUND:l.Mode.OPEN)}}),m.addDisposableListener(e.inputBox.inputElement,m.EventType.INPUT,function(t){e.onType()})}),e.resultCount=t.div({class:"quick-open-result-count","aria-live":"polite"}).clone(),e.treeContainer=t.div({class:"quick-open-tree"},function(t){var i=e.options.treeCreator||function(e,t,n){return new h.Tree(e,t,n)};e.tree=e._register(i(t.getHTMLElement(),{dataSource:new u.DataSource(e),controller:new S({clickBehavior:g.ClickBehavior.ON_MOUSE_UP,keyboardSupport:e.options.keyboardSupport}),renderer:e.renderer=new u.Renderer(e,e.styles),filter:new u.Filter(e),accessibilityProvider:new u.AccessibilityProvider(e)},{twistiePixels:11,indentPixels:0,alwaysFocused:!0,verticalScrollMode:_.ScrollbarVisibility.Visible,horizontalScrollMode:_.ScrollbarVisibility.Hidden,ariaLabel:n.localize(1,null),keyboardSupport:e.options.keyboardSupport,preventRootFocus:!1})),e.treeElement=e.tree.getHTMLElement(), e._register(e.tree.onDidChangeFocus(function(t){e.elementFocused(t.focus,t)})),e._register(e.tree.onDidChangeSelection(function(t){if(t.selection&&t.selection.length>0){var n=t.payload&&t.payload.originalEvent instanceof b.StandardMouseEvent?t.payload.originalEvent:void 0,i=!!n&&e.shouldOpenInBackground(n);e.elementSelected(t.selection[0],t,i?l.Mode.OPEN_IN_BACKGROUND:l.Mode.OPEN)}}))}).on(m.EventType.KEY_DOWN,function(t){var n=new f.StandardKeyboardEvent(t);e.quickNavigateConfiguration&&(18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(m.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode)))}).on(m.EventType.KEY_UP,function(t){var n=new f.StandardKeyboardEvent(t),i=n.keyCode;if(e.quickNavigateConfiguration){var o=e.quickNavigateConfiguration.keybindings;if(3===i||o.some(function(e){var t=e.getParts(),o=t[0];return!t[1]&&(o.shiftKey&&4===i?!(n.ctrlKey||n.altKey||n.metaKey):!(!o.altKey||6!==i)||(!(!o.ctrlKey||5!==i)||!(!o.metaKey||57!==i)))})){var r=e.tree.getFocus();r&&e.elementSelected(r,t)}} }).clone()}).addClass("monaco-quick-open-widget").build(this.container),this.layoutDimensions&&this.layout(this.layoutDimensions),this.applyStyles(),m.addDisposableListener(this.treeContainer.getHTMLElement(),m.EventType.KEY_DOWN,function(t){var n=new f.StandardKeyboardEvent(t);e.quickNavigateConfiguration||18!==n.keyCode&&16!==n.keyCode&&12!==n.keyCode&&11!==n.keyCode||(m.EventHelper.stop(t,!0),e.navigateInTree(n.keyCode,n.shiftKey),e.treeElement.focus())}),this.builder.getHTMLElement()},t.prototype.style=function(e){this.styles=e,this.applyStyles()},t.prototype.applyStyles=function(){if(this.builder){var e=this.styles.foreground?this.styles.foreground.toString():null,t=this.styles.background?this.styles.background.toString():null,n=this.styles.borderColor?this.styles.borderColor.toString():null,i=this.styles.widgetShadow?this.styles.widgetShadow.toString():null;this.builder.style("color",e),this.builder.style("background-color",t),this.builder.style("border-color",n), this.builder.style("border-width",n?"1px":null),this.builder.style("border-style",n?"solid":null),this.builder.style("box-shadow",i?"0 5px 8px "+i:null)}this.progressBar&&this.progressBar.style({progressBarBackground:this.styles.progressBarBackground}),this.inputBox&&this.inputBox.style({inputBackground:this.styles.inputBackground,inputForeground:this.styles.inputForeground,inputBorder:this.styles.inputBorder,inputValidationInfoBackground:this.styles.inputValidationInfoBackground,inputValidationInfoBorder:this.styles.inputValidationInfoBorder,inputValidationWarningBackground:this.styles.inputValidationWarningBackground,inputValidationWarningBorder:this.styles.inputValidationWarningBorder,inputValidationErrorBackground:this.styles.inputValidationErrorBackground,inputValidationErrorBorder:this.styles.inputValidationErrorBorder}),this.tree&&!this.options.treeCreator&&this.tree.style(this.styles),this.renderer&&this.renderer.updateStyles(this.styles)},t.prototype.shouldOpenInBackground=function(e){ if(e instanceof f.StandardKeyboardEvent){if(17!==e.keyCode)return!1;if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;var t=this.inputBox.inputElement;return t.selectionEnd===this.inputBox.value.length&&t.selectionStart===t.selectionEnd}return e.middleButton},t.prototype.onType=function(){var e=this.inputBox.value;this.helpText&&(e?this.helpText.hide():this.helpText.show()),this.callbacks.onType(e)},t.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())&&this.tree.reveal(r).done(null,a.onUnexpectedError)},t.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,l.Mode.PREVIEW,n)}},t.prototype.elementSelected=function(e,t,n){var i=!0;if(this.isVisible()){var o=n||l.Mode.OPEN,r={event:t,keymods:this.extractKeyMods(t),quickNavigateConfiguration:this.quickNavigateConfiguration};i=this.model.runner.run(e,o,r)}i&&this.hide(w.ELEMENT_SELECTED)},t.prototype.extractKeyMods=function(e){return{ctrlCmd:e&&(e.ctrlKey||e.metaKey||e.payload&&e.payload.originalEvent&&(e.payload.originalEvent.ctrlKey||e.payload.originalEvent.metaKey)),alt:e&&(e.altKey||e.payload&&e.payload.originalEvent&&e.payload.originalEvent.altKey)}},t.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:{}),t&&t.inputSelection&&!this.quickNavigateConfiguration&&this.inputBox.select(t.inputSelection),this.callbacks.onShow&&this.callbacks.onShow()},t.prototype.doShowWithPrefix=function(e){this.inputBox.value=e,this.callbacks.onType(e)},t.prototype.doShowWithInput=function(e,t){this.setInput(e,t)},t.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();var i=e?e.entries.filter(function(t){return n.isElementVisible(e,t)}):[];n.updateResultCount(i.length), i.length&&n.autoFocus(e,i,t)},a.onUnexpectedError)},t.prototype.isElementVisible=function(e,t){return!e.filter||e.filter.isVisible(t)},t.prototype.autoFocus=function(e,t,n){if(void 0===n&&(n={}),n.autoFocusPrefixMatch){for(var i=void 0,o=void 0,r=n.autoFocusPrefixMatch,s=r.toLowerCase(),l=0;ln.autoFocusIndex&&(this.tree.focusNth(n.autoFocusIndex),this.tree.reveal(this.tree.getFocus()).done(null,a.onUnexpectedError)):n.autoFocusSecondEntry?t.length>1&&this.tree.focusNth(1):n.autoFocusLastEntry&&t.length>1&&this.tree.focusLast()},t.prototype.getHeight=function(e){var n=this,i=e.renderer;if(!e){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>t.MAX_ITEMS_HEIGHT)&&(r=t.MAX_ITEMS_HEIGHT);for(var a=e.entries.filter(function(t){return n.isElementVisible(e,t)}),l=this.options.maxItemsToShow||a.length,u=0;u=2?(E=_?f.Large:f.LargeBlocks,R=2/C):(E=_?f.Small:f.SmallBlocks,R=1/C);(x=Math.max(0,Math.floor((k-c-2)*R/(u+R))))/R>y&&(x=Math.floor(y*R)),N=k-x,"left"===v?(L=0,I+=x,M+=x,D+=x,T+=x):L=t-x-c}else L=0,x=0,E=f.None,N=k;var O=Math.max(1,Math.floor((N-c-2)/u)),P=h?p:0;return{width:t, height:n,glyphMarginLeft:I,glyphMarginWidth:w,glyphMarginHeight:n,lineNumbersLeft:M,lineNumbersWidth:b,lineNumbersHeight:n,decorationsLeft:D,decorationsWidth:l,decorationsHeight:n,contentLeft:T,contentWidth:N,contentHeight:n,renderMinimap:E,minimapLeft:L,minimapWidth:x,viewportColumn:O,verticalScrollbarWidth:c,horizontalScrollbarHeight:g,overviewRuler:{top:P,width:c,height:n-2*P,right:0}}},e}();t.EditorLayoutProvider=b;t.EDITOR_FONT_DEFAULTS={fontFamily:i.isMacintosh?"Menlo, Monaco, 'Courier New', monospace":i.isLinux?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:i.isMacintosh?12:14,lineHeight:0,letterSpacing:0},t.EDITOR_MODEL_DEFAULTS={tabSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},t.EDITOR_DEFAULTS={inDiffEditor:!1,wordSeparators:r.USUAL_WORD_SEPARATORS,lineNumbersMinChars:5,lineDecorationsWidth:10,readOnly:!1,mouseStyle:"text",disableLayerHinting:!1,automaticLayout:!1, wordWrap:"off",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:g.Same,wordWrapBreakBeforeCharacters:"([{‘“〈《「『【〔([{「£¥$£¥++",wordWrapBreakAfterCharacters:" \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」",wordWrapBreakObtrusiveCharacters:".",autoClosingBrackets:!0,autoIndent:!0,dragAndDrop:!0,emptySelectionClipboard:!0,useTabStops:!0,multiCursorModifier:"altKey",multiCursorMergeOverlapping:!0,accessibilitySupport:"auto",showUnused:!0,viewInfo:{extraEditorClassName:"",disableMonospaceOptimizations:!1,rulers:[],ariaLabel:n.localize(1,null),renderLineNumbers:1,renderCustomLineNumbers:null,selectOnLineNumbers:!0,glyphMargin:!0,revealHorizontalRightPadding:30,roundedSelection:!0,overviewRulerLanes:2,overviewRulerBorder:!0,cursorBlinking:m.Blink,mouseWheelZoom:!1,cursorStyle:v.Line,cursorWidth:0,hideCursorInOverviewRuler:!1,scrollBeyondLastLine:!0,scrollBeyondLastColumn:5,smoothScrolling:!1,stopRenderingLineAfter:1e4,renderWhitespace:"none", renderControlCharacters:!1,fontLigatures:!1,renderIndentGuides:!0,highlightActiveIndentGuide:!0,renderLineHighlight:"line",scrollbar:{vertical:o.ScrollbarVisibility.Auto,horizontal:o.ScrollbarVisibility.Auto,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:10,horizontalSliderSize:10,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,mouseWheelScrollSensitivity:1},minimap:{enabled:!0,side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120},fixedOverflowWidgets:!1},contribInfo:{selectionClipboard:!0,hover:{enabled:!0,delay:300,sticky:!0},links:!0,contextmenu:!0,quickSuggestions:{other:!0,comments:!1,strings:!1},quickSuggestionsDelay:10,parameterHints:!0,iconsInSuggestions:!0,formatOnType:!1,formatOnPaste:!1,suggestOnTriggerCharacters:!0,acceptSuggestionOnEnter:"on",acceptSuggestionOnCommitCharacter:!0,wordBasedSuggestions:!0,suggestSelection:"recentlyUsed",suggestFontSize:0,suggestLineHeight:0,suggest:{filterGraceful:!0, snippets:"inline",snippetsPreventQuickSuggestions:!0},selectionHighlight:!0,occurrencesHighlight:!0,codeLens:!0,folding:!0,foldingStrategy:"auto",showFoldingControls:"mouseover",matchBrackets:!0,find:{seedSearchStringFromSelection:!0,autoFindInSelection:!1,globalFindClipboard:!1},colorDecorators:!0,lightbulbEnabled:!0,codeActionsOnSave:{},codeActionsOnSaveTimeout:750}}}),define(t[122],n([1,0,18,98,47]),function(e,t,n,i,r){"use strict";function s(e,t){if("number"==typeof e)return e;var n=parseFloat(e);return isNaN(n)?t:n}function a(e,t,n){return en?n:e}function l(e,t){return"string"!=typeof e?t:e}Object.defineProperty(t,"__esModule",{value:!0});var u=n.isMacintosh?1.5:1.35,d=function(){function e(e){this.zoomLevel=e.zoomLevel,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}return e.createFromRawSettings=function(t,n){ var o=l(t.fontFamily,r.EDITOR_FONT_DEFAULTS.fontFamily),d=l(t.fontWeight,r.EDITOR_FONT_DEFAULTS.fontWeight),c=s(t.fontSize,r.EDITOR_FONT_DEFAULTS.fontSize);0===(c=a(c,0,100))?c=r.EDITOR_FONT_DEFAULTS.fontSize:c<8&&(c=8);var h=function(e,t){if("number"==typeof e)return Math.round(e);var n=parseInt(e);return isNaN(n)?t:n}(t.lineHeight,0);0===(h=a(h,0,150))?h=Math.round(u*c):h<8&&(h=8);var p=s(t.letterSpacing,0);p=a(p,-5,20);var f=1+.1*i.EditorZoom.getZoomLevel();return c*=f,h*=f,new e({zoomLevel:n,fontFamily:o,fontWeight:d,fontSize:c,lineHeight:h,letterSpacing:p})},e.prototype.getId=function(){return this.zoomLevel+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.lineHeight+"-"+this.letterSpacing},e}();t.BareFontInfo=d;var c=function(e){function t(t,n){var i=e.call(this,t)||this;return i.isTrusted=n,i.isMonospace=t.isMonospace,i.typicalHalfwidthCharacterWidth=t.typicalHalfwidthCharacterWidth,i.typicalFullwidthCharacterWidth=t.typicalFullwidthCharacterWidth,i.spaceWidth=t.spaceWidth, i.maxDigitWidth=t.maxDigitWidth,i}return o(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.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.spaceWidth===e.spaceWidth&&this.maxDigitWidth===e.maxDigitWidth},t}(d);t.FontInfo=c}),define(t[298],n([1,0,102,2,47]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){}}();t.LineContext=r;var s=function(){function e(t,n,i,r){void 0===r&&(r=o.EDITOR_DEFAULTS.contribInfo.suggest),this._snippetCompareFn=e._compareCompletionItems,this._items=t,this._column=n,this._options=r,this._refilterKind=1,this._lineContext=i, "top"===r.snippets?this._snippetCompareFn=e._compareCompletionItemsSnippetsUp:"bottom"===r.snippets&&(this._snippetCompareFn=e._compareCompletionItemsSnippetsDown)}return e.prototype.dispose=function(){for(var e=new Set,t=0,n=this._items;t2e3?n.fuzzyScore:n.fuzzyScoreGracefulAggressive,l=0;lt.score?-1:e.scoret.idx?1:0},e._compareCompletionItemsSnippetsDown=function(t,n){if(t.suggestion.type!==n.suggestion.type){if("snippet"===t.suggestion.type)return 1;if("snippet"===n.suggestion.type)return-1}return e._compareCompletionItems(t,n)},e._compareCompletionItemsSnippetsUp=function(t,n){if(t.suggestion.type!==n.suggestion.type){ if("snippet"===t.suggestion.type)return-1;if("snippet"===n.suggestion.type)return 1}return e._compareCompletionItems(t,n)},e}();t.CompletionModel=s}),define(t[299],n([5,4]),function(e,t){return e.create("vs/editor/common/controller/cursor",t)}),define(t[300],n([5,4]),function(e,t){return e.create("vs/editor/common/modes/modesRegistry",t)}),define(t[301],n([5,4]),function(e,t){return e.create("vs/editor/common/services/modelServiceImpl",t)}),define(t[302],n([5,4]),function(e,t){return e.create("vs/editor/common/view/editorColorRegistry",t)}),define(t[303],n([5,4]),function(e,t){return e.create("vs/editor/contrib/bracketMatching/bracketMatching",t)}),define(t[304],n([5,4]),function(e,t){return e.create("vs/editor/contrib/caretOperations/caretOperations",t)}),define(t[305],n([5,4]),function(e,t){return e.create("vs/editor/contrib/caretOperations/transpose",t)}),define(t[306],n([5,4]),function(e,t){return e.create("vs/editor/contrib/clipboard/clipboard",t)}),define(t[307],n([5,4]),function(e,t){ return e.create("vs/editor/contrib/codeAction/codeActionCommands",t)}),define(t[308],n([5,4]),function(e,t){return e.create("vs/editor/contrib/comment/comment",t)}),define(t[309],n([5,4]),function(e,t){return e.create("vs/editor/contrib/contextmenu/contextmenu",t)}),define(t[310],n([5,4]),function(e,t){return e.create("vs/editor/contrib/cursorUndo/cursorUndo",t)}),define(t[311],n([5,4]),function(e,t){return e.create("vs/editor/contrib/find/findController",t)}),define(t[312],n([5,4]),function(e,t){return e.create("vs/editor/contrib/find/findWidget",t)}),define(t[313],n([5,4]),function(e,t){return e.create("vs/editor/contrib/folding/folding",t)}),define(t[314],n([5,4]),function(e,t){return e.create("vs/editor/contrib/fontZoom/fontZoom",t)}),define(t[315],n([5,4]),function(e,t){return e.create("vs/editor/contrib/format/formatActions",t)}),define(t[316],n([5,4]),function(e,t){return e.create("vs/editor/contrib/goToDefinition/goToDefinitionCommands",t)}),define(t[317],n([5,4]),function(e,t){ return e.create("vs/editor/contrib/goToDefinition/goToDefinitionMouse",t)}),define(t[318],n([5,4]),function(e,t){return e.create("vs/editor/contrib/gotoError/gotoError",t)}),define(t[319],n([5,4]),function(e,t){return e.create("vs/editor/contrib/gotoError/gotoErrorWidget",t)}),define(t[320],n([5,4]),function(e,t){return e.create("vs/editor/contrib/hover/hover",t)}),define(t[321],n([5,4]),function(e,t){return e.create("vs/editor/contrib/hover/modesContentHover",t)}),define(t[322],n([5,4]),function(e,t){return e.create("vs/editor/contrib/inPlaceReplace/inPlaceReplace",t)}),define(t[323],n([5,4]),function(e,t){return e.create("vs/editor/contrib/linesOperations/linesOperations",t)}),define(t[324],n([5,4]),function(e,t){return e.create("vs/editor/contrib/links/links",t)}),define(t[325],n([5,4]),function(e,t){return e.create("vs/editor/contrib/message/messageController",t)}),define(t[326],n([5,4]),function(e,t){return e.create("vs/editor/contrib/multicursor/multicursor",t)}),define(t[327],n([5,4]),function(e,t){ return e.create("vs/editor/contrib/parameterHints/parameterHints",t)}),define(t[328],n([5,4]),function(e,t){return e.create("vs/editor/contrib/parameterHints/parameterHintsWidget",t)}),define(t[329],n([5,4]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/peekViewWidget",t)}),define(t[330],n([5,4]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referenceSearch",t)}),define(t[331],n([5,4]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referencesController",t)}),define(t[332],n([5,4]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referencesModel",t)}),define(t[123],n([1,0,332,9,50,2,6,130,13,3]),function(e,t,n,i,o,r,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){this._parent=e,this._range=t,this._onRefChanged=new i.Emitter,this.onRefChanged=this._onRefChanged.event,this._id=a.defaultGenerator.nextId()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id}, 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,"range",{get:function(){return this._range},set:function(e){this._range=e,this._onRefChanged.fire(this)},enumerable:!0,configurable:!0}),e.prototype.getAriaMessage=function(){return n.localize(0,null,o.basename(this.uri.fsPath),this.range.startLineNumber,this.range.startColumn)},e}();t.OneReference=d;var c=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.endLineNumber,a=e.endColumn,l=n.getWordUntilPosition({lineNumber:i,column:o-t }),d=new u.Range(i,l.startColumn,i,o),c=new u.Range(r,a,r,Number.MAX_VALUE);return{before:n.getValueInRange(d).replace(/^\s+/,s.empty),inside:n.getValueInRange(e),after:n.getValueInRange(c).replace(/\s+$/,s.empty)}}},e.prototype.dispose=function(){this._modelReference&&(this._modelReference.dispose(),this._modelReference=null)},e}();t.FilePreview=c;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,"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.getAriaMessage=function(){var e=this.children.length;return 1===e?n.localize(1,null,o.basename(this.uri.fsPath),this.uri.fsPath):n.localize(2,null,e,o.basename(this.uri.fsPath),this.uri.fsPath)},e.prototype.resolve=function(e){var t=this;return this._resolved?l.TPromise.as(this):e.createModelReference(this._uri).then(function(e){if(!e.object)throw e.dispose(),new Error;return t._preview=new c(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){var n=this;this._groups=[],this._references=[],this._onDidChangeReferenceRange=new i.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._disposables=[],t.sort(e._compareReferences);for(var o,r=0,s=t;r0?(i=t?(i+1)%o:(i+o-1)%o,n.children[i]):(i=n.parent.groups.indexOf(n),t?(i=(i+1)%r,n.parent.groups[i].children[0]):(i=(i+r-1)%r,n.parent.groups[i].children[n.parent.groups[i].children.length-1]))},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.prefixLent.offsetDist?1:0})[0];if(n)return this._references[n.idx]},e.prototype.dispose=function(){this._groups=r.dispose(this._groups),r.dispose(this._disposables),this._disposables.length=0},e._compareReferences=function(e,t){var n=e.uri.toString(),i=t.uri.toString() ;return ni?1:u.Range.compareRangesUsingStarts(e.range,t.range)},e}();t.ReferencesModel=p}),define(t[334],n([5,4]),function(e,t){return e.create("vs/editor/contrib/referenceSearch/referencesWidget",t)}),define(t[335],n([5,4]),function(e,t){return e.create("vs/editor/contrib/rename/rename",t)}),define(t[336],n([5,4]),function(e,t){return e.create("vs/editor/contrib/rename/renameInputField",t)}),define(t[337],n([5,4]),function(e,t){return e.create("vs/editor/contrib/smartSelect/smartSelect",t)}),define(t[338],n([5,4]),function(e,t){return e.create("vs/editor/contrib/snippet/snippetVariables",t)}),define(t[339],n([1,0,338,50,110,6]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this._delegates=e}return e.prototype.resolve=function(e){for(var t=0,n=this._delegates;t=0&&(n._entries.splice(e,1),n._lastCandidate=void 0,n._onDidChange.fire(n._entries.length),o=void 0)}})},e.prototype.has=function(e){return this.all(e).length>0},e.prototype.all=function(e){if(!e)return[];this._updateScores(e) ;for(var t=[],n=0,i=this._entries;n0&&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){this._updateScores(e);for(var n=0;n0&&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 i=0,a=this._entries;i0){for(var u=0,d=this._entries;ut._score?-1:e._timet._time?-1:0},e}();t.default=a}),define(t[17],n([1,0,366,205,33]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){this.language=e,this.id=t}}();t.LanguageIdentifier=r;var s=function(){function e(){}return 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="mtk"+this.getForeground(e),n=this.getFontStyle(e);return 1&n&&(t+=" mtki"),2&n&&(t+=" mtkb"),4&n&&(t+=" mtku"),t},e.getInlineStyleFromMetadata=function(e,t){var n=this.getForeground(e),i=this.getFontStyle(e),o="color: "+t[n]+";";return 1&i&&(o+="font-style: italic;"), 2&i&&(o+="font-weight: bold;"),4&i&&(o+="text-decoration: underline;"),o},e}();t.TokenMetadata=s;!function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(t.SuggestTriggerKind||(t.SuggestTriggerKind={}));!function(e){e[e.Automatic=1]="Automatic",e[e.Manual=2]="Manual"}(t.CodeActionTrigger||(t.CodeActionTrigger={}));!function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var a;!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",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(a=t.SymbolKind||(t.SymbolKind={})),t.symbolKindToCssClass=function(){var e=Object.create(null);return e[a.File]="file",e[a.Module]="module",e[a.Namespace]="namespace",e[a.Package]="package",e[a.Class]="class",e[a.Method]="method",e[a.Property]="property",e[a.Field]="field",e[a.Constructor]="constructor",e[a.Enum]="enum",e[a.Interface]="interface",e[a.Function]="function",e[a.Variable]="variable",e[a.Constant]="constant",e[a.String]="string",e[a.Number]="number",e[a.Boolean]="boolean",e[a.Array]="array",e[a.Object]="object",e[a.Key]="key",e[a.Null]="null",e[a.EnumMember]="enum-member",e[a.Struct]="struct",e[a.Event]="event",e[a.Operator]="operator",e[a.TypeParameter]="type-parameter",function(t){return"symbol-icon "+(e[t]||"property")}}();var l=function(){function e(e){this.value=e} return e.Comment=new e("comment"),e.Imports=new e("imports"),e.Region=new e("region"),e}();t.FoldingRangeKind=l,t.isResourceTextEdit=function(e){return o.isObject(e)&&e.resource&&Array.isArray(e.edits)},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.TypeDefinitionProviderRegistry=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,t.ColorProviderRegistry=new n.default,t.FoldingRangeProviderRegistry=new n.default, t.TokenizationRegistry=new i.TokenizationRegistryImpl}),define(t[99],n([1,0,17]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}return e.prototype.equals=function(t){return t instanceof e&&this.slicedEquals(t,0,this._tokensCount)},e.prototype.slicedEquals=function(e,t,n){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;for(var i=t<<1,o=i+(n<<1),r=i;r0?this._tokens[e-1<<1]:0},e.prototype.getLanguageId=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getLanguageId(t)},e.prototype.getStandardTokenType=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getTokenType(t)}, e.prototype.getForeground=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getForeground(t)},e.prototype.getClassName=function(e){var t=this._tokens[1+(e<<1)];return n.TokenMetadata.getClassNameFromMetadata(t)},e.prototype.getInlineStyle=function(e,t){var i=this._tokens[1+(e<<1)];return n.TokenMetadata.getInlineStyleFromMetadata(i,t)},e.prototype.getEndOffset=function(e){return this._tokens[e<<1]},e.prototype.findTokenIndexAtOffset=function(t){return e.findIndexInTokensArray(this._tokens,t)},e.prototype.inflate=function(){return this},e.prototype.sliceAndInflate=function(e,t,n){return new o(this,e,t,n)},e.convertToEndOffset=function(e,t){for(var n=(e.length>>>1)-1,i=0;i>>1)-1;nt&&(i=o)}return n},e}();t.LineTokens=i;var o=function(){function e(e,t,n,i){this._source=e,this._startOffset=t, this._endOffset=n,this._deltaOffset=i,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(var o=this._firstTokenIndex,r=e.getCount();o=n)break;this._tokensCount++}}return e.prototype.equals=function(t){return t instanceof e&&(this._startOffset===t._startOffset&&this._endOffset===t._endOffset&&this._deltaOffset===t._deltaOffset&&this._source.slicedEquals(t._source,this._firstTokenIndex,this._tokensCount))},e.prototype.getCount=function(){return this._tokensCount},e.prototype.getForeground=function(e){return this._source.getForeground(this._firstTokenIndex+e)},e.prototype.getEndOffset=function(e){var t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset},e.prototype.getClassName=function(e){return this._source.getClassName(this._firstTokenIndex+e)},e.prototype.getInlineStyle=function(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}, e.prototype.findTokenIndexAtOffset=function(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex},e}();t.SlicedLineTokens=o}),define(t[60],n([1,0,17,95]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(){}return e.prototype.clone=function(){return this},e.prototype.equals=function(e){return this===e},e}();t.NULL_STATE=new o,t.NULL_MODE_ID="vs.editor.nullMode",t.NULL_LANGUAGE_IDENTIFIER=new n.LanguageIdentifier(t.NULL_MODE_ID,0),t.nullTokenize=function(e,t,n,o){return new i.TokenizationResult([new i.Token(o,"",e)],n)},t.nullTokenize2=function(e,t,n,o){var r=new Uint32Array(2);return r[0]=o,r[1]=(16384|e<<0|2<<23)>>>0,new i.TokenizationResult2(r,n)}}),define(t[370],n([1,0,99,25,12,10,60]),function(e,t,n,i,o,r,s){"use strict";function a(e){return(16384|e<<0|2<<23)>>>0}Object.defineProperty(t,"__esModule",{value:!0});var l=new Uint32Array(0).buffer,u=function(){function e(e){this._state=e, this._lineTokens=null,this._invalid=!0}return e.prototype.deleteBeginning=function(e){null!==this._lineTokens&&this._lineTokens!==l&&this.delete(0,e)},e.prototype.deleteEnding=function(e){if(null!==this._lineTokens&&this._lineTokens!==l){var t=new Uint32Array(this._lineTokens),n=t[t.length-2];this.delete(e,n)}},e.prototype.delete=function(e,t){if(null!==this._lineTokens&&this._lineTokens!==l&&e!==t){var i=new Uint32Array(this._lineTokens),o=i.length>>>1;if(0!==e||i[i.length-2]!==t){var r=n.LineTokens.findIndexInTokensArray(i,e),s=r>0?i[r-1<<1]:0;if(tc&&(i[d++]=f,i[d++]=i[1+(p<<1)],c=f)}if(d!==i.length){var g=new Uint32Array(d);g.set(i.subarray(0,d),0),this._lineTokens=g.buffer}}}else this._lineTokens=l}},e.prototype.append=function(e){if(e!==l)if(this._lineTokens!==l){if(null!==this._lineTokens)if(null!==e){ var t=new Uint32Array(this._lineTokens),n=new Uint32Array(e),i=n.length>>>1,o=new Uint32Array(t.length+n.length);o.set(t,0);for(var r=t.length,s=t[t.length-2],a=0;a>>1,r=n.LineTokens.findIndexInTokensArray(i,e);if(r>0){(r>0?i[r-1<<1]:0)===e&&r--}for(var s=r;s=e},e.prototype.hasLinesToTokenize=function(e){return this._invalidLineStartIndex=0;s--)this.invalidateLine(e.startLineNumber+s-1);this._acceptDeleteRange(e),this._acceptInsertText(new o.Position(e.startLineNumber,e.startColumn),t,n)},e.prototype._acceptDeleteRange=function(e){var t=e.startLineNumber-1;if(!(t>=this._tokens.length))if(e.startLineNumber!==e.endLineNumber){var n=this._tokens[t];n.deleteEnding(e.startColumn-1);var i=e.endLineNumber-1,o=null;if(i=this._tokens.length))if(0!==t){var r=this._tokens[o];r.deleteEnding(e.column-1),r.insert(e.column-1,n);for(var s=new Array(t),a=t-1;a>=0;a--)s[a]=new u(null);this._tokens=i.arrayInsert(this._tokens,e.lineNumber,s)}else this._tokens[o].insert(e.column-1,n)}},e.prototype._tokenizeOneLine=function(e,t){if(!this.hasLinesToTokenize(e))return e.getLineCount()+1;var n=this._invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t,n),n},e.prototype._tokenizeText=function(e,t,n){var i=null;try{i=this.tokenizationSupport.tokenize2(t,n,0)}catch(e){r.onUnexpectedError(e)}return i||(i=s.nullTokenize2(this.languageIdentifier.id,t,n,0)),i},e.prototype._updateTokensUntilLine=function(e,t,n){if(this.tokenizationSupport){ for(var i=e.getLineCount(),o=n-1,a=this._invalidLineStartIndex;a<=o;a++){var l=a+1,u=null,d=e.getLineContent(a+1);try{var c=this._getState(a).clone();u=this.tokenizationSupport.tokenize2(d,c,0)}catch(e){r.onUnexpectedError(e)}if(u||(u=s.nullTokenize2(this.languageIdentifier.id,d,this._getState(a),0)),this._setTokens(this.languageIdentifier.id,a,d.length,u.tokens),t.registerChangedTokens(a+1),this._setIsInvalid(a,!1),l0?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}();t.ModelTokensChangedEventBuilder=c}),define(t[29],n([1,0,31,9,24,17,483,3,21,499,10,6,487,2,228,60,91,105,12,41,100,370,486,47,136,515]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y,C,b,S,w,E,L,x){"use strict";function N(e){var t=new x.PieceTreeTextBufferBuilder;return t.acceptChunk(e),t.finish()}function I(e,t){return("string"==typeof e?N(e):e).create(t)}function M(e){return e.replace(/[^a-z0-9\-_]/gi," ")}function D(e){return e instanceof P?e:P.createDynamic(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createTextBufferFactory=N,t.createTextBuffer=I;var T=0;t.LONG_LINE_BOUNDARY=1e4;var k=function(e){function f(t,o,u,d){void 0===d&&(d=null);var c=e.call(this)||this;c._onWillDispose=c._register(new i.Emitter),c.onWillDispose=c._onWillDispose.event, c._onDidChangeDecorations=c._register(new F),c.onDidChangeDecorations=c._onDidChangeDecorations.event,c._onDidChangeLanguage=c._register(new i.Emitter),c.onDidChangeLanguage=c._onDidChangeLanguage.event,c._onDidChangeLanguageConfiguration=c._register(new i.Emitter),c.onDidChangeLanguageConfiguration=c._onDidChangeLanguageConfiguration.event,c._onDidChangeTokens=c._register(new i.Emitter),c.onDidChangeTokens=c._onDidChangeTokens.event,c._onDidChangeOptions=c._register(new i.Emitter),c.onDidChangeOptions=c._onDidChangeOptions.event,c._eventEmitter=c._register(new W),T++,c.id="$model"+T,c.isForSimpleWidget=o.isForSimpleWidget,c._associatedResource=void 0===d||null===d?n.default.parse("inmemory://model/"+T):d,c._attachedEditorCount=0,c._buffer=I(t,o.defaultEOL),c._options=f.resolveOptions(c._buffer,o);var h=c._buffer.getLineCount(),p=c._buffer.getValueLengthInRange(new l.Range(1,1,h,c._buffer.getLineLength(h)+1),r.EndOfLinePreference.TextDefined) ;return o.largeFileOptimizations?c._isTooLargeForTokenization=p>f.LARGE_FILE_SIZE_THRESHOLD||h>f.LARGE_FILE_LINE_COUNT_THRESHOLD:c._isTooLargeForTokenization=!1,c._isTooLargeForSyncing=p>f.MODEL_SYNC_LIMIT,c._setVersionId(1),c._isDisposed=!1,c._isDisposing=!1,c._languageIdentifier=u||m.NULL_LANGUAGE_IDENTIFIER,c._tokenizationListener=s.TokenizationRegistry.onDidChange(function(e){-1!==e.changedLanguages.indexOf(c._languageIdentifier.language)&&(c._resetTokenizationState(),c.emitModelTokensChangedEvent({ranges:[{fromLineNumber:1,toLineNumber:c.getLineCount()}]}),c._shouldAutoTokenize()&&c._warmUpTokens())}),c._revalidateTokensTimeout=-1,c._languageRegistryListener=C.LanguageConfigurationRegistry.onDidChange(function(e){e.languageIdentifier.id===c._languageIdentifier.id&&c._onDidChangeLanguageConfiguration.fire({})}),c._resetTokenizationState(),c._instanceId=function(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}(T),c._lastDecorationId=0,c._decorations=Object.create(null), c._decorationsTree=new R,c._commandManager=new a.EditStack(c),c._isUndoing=!1,c._isRedoing=!1,c._trimAutoWhitespaceLines=null,c}return o(f,e),f.createFromString=function(e,t,n,i){return void 0===t&&(t=f.DEFAULT_CREATION_OPTIONS),void 0===n&&(n=null),void 0===i&&(i=null),new f(e,t,n,i)},f.resolveOptions=function(e,t){if(t.detectIndentation){var n=w.guessIndentation(e,t.tabSize,t.insertSpaces);return new r.TextModelResolvedOptions({tabSize:n.tabSize,insertSpaces:n.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new r.TextModelResolvedOptions({tabSize:t.tabSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})},f.prototype.onDidChangeRawContentFast=function(e){return this._eventEmitter.fastEvent(function(t){return e(t.rawContentChangedEvent)})},f.prototype.onDidChangeRawContent=function(e){return this._eventEmitter.slowEvent(function(t){return e(t.rawContentChangedEvent)})},f.prototype.onDidChangeContent=function(e){ return this._eventEmitter.slowEvent(function(t){return e(t.contentChangedEvent)})},f.prototype.dispose=function(){this._isDisposing=!0,this._onWillDispose.fire(),this._commandManager=null,this._decorations=null,this._decorationsTree=null,this._tokenizationListener.dispose(),this._languageRegistryListener.dispose(),this._clearTimers(),this._tokens=null,this._isDisposed=!0,this._buffer=null,e.prototype.dispose.call(this),this._isDisposing=!1},f.prototype._assertNotDisposed=function(){if(this._isDisposed)throw new Error("Model is disposed!")},f.prototype._emitContentChangedEvent=function(e,t){this._isDisposing||this._eventEmitter.fire(new d.InternalModelContentChangeEvent(e,t))},f.prototype.setValue=function(e){if(this._assertNotDisposed(),null!==e){var t=I(e,this._options.defaultEOL);this.setValueFromTextBuffer(t)}},f.prototype._createContentChanged2=function(e,t,n,i,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:n,text:i}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o, isRedoing:r,isFlush:s}},f.prototype.setValueFromTextBuffer=function(e){if(this._assertNotDisposed(),null!==e){var t=this.getFullModelRange(),n=this.getValueLengthInRange(t),i=this.getLineCount(),o=this.getLineMaxColumn(i);this._buffer=e,this._increaseVersionId(),this._resetTokenizationState(),this._decorations=Object.create(null),this._decorationsTree=new R,this._commandManager=new a.EditStack(this),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new d.ModelRawContentChangedEvent([new d.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new l.Range(1,1,i,o),0,n,this.getValue(),!1,!1,!0))}},f.prototype.setEOL=function(e){this._assertNotDisposed();var t=e===r.EndOfLineSequence.CRLF?"\r\n":"\n";if(this._buffer.getEOL()!==t){var n=this.getFullModelRange(),i=this.getValueLengthInRange(n),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(), this._emitContentChangedEvent(new d.ModelRawContentChangedEvent([new d.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new l.Range(1,1,o,s),0,i,this.getValue(),!1,!1,!1))}},f.prototype._onBeforeEOLChange=function(){var e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)},f.prototype._onAfterEOLChange=function(){for(var e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder(),n=0,i=t.length;n0},f.prototype.getAttachedEditorCount=function(){return this._attachedEditorCount},f.prototype.isTooLargeForSyncing=function(){return this._isTooLargeForSyncing},f.prototype.isTooLargeForTokenization=function(){return this._isTooLargeForTokenization},f.prototype.isDisposed=function(){return this._isDisposed},f.prototype.isDominatedByLongLines=function(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;for(var e=0,n=0,i=this._buffer.getLineCount(),o=1;o<=i;o++){var r=this._buffer.getLineLength(o) ;r>=t.LONG_LINE_BOUNDARY?n+=r:e+=r}return n>e},Object.defineProperty(f.prototype,"uri",{get:function(){return this._associatedResource},enumerable:!0,configurable:!0}),f.prototype.getOptions=function(){return this._assertNotDisposed(),this._options},f.prototype.updateOptions=function(e){this._assertNotDisposed();var t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,i=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new r.TextModelResolvedOptions({tabSize:t,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:i});if(!this._options.equals(o)){var s=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(s)}},f.prototype.detectIndentation=function(e,t){this._assertNotDisposed();var n=w.guessIndentation(this._buffer,t,e);this.updateOptions({insertSpaces:n.insertSpaces,tabSize:n.tabSize})},f._normalizeIndentationFromWhitespace=function(e,t,n){ for(var i=0,o=0;othis.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)},f.prototype.getLineLength=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)},f.prototype.getLinesContent=function(){return this._assertNotDisposed(),this._buffer.getLinesContent()},f.prototype.getEOL=function(){return this._assertNotDisposed(),this._buffer.getEOL()}, f.prototype.getLineMinColumn=function(e){return this._assertNotDisposed(),1},f.prototype.getLineMaxColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1},f.prototype.getLineFirstNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)},f.prototype.getLineLastNonWhitespaceColumn=function(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)},f.prototype._validateRangeRelaxedNoAllocations=function(e){var t,n,i=this._buffer.getLineCount(),o=e.startLineNumber,r=e.startColumn;if(o<1)t=1,n=1;else if(o>i)t=i,n=this.getLineMaxColumn(t);else if(t=0|o,r<=1)n=1;else{n=r>=(h=this.getLineMaxColumn(t))?h:0|r}var s,a,d=e.endLineNumber,c=e.endColumn;if(d<1)s=1,a=1;else if(d>i)s=i, a=this.getLineMaxColumn(s);else if(s=0|d,c<=1)a=1;else{var h=this.getLineMaxColumn(s);a=c>=h?h:0|c}return o===t&&r===n&&d===s&&c===a&&e instanceof l.Range&&!(e instanceof u.Selection)?e:new l.Range(t,n,s,a)},f.prototype._isValidPosition=function(e,t,n){if(isNaN(e))return!1;if(e<1)return!1;if(e>this._buffer.getLineCount())return!1;if(isNaN(t))return!1;if(t<1)return!1;if(t>this.getLineMaxColumn(e))return!1;if(n&&t>1){var i=this._buffer.getLineCharCode(e,t-2);if(h.isHighSurrogate(i))return!1}return!0},f.prototype._validatePosition=function(e,t,n){var i=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(i<1)return new y.Position(1,1);if(i>r)return new y.Position(r,this.getLineMaxColumn(r));if(o<=1)return new y.Position(i,1);var s=this.getLineMaxColumn(i);if(o>=s)return new y.Position(i,s);if(n){var a=this._buffer.getLineCharCode(i,o-2);if(h.isHighSurrogate(a))return new y.Position(i,o-1)}return new y.Position(i,o)}, f.prototype.validatePosition=function(e){return this._assertNotDisposed(),e instanceof y.Position&&this._isValidPosition(e.lineNumber,e.column,!0)?e:this._validatePosition(e.lineNumber,e.column,!0)},f.prototype._isValidRange=function(e,t){var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(n,i,!1))return!1;if(!this._isValidPosition(o,r,!1))return!1;if(t){var s=i>1?this._buffer.getLineCharCode(n,i-2):0,a=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,l=h.isHighSurrogate(s),u=h.isHighSurrogate(a);return!l&&!u}return!0},f.prototype.validateRange=function(e){if(this._assertNotDisposed(),e instanceof l.Range&&!(e instanceof u.Selection)&&this._isValidRange(e,!0))return e ;var t=this._validatePosition(e.startLineNumber,e.startColumn,!1),n=this._validatePosition(e.endLineNumber,e.endColumn,!1),i=t.lineNumber,o=t.column,r=n.lineNumber,s=n.column,a=o>1?this._buffer.getLineCharCode(i,o-2):0,d=s>1&&s<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,s-2):0,c=h.isHighSurrogate(a),p=h.isHighSurrogate(d);return c||p?i===r&&o===s?new l.Range(i,o-1,r,s-1):c&&p?new l.Range(i,o-1,r,s+1):c?new l.Range(i,o-1,r,s):new l.Range(i,o,r,s+1):new l.Range(i,o,r,s)},f.prototype.modifyPosition=function(e,t){this._assertNotDisposed();var n=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,n)))},f.prototype.getFullModelRange=function(){this._assertNotDisposed();var e=this.getLineCount();return new l.Range(1,1,e,this.getLineMaxColumn(e))},f.prototype.findMatchesLineByLine=function(e,t,n,i){return this._buffer.findMatchesLineByLine(e,t,n,i)},f.prototype.findMatches=function(e,t,n,i,o,r,s){void 0===s&&(s=999),this._assertNotDisposed();var a ;if(a=l.Range.isIRange(t)?this.validateRange(t):this.getFullModelRange(),!n&&e.indexOf("\n")<0){var u=new L.SearchParams(e,n,i,o).parseSearchRequest();return u?this.findMatchesLineByLine(a,u,r,s):[]}return L.TextModelSearch.findMatches(this,new L.SearchParams(e,n,i,o),a,r,s)},f.prototype.findNextMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t);if(!n&&e.indexOf("\n")<0){var a=new L.SearchParams(e,n,i,o).parseSearchRequest(),u=this.getLineCount(),d=new l.Range(s.lineNumber,s.column,u,this.getLineMaxColumn(u)),c=this.findMatchesLineByLine(d,a,r,1);return L.TextModelSearch.findNextMatch(this,new L.SearchParams(e,n,i,o),s,r),c.length>0?c[0]:(d=new l.Range(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),(c=this.findMatchesLineByLine(d,a,r,1)).length>0?c[0]:null)}return L.TextModelSearch.findNextMatch(this,new L.SearchParams(e,n,i,o),s,r)},f.prototype.findPreviousMatch=function(e,t,n,i,o,r){this._assertNotDisposed();var s=this.validatePosition(t) ;return L.TextModelSearch.findPreviousMatch(this,new L.SearchParams(e,n,i,o),s,r)},f.prototype.pushStackElement=function(){this._commandManager.pushStackElement()},f.prototype.pushEOL=function(e){if(("\n"===this.getEOL()?r.EndOfLineSequence.LF:r.EndOfLineSequence.CRLF)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},f.prototype.pushEditOperations=function(e,t,n){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,t,n)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}},f.prototype._pushEditOperations=function(e,t,n){var i=this;if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){for(var o=t.map(function(e){return{range:i.validateRange(e.range),text:e.text}}),r=!0,s=0,a=e.length;su.endLineNumber,f=u.startLineNumber>_.endLineNumber;if(!p&&!f){d=!0;break}}if(!d){r=!1;break}}if(r)for(var s=0,a=this._trimAutoWhitespaceLines.length;s_.endLineNumber)&&!(g===_.startLineNumber&&_.startColumn===m&&_.isEmpty()&&y&&y.length>0&&"\n"===y.charAt(0)||g===_.startLineNumber&&1===_.startColumn&&_.isEmpty()&&y&&y.length>0&&"\n"===y.charAt(y.length-1))){v=!1;break}}v&&t.push({range:new l.Range(g,1,g,m),text:null})}this._trimAutoWhitespaceLines=null}return this._commandManager.pushEditOperation(e,t,n)},f.prototype.applyEdits=function(e){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._applyEdits(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}, f._eolCount=function(e){for(var t=0,n=0,i=0,o=e.length;i=0;b--){var S=g+b,w=r-l-C+S;a.push(new d.ModelRawLineChanged(S,this.getLineContent(w)))}if(ythis.getLineCount()?[]:this.getLinesDecorations(e,e,t,n)},f.prototype.getLinesDecorations=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new l.Range(r,1,s,a),n,i)},f.prototype.getDecorationsInRange=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=!1);var i=this.validateRange(e);return this._getDecorationsInRange(i,t,n)},f.prototype.getOverviewRulerDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!0,n);return this._ensureNodesHaveRanges(i)},f.prototype.getAllDecorations=function(e,t){void 0===e&&(e=0),void 0===t&&(t=!1);var n=this.getVersionId(),i=this._decorationsTree.search(e,t,!1,n) ;return this._ensureNodesHaveRanges(i)},f.prototype._getDecorationsInRange=function(e,t,n){var i=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(i,o,t,n,r);return this._ensureNodesHaveRanges(s)},f.prototype._ensureNodesHaveRanges=function(e){for(var t=0,n=e.length;t0)for(;o>0&&s>=1;){var l=this.getLineFirstNonWhitespaceColumn(s);if(0!==l){if(l=0;d--){u=(f=this._tokens._tokenizeText(this._buffer,r[d],u))?f.endState.clone():a.clone()}var c=Math.floor(.4*this._tokens.inValidLineStartIndex);t=Math.min(this.getLineCount(),t+c);for(var h=e;h<=t;h++){var p=this.getLineContent(h),f=this._tokens._tokenizeText(this._buffer,p,u);f?(this._tokens._setTokens(this._tokens.languageIdentifier.id,h-1,p.length,f.tokens),this._tokens._setIsInvalid(h-1,!1),this._tokens._setState(h-1,u),u=f.endState.clone(),i.registerChangedTokens(h)):u=a.clone()}var g=i.build();g&&this._onDidChangeTokens.fire(g)}}}, f.prototype.forceTokenization=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");var t=new S.ModelTokensChangedEventBuilder;this._tokens._updateTokensUntilLine(this._buffer,t,e);var n=t.build();n&&this._onDidChangeTokens.fire(n)},f.prototype.isCheapToTokenize=function(e){return this._tokens.isCheapToTokenize(e)},f.prototype.tokenizeIfCheap=function(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)},f.prototype.getLineTokens=function(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)},f.prototype._getLineTokens=function(e){var t=this._buffer.getLineContent(e);return this._tokens.getTokens(this._languageIdentifier.id,e-1,t)},f.prototype.getLanguageIdentifier=function(){return this._languageIdentifier},f.prototype.getModeId=function(){return this._languageIdentifier.language},f.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._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}},f.prototype.getLanguageIdAtPosition=function(e,t){if(!this._tokens.tokenizationSupport)return this._languageIdentifier.id;var n=this.validatePosition({lineNumber:e,column:t}),i=n.lineNumber,o=n.column,r=this._getLineTokens(i);return r.getLanguageId(r.findTokenIndexAtOffset(o-1))},f.prototype._beginBackgroundTokenization=function(){var e=this;this._shouldAutoTokenize()&&-1===this._revalidateTokensTimeout&&(this._revalidateTokensTimeout=setTimeout(function(){e._revalidateTokensTimeout=-1,e._revalidateTokensNow()},0))},f.prototype._warmUpTokens=function(){var e=Math.min(100,this.getLineCount());this._revalidateTokensNow(e),this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization()},f.prototype._revalidateTokensNow=function(e){ void 0===e&&(e=this._buffer.getLineCount());for(var t=new S.ModelTokensChangedEventBuilder,n=g.StopWatch.create(!1);this._tokens.hasLinesToTokenize(this._buffer)&&!(n.elapsed()>20);){if(this._tokens._tokenizeOneLine(this._buffer,t)>=e)break}this._tokens.hasLinesToTokenize(this._buffer)&&this._beginBackgroundTokenization();var i=t.build();i&&this._onDidChangeTokens.fire(i)},f.prototype.emitModelTokensChangedEvent=function(e){this._isDisposing||this._onDidChangeTokens.fire(e)},f.prototype.getWordAtPosition=function(e){this._assertNotDisposed();var t=this.validatePosition(e),n=this.getLineContent(t.lineNumber),i=this._getLineTokens(t.lineNumber),o=i.findTokenIndexAtOffset(t.column-1),r=f._findLanguageBoundaries(i,o),s=r[0],a=r[1],l=b.getWordAtText(t.column,C.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(o)),n.substring(s,a),s);if(l)return l;if(o>0&&s===t.column-1){ var u=f._findLanguageBoundaries(i,o-1),d=u[0],c=u[1],h=b.getWordAtText(t.column,C.LanguageConfigurationRegistry.getWordDefinition(i.getLanguageId(o-1)),n.substring(d,c),d);if(h)return h}return null},f._findLanguageBoundaries=function(e,t){for(var n,i=e.getLanguageId(t),o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);for(var r,o=t,s=e.getCount();o0&&n.getStartOffset(o)===e.column-1){a=n.getStartOffset(o);o--;var u=C.LanguageConfigurationRegistry.getBracketsSupport(n.getLanguageId(o)) ;if(u&&!v.ignoreBracketsInToken(n.getStandardTokenType(o))){var s=Math.max(n.getStartOffset(o),e.column-1-u.maxBracketLength),d=_.BracketsUtils.findPrevBracketInToken(u.reversedRegex,t,i,s,a);if(d&&d.startColumn<=e.column&&e.column<=d.endColumn){var c=i.substring(d.startColumn-1,d.endColumn-1);c=c.toLowerCase();var h=this._matchFoundBracket(d,u.textIsBracket[c],u.textIsOpenBracket[c]);if(h)return h}}}return null},f.prototype._matchFoundBracket=function(e,t,n){if(!t)return null;if(n){if(i=this._findMatchingBracketDown(t,e.getEndPosition()))return[e,i]}else{var i=this._findMatchingBracketUp(t,e.getStartPosition());if(i)return[e,i]}return null},f.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=s.getCount(),l=this._buffer.getLineContent(r),u=a-1,d=-1;for(r===t.lineNumber&&(u=s.findTokenIndexAtOffset(t.column-1),d=t.column-1);u>=0;u--){ var c=s.getLanguageId(u),h=s.getStandardTokenType(u),p=s.getStartOffset(u),f=s.getEndOffset(u);if(-1===d&&(d=f),c===n&&!v.ignoreBracketsInToken(h))for(;;){var g=_.BracketsUtils.findPrevBracketInToken(i,r,l,p,d);if(!g)break;var m=l.substring(g.startColumn-1,g.endColumn-1);if((m=m.toLowerCase())===e.open?o++:m===e.close&&o--,0===o)return g;d=g.startColumn-1}d=-1}}return null},f.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),l=a.getCount(),u=this._buffer.getLineContent(r),d=0,c=0;for(r===t.lineNumber&&(d=a.findTokenIndexAtOffset(t.column-1),c=t.column-1);do)throw new Error("Illegal value for lineNumber");for(var r=C.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),s=r&&r.offSide,a=-2,l=-1,u=-2,d=-1,c=function(e){if(-1!==a&&(-2===a||a>e-1)){a=-1,l=-1;for(n=e-2;n>=0;n--){var t=i._computeIndentLevel(n);if(t>=0){a=n,l=t;break}}}if(-2===u){u=-1,d=-1;for(var n=e;n=0){u=n,d=r;break}}}},h=-2,p=-1,f=-2,g=-1,m=function(e){if(-2===h){h=-1,p=-1;for(n=e-2;n>=0;n--){var t=i._computeIndentLevel(n);if(t>=0){h=n,p=t;break}}}if(-1!==f&&(-2===f||f=0){f=n,g=r;break}}}},v=0,_=!0,y=0,b=!0,S=0,w=0;_||b;w++){var E=e-w,L=e+w ;if(0!==w&&(E<1||Eo||L>n)&&(b=!1),w>5e4&&(_=!1,b=!1),_){var x=void 0;if((I=this._computeIndentLevel(E-1))>=0?(u=E-1,d=I,x=Math.ceil(I/this._options.tabSize)):(c(E),x=this._getIndentLevelForWhitespaceLine(s,l,d)),0===w){if(v=E,y=L,0===(S=x))return{startLineNumber:v,endLineNumber:y,indent:S};continue}x>=S?v=E:_=!1}if(b){var N=void 0,I=this._computeIndentLevel(L-1);I>=0?(h=L-1,p=I,N=Math.ceil(I/this._options.tabSize)):(m(L),N=this._getIndentLevelForWhitespaceLine(s,p,g)),N>=S?y=L:b=!1}}return{startLineNumber:v,endLineNumber:y,indent:S}},f.prototype.getLinesIndentGuides=function(e,t){this._assertNotDisposed();var n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for startLineNumber");if(t<1||t>n)throw new Error("Illegal value for endLineNumber");for(var i=C.LanguageConfigurationRegistry.getFoldingRules(this._languageIdentifier.id),o=i&&i.offSide,r=new Array(t-e+1),s=-2,a=-1,l=-2,u=-1,d=e;d<=t;d++){var c=d-e,h=this._computeIndentLevel(d-1);if(h>=0)s=d-1,a=h, r[c]=Math.ceil(h/this._options.tabSize);else{if(-2===s){s=-1,a=-1;for(p=d-2;p>=0;p--){if((f=this._computeIndentLevel(p))>=0){s=p,a=f;break}}}if(-1!==l&&(-2===l||l=0){l=p,u=f;break}}}r[c]=this._getIndentLevelForWhitespaceLine(o,a,u)}}return r},f.prototype._getIndentLevelForWhitespaceLine=function(e,t,n){return-1===t||-1===n?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))},t}(f.Disposable);t.DidChangeContentEmitter=W}),define(t[38],n([1,0,12,6,29,21,3,41,10]),function(e,t,n,i,o,r,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(t,n,i,o){this._languageIdentifier=t;var r=o.editor;this.readOnly=r.readOnly,this.tabSize=i.tabSize,this.insertSpaces=i.insertSpaces,this.oneIndent=n,this.pageSize=Math.max(1,Math.floor(r.layoutInfo.height/r.fontInfo.lineHeight)-2),this.lineHeight=r.lineHeight,this.useTabStops=r.useTabStops,this.wordSeparators=r.wordSeparators,this.emptySelectionClipboard=r.emptySelectionClipboard, this.multiCursorMergeOverlapping=r.multiCursorMergeOverlapping,this.autoClosingBrackets=r.autoClosingBrackets,this.autoIndent=r.autoIndent,this.autoClosingPairsOpen={},this.autoClosingPairsClose={},this.surroundingPairs={},this._electricChars=null;var s=e._getAutoClosingPairs(t);if(s)for(l=0;l=o.length)&&i.isLowSurrogate(o.charCodeAt(n))},e.isHighSurrogate=function(e,t,n){var o=e.getLineContent(t);return!(n<0||n>=o.length)&&i.isHighSurrogate(o.charCodeAt(n))},e.isInsideSurrogatePair=function(e,t,n){return this.isHighSurrogate(e,t,n-2)},e.visibleColumnFromColumn=function(e,t,n){var o=e.length;o>t-1&&(o=t-1);for(var r=0,s=0;s=t){return l-ts?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=f}),define(t[170],n([1,0,6,38,3,21,41]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){this._opts=t,this._selection=e,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}return e.unshiftIndentCount=function(e,t,n){ var o=i.CursorColumns.visibleColumnFromColumn(e,t,n);return i.CursorColumns.prevTabStop(o,n)/n},e.shiftIndentCount=function(e,t,n){var o=i.CursorColumns.visibleColumnFromColumn(e,t,n);return i.CursorColumns.nextTabStop(o,n)/n},e.prototype._addEditOperation=function(e,t,n){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,n):e.addEditOperation(t,n)},e.prototype.getEditOperations=function(t,r){var a=this._selection.startLineNumber,l=this._selection.endLineNumber;1===this._selection.endColumn&&a!==l&&(l-=1);var u=this._opts.tabSize,d=this._opts.oneIndent,c=a===l;if(this._selection.isEmpty()&&/^\s*$/.test(t.getLineContent(a))&&(this._useLastEditRangeForCursorEndPosition=!0),this._opts.useTabStops)for(var h=["",d],p=0,f=0,g=a;g<=l;g++,p=f){f=0;var m=t.getLineContent(g),v=n.firstNonWhitespaceIndex(m);if((!this._opts.isUnshift||0!==m.length&&0!==v)&&(c||this._opts.isUnshift||0!==m.length)){if(-1===v&&(v=m.length),g>1){ if(i.CursorColumns.visibleColumnFromColumn(m,v+1,u)%u!=0&&t.isCheapToTokenize(g-1)){var _=s.LanguageConfigurationRegistry.getRawEnterActionAtPosition(t,g-1,t.getLineMaxColumn(g-1));if(_){if(f=p,_.appendText)for(var y=0,C=_.appendText.length;ya,c=s>l,h=sl)continue;if(ys)continue;if(_1&&o--,this.columnSelect(e,t,n.selection,i,o)},e.columnSelectRight=function(e,t,i,r,s){for(var a=0,l=Math.min(i.position.lineNumber,r),u=Math.max(i.position.lineNumber,r),d=l;d<=u;d++){ var c=t.getLineMaxColumn(d),h=o.CursorColumns.visibleColumnFromColumn2(e,t,new n.Position(d,c));a=Math.max(a,h)}return st.getLineCount()&&(o=t.getLineCount()),this.columnSelect(e,t,n.selection,o,r)},e}();t.ColumnSelection=r}),define(t[171],n([1,0,38,12,3]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t,n){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=n}}();t.CursorPosition=r;var s=function(){function e(){}return e.left=function(e,t,i,o){return o>t.getLineMinColumn(i)?n.CursorColumns.isLowSurrogate(t,i,o-2)?o-=2:o-=1:i>1&&(i-=1,o=t.getLineMaxColumn(i)),new r(i,o,0)},e.moveLeft=function(t,n,i,o,r){var s,a;if(i.hasSelection()&&!o)s=i.selection.startLineNumber,a=i.selection.startColumn;else{ var l=e.left(t,n,i.position.lineNumber,i.position.column-(r-1));s=l.lineNumber,a=l.column}return i.move(o,s,a,0)},e.right=function(e,t,i,o){return od?(i=d,l?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,u),n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),s=u-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new r(i,o,s)}, e.moveDown=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.endLineNumber,a=i.selection.endColumn):(s=i.position.lineNumber,a=i.position.column);var l=e.down(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,l.lineNumber,l.column,l.leftoverVisibleColumns)},e.translateDown=function(t,r,s){var a=s.selection,l=e.down(t,r,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),u=e.down(t,r,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.SingleCursorState(new o.Range(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new i.Position(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.up=function(e,t,i,o,s,a,l){var u=n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+s;return(i-=a)<1?(i=1,l?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,u), n.CursorColumns.isInsideSurrogatePair(t,i,o)&&(o-=1)),s=u-n.CursorColumns.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new r(i,o,s)},e.moveUp=function(t,n,i,o,r){var s,a;i.hasSelection()&&!o?(s=i.selection.startLineNumber,a=i.selection.startColumn):(s=i.position.lineNumber,a=i.position.column);var l=e.up(t,n,s,a,i.leftoverVisibleColumns,r,!0);return i.move(o,l.lineNumber,l.column,l.leftoverVisibleColumns)},e.translateUp=function(t,r,s){var a=s.selection,l=e.up(t,r,a.selectionStartLineNumber,a.selectionStartColumn,s.selectionStartLeftoverVisibleColumns,1,!1),u=e.up(t,r,a.positionLineNumber,a.positionColumn,s.leftoverVisibleColumns,1,!1);return new n.SingleCursorState(new o.Range(l.lineNumber,l.column,l.lineNumber,l.column),l.leftoverVisibleColumns,new i.Position(u.lineNumber,u.column),u.leftoverVisibleColumns)},e.moveToBeginningOfLine=function(e,t,n,i){var o,r=n.position.lineNumber,s=t.getLineMinColumn(r),a=t.getLineFirstNonWhitespaceColumn(r)||s;return o=n.position.column===a?s:a,n.move(i,r,o,0)}, e.moveToEndOfLine=function(e,t,n,i){var o=n.position.lineNumber,r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e.moveToBeginningOfBuffer=function(e,t,n,i){return n.move(i,1,1,0)},e.moveToEndOfBuffer=function(e,t,n,i){var o=t.getLineCount(),r=t.getLineMaxColumn(o);return n.move(i,o,r,0)},e}();t.MoveOperations=s}),define(t[176],n([1,0,76,38,3,171,6]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){}return e.deleteRight=function(e,t,i,s){for(var a=[],l=3!==e,u=0,d=s.length;u1){var m=a.getLineContent(g.lineNumber),v=s.firstNonWhitespaceIndex(m),_=-1===v?m.length+1:v+1;if(g.column<=_){var y=i.CursorColumns.visibleColumnFromColumn2(t,a,g),C=i.CursorColumns.prevTabStop(y,t.tabSize),b=i.CursorColumns.columnFromVisibleColumn2(t,a,g.lineNumber,C);f=new o.Range(g.lineNumber,b,g.lineNumber,g.column)}else f=new o.Range(g.lineNumber,g.column-1,g.lineNumber,g.column)}else{ var S=r.MoveOperations.left(t,a,g.lineNumber,g.column);f=new o.Range(S.lineNumber,S.column,g.lineNumber,g.column)}}f.isEmpty()?u[c]=null:(f.startLineNumber!==f.endLineNumber&&(d=!0),u[c]=new n.ReplaceCommand(f,""))}return[d,u]},e.cut=function(e,t,r){for(var s=[],a=0,l=r.length;a1?(c=d.lineNumber-1,h=t.getLineMaxColumn(d.lineNumber-1),p=d.lineNumber,f=t.getLineMaxColumn(d.lineNumber)):(c=d.lineNumber,h=1,p=d.lineNumber,f=t.getLineMaxColumn(d.lineNumber));var g=new o.Range(c,h,p,f);g.isEmpty()?s[a]=null:s[a]=new n.ReplaceCommand(g,"")}else s[a]=null;else s[a]=new n.ReplaceCommand(u,"")}return new i.EditOperationResult(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})},e}();t.DeleteOperations=a}),define(t[139],n([1,0,10,76,38,3,6,170,41,58,441,89]),function(e,t,n,i,o,r,s,a,l,u,d,c){ "use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(){}return e.indent=function(e,t,n){for(var i=[],o=0,r=n.length;o1){var c=i-1;for(c=i-1;c>=1;c--){var h=n.getLineContent(c);if(s.lastNonWhitespaceIndex(h)>=0)break}if(c<1)return null;var p=n.getLineMaxColumn(c),f=l.LanguageConfigurationRegistry.getEnterAction(n,new r.Range(c,p,c,p));f&&(a=f.indentation,(o=f.enterAction)&&(a+=o.appendText))}return o&&(o===u.IndentAction.Indent&&(a=e.shiftIndent(t,a)),o===u.IndentAction.Outdent&&(a=e.unshiftIndent(t,a)),a=t.normalizeIndentation(a)),a||null},e._replaceJumpToNextIndent=function(e,t,n,r){var s="",a=n.getStartPosition();if(e.insertSpaces)for(var l=o.CursorColumns.visibleColumnFromColumn2(e,t,a),u=e.tabSize,d=u-l%u,c=0;c=0?d.setEndPosition(d.endLineNumber,Math.max(d.endColumn,M+1)):d.setEndPosition(d.endLineNumber,n.getLineMaxColumn(d.endLineNumber)),a)return new i.ReplaceCommandWithoutChangingPosition(d,N+t.normalizeIndentation(S.afterEnter),!0);var D=0;return x<=M+1&&(t.insertSpaces||(L=Math.ceil(L/t.tabSize)),D=Math.min(L+1-t.normalizeIndentation(S.afterEnter).length-1,0)),new i.ReplaceCommandWithOffsetCursorState(d,N+t.normalizeIndentation(S.afterEnter),0,D,!0)}return e._typeCommand(d,"\n"+t.normalizeIndentation(E),a)},e._isAutoIndentType=function(e,t,n){if(!e.autoIndent)return!1;for(var i=0,o=n.length;i1){var p=c.getMapForWordSeparators(t.wordSeparators),f=h.charCodeAt(d.column-2);if(0===p.get(f))return!1}var g=h.charAt(d.column-1);if(g){if(!e._isBeforeClosingBrace(t,r,g)&&!/\s/.test(g))return!1}if(!i.isCheapToTokenize(d.lineNumber))return!1;i.forceTokenization(d.lineNumber);var m=i.getLineTokens(d.lineNumber),v=!1;try{ v=l.LanguageConfigurationRegistry.shouldAutoClosePair(r,m,d.column)}catch(e){n.onUnexpectedError(e)}if(!v)return!1}return!0},e._runAutoClosingOpenCharType=function(e,t,n,r,s){for(var a=[],l=0,u=r.length;l2){var m=c.getMapForWordSeparators(r.wordSeparators),v=p.charCodeAt(h.column-3);if(0===m.get(v))continue}var _=p.charAt(h.column-1);if(_){if(!e._isBeforeClosingBrace(r,f,_)&&!/\s/.test(_))continue}if(!s.isCheapToTokenize(h.lineNumber))continue;s.forceTokenization(h.lineNumber);var y=s.getLineTokens(h.lineNumber),C=!1;try{C=l.LanguageConfigurationRegistry.shouldAutoClosePair(f,y,h.column-1)}catch(e){n.onUnexpectedError(e)}if(C){var b=r.autoClosingPairsOpen[f];u[d]=new i.ReplaceCommandWithOffsetCursorState(a[d],b,0,-b.length)}}}return new o.EditOperationResult(1,u,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})},e.typeWithInterceptors=function(t,n,r,s,a){if("\n"===a){for(var l=[],u=0,d=s.length;u=0;i--){var o=e.charCodeAt(i);if(32===o||9===o||!n&&s.isUpperAsciiLetter(o)||95===o)return i-1;if(n&&i=0;o--){var r=e.charCodeAt(o),s=t.get(r);if(0===s){if(2===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=1}else if(2===s){if(1===i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1));i=2 }else if(1===s&&0!==i)return this._createWord(e,i,s,o+1,this._findEndOfWord(e,t,i,o+1))}return 0!==i?this._createWord(e,i,1,0,this._findEndOfWord(e,t,i,0)):null},e._findEndOfWord=function(e,t,n,i){for(var o=e.length,r=i;r=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,r){var s=o.lineNumber,a=o.column;1===a&&s>1&&(s-=1,a=n.getLineMaxColumn(s));var l=e._findPreviousWordOnLine(t,n,new i.Position(s,a));return 0===r?(l&&2===l.wordType&&l.end-l.start==1&&0===l.nextCharClass&&(l=e._findPreviousWordOnLine(t,n,new i.Position(s,l.start+1))),a=l?l.start+1:1):(l&&a<=l.end+1&&(l=e._findPreviousWordOnLine(t,n,new i.Position(s,l.start+1))),a=l?l.end+1:1),new i.Position(s,a)},e.moveWordRight=function(t,n,o,r){var s=o.lineNumber,a=o.column;a===n.getLineMaxColumn(s)&&s=l.start+1&&(l=e._findNextWordOnLine(t,n,new i.Position(s,l.end+1))),a=l?l.start+1:n.getLineMaxColumn(s)),new i.Position(s,a)}, e._deleteWordLeftWhitespace=function(e,t){var n=e.getLineContent(t.lineNumber),i=t.column-2,o=s.lastNonWhitespaceIndex(n,i);return o+11?d=1:(u--,d=n.getLineMaxColumn(u)):(h&&d<=h.end+1&&(h=e._findPreviousWordOnLine(t,n,new i.Position(u,h.start+1))),h?d=h.end+1:d>1?d=1:(u--,d=n.getLineMaxColumn(u))),new a.Range(u,d,l.lineNumber,l.column)},e._findFirstNonWhitespaceChar=function(e,t){for(var n=e.length,i=t;i=f.start+1&&(f=e._findNextWordOnLine(t,n,new i.Position(u,f.end+1))),f?d=f.start+1:d1?new i.Position(r-1,t.getLineMaxColumn(r-1)):n;var a=d.moveWordLeft(e,t,n,o),u=l(t.getLineContent(r),s-2),c=new i.Position(r,u+2);return c.isBeforeOrEqual(a)?a:c},t.moveWordPartRight=function(e,t,n,o){var r=n.lineNumber,s=n.column;if(s===t.getLineMaxColumn(r))return rd&&(c=d,h=e.model.getLineMaxColumn(c)), n.CursorState.fromModelState(new n.SingleCursorState(new o.Range(l.lineNumber,1,c,h),0,new i.Position(c,h),0))}var p=t.modelState.selectionStart.getStartPosition().lineNumber;if(l.lineNumberp){var d=e.viewModel.getLineCount(),f=u.lineNumber+1,g=1;return f>d&&(f=d,g=e.viewModel.getLineMaxColumn(f)),n.CursorState.fromViewState(t.viewState.move(t.modelState.hasSelection(),f,g,0))}var m=t.modelState.selectionStart.getEndPosition();return n.CursorState.fromModelState(t.modelState.move(t.modelState.hasSelection(),m.lineNumber,m.column,0))},e.word=function(e,t,i,o){var r=e.model.validatePosition(o);return n.CursorState.fromModelState(s.WordOperations.word(e.config,e.model,t.modelState,i,r))},e.cancelSelection=function(e,t){if(!t.modelState.hasSelection())return new n.CursorState(t.modelState,t.viewState);var r=t.viewState.position.lineNumber,s=t.viewState.position.column ;return n.CursorState.fromViewState(new n.SingleCursorState(new o.Range(r,s,r,s),0,new i.Position(r,s),0))},e.moveTo=function(e,t,o,r,s){var a=e.model.validatePosition(r),l=s?e.validateViewPosition(new i.Position(s.lineNumber,s.column),a):e.convertModelPositionToViewPosition(a);return n.CursorState.fromViewState(t.viewState.move(o,l.lineNumber,l.column,0))},e.move=function(e,t,n){var i=n.select,o=n.value;switch(n.direction){case 0:return 4===n.unit?this._moveHalfLineLeft(e,t,i):this._moveLeft(e,t,i,o);case 1:return 4===n.unit?this._moveHalfLineRight(e,t,i):this._moveRight(e,t,i,o);case 2:return 2===n.unit?this._moveUpByViewLines(e,t,i,o):this._moveUpByModelLines(e,t,i,o);case 3:return 2===n.unit?this._moveDownByViewLines(e,t,i,o):this._moveDownByModelLines(e,t,i,o);case 4:return this._moveToViewMinColumn(e,t,i);case 5:return this._moveToViewFirstNonWhitespaceColumn(e,t,i);case 6:return this._moveToViewCenterColumn(e,t,i);case 7:return this._moveToViewMaxColumn(e,t,i);case 8: return this._moveToViewLastNonWhitespaceColumn(e,t,i);case 9:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._firstLineNumberInRange(e.model,s,o),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,l)];case 11:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=this._lastLineNumberInRange(e.model,s,o),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,l)];case 10:var r=t[0],s=e.getCompletelyVisibleModelRange(),a=Math.round((s.startLineNumber+s.endLineNumber)/2),l=e.model.getLineFirstNonWhitespaceColumn(a);return[this._moveToModelPosition(e,r,i,a,l)];case 12:for(var u=e.getCompletelyVisibleViewRange(),d=[],c=0,h=t.length;ci.endLineNumber-1&&(r=i.endLineNumber-1), rn)for(var r=t-n,o=0;o=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)},e.prototype._getAll=function(){var e=[];e[0]=this.primaryCursor;for(var t=0,n=this.secondaryCursors.length;tp&&t[w].index--;e.splice(p,1),t.splice(h,1),this._removeSecondaryCursor(p-1),s--}}}}},e}();t.CursorCollection=r}),define(t[382],n([1,0,299,6,10,381,3,21,66,38,176,139,54,78,9,24]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}) ;var v=function(){return function(e,t,n){this.selections=e,this.source=t,this.reason=n}}();t.CursorStateChangedEvent=v;var _=function(){function e(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getAll()}return e.prototype.equals=function(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(var t=0,n=this.cursorState.length;tt.MAX_CURSOR_COUNT&&(i=i.slice(0,t.MAX_CURSOR_COUNT),this._onDidReachMaxCursorCount.fire(void 0));var o=new _(this._model,this);this._cursors.setStates(i),this._cursors.normalize(),this._columnSelectData=null,this._emitStateChangedIfNecessary(e,n,o)},t.prototype.setColumnSelectData=function(e){this._columnSelectData=e},t.prototype.reveal=function(e,t,n){this._revealRange(t,0,e,n)},t.prototype.revealRange=function(e,t,n,i){this.emitCursorRevealRange(t,n,e,i)},t.prototype.scrollTo=function(e){this._viewModel.viewLayout.setScrollPositionSmooth({scrollTop:e})}, t.prototype.saveState=function(){for(var e=[],t=this._cursors.getSelections(),n=0,i=t.length;n1)return;var l=new a.Range(r.lineNumber,r.column,r.lineNumber,r.column);this.emitCursorRevealRange(l,t,n,i)},t.prototype.emitCursorRevealRange=function(e,t,n,i){try{this._beginEmit().emit(new f.ViewRevealRangeRequestEvent(e,t,n,i))}finally{this._endEmit()}},t.prototype.trigger=function(e,t,n){var i=u.Handler;if(t!==i.CompositionStart)if(t===i.CompositionEnd&&(this._isDoingComposition=!1),this._configuration.editor.readOnly)this._onDidAttemptReadOnlyEdit.fire(void 0);else{var o=new _(this._model,this),s=p.CursorChangeReason.NotSet ;t!==i.Undo&&t!==i.Redo&&this._cursors.stopTrackingSelections(),this._cursors.ensureValidState(),this._isHandling=!0;try{switch(t){case i.Type:this._type(e,n.text);break;case i.ReplacePreviousChar:this._replacePreviousChar(n.text,n.replaceCharCnt);break;case i.Paste:s=p.CursorChangeReason.Paste,this._paste(n.text,n.pasteOnNewLine,n.multicursorText);break;case i.Cut:this._cut();break;case i.Undo:s=p.CursorChangeReason.Undo,this._interpretCommandResult(this._model.undo());break;case i.Redo:s=p.CursorChangeReason.Redo,this._interpretCommandResult(this._model.redo());break;case i.ExecuteCommand:this._externalExecuteCommand(n);break;case i.ExecuteCommands:this._externalExecuteCommands(n);break;case i.CompositionEnd:this._interpretCompositionEnd(e)}}catch(e){r.onUnexpectedError(e)}this._isHandling=!1,t!==i.Undo&&t!==i.Redo&&this._cursors.startTrackingSelections(),this._emitStateChangedIfNecessary(e,s,o)&&this._revealRange(0,0,!0,0)}else this._isDoingComposition=!0},t.prototype._interpretCompositionEnd=function(e){ this._isDoingComposition||"keyboard"!==e||this._executeEditOperation(h.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections()))},t.prototype._type=function(e,t){if(this._isDoingComposition||"keyboard"!==e)this._executeEditOperation(h.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.config,this.context.model,this.getSelections(),t));else for(var n=0,o=t.length;n0&&(r[0]._isTracked=!0);var u=e.model.pushEditOperations(e.selectionsBefore,r,function(n){for(var i=[],o=0;o0?(i[n].sort(s),a[n]=t[n].computeCursorState(e.model,{getInverseEditOperations:function(){return i[n]}, getTrackedSelection:function(t){var n=parseInt(t,10),i=e.model._getTrackedRange(e.trackedRanges[n]);return e.trackedRangesDirection[n]===l.SelectionDirection.LTR?new l.Selection(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new l.Selection(i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn)}})):a[n]=e.selectionsBefore[n]},o=0;oo.identifier.major?i.identifier.major:o.identifier.major).toString()]=!0;for(var s=0;s0&&n--}}return t},e}()}),define(t[182],n([1,0,6,17,60,99]),function(e,t,n,i,o,r){"use strict";function s(e,t){return function(e,t){for(var i='
    ',o=e.split(/\r\n|\r|\n/),s=t.getInitialState(),a=0,l=o.length;a0&&(i+="
    ");var d=t.tokenize2(u,s,0);r.LineTokens.convertToEndOffset(d.tokens,u.length);for(var c=new r.LineTokens(d.tokens,u).inflate(),h=0,p=0,f=c.getCount();p'+n.escape(u.substring(h,m))+"",h=m}s=d.endState}return i+="
    "}(e,function(e){var t=i.TokenizationRegistry.get(e);if(t)return t;return{ getInitialState:function(){return o.NULL_STATE},tokenize:void 0,tokenize2:function(e,t,n){return o.nullTokenize2(0,e,t,n)}}}(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.tokenizeToString=s,t.tokenizeLineToHTML=function(e,t,n,i,o,r){for(var s="
    ",a=i,l=0,u=0,d=t.getCount();u0;)h+=" ",f--;break;case 60:h+="<";break;case 62:h+=">";break;case 38:h+="&";break;case 0:h+="�";break;case 65279:case 8232:h+="�";break;case 13:h+="​";break;default:h+=String.fromCharCode(p)}}if(s+=''+h+"",c>o||a>=o)break}}return s+="
    "}}),define(t[107],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITextModelService=n.createDecorator("textModelService")}),define(t[187],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}), t.ITextResourceConfigurationService=n.createDecorator("textResourceConfigurationService")});var u=this&&this.__param||function(e,t){return function(n,i){t(n,i,e)}};define(t[189],n([1,0,14,2,13,160,470,17,48,220,41,187]),function(e,t,n,i,r,s,l,d,c,h,p,f){"use strict";function g(e,t){var n=e.getModel(t);return!!n&&!n.isTooLargeForSyncing()}Object.defineProperty(t,"__esModule",{value:!0});var m=6e4,v=3e5,_=function(e){function t(t,i){var o=e.call(this)||this;return o._modelService=t,o._workerManager=o._register(new C(o._modelService)),o._register(d.LinkProviderRegistry.register("*",{provideLinks:function(e,t){return g(o._modelService,e.uri)?n.wireCancellationToken(t,o._workerManager.withWorker().then(function(t){return t.computeLinks(e.uri)})):r.TPromise.as([])}})),o._register(d.SuggestRegistry.register("*",new y(o._workerManager,i,o._modelService))),o}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.canComputeDiff=function(e,t){ return g(this._modelService,e)&&g(this._modelService,t)},t.prototype.computeDiff=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.computeDiff(e,t,n)})},t.prototype.computeMoreMinimalEdits=function(e,t){return Array.isArray(t)&&0!==t.length&&g(this._modelService,e)?this._workerManager.withWorker().then(function(n){return n.computeMoreMinimalEdits(e,t)}):r.TPromise.as(t)},t.prototype.canNavigateValueSet=function(e){return g(this._modelService,e)},t.prototype.navigateValueSet=function(e,t,n){return this._workerManager.withWorker().then(function(i){return i.navigateValueSet(e,t,n)})},t=a([u(0,c.IModelService),u(1,f.ITextResourceConfigurationService)],t)}(i.Disposable);t.EditorWorkerServiceImpl=_;var y=function(){function e(e,t,n){this._workerManager=e,this._configurationService=t,this._modelService=n}return e.prototype.provideCompletionItems=function(e,t){ if(this._configurationService.getValue(e.uri,t,"editor").wordBasedSuggestions&&g(this._modelService,e.uri))return this._workerManager.withWorker().then(function(n){return n.textualSuggest(e.uri,t)})},e}(),C=function(e){function t(t){var i=e.call(this)||this;i._modelService=t,i._editorWorkerClient=null;return i._register(new n.IntervalTimer).cancelAndSet(function(){return i._checkStopIdleWorker()},Math.round(v/2)),i._register(i._modelService.onModelRemoved(function(e){return i._checkStopEmptyWorker()})),i}return o(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){0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}},t.prototype._checkStopIdleWorker=function(){if(this._editorWorkerClient){(new Date).getTime()-this._lastWorkerUsedTime>v&&(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")),r.TPromise.as(this._editorWorkerClient)},t}(i.Disposable),b=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(m/2)),r._register(s)}return r}return o(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;tm&&t.push(n)}for(var i=0;i=.5,this._onDidChange.fire(void 0)},e.prototype.getColor=function(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]},e.prototype.backgroundIsLight=function(){return this._backgroundIsLight},e._INSTANCE=null,e}();t.MinimapTokensColorTracker=r;var s=function(){function e(t,n){if(760!==t.length)throw new Error("Invalid x2CharData");if(190!==n.length)throw new Error("Invalid x1CharData");this.x2charData=t,this.x1charData=n,this.x2charDataLight=e.soften(t,.8),this.x1charDataLight=e.soften(n,50/60)}return e.soften=function(e,t){ for(var n=new Uint8ClampedArray(e.length),i=0,o=e.length;it.width||i+4>t.height)console.warn("bad render request outside image data");else{var l=a?this.x2charDataLight:this.x2charData,u=e._getChIndex(o),d=4*t.width,c=s.r,h=s.g,p=s.b,f=r.r-c,g=r.g-h,m=r.b-p,v=t.data,_=4*u*2,y=i*d+4*n,C=l[_]/255;v[y+0]=c+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=l[_+1]/255;v[y+4]=c+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C,y+=d;C=l[_+2]/255;v[y+0]=c+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=l[_+3]/255;v[y+4]=c+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C,y+=d;C=l[_+4]/255;v[y+0]=c+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=l[_+5]/255;v[y+4]=c+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C,y+=d;C=l[_+6]/255;v[y+0]=c+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C;C=l[_+7]/255;v[y+4]=c+f*C,v[y+5]=h+g*C,v[y+6]=p+m*C}},e.prototype.x1RenderChar=function(t,n,i,o,r,s,a){if(n+1>t.width||i+2>t.height)console.warn("bad render request outside image data");else{ var l=a?this.x1charDataLight:this.x1charData,u=e._getChIndex(o),d=4*t.width,c=s.r,h=s.g,p=s.b,f=r.r-c,g=r.g-h,m=r.b-p,v=t.data,_=2*u*1,y=i*d+4*n,C=l[_]/255;v[y+0]=c+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C,y+=d;C=l[_+1]/255;v[y+0]=c+f*C,v[y+1]=h+g*C,v[y+2]=p+m*C}},e.prototype.x2BlockRenderChar=function(e,t,n,i,o,r){if(t+2>e.width||n+4>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,l=o.g,u=o.b,d=a+.5*(i.r-a),c=l+.5*(i.g-l),h=u+.5*(i.b-u),p=e.data,f=n*s+4*t;p[f+0]=d,p[f+1]=c,p[f+2]=h,p[f+4]=d,p[f+5]=c,p[f+6]=h,p[(f+=s)+0]=d,p[f+1]=c,p[f+2]=h,p[f+4]=d,p[f+5]=c,p[f+6]=h,p[(f+=s)+0]=d,p[f+1]=c,p[f+2]=h,p[f+4]=d,p[f+5]=c,p[f+6]=h,p[(f+=s)+0]=d,p[f+1]=c,p[f+2]=h,p[f+4]=d,p[f+5]=c,p[f+6]=h}},e.prototype.x1BlockRenderChar=function(e,t,n,i,o,r){if(t+1>e.width||n+2>e.height)console.warn("bad render request outside image data");else{var s=4*e.width,a=o.r,l=o.g,u=o.b,d=a+.5*(i.r-a),c=l+.5*(i.g-l),h=u+.5*(i.b-u),p=e.data,f=n*s+4*t;p[f+0]=d,p[f+1]=c,p[f+2]=h,p[(f+=s)+0]=d,p[f+1]=c,p[f+2]=h}}, e}();t.MinimapCharRenderer=s}),define(t[389],n([1,0,108]),function(e,t,n){"use strict";function i(e){for(var t=new Uint8ClampedArray(e.length),n=0,i=e.length;n=l&&f<=d,m=u(this.linePositionMapperFactory,n[p],this.tabSize,this.wrappingColumn,this.columnsForFullWidthChar,this.wrappingIndent,!g);s[p]=m.getViewLineCount(),this.lines[p]=m}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new o.PrefixSumComputerWithCache(s)},e.prototype.getHiddenAreas=function(){var e=this;return this.hiddenAreasIds.map(function(t){return e.model.getDecorationRange(t)})},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,l=n.length;as+1?(o.push(new i.Range(r,1,s,1)),r=u.startLineNumber,s=u.endLineNumber):u.endLineNumber>s&&(s=u.endLineNumber)} return o.push(new i.Range(r,1,s,1)),o},e.prototype.setHiddenAreas=function(e){var t=this,n=this._reduceRanges(e),o=this.hiddenAreasIds.map(function(e){return t.model.getDecorationRange(e)}).sort(i.Range.compareRangesUsingStarts);if(n.length===o.length){for(var r=!1,s=0;s=d&&g<=c?this.lines[s].isVisible()&&(this.lines[s]=this.lines[s].setVisible(!1),m=!0):(f=!0,this.lines[s].isVisible()||(this.lines[s]=this.lines[s].setVisible(!0),m=!0)),m){var v=this.lines[s].getViewLineCount();this.prefixSumComputer.changeValue(s,v)}}return f||this.setHiddenAreas([]),!0}, e.prototype.modelPositionIsVisible=function(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()},e.prototype.setTabSize=function(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1),!0)},e.prototype.setWrappingSettings=function(e,t,n){return(this.wrappingIndent!==e||this.wrappingColumn!==t||this.columnsForFullWidthChar!==n)&&(this.wrappingIndent=e,this.wrappingColumn=t,this.columnsForFullWidthChar=n,this._constructLines(!1),!0)},e.prototype.onModelFlushed=function(){this._constructLines(!0)},e.prototype.onModelLinesDeleted=function(e,t,n){if(e<=this._validModelVersionId)return null;var i=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,o=this.prefixSumComputer.getAccumulatedValue(n-1);return this.lines.splice(t-1,n-t+1),this.prefixSumComputer.removeValues(t-1,n-t+1),new s.ViewLinesDeletedEvent(i,o)},e.prototype.onModelLinesInserted=function(e,t,i,o){if(e<=this._validModelVersionId)return null ;for(var r=this.getHiddenAreas(),a=!1,l=new n.Position(t,1),d=0;dl?(m=(g=(h=(c=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1)+l-1)+1)+(o-l)-1,d=!0):ot?t:e},e.prototype.warmUpLookupCache=function(e,t){this.prefixSumComputer.warmUpCache(e-1,t-1)},e.prototype.getActiveIndentGuide=function(e,t,n){this._ensureValidState(),e=this._toValidViewLineNumber(e), t=this._toValidViewLineNumber(t),n=this._toValidViewLineNumber(n);var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),s=this.model.getActiveIndentGuide(i.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,1);return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}},e.prototype.getViewLinesIndentGuides=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);for(var i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t)),r=[],s=[],a=[],l=i.lineNumber-1,u=o.lineNumber-1,d=null,c=l;c<=u;c++){var h=this.lines[c];if(h.isVisible()){ var p=h.getViewLineNumberOfModelPosition(0,c===l?i.column:1),f=h.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(c+1)),g=0;(S=f-p+1)>1&&1===h.getViewLineMinColumn(this.model,c+1,f)&&(g=0===p?1:2),s.push(S),a.push(g),null===d&&(d=new n.Position(c+1,0))}else null!==d&&(r=r.concat(this.model.getLinesIndentGuides(d.lineNumber,c)),d=null)}null!==d&&(r=r.concat(this.model.getLinesIndentGuides(d.lineNumber,o.lineNumber)),d=null);for(var m=t-e+1,v=new Array(m),_=0,y=0,C=r.length;yt&&(p=!0,h=t-o+1);var f=c+h;if(d.getViewLinesData(this.model,l+1,c,f,o-e,n,a),o+=h,p)break}}return a},e.prototype.validateViewPosition=function(e,t,i){this._ensureValidState(),e=this._toValidViewLineNumber(e);var o=this.prefixSumComputer.getIndexOf(e-1),r=o.index,s=o.remainder,a=this.lines[r],l=a.getViewLineMinColumn(this.model,r+1,s),u=a.getViewLineMaxColumn(this.model,r+1,s);tu&&(t=u);var d=a.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new n.Position(r+1,d)).equals(i)?new n.Position(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)},e.prototype.convertViewPositionToModelPosition=function(e,t){this._ensureValidState(),e=this._toValidViewLineNumber(e);var i=this.prefixSumComputer.getIndexOf(e-1),o=i.index,r=i.remainder,s=this.lines[o].getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new n.Position(o+1,s))}, e.prototype.convertModelPositionToViewPosition=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 l=1+(0===s?0:this.prefixSumComputer.getAccumulatedValue(s-1));return a?this.lines[s].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(s+1)):this.lines[o-1].getViewPositionOfModelPosition(l,r)},e.prototype._getViewLineNumberForModelPosition=function(e,t){var n=e-1;if(this.lines[n].isVisible()){var i=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(i,t)}for(;n>0&&!this.lines[n].isVisible();)n--;if(0===n&&!this.lines[n].isVisible())return 1;var o=1+(0===n?0:this.prefixSumComputer.getAccumulatedValue(n-1));return this.lines[n].getViewLineNumberOfModelPosition(o,this.model.getLineMaxColumn(n+1))}, e.prototype.getAllOverviewRulerDecorations=function(e,t,n){for(var i=this.model.getOverviewRulerDecorations(e,t),o=new y,r=0,s=i.length;r0&&(r=this.wrappedIndent+r),r},e.prototype.getViewLineLength=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n)-i;return n>0&&(o=this.wrappedIndent.length+o),o},e.prototype.getViewLineMinColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return n>0?this.wrappedIndentLength+1:1},e.prototype.getViewLineMaxColumn=function(e,t,n){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,n).length+1},e.prototype.getViewLineData=function(e,t,n){if(!this._isVisible)throw new Error("Not supported") ;var i=this.getInputStartOffsetOfOutputLineIndex(n),o=this.getInputEndOffsetOfOutputLineIndex(e,t,n),s=e.getValueInRange({startLineNumber:t,startColumn:i+1,endLineNumber:t,endColumn:o+1});n>0&&(s=this.wrappedIndent+s);var a=n>0?this.wrappedIndentLength+1:1,l=s.length+1,u=n+10&&(d=this.wrappedIndentLength);var c=e.getLineTokens(t);return new r.ViewLineData(s,u,a,l,c.sliceAndInflate(i,o,d))},e.prototype.getViewLinesData=function(e,t,n,i,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(var a=n;a0&&(n0&&(r+=this.wrappedIndentLength),new n.Position(e+o,r)},e.prototype.getViewLineNumberOfModelPosition=function(e,t){if(!this._isVisible)throw new Error("Not supported");return e+this.positionMapper.getOutputPositionOfInputOffset(t-1).outputLineIndex},e}();t.SplitLine=m;var v=function(){function e(e){this._lines=e}return e.prototype._validPosition=function(e){return this._lines.model.validatePosition(e)},e.prototype._validRange=function(e){return this._lines.model.validateRange(e)},e.prototype.convertViewPositionToModelPosition=function(e){return this._validPosition(e)},e.prototype.convertViewRangeToModelRange=function(e){return this._validRange(e)},e.prototype.validateViewPosition=function(e,t){return this._validPosition(t)},e.prototype.validateViewRange=function(e,t){return this._validRange(t)},e.prototype.convertModelPositionToViewPosition=function(e){return this._validPosition(e)}, e.prototype.convertModelRangeToViewRange=function(e){return this._validRange(e)},e.prototype.modelPositionIsVisible=function(e){var t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)},e}();t.IdentityCoordinatesConverter=v;var _=function(){function e(e){this.model=e}return e.prototype.dispose=function(){},e.prototype.createCoordinatesConverter=function(){return new v(this)},e.prototype.getHiddenAreas=function(){return[]},e.prototype.setHiddenAreas=function(e){return!1},e.prototype.setTabSize=function(e){return!1},e.prototype.setWrappingSettings=function(e,t,n){return!1},e.prototype.onModelFlushed=function(){},e.prototype.onModelLinesDeleted=function(e,t,n){return new s.ViewLinesDeletedEvent(t,n)},e.prototype.onModelLinesInserted=function(e,t,n,i){return new s.ViewLinesInsertedEvent(t,n)},e.prototype.onModelLineChanged=function(e,t,n){return[!1,new s.ViewLinesChangedEvent(t,t),null,null]},e.prototype.acceptVersionId=function(e){},e.prototype.getViewLineCount=function(){ return this.model.getLineCount()},e.prototype.warmUpLookupCache=function(e,t){},e.prototype.getActiveIndentGuide=function(e,t,n){return{startLineNumber:e,endLineNumber:e,indent:0}},e.prototype.getViewLinesIndentGuides=function(e,t){for(var n=t-e+1,i=new Array(n),o=0;o=t)return void(n>s&&(o[o.length-1]=n));o.push(i,t,n)}else this.result[e]=[i,t,n]},e}()}),define(t[391],n([1,0,6,129,191,83,94,47]),function(e,t,n,i,r,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(t,n,i){for(var o=e.call(this,0)||this,r=0;r=12352&&t<=12543||t>=13312&&t<=19903||t>=19968&&t<=40959?4:e.prototype.get.call(this,t)},t}(s.CharacterClassifier),d=function(){function e(e,t,n){this.classifier=new u(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,o,r,s,u){if(-1===r)return null;o=+o,r=+r,s=+s;var d=0,h="",p=-1;if((u=+u)!==l.WrappingIndent.None&&-1!==(p=n.firstNonWhitespaceIndex(t))){h=t.substring(0,p);for(L=0;Lr&&(h="",d=0)}for(var g=this.classifier,m=0,v=[],_=0,y=0,C=-1,b=0,S=-1,w=0,E=t.length,L=0;L0){var M=t.charCodeAt(L-1);1!==g.get(M)&&(C=L,b=d)}var D=1 ;if(n.isFullWidthCharacter(x)&&(D=s),(y=e.nextVisibleColumn(y,o,N,D))>r&&0!==L){var T=void 0,k=void 0;-1!==C&&b<=r?(T=C,k=b):-1!==S&&w<=r?(T=S,k=w):(T=L,k=d),v[_++]=T-m,m=T,y=e.nextVisibleColumn(k,o,N,D),C=-1,b=0,S=-1,w=0}if(-1!==C&&(b=e.nextVisibleColumn(b,o,N,D)),-1!==S&&(w=e.nextVisibleColumn(w,o,N,D)),2===I&&(u===l.WrappingIndent.None||L>=p)&&(C=L+1,b=d),4===I&&L=2&&e.viewportStartLineTrackedRange){var m=e.model._getTrackedRange(e.viewportStartLineTrackedRange);if(m){var v=e.coordinatesConverter.convertModelPositionToViewPosition(m.getStartPosition()),_=e.viewLayout.getVerticalOffsetForLineNumber(v.lineNumber);e.viewLayout.deltaScrollNow(0,_-e.viewportStartLineTop)}}})), this._register(this.model.onDidChangeTokens(function(t){for(var n=[],o=0,r=t.ranges.length;ol||(s0&&l[d-1]===l[d]||(u+=this.model.getLineContent(l[d])+s);return u} for(var c=[],d=0;d'+this._getHTMLToCopy(n,s)+""},t.prototype._getHTMLToCopy=function(e,t){for(var n=e.startLineNumber,i=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize(),l="",u=n;u<=o;u++){ var d=this.model.getLineTokens(u),c=d.getLineContent(),h=u===n?i-1:0,p=u===o?r-1:c.length;l+=""===c?"
    ":a.tokenizeLineToHTML(c,d.inflate(),t,h,p,s)}return l},t.prototype._getColorMap=function(){for(var e=s.TokenizationRegistry.getColorMap(),t=[null],n=1,i=e.length;n=t._editor.getModel().getLineCount()&&t._futureFixes.cancel()})),this._disposables.push(n.addStandardDisposableListener(this._domNode,"click",function(e){t._editor.focus();var i=n.getDomNodePagePosition(t._domNode),o=i.top,r=i.height,s=t._editor.getConfiguration().lineHeight,a=Math.floor(s/3);t._position&&t._position.position.lineNumber0?i.isEmpty()&&e.every(function(e){return e.kind&&u.CodeActionKind.Refactor.contains(e.kind)})?t.hide():t._show():t.hide()}).catch(function(e){t.hide()})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._domNode.title},set:function(e){this._domNode.title=e},enumerable:!0,configurable:!0}), e.prototype._show=function(){var t=this._editor.getConfiguration();if(t.contribInfo.lightbulbEnabled){var n=this._model.position.lineNumber,i=this._editor.getModel();if(i){var o=i.getOptions().tabSize,r=i.getLineContent(n),s=l.TextModel.computeIndentLevel(r,o),a=n;t.fontInfo.spaceWidth*s>22||(n>1?a-=1:a+=1),this._position={position:{lineNumber:a,column:1},preference:e._posPref},this._editor.layoutContentWidget(this)}}},e.prototype.hide=function(){this._position=null,this._model=null,this._futureFixes.cancel(),this._editor.layoutContentWidget(this)},e._posPref=[a.ContentWidgetPositionPreference.EXACT],e}();t.LightBulbWidget=d}),define(t[394],n([1,0,24,29]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){this.editor=e,this.autoHideFoldingControls=!0}return e.prototype.getDecorationOption=function(t){return t?e.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:e.EXPANDED_VISUAL_DECORATION}, e.prototype.deltaDecorations=function(e,t){return this.editor.deltaDecorations(e,t)},e.prototype.changeDecorations=function(e){return this.editor.changeDecorations(e)},e.COLLAPSED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,afterContentClassName:"inline-folded",linesDecorationsClassName:"folding collapsed"}),e.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding"}),e.EXPANDED_VISUAL_DECORATION=i.ModelDecorationOptions.register({stickiness:n.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,linesDecorationsClassName:"folding alwaysShowFoldIcons"}),e}();t.FoldingDecorationProvider=o}),define(t[395],n([1,0,109,29,13,41]),function(e,t,n,i,o,r){"use strict";function s(e,t,n,o){void 0===o&&(o=a);var r=e.getOptions().tabSize,s=new u(o),l=void 0;n&&(l=new RegExp("("+n.start.source+")|(?:"+n.end.source+")"));var d=[];d.push({ indent:-1,line:e.getLineCount()+1,marker:!1});for(var c=e.getLineCount();c>0;c--){var h=e.getLineContent(c),p=i.TextModel.computeIndentLevel(h,r),f=d[d.length-1];if(-1!==p){var g=void 0;if(l&&(g=h.match(l))){if(!g[1]){d.push({indent:-2,line:c,marker:!0});continue}for(var m=d.length-1;m>0&&!d[m].marker;)m--;if(m>0){d.length=m+1,f=d[m],s.insertFirst(c,f.line,p),f.marker=!1,f.indent=p,f.line=c;continue}}if(f.indent>p){do{d.pop(),f=d[d.length-1]}while(f.indent>p);var v=f.line-1;v-c>=1&&s.insertFirst(c,v,p)}f.indent===p?f.line=c:d.push({indent:p,line:c,marker:!1})}else t&&!f.marker&&(f.line=c)}return s.toIndentRanges(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=5e3;t.ID_INDENT_PROVIDER="indent";var l=function(){function e(e){this.editorModel=e,this.id=t.ID_INDENT_PROVIDER}return e.prototype.dispose=function(){},e.prototype.compute=function(e){var t=r.LanguageConfigurationRegistry.getFoldingRules(this.editorModel.getLanguageIdentifier().id),n=t&&t.offSide,i=t&&t.markers ;return o.TPromise.as(s(this.editorModel,n,i))},e}();t.IndentRangeProvider=l;var u=function(){function e(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}return e.prototype.insertFirst=function(e,t,i){if(!(e>n.MAX_LINE_NUMBER||t>n.MAX_LINE_NUMBER)){var o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}},e.prototype.toIndentRanges=function(e){if(this._length<=this._foldingRangesLimit){for(var t=new Uint32Array(this._length),o=new Uint32Array(this._length),r=this._length-1,s=0;r>=0;r--,s++)t[s]=this._startIndexes[r],o[s]=this._endIndexes[r];return new n.FoldingRegions(t,o)}for(var a=0,l=this._indentOccurrences.length,r=0;rthis._foldingRangesLimit){l=r;break}a+=u}} for(var d=e.getOptions().tabSize,t=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit),r=this._length-1,s=0;r>=0;r--){var c=this._startIndexes[r],h=e.getLineContent(c),p=i.TextModel.computeIndentLevel(h,d);(p=l.startLineNumber+1&&t<=l.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t)};var w=r.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(g,1),l.startLineNumber+1,c);if(null!==w){ y=n.getLeadingWhitespace(e.getLineContent(l.startLineNumber));if((C=a.getSpaceCnt(w,u))!==(N=a.getSpaceCnt(y,u))){I=C-N;this.getIndentEditsOfMovingBlock(e,t,l,u,d,I)}}}}else t.addEditOperation(new i.Range(l.startLineNumber,1,l.startLineNumber,1),v+"\n")}else if(g=l.startLineNumber-1,m=e.getLineContent(g),t.addEditOperation(new i.Range(g,1,g+1,1),null),t.addEditOperation(new i.Range(l.endLineNumber,e.getLineMaxColumn(l.endLineNumber),l.endLineNumber,e.getLineMaxColumn(l.endLineNumber)),"\n"+m),this.shouldAutoIndent(e,l)){h.getLineContent=function(t){return t===g?e.getLineContent(l.startLineNumber):e.getLineContent(t)};var E=this.matchEnterRule(e,c,u,l.startLineNumber,l.startLineNumber-2);if(null!==E)0!==E&&this.getIndentEditsOfMovingBlock(e,t,l,u,d,E);else{var L=r.LanguageConfigurationRegistry.getGoodIndentForLine(h,e.getLanguageIdAtPosition(l.startLineNumber,1),g,c);if(null!==L){var x=n.getLeadingWhitespace(e.getLineContent(l.startLineNumber)),C=a.getSpaceCnt(L,u),N=a.getSpaceCnt(x,u);if(C!==N){var I=C-N ;this.getIndentEditsOfMovingBlock(e,t,l,u,d,I)}}}}}this._selectionId=t.trackSelection(l)}},e.prototype.buildIndentConverter=function(e){return{shiftIndent:function(t){for(var n=s.ShiftCommand.shiftIndentCount(t,t.length+1,e),i="",o=0;o=1;){var h=void 0;h=c===u&&void 0!==d?d:e.getLineContent(c);if(n.lastNonWhitespaceIndex(h)>=0)break;c--}if(c<1||s>e.getLineCount())return null;var p=e.getLineMaxColumn(c),f=r.LanguageConfigurationRegistry.getEnterAction(e,new i.Range(c,p,c,p));if(f){var g=f.indentation,m=f.enterAction;m.indentAction===l.IndentAction.None?g=f.indentation+m.appendText:m.indentAction===l.IndentAction.Indent?g=f.indentation+m.appendText:m.indentAction===l.IndentAction.IndentOutdent?g=f.indentation:m.indentAction===l.IndentAction.Outdent&&(g=t.unshiftIndent(f.indentation)+m.appendText) ;var v=e.getLineContent(s);if(this.trimLeft(v).indexOf(this.trimLeft(g))>=0){var _=n.getLeadingWhitespace(e.getLineContent(s)),y=n.getLeadingWhitespace(g);2&r.LanguageConfigurationRegistry.getIndentMetadata(e,s)&&(y=t.unshiftIndent(y));return a.getSpaceCnt(y,o)-a.getSpaceCnt(_,o)}}return null},e.prototype.trimLeft=function(e){return e.replace(/^\s+/,"")},e.prototype.shouldAutoIndent=function(e,t){if(!this._autoIndent)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;var n=e.getLanguageIdAtPosition(t.startLineNumber,1);return n===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==r.LanguageConfigurationRegistry.getIndentRulesSupport(n)},e.prototype.getIndentEditsOfMovingBlock=function(e,t,o,r,s,l){for(var u=o.startLineNumber;u<=o.endLineNumber;u++){var d=e.getLineContent(u),c=n.getLeadingWhitespace(d),h=a.getSpaceCnt(c,r)+l,p=a.generateIndent(h,r,s);p!==c&&(t.addEditOperation(new i.Range(u,1,u,c.length+1),p), u===o.endLineNumber&&o.endColumn<=c.length+1&&""===p&&(this._moveEndLineSelectionShrink=!0))}},e.prototype.computeCursorState=function(e,t){var n=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber0&&0===e.minimapLeft?e.minimapWidth:0},e.prototype._onViewZoneTop=function(e){this.domNode.style.top=e+"px"},e.prototype._onViewZoneHeight=function(e){this.domNode.style.height=e+"px";var t=e-this._decoratingElementsHeight();this.container.style.height=t+"px";var n=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(n)),this._resizeSash.layout()},Object.defineProperty(e.prototype,"position",{get:function(){var e=this._positionMarkerId[0];if(e){var t=this.editor.getModel().getDecorationRange(e);if(t)return t.getStartPosition()}},enumerable:!0,configurable:!0}),e.prototype.show=function(e,t){var n=s.Range.isIRange(e)?e:new s.Range(e.lineNumber,e.column,e.lineNumber,e.column);this._isShowing=!0,this._showImpl(n,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:n,options:l.ModelDecorationOptions.EMPTY}])},e.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),this._arrow&&this._arrow.hide()},e.prototype._decoratingElementsHeight=function(){var e=this.editor.getConfiguration().lineHeight,t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t},e.prototype._showImpl=function(e,t){var n=this,i={lineNumber:e.startLineNumber,column:e.startColumn},o=this.editor.getLayoutInfo(),r=this._getWidth(o);this.domNode.style.width=r+"px",this.domNode.style.left=this._getLeft(o)+"px";var s=document.createElement("div");s.style.overflow="hidden";var a=this.editor.getConfiguration().lineHeight,l=this.editor.getLayoutInfo().height/a*.8;t>=l&&(t=l);var u=0,d=0;if(this.options.showArrow&&(u=Math.round(a/3),this._arrow.height=u,this._arrow.show(i)),this.options.showFrame&&(d=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 p(s,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 f("vs.editor.contrib.zoneWidget"+n._viewZone.id,n.domNode),n.editor.addOverlayWidget(n._overlayWidget)}),this.options.showFrame){var c=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=c+"px",this.container.style.borderBottomWidth=c+"px"}var h=t*a-this._decoratingElementsHeight();this.container.style.top=u+"px",this.container.style.height=h+"px",this.container.style.overflow="hidden",this._doLayout(h,r),this.options.keepEditorSelection||this.editor.setSelection(e);var g=Math.min(this.editor.getModel().getLineCount(),Math.max(1,e.endLineNumber+1));this.revealLine(g)}, e.prototype.revealLine=function(e){this.editor.revealLine(e,0)},e.prototype.setCssClass=function(e,t){t&&this.container.classList.remove(t),o.addClass(this.container,e)},e.prototype._onWidth=function(e){},e.prototype._doLayout=function(e,t){},e.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)})},e.prototype._initSash=function(){var e=this;this._resizeSash=new r.Sash(this.domNode,this,{orientation:r.Orientation.HORIZONTAL}),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=r.SashState.Disabled);var t;this._disposables.push(this._resizeSash.onDidStart(function(n){e._viewZone&&(t={startY:n.startY,heightInLines:e._viewZone.heightInLines})})),this._disposables.push(this._resizeSash.onDidEnd(function(){t=void 0})),this._disposables.push(this._resizeSash.onDidChange(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)}}))},e.prototype.getHorizontalSashLeft=function(){return 0},e.prototype.getHorizontalSashTop=function(){return parseInt(this.domNode.style.height)-this._decoratingElementsHeight()/2},e.prototype.getHorizontalSashWidth=function(){var e=this.editor.getLayoutInfo();return e.width-e.minimapWidth},e}();t.ZoneWidget=m}),define(t[399],n([1,0,13,17,96,99,6,63]),function(e,t,n,i,o,r,s,a){"use strict";function l(e,t,n){return function(e,t,n){for(var i=[],s=n.getInitialState(),l=0,u=e.length;l"),s=c.endState}return i.join("")}(e,t,n)} Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(){}return e.colorizeElement=function(e,t,n,i){var o=(i=i||{}).theme||"vs",r=i.mimeType||n.getAttribute("lang")||n.getAttribute("data-lang");if(r){e.setTheme(o);var s=n.firstChild.nodeValue;n.className+=" "+o;return this.colorize(t,s,r,i).then(function(e){n.innerHTML=e},function(e){return console.error(e)})}console.error("Mode not detected")},e._tokenizationSupportChangedPromise=function(e){var t=null,o=function(){t&&(t.dispose(),t=null)};return new n.TPromise(function(n,r){t=i.TokenizationRegistry.onDidChange(function(t){t.changedLanguages.indexOf(e)>=0&&(o(),n(void 0))})},o)},e.colorize=function(e,t,u,d){s.startsWithUTF8BOM(t)&&(t=t.substr(1));var c=t.split(/\r\n|\r|\n/),h=e.getModeId(u);void 0===(d=d||{}).tabSize&&(d.tabSize=4),e.getOrCreateMode(h);var p=i.TokenizationRegistry.get(h);return p?n.TPromise.as(l(c,d.tabSize,p)):n.TPromise.any([this._tokenizationSupportChangedPromise(h),n.TPromise.timeout(500)]).then(function(e){ var t=i.TokenizationRegistry.get(h);return t?l(c,d.tabSize,t):function(e,t){var n=[],i=new Uint32Array(2);i[0]=0,i[1]=16793600;for(var s=0,l=e.length;s")}return n.join("")}(c,d.tabSize)})},e.colorizeLine=function(e,t,n,i,r){void 0===r&&(r=4);var s=a.ViewLineRenderingData.isBasicASCII(e,t),l=a.ViewLineRenderingData.containsRTL(e,s,n);return o.renderViewLine2(new o.RenderLineInput(!1,e,!1,s,l,0,i,[],r,0,-1,"none",!1,!1)).html},e.colorizeModelLine=function(e,t,n){void 0===n&&(n=4);var i=e.getLineContent(t);e.forceTokenization(t);var o=e.getLineTokens(t).inflate();return this.colorizeLine(i,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,n)},e}();t.Colorizer=u}),define(t[400],n([1,0,17,190,95,60]),function(e,t,n,i,o,r){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});var s=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 a(e,t);var n=a.getStackElementId(e);n.length>0&&(n+="|"),n+=t;var i=this._entries[n];return i||(i=new a(e,t),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),a=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 s.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 s.create(this.parent,e)},e}(),l=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(){return this.state.clone()===this.state?this:new e(this.modeId,this.state)},e}(),u=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 d(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new d(e,t);var n=a.getStackElementId(e),i=this._entries[n];return i||(i=new d(e,null),this._entries[n]=i,i)},e._INSTANCE=new e(5),e}(),d=function(){function e(e,t){this.stack=e,this.embeddedModeData=t}return e.prototype.clone=function(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:u.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}(),c=Object.hasOwnProperty,h=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}(),p=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;a0&&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,s=t.embeddedModeData,a=t.stack,l=0,d=null,h=null,p=null,f=null;l=r)break;var E=this._lexer.tokenizer[_];E||(E=i.findRules(this._lexer,_))||i.throwError(this._lexer,"tokenizer state is not defined: "+_);F=e.substr(l);for(var L in E)if(c.call(E,L)){var x=E[L];if((0===l||!x.matchOnlyAtLineStart)&&(y=F.match(x.regex))){C=y[0],b=x.action;break}}}for(y||(y=[""],C=""),b||(l=this._lexer.maxStack?i.throwError(this._lexer,"maximum tokenizer stack size reached: ["+a.state+","+a.parent.state+",...]"):a=a.push(_);else if("@pop"===b.next)a.depth<=1?i.throwError(this._lexer,"trying to pop an empty stack in rule: "+S.name):a=a.pop();else if("@popall"===b.next)a=a.popall();else{var I=i.substituteMatches(this._lexer,b.next,C,y,_);"@"===I[0]&&(I=I.substr(1)),i.findRules(this._lexer,I)?a=a.push(I):i.throwError(this._lexer,"trying to set a next state '"+I+"' that is undefined in rule: "+S.name)}b.log&&"string"==typeof b.log&&i.log(this._lexer,this._lexer.languageId+": "+i.substituteMatches(this._lexer,b.log,C,y,_))}if(null===N&&i.throwError(this._lexer,"lexer rule has no well-defined action in rule: "+S.name),Array.isArray(N)){d&&d.length>0&&i.throwError(this._lexer,"groups cannot be nested: "+S.name), y.length!==N.length+1&&i.throwError(this._lexer,"matched number of groups does not match the number of actions in rule: "+S.name);for(var M=0,D=1;D=0){for(var i=[],r=0,a=this._placeholderGroups[this._placeholderGroupsIdx];r0&&this._editor.executeEdits("snippet.placeholderTransform",i)}return!0===t&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1), this._editor.getModel().changeDecorations(function(t){for(var i=new Set,o=[],r=0,a=n._placeholderGroups[n._placeholderGroupsIdx];r0},enumerable:!0,configurable:!0}),e.prototype.computePossibleSelections=function(){for(var e=new Map,t=0,n=this._placeholderGroups;t ")+'"'},e.prototype.insert=function(){var t=this,n=this._editor.getModel(),i=e.createEditsAndSnippets(this._editor,this._template,this._overwriteBefore,this._overwriteAfter,!1),o=i.edits,r=i.snippets;this._snippets=r;var a=n.pushEditOperations(this._editor.getSelections(),o,function(e){ return t._snippets[0].hasPlaceholder?t._move(!0):e.map(function(e){return s.Selection.fromPositions(e.range.getEndPosition())})});this._editor.setSelections(a),this._editor.revealRange(a[0])},e.prototype.merge=function(t,n,i){var o=this;void 0===n&&(n=0),void 0===i&&(i=0),this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,t]);var r=e.createEditsAndSnippets(this._editor,t,n,i,!0),a=r.edits,l=r.snippets;this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(),a,function(e){for(var t=0,n=o._snippets;t0},e}();t.SnippetSession=g}),define(t[34],n([1,0,2,33,15,166]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ICommandService=o.createDecorator("commandService"),t.CommandsRegistry=new(function(){function e(){this._commands=new Map}return e.prototype.registerCommand=function(e,t){var o=this;if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command") ;return this.registerCommand({id:e,handler:t})}if(e.description){for(var s=[],a=0,l=e.description.args;a=0){t=e.split("!=");return new d(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("==")>=0){t=e.split("==") ;return new u(t[0].trim(),this._deserializeValue(t[1]))}if(e.indexOf("=~")>=0){var t=e.split("=~");return new h(t[0].trim(),this._deserializeRegexValue(t[1]))}return/^\!\s*/.test(e)?new c(e.substr(1).trim()):new l(e)},e._deserializeValue=function(e){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;var t=/^'([^']*)'$/.exec(e);return t?t[1].trim():e},e._deserializeRegexValue=function(e){if(i.isFalsyOrWhitespace(e))return console.warn("missing regexp-value for =~-expression"),null;var t=e.indexOf("/"),n=e.lastIndexOf("/");if(t===n||t<0)return console.warn("bad regexp-value '"+e+"', missing /-enclosure"),null;var o=e.slice(t+1,n),r="i"===e[n+1]?"i":"";try{return new RegExp(o,r)}catch(t){return console.warn("bad regexp-value '"+e+"', parse error: "+t),null}},e}();t.ContextKeyExpr=a;var l=function(){function e(e){this.key=e}return e.prototype.getType=function(){return s.Defined},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){ return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyDefinedExpr=l;var u=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return s.Equals},e.prototype.cmp=function(e){return this.keye.key?1:this.valuee.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.getValue(this.key)==this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new l(this.key):new c(this.key):this},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyEqualsExpr=u;var d=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.getType=function(){return s.NotEquals},e.prototype.cmp=function(e){ return this.keye.key?1:this.valuee.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.getValue(this.key)!=this.value},e.prototype.normalize=function(){return"boolean"==typeof this.value?this.value?new c(this.key):new l(this.key):this},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotEqualsExpr=d;var c=function(){function e(e){this.key=e}return e.prototype.getType=function(){return s.Not},e.prototype.cmp=function(e){return this.keye.key?1:0},e.prototype.equals=function(t){return t instanceof e&&this.key===t.key},e.prototype.evaluate=function(e){return!e.getValue(this.key)},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyNotExpr=c;var h=function(){function e(e,t){this.key=e,this.regexp=t}return e.prototype.getType=function(){return s.Regex},e.prototype.cmp=function(e){ if(this.keye.key)return 1;var t=this.regexp?this.regexp.source:void 0;return te.regexp.source?1:0},e.prototype.equals=function(t){if(t instanceof e){var n=this.regexp?this.regexp.source:void 0;return this.key===t.key&&n===t.regexp.source}return!1},e.prototype.evaluate=function(e){return!!this.regexp&&this.regexp.test(e.getValue(this.key))},e.prototype.normalize=function(){return this},e.prototype.keys=function(){return[this.key]},e}();t.ContextKeyRegexExpr=h;var p=function(){function e(t){this.expr=e._normalizeArr(t)}return e.prototype.getType=function(){return s.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=0&&i.splice(e,1)}}},e.prototype.getMenuItems=function(e){var t=e.id,n=this._menuItems[t]||[];return t===d.CommandPalette.id&&this._appendImplicitItems(n),n},e.prototype._appendImplicitItems=function(e){ for(var t=new Set,n=0,i=e.filter(function(e){return l(e)});n0&&t.push([s,a])}return t},e._fillInKbExprKeys=function(e,t){if(e)for(var n=0,i=e.keys();ns)return 1 ;var a="string"==typeof e.command.title?e.command.title:e.command.title.value,l="string"==typeof t.command.title?t.command.title:t.command.title.value;return a.localeCompare(l)},e=a([u(2,s.ICommandService),u(3,o.IContextKeyService)],e)}();t.Menu=l}),define(t[77],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IContextViewService=n.createDecorator("contextViewService"),t.IContextMenuService=n.createDecorator("contextMenuService")}),define(t[411],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDialogService=n.createDecorator("dialogService")}),define(t[412],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IEnvironmentService=n.createDecorator("environmentService")}),define(t[106],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){for(var e=[],t=0;t0?o[0].index:n.length ;if(n.length!==c){console.warn("[createInstance] First service dependency of "+e.ctor.name+" at position "+(c+1)+" conflicts with "+n.length+" static arguments");var h=c-n.length;n=h>0?n.concat(new Array(h)):n.slice(0,c)}var p=[e.ctor];return p.push.apply(p,n),p.push.apply(p,r),i.create.apply(null,p)},e.prototype._getOrCreateServiceInstance=function(e){var t=this._services.get(e);return t instanceof s.SyncDescriptor?this._createAndCacheServiceInstance(e,t):t},e.prototype._createAndCacheServiceInstance=function(e,t){function n(){var e=new Error("[createInstance] cyclic dependency between services");throw e.message=i.toString(),e}o.ok(this._services.get(e)instanceof s.SyncDescriptor);for(var i=new r.Graph(function(e){return e.id.toString()}),l=0,u=[{id:e,desc:t}];u.length;){var d=u.pop();i.lookupOrInsertNode(d),l++>100&&n();for(var c=0,h=a._util.getServiceDependencies(d.desc.ctor);c5e3&&i._leaveChordMode():i._leaveChordMode()},500)},t.prototype._leaveChordMode=function(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null},t.prototype._dispatch=function(e,t){var i=this,o=!1,r=this.resolveKeyboardEvent(e) ;if(r.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;var s=r.getDispatchParts()[0];if(null===s)return o;var a=this._contextKeyService.getContext(t),l=this._currentChord?this._currentChord.keypress:null,u=r.getLabel(),d=this._getResolver().resolve(a,l,s);return d&&d.enterChord?(o=!0,this._enterChordMode(s,u),o):(this._statusService&&this._currentChord&&(d&&d.commandId||(this._statusService.setStatusMessage(n.localize(1,null,this._currentChord.label,u),1e4),o=!0)),this._leaveChordMode(),d&&d.commandId&&(d.bubble||(o=!0),void 0===d.commandArgs?this._commandService.executeCommand(d.commandId).done(void 0,function(e){return i._notificationService.warn(e)}):this._commandService.executeCommand(d.commandId,d.commandArgs).done(void 0,function(e){return i._notificationService.warn(e)}),this._telemetryService.publicLog("workbenchActionExecuted",{id:d.commandId,from:"keybinding"})),o)},t}(i.Disposable);t.AbstractKeybindingService=a}),define(t[49],n([1,0,15]),function(e,t,n){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.Default=1]="Default",e[e.User=2]="User"}(t.KeybindingSource||(t.KeybindingSource={})),t.IKeybindingService=n.createDecorator("keybindingService")}),define(t[154],n([1,0,19]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(t,n){this._defaultKeybindings=t,this._defaultBoundCommands=new Map;for(var i=0,o=t.length;i=0;d--)this._isTargetedForRemoval(e[d],a,l,s,u)&&e.splice(d,1);else n.push(r)}return e.concat(n)},e.prototype._addKeyPress=function(t,n){var i=this._map.get(t);if(void 0===i)return this._map.set(t,[n]),void this._addToLookupMap(n);for(var o=i.length-1;o>=0;o--){var r=i[o];if(r.command!==n.command){var s=null!==r.keypressChordPart,a=null!==n.keypressChordPart;s&&a&&r.keypressChordPart!==n.keypressChordPart||e.whenIsEntirelyIncluded(r.when,n.when)&&this._removeFromLookupMap(r)}}i.push(n),this._addToLookupMap(n)},e.prototype._addToLookupMap=function(e){if(e.command){var t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}},e.prototype._removeFromLookupMap=function(e){var t=this._lookupMap.get(e.command);if(void 0!==t)for(var n=0,i=t.length;n=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=i}),define(t[418],n([1,0]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e,t,n,i,o){if(this.resolvedKeybinding=e,e){var r=e.getDispatchParts(),s=r[0],a=r[1];this.keypressFirstPart=s,this.keypressChordPart=a}else this.keypressFirstPart=null,this.keypressChordPart=null;this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=n,this.when=i,this.isDefault=o}}();t.ResolvedKeybindingItem=n}),define(t[419],n([1,0,39,162]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,n){var i=e.call(this)||this;if(i._os=n,null===t)throw new Error("Invalid USLayoutResolvedKeybinding");return 2===t.type?(i._firstPart=t.firstPart,i._chordPart=t.chordPart):(i._firstPart=t,i._chordPart=null),i}return o(t,e),t.prototype._keyCodeToUILabel=function(e){if(2===this._os)switch(e){case 15: return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return n.KeyCodeUtils.toString(e)},t.prototype._getUILabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode):null},t.prototype.getLabel=function(){var e=this._getUILabelForKeybinding(this._firstPart),t=this._getUILabelForKeybinding(this._chordPart);return i.UILabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype._getAriaLabelForKeybinding=function(e){return e?e.isDuplicateModifierCase()?"":n.KeyCodeUtils.toString(e.keyCode):null},t.prototype.getAriaLabel=function(){var e=this._getAriaLabelForKeybinding(this._firstPart),t=this._getAriaLabelForKeybinding(this._chordPart);return i.AriaLabelProvider.toLabel(this._firstPart,e,this._chordPart,t,this._os)},t.prototype.isChord=function(){return!!this._chordPart},t.prototype.getParts=function(){return[this._toResolvedKeybindingPart(this._firstPart),this._toResolvedKeybindingPart(this._chordPart)]}, t.prototype._toResolvedKeybindingPart=function(e){return e?new n.ResolvedKeybindingPart(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getUILabelForKeybinding(e),this._getAriaLabelForKeybinding(e)):null},t.prototype.getDispatchParts=function(){return[this._firstPart?t.getDispatchStr(this._firstPart):null,this._chordPart?t.getDispatchStr(this._chordPart):null]},t.getDispatchStr=function(e){if(e.isModifierKey())return null;var t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=n.KeyCodeUtils.toString(e.keyCode)},t}(n.ResolvedKeybinding);t.USLayoutResolvedKeybinding=r}),define(t[117],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ILogService=n.createDecorator("logService");var i=function(){function e(){}return e.prototype.trace=function(e){for(var t=[],n=1;n0?a:1,l=l>0?l:1,u=u>=a?u:a,d=d>0?d:l,{resource:t,owner:e,code:i,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:u,endColumn:d,relatedInformation:c,tags:h}},e.prototype.read=function(t){void 0===t&&(t=Object.create(null));var n=t.owner,i=t.resource,o=t.severities,r=t.take;if((!r||r<0)&&(r=-1),n&&i){if(y=a.get(this._byResource,i.toString(),n)){for(var s=[],l=0,u=y;l0&&C===r)break}}return s}return[]}if(n||i){var c=n?this._byOwner[n]:this._byResource[i.toString()];if(!c)return[];s=[];for(var h in c)for(var p=0,f=c[h];p0&&C===r)return s}}return s}s=[] ;for(var g in this._byResource)for(var m in this._byResource[g])for(var v=0,_=this._byResource[g][m];v<_.length;v++){var y=_[v];if(e._accept(y,o)){var C=s.push(y);if(r>0&&C===r)return s}}return s},e._accept=function(e,t){return void 0===t||(t&e.severity)===e.severity},e._debouncer=function(t,n){t||(e._dedupeMap=Object.create(null),t=[]);for(var i=0,o=n;i'+e+""})},codeBlockRenderCallback:function(){return t._onDidRenderCodeBlock.fire()},actionHandler:{callback:function(e){t._openerService.open(r.default.parse(e)).then(void 0,s.onUnexpectedError)},disposeables:e}}},e.prototype.render=function(e){ var t,i=[];return t=e?n.renderMarkdown(e,this.getOptions(i)):document.createElement("span"),{element:t,dispose:function(){return h.dispose(i)}}},e=a([u(1,o.IModeService),u(2,d.optional(i.IOpenerService))],e)}();t.MarkdownRenderer=p}),define(t[92],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IProgressService=n.createDecorator("progressService")}),define(t[45],n([1,0,33,85]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});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.as=function(e){return this.data[e]||null},e}();t.Registry=new o}),define(t[124],n([1,0,300,9,45,41,17]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),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.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(t[429],n([1,0,45,9]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={JSONContribution:"base.contributions.json"};var o=new(function(){function e(){this._onDidChangeSchema=new i.Emitter, this.schemasById={}}return e.prototype.registerSchema=function(e,t){this.schemasById[function(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}(e)]=t,this._onDidChangeSchema.fire(e)},e}());n.Registry.add(t.Extensions.JSONContribution,o)}),define(t[82],n([1,0,352,9,45,33,6,429]),function(e,t,n,i,o,r,s,a){"use strict";function l(e){return t.OVERRIDE_PROPERTY_PATTERN.test(e)?n.localize(3,null,e):void 0!==g.getConfigurationProperties()[e]?n.localize(4,null,e):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={Configuration:"base.contributions.configuration"};var u;!function(e){e[e.APPLICATION=1]="APPLICATION",e[e.WINDOW=2]="WINDOW",e[e.RESOURCE=3]="RESOURCE"}(u=t.ConfigurationScope||(t.ConfigurationScope={})),t.allSettings={properties:{},patternProperties:{}},t.applicationSettings={properties:{},patternProperties:{}},t.windowSettings={properties:{},patternProperties:{}},t.resourceSettings={properties:{},patternProperties:{}}, t.editorConfigurationSchemaId="vscode://schemas/settings/editor";var d=o.Registry.as(a.Extensions.JSONContribution),c=function(){function e(){this.overrideIdentifiers=[],this._onDidSchemaChange=new i.Emitter,this._onDidRegisterConfiguration=new i.Emitter,this.configurationContributors=[],this.editorConfigurationSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting"},this.configurationProperties={},this.excludedConfigurationProperties={},this.computeOverridePropertyPattern(),d.registerSchema(t.editorConfigurationSchemaId,this.editorConfigurationSchema)}return e.prototype.registerConfiguration=function(e,t){void 0===t&&(t=!0),this.registerConfigurations([e],[],t)},e.prototype.registerConfigurations=function(e,t,n){var i=this;void 0===n&&(n=!0);var o=this.toConfiguration(t);o&&e.push(o);var r=[];e.forEach(function(e){r.push.apply(r,i.validateAndRegisterProperties(e,n)),i.configurationContributors.push(e),i.registerJSONConfiguration(e), i.updateSchemaForOverrideSettingsConfiguration(e)}),this._onDidRegisterConfiguration.fire(r)},e.prototype.registerOverrideIdentifiers=function(e){var t;(t=this.overrideIdentifiers).push.apply(t,e),this.updateOverridePropertyPatternKey()},e.prototype.toConfiguration=function(e){for(var i={id:"defaultOverrides",title:n.localize(0,null),properties:{}},o=0,r=e;o.001){C=!1;break}}var L=s.getTimeSinceLastZoomLevelChanged()>2e3;return new l.FontInfo({zoomLevel:s.getZoomLevel(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:C,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:o.width, spaceWidth:r.width,maxDigitWidth:y},L)},t.INSTANCE=new t,t}(i.Disposable),p=function(e){function t(t,n){void 0===n&&(n=null);var i=e.call(this,t)||this;return i._elementSizeObserver=i._register(new u.ElementSizeObserver(n,function(){return i._onReferenceDomElementSizeChanged()})),i._register(h.INSTANCE.onDidChange(function(){return i._onCSSBasedConfigurationChanged()})),i._validatedOptions.automaticLayout&&i._elementSizeObserver.startObserving(),i._register(s.onDidChangeZoomLevel(function(e){return i._recomputeOptions()})),i._register(s.onDidChangeAccessibilitySupport(function(){return i._recomputeOptions()})),i._recomputeOptions(),i}return o(t,e),t._massageFontFamily=function(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?'"'+e+'"':e},t.applyFontInfoSlow=function(e,n){e.style.fontFamily=t._massageFontFamily(n.fontFamily),e.style.fontWeight=n.fontWeight,e.style.fontSize=n.fontSize+"px",e.style.lineHeight=n.lineHeight+"px",e.style.letterSpacing=n.letterSpacing+"px"},t.applyFontInfo=function(e,n){ e.setFontFamily(t._massageFontFamily(n.fontFamily)),e.setFontWeight(n.fontWeight),e.setFontSize(n.fontSize),e.setLineHeight(n.lineHeight),e.setLetterSpacing(n.letterSpacing)},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(){e.prototype.dispose.call(this)},t.prototype._getExtraEditorClassName=function(){var e="";return s.isIE?e+="ie ":s.isFirefox?e+="ff ":s.isEdge?e+="edge ":s.isSafari&&(e+="safari "),r.isMacintosh&&(e+="mac "),e},t.prototype._getEnvConfiguration=function(){return{extraEditorClassName:this._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:s.isWebKit||s.isFirefox,pixelRatio:s.getPixelRatio(),zoomLevel:s.getZoomLevel(),accessibilitySupport:s.getAccessibilitySupport()}}, t.prototype.readConfiguration=function(e){return h.INSTANCE.readConfiguration(e)},t}(a.CommonEditorConfiguration);t.Configuration=p}),define(t[433],n([1,0,26,113,65,36]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this,t)||this;return n._visibleLines=new i.VisibleLinesCollection(n),n.domNode=n._visibleLines.domNode,n._dynamicOverlays=[],n._isFocused=!1,n.domNode.setClassName("view-overlays"),n}return o(t,e),t.prototype.shouldRender=function(){if(e.prototype.shouldRender.call(this))return!0;for(var t=0,n=this._dynamicOverlays.length;t'),i.appendASCIIString(o),i.appendASCIIString(""),!0)},e.prototype.layoutLine=function(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))},e}();t.ViewOverlayLine=l;var u=function(e){function t(t){var n=e.call(this,t)||this;return n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n.domNode.setHeight(0),n}return o(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 e.prototype.onScrollChanged.call(this,t)||t.scrollWidthChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t),this.domNode.setWidth(Math.max(t.scrollWidth,this._contentWidth))},t}(a);t.ContentViewOverlays=u;var d=function(e){function t(t){var n=e.call(this,t)||this;return n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n.domNode.setClassName("margin-view-overlays"),n.domNode.setWidth(1),r.Configuration.applyFontInfo(n.domNode,n._context.configuration.editor.fontInfo),n}return o(t,e),t.prototype.onConfigurationChanged=function(t){var n=!1;return t.fontInfo&&(r.Configuration.applyFontInfo(this.domNode,this._context.configuration.editor.fontInfo),n=!0),t.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft,n=!0),e.prototype.onConfigurationChanged.call(this,t)||n},t.prototype.onScrollChanged=function(t){ return e.prototype.onScrollChanged.call(this,t)||t.scrollHeightChanged},t.prototype._viewOverlaysRender=function(t){e.prototype._viewOverlaysRender.call(this,t);var n=Math.min(t.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)},t}(a);t.MarginViewOverlays=d}),define(t[434],n([1,0,26,12,3,47,65,7,6]),function(e,t,n,i,o,r,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){return function(e,t,n,i,o,r){this.top=e,this.left=t,this.width=n,this.height=i,this.textContent=o,this.textContentClassName=r}}(),d=function(){function e(e){this._context=e,this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineHeight=this._context.configuration.editor.lineHeight,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth),this._isVisible=!0, this._domNode=n.createFastDomNode(document.createElement("div")),this._domNode.setClassName("cursor"),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo),this._domNode.setDisplay("none"),this.updatePosition(new i.Position(1,1)),this._lastRenderedContent="",this._renderData=null}return e.prototype.getDomNode=function(){return this._domNode},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.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.fontInfo&&(s.Configuration.applyFontInfo(this._domNode,this._context.configuration.editor.fontInfo), this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),e.viewInfo&&(this._cursorStyle=this._context.configuration.editor.viewInfo.cursorStyle,this._lineCursorWidth=Math.min(this._context.configuration.editor.viewInfo.cursorWidth,this._typicalHalfwidthCharacterWidth)),!0},e.prototype.onCursorPositionChanged=function(e){return this.updatePosition(e),!0},e.prototype._prepareRender=function(e){var t="",n="";if(this._cursorStyle===r.TextEditorCursorStyle.Line||this._cursorStyle===r.TextEditorCursorStyle.LineThin){var i=e.visibleRangeForPosition(this._position);if(!i)return null;var s;if(this._cursorStyle===r.TextEditorCursorStyle.Line){if((s=a.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2))>2){t=this._context.model.getLineContent(this._position.lineNumber).charAt(this._position.column-1)}}else s=a.computeScreenAwareSize(1);var d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta ;return new u(d,i.left,s,this._lineHeight,t,n)}var c=e.linesVisibleRangesForRange(new o.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+1),!1);if(!c||0===c.length||0===c[0].ranges.length)return null;var h=c[0].ranges[0],p=h.width<1?this._typicalHalfwidthCharacterWidth:h.width;if(this._cursorStyle===r.TextEditorCursorStyle.Block){var f=this._context.model.getViewLineData(this._position.lineNumber);t=f.content.charAt(this._position.column-1),l.isHighSurrogate(f.content.charCodeAt(this._position.column-1))&&(t+=f.content.charAt(this._position.column));var g=f.tokens.findTokenIndexAtOffset(this._position.column-1);n=f.tokens.getClassName(g)}var m=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,v=this._lineHeight;return this._cursorStyle!==r.TextEditorCursorStyle.Underline&&this._cursorStyle!==r.TextEditorCursorStyle.UnderlineThin||(m+=this._lineHeight-2,v=2),new u(m,h.left,p,v,t,n)},e.prototype.prepareRender=function(e){ this._renderData=this._prepareRender(e)},e.prototype.render=function(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName("cursor "+this._renderData.textContentClassName),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)},e.prototype.updatePosition=function(e){this._position=e},e}();t.ViewCursor=d}),define(t[435],n([1,0,10,424,6,45,124,17,60,82]),function(e,t,n,i,o,r,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}) ;var d=Object.prototype.hasOwnProperty,c=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=!1);var n=this;this._nextLanguageId=1,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},this._languageIds=[],this._warnOnOverwrite=t,e&&(this._registerLanguages(s.ModesRegistry.getLanguages()),s.ModesRegistry.onDidAddLanguages(function(e){return n._registerLanguages(e)}))}return e.prototype._registerLanguages=function(e){var t=this;if(0!==e.length){for(var n=0;n0&&((r=e.mimetypes).push.apply(r,t.mimetypes),a=t.mimetypes[0]),a||(a="text/x-"+s,e.mimetypes.push(a)),Array.isArray(t.extensions))for(var l=0,u=t.extensions;l0){var v=t.firstLine;"^"!==v.charAt(0)&&(v="^"+v);try{var _=new RegExp(v);o.regExpLeadsToEndlessLoop(_)||i.registerTextMime({id:s,mime:a,firstline:_},this._warnOnOverwrite)}catch(e){n.onUnexpectedError(e)}}e.aliases.push(s);var y=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(y=0===t.aliases.length?[null]:t.aliases),null!==y)for(var C=0;C0;if(b&&null===y[0]);else{var S=(b?y[0]:null)||s;!b&&e.name||(e.name=S)}t.configuration&&e.configurationFiles.push(t.configuration)},e.prototype.isRegisteredMode=function(e){return!!d.call(this._mimeTypesMap,e)||d.call(this._languages,e)},e.prototype.getModeIdForLanguageNameLowercase=function(e){return d.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null},e.prototype.extractModeIds=function(e){var t=this;return e?e.split(",").map(function(e){return e.trim() }).map(function(e){return d.call(t._mimeTypesMap,e)?t._mimeTypesMap[e].language: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]))return null;return d.call(this._languages,t)?this._languages[t].identifier:null},e.prototype.getModeIdsFromFilenameOrFirstLine=function(e,t){if(!e&&!t)return[];var n=i.guessMimeTypes(e,t);return this.extractModeIds(n.join(","))},e}();t.LanguagesRegistry=c}),define(t[436],n([1,0,10,9,13,528,435]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){void 0===e&&(e=!1),this._onDidCreateMode=new i.Emitter,this.onDidCreateMode=this._onDidCreateMode.event,this._instantiatedModes={},this._registry=new s.LanguagesRegistry(!0,e)}return e.prototype._onReady=function(){return o.TPromise.as(!0)},e.prototype.isRegisteredMode=function(e){ return this._registry.isRegisteredMode(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.getMode=function(e){for(var t=this._registry.extractModeIds(e),i=!1,o=0;ot.command?1:e.weight2-t.weight2}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(){this._keybindings=[],this._keybindingsSorted=!0}return e.bindToCurrentPlatform=function(e){if(1===i.OS){if(e&&e.win)return e.win}else if(2===i.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e},e.prototype.registerKeybindingRule=function(t,o){void 0===o&&(o=0);var r=e.bindToCurrentPlatform(t);if(r&&r.primary&&this._registerDefaultKeybinding(n.createKeybinding(r.primary,i.OS),t.id,t.weight,0,t.when,o),r&&Array.isArray(r.secondary))for(var s=0,a=r.secondary.length;s=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))},e.prototype._assertNoCtrlAlt=function(t,n){t.ctrlKey&&t.altKey&&!t.metaKey&&e._mightProduceChar(t.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",t," for ",n)},e.prototype._registerDefaultKeybinding=function(e,t,n,o,r,s){0===s&&1===i.OS&&(2===e.type?this._assertNoCtrlAlt(e.firstPart,t):this._assertNoCtrlAlt(e,t)),this._keybindings.push({keybinding:e,command:t,commandArgs:void 0,when:r,weight1:n,weight2:o}),this._keybindingsSorted=!1},e.prototype.getDefaultKeybindings=function(){return this._keybindingsSorted||(this._keybindings.sort(s),this._keybindingsSorted=!0),this._keybindings.slice(0)},e}();t.KeybindingsRegistry=new a,t.Extensions={EditorModes:"platform.keybindingsRegistry"}, r.Registry.add(t.Extensions.EditorModes,t.KeybindingsRegistry)}),define(t[72],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ID="storageService",t.IStorageService=n.createDecorator(t.ID);!function(e){e[e.GLOBAL=0]="GLOBAL",e[e.WORKSPACE=1]="WORKSPACE"}(t.StorageScope||(t.StorageScope={})),t.NullStorageService={_serviceBrand:void 0,store: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(t[442],n([1,0,70,72,14]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(){}return e.prototype.select=function(e,t,n){if(0===n.length)return 0;for(var i=n[0].score,o=1;os&&d.type===l.type&&d.insertText===l.insertText&&(s=d.touch,r=a)}return-1===r?e.prototype.select.call(this,t,n,i):r},t.prototype.toJSON=function(){var e=[];return this._cache.forEach(function(t,n){ e.push([n,t])}),e},t.prototype.fromJSON=function(e){this._cache.clear();for(var t=0,n=e;t0){this._seq=e[0][1].touch+1;for(var t=0,n=e;t1)for(var r=n.modelState?n.modelState.position:null,s=n.viewState?n.viewState.position:null,a=0,d=o.length;ao&&(i=o);var s=new r.Range(i,1,i,e.context.model.getLineMaxColumn(i)),a=0;if(n.at)switch(n.at){case x.RawAtArgument.Top:a=3;break;case x.RawAtArgument.Center:a=1;break;case x.RawAtArgument.Bottom:a=4}var l=e.context.convertModelRangeToViewRange(s);e.revealRange(!1,l,a,0)},t}(E))),e.SelectAll=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"selectAll",precondition:null})||this}return o(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(), e.setStates(t.source,l.CursorChangeReason.Explicit,[u.CursorMoveCommands.selectAll(e.context,e.getPrimaryCursor())])},t}(E))),e.SetSelection=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"setSelection",precondition:null})||this}return o(t,e),t.prototype.runCoreEditorCommand=function(e,t){e.context.model.pushStackElement(),e.setStates(t.source,l.CursorChangeReason.Explicit,[a.CursorState.fromModelSelection(t.selection)])},t}(E)))}(N=t.CoreNavigationCommands||(t.CoreNavigationCommands={}));!function(e){e.LineBreakInsert=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"lineBreakInsert",precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:h.EditorContextKeys.textInputFocus,primary:null,mac:{primary:301}}})||this}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,m.TypeOperations.lineBreakInsert(t._getCursorConfiguration(),t.getModel(),t.getSelections()))},t}(d.EditorCommand))), e.Outdent=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"outdent",precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:f.ContextKeyExpr.and(h.EditorContextKeys.editorTextFocus,h.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})||this}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,m.TypeOperations.outdent(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(d.EditorCommand))),e.Tab=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"tab",precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:f.ContextKeyExpr.and(h.EditorContextKeys.editorTextFocus,h.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})||this}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){t.pushUndoStop(),t.executeCommands(this.id,m.TypeOperations.tab(t._getCursorConfiguration(),t.getModel(),t.getSelections())),t.pushUndoStop()},t}(d.EditorCommand))), e.DeleteLeft=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"deleteLeft",precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:h.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})||this}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=t._getCursors(),o=v.DeleteOperations.deleteLeft(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=o[0],s=o[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(2)},t}(d.EditorCommand))),e.DeleteRight=d.registerEditorCommand(new(function(e){function t(){return e.call(this,{id:"deleteRight",precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:h.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})||this}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){ var i=t._getCursors(),o=v.DeleteOperations.deleteRight(i.getPrevEditOperationType(),t._getCursorConfiguration(),t.getModel(),t.getSelections()),r=o[0],s=o[1];r&&t.pushUndoStop(),t.executeCommands(this.id,s),i.setPrevEditOperationType(3)},t}(d.EditorCommand)))}(t.CoreEditingCommands||(t.CoreEditingCommands={}));var I=function(e){function t(t){var n=e.call(this,t)||this;return n._editorHandler=t.editorHandler,n._inputHandler=t.inputHandler,n}return o(t,e),t.prototype.runCommand=function(e,t){var n=y(e);if(n&&n.hasTextFocus())return this._runEditorHandler(n,t);var i=document.activeElement;if(!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)){var o=e.get(p.ICodeEditorService).getActiveCodeEditor();return o?(o.focus(),this._runEditorHandler(o,t)):void 0}document.execCommand(this._inputHandler)},t.prototype._runEditorHandler=function(e,t){var n=this._editorHandler;"string"==typeof n?e.trigger("keyboard",n,t):((t=t||{}).source="keyboard",n.runEditorCommand(null,e,t))},t}(d.Command),M=function(e){ function t(t,n){var i=e.call(this,{id:t,precondition:null})||this;return i._handlerId=n,i}return o(t,e),t.prototype.runCommand=function(e,t){var n=y(e);n&&n.trigger("keyboard",this._handlerId,t)},t}(d.Command);C(new I({editorHandler:N.SelectAll,inputHandler:"selectAll",id:"editor.action.selectAll",precondition:h.EditorContextKeys.textInputFocus,kbOpts:{weight:w,kbExpr:null,primary:2079},menubarOpts:{menuId:_.MenuId.MenubarSelectionMenu,group:"1_basic",title:n.localize(0,null),order:1}})),C(new I({editorHandler:S.Undo,inputHandler:"undo",id:S.Undo,precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:h.EditorContextKeys.textInputFocus,primary:2104},menubarOpts:{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:n.localize(1,null),order:1}})),C(new M("default:"+S.Undo,S.Undo)),C(new I({editorHandler:S.Redo,inputHandler:"redo",id:S.Redo,precondition:h.EditorContextKeys.writable,kbOpts:{weight:w,kbExpr:h.EditorContextKeys.textInputFocus,primary:2103,secondary:[3128],mac:{primary:3128}},menubarOpts:{ menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:n.localize(2,null),order:2}})),C(new M("default:"+S.Redo,S.Redo)),b(S.Type),b(S.ReplacePreviousChar),b(S.CompositionStart),b(S.CompositionEnd),b(S.Paste),b(S.Cut)}),define(t[446],n([1,0,12,133]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t,n,i,o){this.configuration=e,this.viewModel=t,this._execCoreEditorCommandFunc=n,this.outgoingEvents=i,this.commandDelegate=o}return e.prototype._execMouseCommand=function(e,t){t.source="mouse",this._execCoreEditorCommandFunc(e,t)},e.prototype.paste=function(e,t,n,i){this.commandDelegate.paste(e,t,n,i)},e.prototype.type=function(e,t){this.commandDelegate.type(e,t)},e.prototype.replacePreviousChar=function(e,t,n){this.commandDelegate.replacePreviousChar(e,t,n)},e.prototype.compositionStart=function(e){this.commandDelegate.compositionStart(e)},e.prototype.compositionEnd=function(e){this.commandDelegate.compositionEnd(e)},e.prototype.cut=function(e){ this.commandDelegate.cut(e)},e.prototype.setSelection=function(e,t){this._execCoreEditorCommandFunc(i.CoreNavigationCommands.SetSelection,{source:e,selection:t})},e.prototype._validateViewColumn=function(e){var t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this.selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this.lastCursorLineSelectDrag(e.position):this.lastCursorLineSelect(e.position):e.inSelectionMode?this.lineSelectDrag(e.position):this.lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this.lastCursorWordSelect(e.position):e.inSelectionMode?this.wordSelectDrag(e.position):this.wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this.columnSelect(e.position,e.mouseColumn):e.inSelectionMode?this.lastCursorMoveToSelect(e.position):this.createCursor(e.position,!1)):e.inSelectionMode?this.moveToSelect(e.position):this.moveTo(e.position) },e.prototype._usualArgs=function(e){return e=this._validateViewColumn(e),{position:this.convertViewToModelPosition(e),viewPosition:e}},e.prototype.moveTo=function(e){this._execMouseCommand(i.CoreNavigationCommands.MoveTo,this._usualArgs(e))},e.prototype.moveToSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.MoveToSelect,this._usualArgs(e))},e.prototype.columnSelect=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(i.CoreNavigationCommands.ColumnSelect,{position:this.convertViewToModelPosition(e),viewPosition:e,mouseColumn:t})},e.prototype.createCursor=function(e,t){e=this._validateViewColumn(e),this._execMouseCommand(i.CoreNavigationCommands.CreateCursor,{position:this.convertViewToModelPosition(e),viewPosition:e,wholeLine:t})},e.prototype.lastCursorMoveToSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorMoveToSelect,this._usualArgs(e))},e.prototype.wordSelect=function(e){ this._execMouseCommand(i.CoreNavigationCommands.WordSelect,this._usualArgs(e))},e.prototype.wordSelectDrag=function(e){this._execMouseCommand(i.CoreNavigationCommands.WordSelectDrag,this._usualArgs(e))},e.prototype.lastCursorWordSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorWordSelect,this._usualArgs(e))},e.prototype.lineSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LineSelect,this._usualArgs(e))},e.prototype.lineSelectDrag=function(e){this._execMouseCommand(i.CoreNavigationCommands.LineSelectDrag,this._usualArgs(e))},e.prototype.lastCursorLineSelect=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorLineSelect,this._usualArgs(e))},e.prototype.lastCursorLineSelectDrag=function(e){this._execMouseCommand(i.CoreNavigationCommands.LastCursorLineSelectDrag,this._usualArgs(e))},e.prototype.selectAll=function(){this._execMouseCommand(i.CoreNavigationCommands.SelectAll,{})},e.prototype.convertViewToModelPosition=function(e){ return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)},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.prototype.emitMouseDrag=function(e){this.outgoingEvents.emitMouseDrag(e)},e.prototype.emitMouseDrop=function(e){this.outgoingEvents.emitMouseDrop(e)},e}();t.ViewController=o}),define(t[447],n([1,0,304,20,11,236]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t,n){var i=e.call(this,n)||this;return i.left=t,i}return o(t,e), t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;ot.getLineMinColumn(o)?i.isLowSurrogate(t.getLineContent(o).charCodeAt(n-2))?n-=2:n-=1:o>1&&(o-=1,n=t.getLineMaxColumn(o)),new s.Position(o,n)},t.prototype.positionRightOf=function(e,t){var n=e.column,o=e.lineNumber;return n0&&(t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop())},t}(l.EditorAction);l.registerEditorAction(d)}),define(t[449],n([1,0,306,30,18,32,11,165,20,44,367]),function(e,t,n,i,r,s,a,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="9_cutcopypaste",h=r.isNative||document.queryCommandSupported("cut"),p=r.isNative||document.queryCommandSupported("copy"),f=p&&!i.isEdgeOrIE,g=r.isNative||!i.isChrome&&document.queryCommandSupported("paste"),m=function(e){function t(t,n){var i=e.call(this,n)||this;return i.browserCommand=t,i}return o(t,e),t.prototype.runCommand=function(e,t){var n=e.get(s.ICodeEditorService).getFocusedCodeEditor();n&&n.hasTextFocus()?n.trigger("keyboard",this.id,t):document.execCommand(this.browserCommand)},t.prototype.run=function(e,t){t.focus(),document.execCommand(this.browserCommand)},t}(a.EditorAction),v=function(e){function t(){var t={kbExpr:u.EditorContextKeys.textInputFocus,primary:2102,win:{primary:2102, secondary:[1044]},weight:100};return r.isNative||(t=null),e.call(this,"cut",{id:"editor.action.clipboardCutAction",label:n.localize(0,null),alias:"Cut",precondition:u.EditorContextKeys.writable,kbOpts:t,menuOpts:{group:c,order:1},menubarOpts:{menuId:d.MenuId.MenubarEditMenu,group:"2_ccp",title:n.localize(1,null),order:1}})||this}return o(t,e),t.prototype.run=function(t,n){!n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(m),_=function(e){function t(){var t={kbExpr:u.EditorContextKeys.textInputFocus,primary:2081,win:{primary:2081,secondary:[2067]},weight:100};return r.isNative||(t=null),e.call(this,"copy",{id:"editor.action.clipboardCopyAction",label:n.localize(2,null),alias:"Copy",precondition:null,kbOpts:t,menuOpts:{group:c,order:2},menubarOpts:{menuId:d.MenuId.MenubarEditMenu,group:"2_ccp",title:n.localize(3,null),order:2}})||this}return o(t,e),t.prototype.run=function(t,n){ !n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||e.prototype.run.call(this,t,n)},t}(m),y=function(e){function t(){var t={kbExpr:u.EditorContextKeys.textInputFocus,primary:2100,win:{primary:2100,secondary:[1043]},weight:100};return r.isNative||(t=null),e.call(this,"paste",{id:"editor.action.clipboardPasteAction",label:n.localize(4,null),alias:"Paste",precondition:u.EditorContextKeys.writable,kbOpts:t,menuOpts:{group:c,order:3},menubarOpts:{menuId:d.MenuId.MenubarEditMenu,group:"2_ccp",title:n.localize(5,null),order:3}})||this}return o(t,e),t}(m),C=function(e){function t(){return e.call(this,"copy",{id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:n.localize(6,null),alias:"Copy With Syntax Highlighting",precondition:null,kbOpts:{kbExpr:u.EditorContextKeys.textInputFocus,primary:null,weight:100}})||this}return o(t,e),t.prototype.run=function(t,n){ !n.getConfiguration().emptySelectionClipboard&&n.getSelection().isEmpty()||(l.CopyOptions.forceCopyWithSyntaxHighlighting=!0,e.prototype.run.call(this,t,n),l.CopyOptions.forceCopyWithSyntaxHighlighting=!1)},t}(m);h&&a.registerEditorAction(v),p&&a.registerEditorAction(_),g&&a.registerEditorAction(y),f&&a.registerEditorAction(C)}),define(t[450],n([1,0,25,14,40,10,31,11,3,17,48,137]),function(e,t,n,i,o,r,s,a,l,u,d,c){"use strict";function h(e,t,s,a){void 0===a&&(a=o.CancellationToken.None);var l={only:s&&s.filter&&s.filter.kind?s.filter.kind.value:void 0,trigger:s&&"manual"===s.type?u.CodeActionTrigger.Manual:u.CodeActionTrigger.Automatic},d=u.CodeActionProviderRegistry.all(e).map(function(n){return i.asWinJsPromise(function(i){return n.provideCodeActions(e,t,l,i)}).then(function(e){return Array.isArray(e)?e.filter(function(e){return function(e,t){if(!t)return!1;if(e&&e.kind&&(!t.kind||!e.kind.contains(t.kind)))return!1;if(t.kind&&c.CodeActionKind.Source.contains(t.kind)&&(!e||!e.includeSourceActions))return!1 ;return!0}(s&&s.filter,e)}):[]},function(e){if(r.isPromiseCanceledError(e))throw e;return r.onUnexpectedExternalError(e),[]})});return Promise.all(d).then(n.flatten).then(function(e){return n.mergeSort(e,p)})}function p(e,t){var i=!n.isFalsyOrEmpty(e.diagnostics),o=!n.isFalsyOrEmpty(t.diagnostics);return i?o?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:o?1:0}Object.defineProperty(t,"__esModule",{value:!0}),t.getCodeActions=h,a.registerLanguageCommand("_executeCodeActionProvider",function(e,t){var n=t.resource,i=t.range;if(!(n instanceof s.default&&l.Range.isIRange(i)))throw r.illegalArgument();var o=e.get(d.IModelService).getModel(n);if(!o)throw r.illegalArgument();return h(o,o.validateRange(i),{type:"manual",filter:{includeSourceActions:!0}})})}),define(t[451],n([1,0,14,9,2,13,3,17,19,450]),function(e,t,n,i,o,r,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SUPPORTED_CODE_ACTIONS=new l.RawContextKey("supportedCodeAction","");var d=function(){ function e(e,t,n,o,r){void 0===o&&(o=250);var s=this;this._editor=e,this._markerService=t,this._signalChange=n,this._progressService=r,this._disposables=[],this._disposables.push(i.debounceEvent(this._markerService.onMarkerChanged,function(e,t){return e?e.concat(t):t},o/2)(function(e){return s._onMarkerChanges(e)}),i.debounceEvent(this._editor.onDidChangeCursorPosition,function(e,t){return t},o)(function(e){return s._onCursorChange()}))}return e.prototype.dispose=function(){this._disposables=o.dispose(this._disposables)},e.prototype.trigger=function(e){var t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)},e.prototype._onMarkerChanges=function(e){for(var t=this._editor.getModel().uri,n=0,i=e;nt.symbol.range.startLineNumber?1:r.indexOf(e.provider)r.indexOf(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0})})}Object.defineProperty(t,"__esModule",{value:!0}),t.getCodeLensData=u,r.registerLanguageCommand("_executeCodeLensProvider",function(e,t){var i=t.resource,r=t.itemResolveCount;if(!(i instanceof o.default))throw n.illegalArgument();var s=e.get(a.IModelService).getModel(i);if(!s)throw n.illegalArgument();var d=[];return u(s,l.CancellationToken.None).then(function(e){for(var t=[],n=0,i=e;n0&&t.push(Promise.resolve(o.provider.resolveCodeLens(s,o.symbol,l.CancellationToken.None)).then(function(e){return d.push(e)}))}return Promise.all(t)}).then(function(){return d})})}),define(t[172],n([1,0,31,13,17,14,11,3,10,48]),function(e,t,n,i,o,r,s,a,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getColors=function(e,t){var n=[],i=o.ColorProviderRegistry.ordered(e).reverse().map(function(i){return Promise.resolve(i.provideDocumentColors(e,t)).then(function(e){if(Array.isArray(e))for(var t=0,o=e;t0&&s._contextViewService.hideContextView()})),this._toDispose.push(this._editor.onKeyDown(function(e){58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),s.showContextMenu())}))}return e.get=function(t){return t.getContribution(e.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!==m.MouseTargetType.OVERLAY_WIDGET&&(e.event.preventDefault(), e.target.type===m.MouseTargetType.CONTENT_TEXT||e.target.type===m.MouseTargetType.CONTENT_EMPTY||e.target.type===m.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!==m.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){var t=this._getMenuActions();t.length>0&&this._doShowContextMenu(t,e)}else this._editor.focus()},e.prototype._getMenuActions=function(){var e=[],t=this._menuService.createMenu(p.MenuId.EditorContext,this._contextKeyService),n=t.getActions({arg:this._editor.getModel().uri});t.dispose();for(var i=0,o=n;i0&&this._contextViewService.hideContextView(),this._toDispose=i.dispose(this._toDispose)},e.ID="editor.contrib.contextmenu",e=a([u(1,d.IContextMenuService),u(2,d.IContextViewService),u(3,h.IContextKeyService),u(4,c.IKeybindingService),u(5,p.IMenuService)],e)}();t.ContextMenuController=v;var _=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:f.EditorContextKeys.textInputFocus,primary:1092,weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){v.get(t).showContextMenu()},t}(g.EditorAction);g.registerEditorContribution(v),g.registerEditorAction(_)}),define(t[457],n([1,0,310,11,2,20]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this.selections=e} return e.prototype.equals=function(e){var t=this.selections.length;if(t!==e.selections.length)return!1;for(var n=0;n50&&n._undoStack.shift()),n._prevState=n._readState()})),n}return o(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype._readState=function(){return this._editor.getModel()?new a(this._editor.getSelections()):null},t.prototype.getId=function(){return t.ID},t.prototype.cursorUndo=function(){for(var e=new a(this._editor.getSelections());this._undoStack.length>0;){ var t=this._undoStack.pop();if(!t.equals(e))return this._isCursorUndo=!0,this._editor.setSelections(t.selections),this._editor.revealRangeInCenterIfOutsideViewport(t.selections[0],0),void(this._isCursorUndo=!1)}},t.ID="editor.contrib.cursorUndoController",t}(r.Disposable);t.CursorUndoController=l;var u=function(e){function t(){return e.call(this,{id:"cursorUndo",label:n.localize(0,null),alias:"Soft Undo",precondition:null,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2099,weight:100}})||this}return o(t,e),t.prototype.run=function(e,t,n){l.get(t).cursorUndo()},t}(i.EditorAction);t.CursorUndo=u,i.registerEditorContribution(l),i.registerEditorAction(u)}),define(t[458],n([1,0,2,18,23,11,12,3,21,242,29,372]),function(e,t,n,i,o,r,s,a,l,u,d){"use strict";function c(e){return i.isMacintosh?e.altKey:e.ctrlKey}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e){var t=this;this._editor=e,this._toUnhook=[],this._toUnhook.push(this._editor.onMouseDown(function(e){ return t._onEditorMouseDown(e)})),this._toUnhook.push(this._editor.onMouseUp(function(e){return t._onEditorMouseUp(e)})),this._toUnhook.push(this._editor.onMouseDrag(function(e){return t._onEditorMouseDrag(e)})),this._toUnhook.push(this._editor.onMouseDrop(function(e){return t._onEditorMouseDrop(e)})),this._toUnhook.push(this._editor.onKeyDown(function(e){return t.onEditorKeyDown(e)})),this._toUnhook.push(this._editor.onKeyUp(function(e){return t.onEditorKeyUp(e)})),this._dndDecorationIds=[],this._mouseDown=!1,this._modiferPressed=!1,this._dragSelection=null}return e.prototype.onEditorKeyDown=function(e){this._editor.getConfiguration().dragAndDrop&&(c(e)&&(this._modiferPressed=!0),this._mouseDown&&c(e)&&this._editor.updateOptions({mouseStyle:"copy"}))},e.prototype.onEditorKeyUp=function(t){this._editor.getConfiguration().dragAndDrop&&(c(t)&&(this._modiferPressed=!1),this._mouseDown&&t.keyCode===e.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}, e.prototype._onEditorMouseDown=function(e){this._mouseDown=!0},e.prototype._onEditorMouseUp=function(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})},e.prototype._onEditorMouseDrag=function(e){var t=e.target;if(null===this._dragSelection){var n=this._editor.getSelections().filter(function(e){return e.containsPosition(t.position)});if(1!==n.length)return;this._dragSelection=n[0]}c(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position)},e.prototype._onEditorMouseDrop=function(t){if(t.target&&(this._hitContent(t.target)||this._hitMargin(t.target))&&t.target.position){var n=new s.Position(t.target.position.lineNumber,t.target.position.column);if(null===this._dragSelection)if(t.event.shiftKey){var i=this._editor.getSelection(),o=i.startLineNumber,r=i.startColumn;this._editor.setSelections([new l.Selection(o,r,n.lineNumber,n.column)])}else{ var a=this._editor.getSelections().map(function(e){return e.containsPosition(n)?new l.Selection(n.lineNumber,n.column,n.lineNumber,n.column):e});this._editor.setSelections(a)}else(!this._dragSelection.containsPosition(n)||(c(t.event)||this._modiferPressed)&&(this._dragSelection.getEndPosition().equals(n)||this._dragSelection.getStartPosition().equals(n)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(e.ID,new u.DragAndDropCommand(this._dragSelection,n,c(t.event)||this._modiferPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1},e.prototype.showAt=function(t){var n=[{range:new a.Range(t.lineNumber,t.column,t.lineNumber,t.column),options:e._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,n),this._editor.revealPosition(t,1)},e.prototype._removeDecoration=function(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}, e.prototype._hitContent=function(e){return e.type===o.MouseTargetType.CONTENT_TEXT||e.type===o.MouseTargetType.CONTENT_EMPTY},e.prototype._hitMargin=function(e){return e.type===o.MouseTargetType.GUTTER_GLYPH_MARGIN||e.type===o.MouseTargetType.GUTTER_LINE_NUMBERS||e.type===o.MouseTargetType.GUTTER_LINE_DECORATIONS},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modiferPressed=!1,this._toUnhook=n.dispose(this._toUnhook)},e.ID="editor.contrib.dragAndDrop",e.TRIGGER_KEY_VALUE=i.isMacintosh?6:5,e._DECORATION_OPTIONS=d.ModelDecorationOptions.register({className:"dnd-target"}),e}();t.DragAndDropController=h,r.registerEditorContribution(h)}),define(t[459],n([1,0,313,33,6,14,39,2,13,11,23,247,394,20,248,41,395,17,168,250,10,375]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y,C,b){"use strict";function S(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;if(!(i.isUndefined(t.selectionLines)||i.isArray(t.selectionLines)&&t.selectionLines.every(i.isNumber)))return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.ID="editor.contrib.folding";var w=function(){function e(e){var t=this;this.editor=e,this._isEnabled=this.editor.getConfiguration().contribInfo.folding,this._autoHideFoldingControls="mouseover"===this.editor.getConfiguration().contribInfo.showFoldingControls,this._useFoldingProviders="indentation"!==this.editor.getConfiguration().contribInfo.foldingStrategy,this.globalToDispose=[],this.localToDispose=[],this.foldingDecorationProvider=new p.FoldingDecorationProvider(e),this.foldingDecorationProvider.autoHideFoldingControls=this._autoHideFoldingControls,this.globalToDispose.push(this.editor.onDidChangeModel(function(){return t.onModelChanged()})), this.globalToDispose.push(_.FoldingRangeProviderRegistry.onDidChange(function(){return t.onFoldingStrategyChanged()})),this.globalToDispose.push(this.editor.onDidChangeConfiguration(function(e){if(e.contribInfo){var n=t._isEnabled;t._isEnabled=t.editor.getConfiguration().contribInfo.folding,n!==t._isEnabled&&t.onModelChanged();var i=t._autoHideFoldingControls;t._autoHideFoldingControls="mouseover"===t.editor.getConfiguration().contribInfo.showFoldingControls,i!==t._autoHideFoldingControls&&(t.foldingDecorationProvider.autoHideFoldingControls=t._autoHideFoldingControls,t.onModelContentChanged());var o=t._useFoldingProviders;t._useFoldingProviders="indentation"!==t.editor.getConfiguration().contribInfo.foldingStrategy,o!==t._useFoldingProviders&&t.onFoldingStrategyChanged()}})),this.globalToDispose.push({dispose:function(){return l.dispose(t.localToDispose)}}),this.onModelChanged()}return e.get=function(e){return e.getContribution(t.ID)},e.prototype.getId=function(){return t.ID},e.prototype.dispose=function(){ this.globalToDispose=l.dispose(this.globalToDispose)},e.prototype.saveViewState=function(){var e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){var t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),n=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:n}}},e.prototype.restoreViewState=function(e){var t=this.editor.getModel();t&&this._isEnabled&&!t.isTooLargeForTokenization()&&e&&e.collapsedRegions&&e.lineCount===t.getLineCount()&&(e.provider!==y.ID_SYNTAX_PROVIDER&&e.provider!==C.ID_INIT_PROVIDER||(this.foldingStateMemento=e),this.hiddenRangeModel.applyMemento(e.collapsedRegions)&&this.getFoldingModel().then(function(t){t&&t.applyMemento(e.collapsedRegions)}).done(void 0,b.onUnexpectedError))},e.prototype.onModelChanged=function(){var e=this;this.localToDispose=l.dispose(this.localToDispose);var t=this.editor.getModel() ;this._isEnabled&&t&&!t.isTooLargeForTokenization()&&(this.foldingModel=new h.FoldingModel(t,this.foldingDecorationProvider),this.localToDispose.push(this.foldingModel),this.hiddenRangeModel=new g.HiddenRangeModel(this.foldingModel),this.localToDispose.push(this.hiddenRangeModel),this.localToDispose.push(this.hiddenRangeModel.onDidChange(function(t){return e.onHiddenRangesChanges(t)})),this.updateScheduler=new s.Delayer(200),this.cursorChangedScheduler=new s.RunOnceScheduler(function(){return e.revealCursor()},200),this.localToDispose.push(this.cursorChangedScheduler),this.localToDispose.push(this.editor.onDidChangeModelLanguageConfiguration(function(t){return e.onModelContentChanged()})),this.localToDispose.push(this.editor.onDidChangeModelContent(function(t){return e.onModelContentChanged()})),this.localToDispose.push(this.editor.onDidChangeCursorPosition(function(t){return e.onCursorPositionChanged()})),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(){e.foldingRegionPromise&&(e.foldingRegionPromise.cancel(),e.foldingRegionPromise=null),e.updateScheduler.cancel(),e.updateScheduler=null,e.foldingModel=null,e.foldingModelPromise=null,e.hiddenRangeModel=null,e.cursorChangedScheduler=null,e.foldingStateMemento=null,e.rangeProvider&&e.rangeProvider.dispose(),e.rangeProvider=null}}),this.onModelContentChanged())},e.prototype.onFoldingStrategyChanged=function(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()},e.prototype.getRangeProvider=function(e){var t=this;if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new v.IndentRangeProvider(e),this._useFoldingProviders){var n=_.FoldingRangeProviderRegistry.ordered(this.foldingModel.textModel) ;if(0===n.length&&this.foldingStateMemento)return this.rangeProvider=new C.InitializingRangeProvider(e,this.foldingStateMemento.collapsedRegions,function(){t.foldingStateMemento=null,t.onFoldingStrategyChanged()},3e4),this.rangeProvider;n.length>0&&(this.rangeProvider=new y.SyntaxRangeProvider(e,n))}return this.foldingStateMemento=null,this.rangeProvider},e.prototype.getFoldingModel=function(){return this.foldingModelPromise},e.prototype.onModelContentChanged=function(){var e=this;this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(function(){if(!e.foldingModel)return null;var t=e.foldingRegionPromise=s.createCancelablePromise(function(t){return e.getRangeProvider(e.foldingModel.textModel).compute(t)});return u.TPromise.wrap(t.then(function(n){if(n&&t===e.foldingRegionPromise){var i=e.editor.getSelections(),o=i?i.map(function(e){return e.startLineNumber}):[];e.foldingModel.update(n,o)} return e.foldingModel}))}))},e.prototype.onHiddenRangesChanges=function(e){if(e.length){var t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)},e.prototype.onCursorPositionChanged=function(){this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()},e.prototype.revealCursor=function(){var e=this;this.getFoldingModel().then(function(t){if(t){var n=e.editor.getSelections();if(n&&n.length>0){for(var i=[],o=function(n){var o=n.selectionStartLineNumber;e.hiddenRangeModel.isHidden(o)&&i.push.apply(i,t.getAllRegionsAtLine(o,function(e){return e.isCollapsed&&o>e.startLineNumber}))},r=0,s=n;r1)){var n=this.editor.getModel(),o=this.editor.getPosition(),r=!1,s=this.editor.onDidChangeModelContent(function(e){if(e.isFlush)return r=!0,void s.dispose();for(var t=0,n=e.changes.length;t1)){var n=this.editor.getModel(),o=n.getOptions(),r=o.tabSize,s=o.insertSpaces,a=new b.EditorState(this.editor,5) ;p.getDocumentRangeFormattingEdits(n,e,{tabSize:r,insertSpaces:s}).then(function(e){return t.workerService.computeMoreMinimalEdits(n.uri,e)}).then(function(e){a.validate(t.editor)&&!i.isFalsyOrEmpty(e)&&(f.FormattingEdit.execute(t.editor,e),E(e))})}},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.callOnDispose=s.dispose(this.callOnDispose),this.callOnModel=s.dispose(this.callOnModel)},e.ID="editor.contrib.formatOnPaste",e=a([u(1,v.IEditorWorkerService)],e)}(),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(e,t){var n=this,o=e.get(v.IEditorWorkerService),r=e.get(w.INotificationService),s=this._getFormattingEdits(t);if(!s)return l.TPromise.as(void 0);var a=new b.EditorState(t,5);return s.then(function(e){return o.computeMoreMinimalEdits(t.getModel().uri,e)}).then(function(e){a.validate(t)&&!i.isFalsyOrEmpty(e)&&(f.FormattingEdit.execute(t,e),E(e),t.focus())},function(e){ if(!(e instanceof Error&&e.name===p.NoProviderError.Name))throw e;n._notifyNoProviderError(r,t.getModel().getLanguageIdentifier().language)})},t.prototype._notifyNoProviderError=function(e,t){e.info(n.localize(4,null,t))},t}(c.EditorAction);t.AbstractFormatAction=N;var I=function(e){function t(){return e.call(this,{id:"editor.action.formatDocument",label:n.localize(5,null),alias:"Format Document",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},menuOpts:{when:S.EditorContextKeys.hasDocumentFormattingProvider,group:"1_modification",order:1.3}})||this}return o(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return p.getDocumentFormattingEdits(t,{tabSize:i,insertSpaces:o})},t.prototype._notifyNoProviderError=function(e,t){e.info(n.localize(6,null,t))},t}(N);t.FormatDocumentAction=I;var M=function(e){function t(){return e.call(this,{ id:"editor.action.formatSelection",label:n.localize(7,null),alias:"Format Code",precondition:d.ContextKeyExpr.and(S.EditorContextKeys.writable,S.EditorContextKeys.hasNonEmptySelection),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:r.KeyChord(2089,2084),weight:100},menuOpts:{when:d.ContextKeyExpr.and(S.EditorContextKeys.hasDocumentSelectionFormattingProvider,S.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31}})||this}return o(t,e),t.prototype._getFormattingEdits=function(e){var t=e.getModel(),n=t.getOptions(),i=n.tabSize,o=n.insertSpaces;return p.getDocumentRangeFormattingEdits(t,e.getSelection(),{tabSize:i,insertSpaces:o})},t.prototype._notifyNoProviderError=function(e,t){e.info(n.localize(8,null,t))},t}(N);t.FormatSelectionAction=M,c.registerEditorContribution(L),c.registerEditorContribution(x),c.registerEditorAction(I),c.registerEditorAction(M),g.CommandsRegistry.registerCommand("editor.action.format",function(e){var t=e.get(m.ICodeEditorService).getFocusedCodeEditor() ;if(t)return(new(function(e){function t(){return e.call(this,{})||this}return o(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()?p.getDocumentFormattingEdits(t,{tabSize:o,insertSpaces:r}):p.getDocumentRangeFormattingEdits(t,n,{tabSize:o,insertSpaces:r})},t}(N))).run(e,t)})}),define(t[174],n([1,0,25,14,10,13,11,17]),function(e,t,n,i,o,r,s,a){"use strict";function l(e,t,s,a){var l=s.ordered(e).map(function(n){return i.asWinJsPromise(function(i){return a(n,e,t,i)}).then(void 0,function(e){return o.onUnexpectedExternalError(e),null})});return r.TPromise.join(l).then(n.flatten).then(function(e){return n.coalesce(e)})}function u(e,t){return l(e,t,a.DefinitionProviderRegistry,function(e,t,n,i){return e.provideDefinition(t,n,i)})}function d(e,t){return l(e,t,a.ImplementationProviderRegistry,function(e,t,n,i){return e.provideImplementation(t,n,i)})}function c(e,t){ return l(e,t,a.TypeDefinitionProviderRegistry,function(e,t,n,i){return e.provideTypeDefinition(t,n,i)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getDefinitionsAtPosition=u,t.getImplementationsAtPosition=d,t.getTypeDefinitionsAtPosition=c,s.registerDefaultLanguageCommand("_executeDefinitionProvider",u),s.registerDefaultLanguageCommand("_executeImplementationProvider",d),s.registerDefaultLanguageCommand("_executeTypeDefinitionProvider",c)}),define(t[464],n([1,0,25,10,11,17,40]),function(e,t,n,i,o,r,s){"use strict";function a(e,t,o){var s=r.HoverProviderRegistry.ordered(e).map(function(n){return Promise.resolve(n.provideHover(e,t,o)).then(function(e){return e&&function(e){var t=void 0!==e.range,n=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&n}(e)?e:void 0},function(e){i.onUnexpectedExternalError(e)})});return Promise.all(s).then(function(e){return n.coalesce(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.getHover=a, o.registerDefaultLanguageCommand("_executeHoverProvider",function(e,t){return a(e,t,s.CancellationToken.None)})}),define(t[465],n([1,0,323,39,260,53,431,20,76,3,21,12,11,258,259,396,139,133,44]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(e){function t(t,n){var i=e.call(this,n)||this;return i.down=t,i}return o(t,e),t.prototype.run=function(e,t){for(var n=[],i=t.getSelections(),o=0;o0){var s=t.startLineNumber-o;r=new c.Selection(s,t.startColumn,s,t.startColumn) }else r=new c.Selection(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?n=r:i.push(r)}),n&&i.unshift(n),i},t.prototype._getRangesToDelete=function(e){var t=e.getSelections(),n=e.getModel();return t.sort(d.Range.compareRangesUsingStarts),t=t.map(function(e){if(e.isEmpty()){if(1===e.startColumn){var t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new d.Range(t,i,e.startLineNumber,1)}return new d.Range(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return e})},t}(P);t.DeleteAllLeftAction=A;var F=function(e){function t(){return e.call(this,{id:"deleteAllRight",label:n.localize(17,null),alias:"Delete All Right",precondition:l.EditorContextKeys.writable,kbOpts:{kbExpr:l.EditorContextKeys.textInputFocus,primary:null,mac:{primary:297,secondary:[2068]},weight:100}})||this}return o(t,e),t.prototype._getEndCursorState=function(e,t){for(var n,i=[],o=0,r=t.length;oe.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(r);for(var a=t.getModel(),l=[],u=[],h=i,p=0,f=0,g=o.length;f=1){var N=!0;""===w&&(N=!1),!N||" "!==w.charAt(w.length-1)&&"\t"!==w.charAt(w.length-1)||(N=!1,w=w.replace(/[\s\uFEFF\xA0]+$/g," ")) ;var I=L.substr(x-1);w+=(N?" ":"")+I,_=N?I.length+1:I.length}else _=0}var M=new d.Range(v,1,y,C);if(!M.isEmpty()){var D=void 0;m.isEmpty()?(l.push(s.EditOperation.replace(M,w)),D=new c.Selection(M.startLineNumber-p,w.length-_+1,v-p,w.length-_+1)):m.startLineNumber===m.endLineNumber?(l.push(s.EditOperation.replace(M,w)),D=new c.Selection(m.startLineNumber-p,m.startColumn,m.endLineNumber-p,m.endColumn)):(l.push(s.EditOperation.replace(M,w)),D=new c.Selection(m.startLineNumber-p,m.startColumn,m.startLineNumber-p,w.length-b)),null!==d.Range.intersectRanges(M,i)?h=D:u.push(D)}p+=M.endLineNumber-M.startLineNumber}u.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,l,u),t.pushUndoStop()},t}(p.EditorAction);t.JoinLinesAction=W;var V=function(e){function t(){return e.call(this,{id:"editor.action.transpose",label:n.localize(19,null),alias:"Transpose characters around the cursor",precondition:l.EditorContextKeys.writable})||this}return o(t,e),t.prototype.run=function(e,t){ for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,s=n.length;r=h){if(l.lineNumber===i.getLineCount())continue;var p=new d.Range(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),f=i.getValueInRange(p).split("").reverse().join("");o.push(new u.ReplaceCommand(new c.Selection(l.lineNumber,Math.max(1,l.column-1),l.lineNumber+1,1),f))}else{var p=new d.Range(l.lineNumber,Math.max(1,l.column-1),l.lineNumber,l.column+1),f=i.getValueInRange(p).split("").reverse().join("");o.push(new u.ReplaceCommandThatPreservesSelection(p,f,new c.Selection(l.lineNumber,l.column+1,l.lineNumber,l.column+1)))}}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()},t}(p.EditorAction);t.TransposeAction=V;var B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(e,t){for(var n=t.getSelections(),i=t.getModel(),o=[],r=0,s=n.length;r")}},e.prototype._doInsert=function(e,t,n,i,s){var a=this;void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=!0),void 0===s&&(s=!0),this._snippetListener=o.dispose(this._snippetListener),i&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t,n):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new r.SnippetSession(this._editor,e,t,n),this._session.insert()),s&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener=[this._editor.onDidChangeModelContent(function(e){return e.isFlush&&a.cancel() }),this._editor.onDidChangeModel(function(){return a.cancel()}),this._editor.onDidChangeCursorSelection(function(){return a._updateState()})]},e.prototype._updateState=function(){if(this._session){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}},e.prototype._handleChoice=function(){var e=this._session.choice;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map(function(e){return d.Selection.fromPositions(e.getStartPosition())}));var t=e.options[0];l.showSimpleSuggestions(this._editor,e.options.map(function(e,n){return{type:"value",label:e.value,insertText:e.value, sortText:c.repeat("a",n),overwriteAfter:t.value.length}}))}}else this._currentChoice=void 0},e.prototype.finish=function(){for(;this._inSnippet.get();)this.next()},e.prototype.cancel=function(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),o.dispose(this._snippetListener),o.dispose(this._session),this._session=void 0,this._modelVersionId=-1},e.prototype.prev=function(){this._session.prev(),this._updateState()},e.prototype.next=function(){this._session.next(),this._updateState()},e.prototype.isInSnippet=function(){return this._inSnippet.get()},e.InSnippetMode=new n.RawContextKey("inSnippetMode",!1),e.HasNextTabstop=new n.RawContextKey("hasNextTabstop",!1),e.HasPrevTabstop=new n.RawContextKey("hasPrevTabstop",!1),e=a([u(1,h.ILogService),u(2,n.IContextKeyService)],e)}();t.SnippetController2=p,i.registerEditorContribution(p);var f=i.EditorCommand.bindToContribution(p.get);i.registerEditorCommand(new f({id:"jumpToNextSnippetPlaceholder", precondition:n.ContextKeyExpr.and(p.InSnippetMode,p.HasNextTabstop),handler:function(e){return e.next()},kbOpts:{weight:130,kbExpr:s.EditorContextKeys.editorTextFocus,primary:2}})),i.registerEditorCommand(new f({id:"jumpToPrevSnippetPlaceholder",precondition:n.ContextKeyExpr.and(p.InSnippetMode,p.HasPrevTabstop),handler:function(e){return e.prev()},kbOpts:{weight:130,kbExpr:s.EditorContextKeys.editorTextFocus,primary:1026}})),i.registerEditorCommand(new f({id:"leaveSnippet",precondition:p.InSnippetMode,handler:function(e){return e.cancel()},kbOpts:{weight:130,kbExpr:s.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),i.registerEditorCommand(new f({id:"acceptSnippet",precondition:p.InSnippetMode,handler:function(e){return e.finish()}}))}),define(t[471],n([1,0,25,14,10,9,2,70,54,21,17,298,101,135]),function(e,t,n,i,o,r,s,a,l,u,d,c,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=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();t.tokenizeIfCheap(n.lineNumber);var i=t.getWordAtPosition(n);return!!i&&(i.endColumn===n.column&&!!isNaN(Number(i.word)))},e}();t.LineContext=f;var g=function(){function e(e){var t=this;this._toDispose=[],this._triggerQuickSuggest=new i.TimeoutTimer,this._triggerRefilter=new i.TimeoutTimer,this._onDidCancel=new r.Emitter,this._onDidTrigger=new r.Emitter,this._onDidSuggest=new r.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._editor=e,this._state=0,this._requestPromise=null,this._completionModel=null,this._context=null,this._currentSelection=this._editor.getSelection()||new u.Selection(1,1,1,1), this._toDispose.push(this._editor.onDidChangeModel(function(){t._updateTriggerCharacters(),t.cancel()})),this._toDispose.push(this._editor.onDidChangeModelLanguage(function(){t._updateTriggerCharacters(),t.cancel()})),this._toDispose.push(this._editor.onDidChangeConfiguration(function(){t._updateTriggerCharacters(),t._updateQuickSuggest()})),this._toDispose.push(d.SuggestRegistry.onDidChange(function(){t._updateTriggerCharacters(),t._updateActiveSuggestSession()})),this._toDispose.push(this._editor.onDidChangeCursorSelection(function(e){t._onCursorChange(e)})),this._toDispose.push(this._editor.onDidChangeModelContent(function(e){t._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}return e.prototype.dispose=function(){s.dispose([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerCharacterListener,this._triggerQuickSuggest,this._triggerRefilter]),this._toDispose=s.dispose(this._toDispose),s.dispose(this._completionModel),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),i=0,o=d.SuggestRegistry.all(this._editor.getModel());ithis._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){var t=this._completionModel.incomplete,n=this._completionModel.adopt(t);this.trigger({auto:2===this._state},!0,a.values(t),n)}else{var i=this._completionModel.lineContext,o=!1;if(this._completionModel.lineContext={ leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(f.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0)&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,isFrozen:o})}}else this.cancel()},e}();t.SuggestModel=g}),define(t[178],n([1,0,342,11,126]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){return e.call(this,{id:t.ID,label:n.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:null,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=r.TabFocus.getTabFocusMode() ;r.TabFocus.setTabFocusMode(!n)},t.ID="editor.action.toggleTabFocusMode",t}(i.EditorAction);t.ToggleTabFocusModeAction=s,i.registerEditorAction(s)}),define(t[179],n([1,0,20,21,11,12,3,140,76,89,38,54]),function(e,t,n,i,r,s,a,l,u,d,c,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t){var n=e.call(this,t)||this;return n._inSelectionMode=t.inSelectionMode,n._wordNavigationType=t.wordNavigationType,n}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,o=t.getConfiguration(),r=d.getMapForWordSeparators(o.wordSeparators),a=t.getModel(),l=t.getSelections().map(function(e){var t=new s.Position(e.positionLineNumber,e.positionColumn),n=i._move(r,a,t,i._wordNavigationType);return i._moveTo(e,n,i._inSelectionMode)});if(t._getCursors().setStates("moveWordCommand",h.CursorChangeReason.NotSet,l.map(function(e){return c.CursorState.fromModelSelection(e)})),1===l.length){var u=new s.Position(l[0].positionLineNumber,l[0].positionColumn);t.revealPosition(u,0)}}, t.prototype._moveTo=function(e,t,n){return n?new i.Selection(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new i.Selection(t.lineNumber,t.column,t.lineNumber,t.column)},t}(r.EditorCommand);t.MoveWordCommand=p;var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._move=function(e,t,n,i){return l.WordOperations.moveWordLeft(e,t,n,i)},t}(p);t.WordLeftCommand=f;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._move=function(e,t,n,i){return l.WordOperations.moveWordRight(e,t,n,i)},t}(p);t.WordRightCommand=g;var m=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2063,mac:{primary:527},weight:100}})||this}return o(t,e),t}(f);t.CursorWordStartLeft=m;var v=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1, id:"cursorWordEndLeft",precondition:null})||this}return o(t,e),t}(f);t.CursorWordEndLeft=v;var _=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordLeft",precondition:null})||this}return o(t,e),t}(f);t.CursorWordLeft=_;var y=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:3087,mac:{primary:1551},weight:100}})||this}return o(t,e),t}(f);t.CursorWordStartLeftSelect=y;var C=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndLeftSelect",precondition:null})||this}return o(t,e),t}(f);t.CursorWordEndLeftSelect=C;var b=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordLeftSelect",precondition:null})||this}return o(t,e),t}(f);t.CursorWordLeftSelect=b;var S=function(e){function t(){return e.call(this,{inSelectionMode:!1, wordNavigationType:0,id:"cursorWordStartRight",precondition:null})||this}return o(t,e),t}(g);t.CursorWordStartRight=S;var w=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordEndRight",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2065,mac:{primary:529},weight:100}})||this}return o(t,e),t}(g);t.CursorWordEndRight=w;var E=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordRight",precondition:null})||this}return o(t,e),t}(g);t.CursorWordRight=E;var L=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:null})||this}return o(t,e),t}(g);t.CursorWordStartRightSelect=L;var x=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordEndRightSelect",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:3089,mac:{primary:1553},weight:100}})||this} return o(t,e),t}(g);t.CursorWordEndRightSelect=x;var N=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordRightSelect",precondition:null})||this}return o(t,e),t}(g);t.CursorWordRightSelect=N;var I=function(e){function t(t){var n=e.call(this,t)||this;return n._whitespaceHeuristics=t.whitespaceHeuristics,n._wordNavigationType=t.wordNavigationType,n}return o(t,e),t.prototype.runEditorCommand=function(e,t,n){var i=this,o=t.getConfiguration(),r=d.getMapForWordSeparators(o.wordSeparators),s=t.getModel(),a=t.getSelections().map(function(e){var t=i._delete(r,s,e,i._whitespaceHeuristics,i._wordNavigationType);return new u.ReplaceCommand(t,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()},t}(r.EditorCommand);t.DeleteWordCommand=I;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._delete=function(e,t,n,i,o){var r=l.WordOperations.deleteWordLeft(e,t,n,i,o);return r||new a.Range(1,1,1,1)},t}(I) ;t.DeleteWordLeftCommand=M;var D=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._delete=function(e,t,n,i,o){var r=l.WordOperations.deleteWordRight(e,t,n,i,o);if(r)return r;var s=t.getLineCount(),u=t.getLineMaxColumn(s);return new a.Range(s,u,s,u)},t}(I);t.DeleteWordRightCommand=D;var T=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:n.EditorContextKeys.writable})||this}return o(t,e),t}(M);t.DeleteWordStartLeft=T;var k=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndLeft",precondition:n.EditorContextKeys.writable})||this}return o(t,e),t}(M);t.DeleteWordEndLeft=k;var R=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})||this} return o(t,e),t}(M);t.DeleteWordLeft=R;var O=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:n.EditorContextKeys.writable})||this}return o(t,e),t}(D);t.DeleteWordStartRight=O;var P=function(e){function t(){return e.call(this,{whitespaceHeuristics:!1,wordNavigationType:1,id:"deleteWordEndRight",precondition:n.EditorContextKeys.writable})||this}return o(t,e),t}(D);t.DeleteWordEndRight=P;var A=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordRight",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})||this}return o(t,e),t}(D);t.DeleteWordRight=A,r.registerEditorCommand(new m),r.registerEditorCommand(new v),r.registerEditorCommand(new _),r.registerEditorCommand(new y),r.registerEditorCommand(new C),r.registerEditorCommand(new b),r.registerEditorCommand(new S),r.registerEditorCommand(new w), r.registerEditorCommand(new E),r.registerEditorCommand(new L),r.registerEditorCommand(new x),r.registerEditorCommand(new N),r.registerEditorCommand(new T),r.registerEditorCommand(new k),r.registerEditorCommand(new R),r.registerEditorCommand(new O),r.registerEditorCommand(new P),r.registerEditorCommand(new A)}),define(t[474],n([1,0,20,11,3,140,179,34]),function(e,t,n,i,r,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})||this}return o(t,e),t.prototype._delete=function(e,t,n,i,o){var a=s.WordPartOperations.deleteWordPartLeft(e,t,n,i,o);return a||new r.Range(1,1,1,1)},t}(a.DeleteWordCommand);t.DeleteWordPartLeft=u;var d=function(e){function t(){return e.call(this,{whitespaceHeuristics:!0,wordNavigationType:1,id:"deleteWordPartRight", precondition:n.EditorContextKeys.writable,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})||this}return o(t,e),t.prototype._delete=function(e,t,n,i,o){var a=s.WordPartOperations.deleteWordPartRight(e,t,n,i,o);if(a)return a;var l=t.getLineCount(),u=t.getLineMaxColumn(l);return new r.Range(l,u,l,u)},t}(a.DeleteWordCommand);t.DeleteWordPartRight=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._move=function(e,t,n,i){return s.WordPartOperations.moveWordPartLeft(e,t,n,i)},t}(a.MoveWordCommand);t.WordPartLeftCommand=c;var h=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})||this}return o(t,e),t}(c);t.CursorWordPartLeft=h,l.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");var p=function(e){function t(){ return e.call(this,{inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})||this}return o(t,e),t}(c);t.CursorWordPartLeftSelect=p,l.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._move=function(e,t,n,i){return s.WordPartOperations.moveWordPartRight(e,t,n,i)},t}(a.MoveWordCommand);t.WordPartRightCommand=f;var g=function(e){function t(){return e.call(this,{inSelectionMode:!1,wordNavigationType:1,id:"cursorWordPartRight",precondition:null,kbOpts:{kbExpr:n.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})||this}return o(t,e),t}(f);t.CursorWordPartRight=g;var m=function(e){function t(){return e.call(this,{inSelectionMode:!0,wordNavigationType:1,id:"cursorWordPartRightSelect",precondition:null,kbOpts:{ kbExpr:n.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})||this}return o(t,e),t}(f);t.CursorWordPartRightSelect=m,i.registerEditorCommand(new u),i.registerEditorCommand(new d),i.registerEditorCommand(new h),i.registerEditorCommand(new p),i.registerEditorCommand(new g),i.registerEditorCommand(new m)}),define(t[475],n([1,0,2,30,7,23,11,404]),function(e,t,n,i,o,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=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 l(this.editor):e&&!t&&(this.widget.dispose(),this.widget=null)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toDispose=n.dispose(this.toDispose),this.widget&&(this.widget.dispose(),this.widget=null)}, e.ID="editor.contrib.iPadShowKeyboard",e}();t.IPadShowKeyboard=a;var l=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.ID="editor.contrib.ShowKeyboardWidget",e}();s.registerEditorContribution(a)}),define(t[476],n([1,0,351,11,84]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){ var t=e.call(this,{id:"editor.action.toggleHighContrast",label:n.localize(0,null),alias:"Toggle High Contrast Theme",precondition:null})||this;return t._originalThemeName=null,t}return o(t,e),t.prototype.run=function(e,t){var n=e.get(r.IStandaloneThemeService);this._originalThemeName?(n.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=n.getTheme().themeName,n.setTheme("hc-black"))},t}(i.EditorAction);i.registerEditorAction(s)}),define(t[477],n([1,0,197,86,117]),function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,i){this.logService=i,this.contextView=new n.ContextView(e)}return e.prototype.dispose=function(){this.contextView.dispose()},e.prototype.setContainer=function(e){this.logService.trace("ContextViewService#setContainer"),this.contextView.setContainer(e)},e.prototype.showContextView=function(e){this.logService.trace("ContextViewService#showContextView"),this.contextView.show(e)}, e.prototype.layout=function(){this.contextView.layout()},e.prototype.hideContextView=function(e){this.logService.trace("ContextViewService#hideContextView"),this.contextView.hide(e)},e=a([u(1,i.ITelemetryService),u(2,o.ILogService)],e)}();t.ContextViewService=r}),define(t[478],n([1,0,13]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullTelemetryService=new(function(){function e(){}return e.prototype.publicLog=function(e,t){return n.TPromise.wrap(null)},e.prototype.getTelemetryInfo=function(){return n.TPromise.wrap({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId"})},e}())}),define(t[479],n([1,0,7,480,61,13,32,50,34,86,15,478]),function(e,t,n,i,o,r,s,l,d,c,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){void 0===n&&(n=p.NullTelemetryService),this._editorService=e,this._commandService=t,this._telemetryService=n}return e.prototype.open=function(e,t){var s ;this._telemetryService.publicLog("openerService",{scheme:e.scheme});var a=e.scheme,u=e.path,c=e.query,h=e.fragment,p=r.TPromise.wrap(void 0);if(a===o.Schemas.http||a===o.Schemas.https||a===o.Schemas.mailto)n.windowOpenNoOpener(e.toString(!0));else if("command"===a&&d.CommandsRegistry.getCommand(u)){var f=[];try{f=i.parse(c),Array.isArray(f)||(f=[f])}catch(e){}p=(s=this._commandService).executeCommand.apply(s,[u].concat(f))}else{var g=void 0,m=/^L?(\d+)(?:,(\d+))?/.exec(h);if(m&&(g={startLineNumber:parseInt(m[1]),startColumn:m[2]?parseInt(m[2]):1},e=e.with({fragment:""})),!e.scheme)return r.TPromise.as(void 0);e.scheme===o.Schemas.file&&(e=e.with({path:l.normalize(e.path)})),p=this._editorService.openCodeEditor({resource:e,options:{selection:g}},this._editorService.getFocusedCodeEditor(),t&&t.openToSide)}return p},e=a([u(0,s.ICodeEditorService),u(1,d.ICommandService),u(2,h.optional(c.ITelemetryService))],e)}();t.OpenerService=f}),define(t[22],n([1,0,45,27,356]),function(e,t,n,i,o){"use strict" ;function r(e,t,n,i,o){return u.registerColor(e,t,n,i,o)}function s(e,t){return function(n){var i=l(e,n);return i?i.transparent(t):null}}function a(e,t,n,o){return function(r){var s=l(e,r);if(s){var a=l(t,r);return a?s.isDarkerThan(a)?i.Color.getLighterColor(s,a,n).transparent(o):i.Color.getDarkerColor(s,a,n).transparent(o):s.transparent(n*o)}return null}}function l(e,t){return null===e?null:"string"==typeof e?"#"===e[0]?i.Color.fromHex(e):t.getColor(e):e instanceof i.Color?e:"function"==typeof e?e(t):null}Object.defineProperty(t,"__esModule",{value:!0}),t.Extensions={ColorContribution:"base.contributions.colors"};var u=new(function(){function e(){this.colorSchema={type:"object",description:o.localize(0,null),properties:{},additionalProperties:!1},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}return e.prototype.registerColor=function(e,t,n,i,o){void 0===i&&(i=!1);var r={id:e,description:n,defaults:t,needsTransparency:i,deprecationMessage:o};this.colorsById[e]=r ;var s={type:"string",description:n,format:"color-hex",default:"#ff0000"};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(n),e},e.prototype.resolveDefaultColor=function(e,t){var n=this.colorsById[e];if(n&&n.defaults){return l(n.defaults[t.type],t)}return null},e.prototype.toString=function(){var e=this;return Object.keys(this.colorsById).sort(function(e,t){var n=-1===e.indexOf(".")?0:1,i=-1===t.indexOf(".")?0:1;return n!==i?n-i:e.localeCompare(t)}).map(function(t){return"- `"+t+"`: "+e.colorsById[t].description}).join("\n")},e}());n.Registry.add(t.Extensions.ColorContribution,u),t.registerColor=r,t.foreground=r("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},o.localize(1,null)),t.errorForeground=r("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},o.localize(2,null)),t.focusBorder=r("focusBorder",{dark:i.Color.fromHex("#0E639C").transparent(.6), light:i.Color.fromHex("#007ACC").transparent(.4),hc:"#F38518"},o.localize(3,null)),t.contrastBorder=r("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},o.localize(4,null)),t.activeContrastBorder=r("contrastActiveBorder",{light:null,dark:null,hc:t.focusBorder},o.localize(5,null)),t.textLinkForeground=r("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},o.localize(6,null)),t.textCodeBlockBackground=r("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:i.Color.black},o.localize(7,null)),t.widgetShadow=r("widget.shadow",{dark:"#000000",light:"#A8A8A8",hc:null},o.localize(8,null)),t.inputBackground=r("input.background",{dark:"#3C3C3C",light:i.Color.white,hc:i.Color.black},o.localize(9,null)),t.inputForeground=r("input.foreground",{dark:t.foreground,light:t.foreground,hc:t.foreground},o.localize(10,null)),t.inputBorder=r("input.border",{dark:null,light:null,hc:t.contrastBorder},o.localize(11,null)),t.inputActiveOptionBorder=r("inputOption.activeBorder",{dark:"#007ACC", light:"#007ACC",hc:t.activeContrastBorder},o.localize(12,null)),t.inputValidationInfoBackground=r("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:i.Color.black},o.localize(13,null)),t.inputValidationInfoBorder=r("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:t.contrastBorder},o.localize(14,null)),t.inputValidationWarningBackground=r("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:i.Color.black},o.localize(15,null)),t.inputValidationWarningBorder=r("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:t.contrastBorder},o.localize(16,null)),t.inputValidationErrorBackground=r("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:i.Color.black},o.localize(17,null)),t.inputValidationErrorBorder=r("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:t.contrastBorder},o.localize(18,null)),t.listFocusBackground=r("list.focusBackground",{dark:"#062F4A",light:"#DFF0FF",hc:null},o.localize(19,null)), t.listFocusForeground=r("list.focusForeground",{dark:null,light:null,hc:null},o.localize(20,null)),t.listActiveSelectionBackground=r("list.activeSelectionBackground",{dark:"#094771",light:"#2477CE",hc:null},o.localize(21,null)),t.listActiveSelectionForeground=r("list.activeSelectionForeground",{dark:i.Color.white,light:i.Color.white,hc:null},o.localize(22,null)),t.listInactiveSelectionBackground=r("list.inactiveSelectionBackground",{dark:"#37373D",light:"#dddfea",hc:null},o.localize(23,null)),t.listInactiveSelectionForeground=r("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},o.localize(24,null)),t.listInactiveFocusBackground=r("list.inactiveFocusBackground",{dark:"#313135",light:"#d8dae6",hc:null},o.localize(25,null)),t.listHoverBackground=r("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},o.localize(26,null)),t.listHoverForeground=r("list.hoverForeground",{dark:null,light:null,hc:null},o.localize(27,null)),t.listDropBackground=r("list.dropBackground",{ dark:t.listFocusBackground,light:t.listFocusBackground,hc:null},o.localize(28,null)),t.listHighlightForeground=r("list.highlightForeground",{dark:"#0097fb",light:"#007acc",hc:t.focusBorder},o.localize(29,null)),t.pickerGroupForeground=r("pickerGroup.foreground",{dark:"#3794FF",light:"#006AB1",hc:i.Color.white},o.localize(30,null)),t.pickerGroupBorder=r("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:i.Color.white},o.localize(31,null)),t.badgeBackground=r("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:i.Color.black},o.localize(32,null)),t.badgeForeground=r("badge.foreground",{dark:i.Color.white,light:"#333",hc:i.Color.white},o.localize(33,null)),t.scrollbarShadow=r("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},o.localize(34,null)),t.scrollbarSliderBackground=r("scrollbarSlider.background",{dark:i.Color.fromHex("#797979").transparent(.4),light:i.Color.fromHex("#646464").transparent(.4),hc:s(t.contrastBorder,.6)},o.localize(35,null)), t.scrollbarSliderHoverBackground=r("scrollbarSlider.hoverBackground",{dark:i.Color.fromHex("#646464").transparent(.7),light:i.Color.fromHex("#646464").transparent(.7),hc:s(t.contrastBorder,.8)},o.localize(36,null)),t.scrollbarSliderActiveBackground=r("scrollbarSlider.activeBackground",{dark:i.Color.fromHex("#BFBFBF").transparent(.4),light:i.Color.fromHex("#000000").transparent(.6),hc:t.contrastBorder},o.localize(37,null)),t.progressBarBackground=r("progressBar.background",{dark:i.Color.fromHex("#0E70C0"),light:i.Color.fromHex("#0E70C0"),hc:t.contrastBorder},o.localize(38,null)),t.editorBackground=r("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:i.Color.black},o.localize(39,null)),t.editorForeground=r("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:i.Color.white},o.localize(40,null)),t.editorWidgetBackground=r("editorWidget.background",{dark:"#2D2D30",light:"#EFEFF2",hc:"#0C141F"},o.localize(41,null)),t.editorWidgetBorder=r("editorWidget.border",{dark:"#454545",light:"#C8C8C8", hc:t.contrastBorder},o.localize(42,null)),t.editorWidgetResizeBorder=r("editorWidget.resizeBorder",{light:null,dark:null,hc:null},o.localize(43,null)),t.editorSelectionBackground=r("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},o.localize(44,null)),t.editorSelectionForeground=r("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},o.localize(45,null)),t.editorInactiveSelection=r("editor.inactiveSelectionBackground",{light:s(t.editorSelectionBackground,.5),dark:s(t.editorSelectionBackground,.5),hc:s(t.editorSelectionBackground,.5)},o.localize(46,null),!0),t.editorSelectionHighlight=r("editor.selectionHighlightBackground",{light:a(t.editorSelectionBackground,t.editorBackground,.3,.6),dark:a(t.editorSelectionBackground,t.editorBackground,.3,.6),hc:null},o.localize(47,null),!0),t.editorSelectionHighlightBorder=r("editor.selectionHighlightBorder",{light:null,dark:null,hc:t.activeContrastBorder},o.localize(48,null)),t.editorFindMatch=r("editor.findMatchBackground",{ light:"#A8AC94",dark:"#515C6A",hc:null},o.localize(49,null)),t.editorFindMatchHighlight=r("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},o.localize(50,null),!0),t.editorFindRangeHighlight=r("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},o.localize(51,null),!0),t.editorFindMatchBorder=r("editor.findMatchBorder",{light:null,dark:null,hc:t.activeContrastBorder},o.localize(52,null)),t.editorFindMatchHighlightBorder=r("editor.findMatchHighlightBorder",{light:null,dark:null,hc:t.activeContrastBorder},o.localize(53,null)),t.editorFindRangeHighlightBorder=r("editor.findRangeHighlightBorder",{dark:null,light:null,hc:s(t.activeContrastBorder,.4)},o.localize(54,null),!0),t.editorHoverHighlight=r("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},o.localize(55,null),!0),t.editorHoverBackground=r("editorHoverWidget.background",{light:t.editorWidgetBackground,dark:t.editorWidgetBackground,hc:t.editorWidgetBackground },o.localize(56,null)),t.editorHoverBorder=r("editorHoverWidget.border",{light:t.editorWidgetBorder,dark:t.editorWidgetBorder,hc:t.editorWidgetBorder},o.localize(57,null)),t.editorActiveLinkForeground=r("editorLink.activeForeground",{dark:"#4E94CE",light:i.Color.blue,hc:i.Color.cyan},o.localize(58,null)),t.defaultInsertColor=new i.Color(new i.RGBA(155,185,85,.2)),t.defaultRemoveColor=new i.Color(new i.RGBA(255,0,0,.2)),t.diffInserted=r("diffEditor.insertedTextBackground",{dark:t.defaultInsertColor,light:t.defaultInsertColor,hc:null},o.localize(59,null),!0),t.diffRemoved=r("diffEditor.removedTextBackground",{dark:t.defaultRemoveColor,light:t.defaultRemoveColor,hc:null},o.localize(60,null),!0),t.diffInsertedOutline=r("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},o.localize(61,null)),t.diffRemovedOutline=r("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},o.localize(62,null)),t.diffBorder=r("diffEditor.border",{dark:null,light:null,hc:t.contrastBorder },o.localize(63,null));var d=new i.Color(new i.RGBA(246,185,77,.7));t.overviewRulerFindMatchForeground=r("editorOverviewRuler.findMatchForeground",{dark:d,light:d,hc:d},o.localize(64,null),!0),t.overviewRulerSelectionHighlightForeground=r("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},o.localize(65,null),!0),t.transparent=s,t.oneOf=function(){for(var e=[],t=0;t0&&(o.insertRule(this._unThemedSelector+" {"+e+"}",0),r=!0),t.length>0&&(o.insertRule(".vs"+this._unThemedSelector+" {"+t+"}",0),r=!0),n.length>0&&(o.insertRule(".vs-dark"+this._unThemedSelector+", .hc-black"+this._unThemedSelector+" {"+n+"}",0),r=!0),this._hasContent=r},e.prototype._removeCSS=function(){r.removeCSSRulesContainingSelector(this._unThemedSelector,this._providerArgs.styleSheet)},e.prototype.getCSSTextForModelDecorationClassName=function(e){if(!e)return"";var t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")},e.prototype.getCSSTextForModelDecorationInlineClassName=function(e){if(!e)return"" ;var t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")},e.prototype.getCSSTextForModelDecorationContentClassName=function(e){if(!e)return"";var t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&("string"==typeof e.contentIconPath?t.push(n.format(m.contentIconPath,i.default.file(e.contentIconPath).toString().replace(/'/g,"%27"))):t.push(n.format(m.contentIconPath,i.default.revive(e.contentIconPath).toString(!0).replace(/'/g,"%27")))),"string"==typeof e.contentText){var o=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(n.format(m.contentText,o))}this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","color","opacity","backgroundColor","margin"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")},e.prototype.getCSSTextForModelDecorationGlyphMarginClassName=function(e){ if(!e)return"";var t=[];return void 0!==e.gutterIconPath&&("string"==typeof e.gutterIconPath?t.push(n.format(m.gutterIconPath,i.default.file(e.gutterIconPath).toString())):t.push(n.format(m.gutterIconPath,i.default.revive(e.gutterIconPath).toString(!0).replace(/'/g,"%27"))),void 0!==e.gutterIconSize&&t.push(n.format(m.gutterIconSize,e.gutterIconSize))),t.join("")},e.prototype.collectBorderSettingsCSSText=function(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(n.format("box-sizing: border-box;")),!0)},e.prototype.collectCSSText=function(e,t,i){for(var o=i.length,r=0,s=t;rt)){var v=m.startLineNumber===t?m.startColumn:r.minColumn,y=m.endLineNumber===t?m.endColumn:r.maxColumn;v') ;var S=a.renderViewLine(C,o);o.appendASCIIString("");var w=null;return p&&r.isBasicASCII&&l.useMonospaceOptimizations&&0===S.containsForeignElements&&r.content.length<300&&C.lineTokens.getCount()<100&&(w=new _(this._renderedViewLine?this._renderedViewLine.domNode:null,C,S.characterMapping)),w||(w=b(this._renderedViewLine?this._renderedViewLine.domNode:null,C,S.characterMapping,S.containsRTL,S.containsForeignElements)),this._renderedViewLine=w,!0},e.prototype.layoutLine=function(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))},e.prototype.getWidth=function(){return this._renderedViewLine?this._renderedViewLine.getWidth():0},e.prototype.getWidthIsFast=function(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()},e.prototype.getVisibleRangesForRange=function(e,t,n){e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)), t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));var i=0|this._renderedViewLine.input.stopRenderingLineAfter;return-1!==i&&e>i&&t>i?null:(-1!==i&&e>i&&(e=i),-1!==i&&t>i&&(t=i),this._renderedViewLine.getVisibleRangesForRange(e,t,n))},e.prototype.getColumnOfNodeOffset=function(e,t,n){return this._renderedViewLine.getColumnOfNodeOffset(e,t,n)},e.CLASS_NAME="view-line",e}();t.ViewLine=v;var _=function(){function e(e,t,n){this.domNode=e,this.input=t,this._characterMapping=n,this._charWidth=t.spaceWidth}return e.prototype.getWidth=function(){return this._getCharPosition(this._characterMapping.length)},e.prototype.getWidthIsFast=function(){return!0},e.prototype.getVisibleRangesForRange=function(e,t,n){var i=this._getCharPosition(e),o=this._getCharPosition(t);return[new u.HorizontalRange(i,o-i)]},e.prototype._getCharPosition=function(e){var t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}, e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),y=function(){function e(e,t,n,i,o){if(this.domNode=e,this.input=t,this._characterMapping=n,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!i||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(var r=0,s=this._characterMapping.length;r<=s;r++)this._pixelOffsetCache[r]=-1}}return e.prototype._getReadingTarget=function(){return this.domNode.domNode.firstChild},e.prototype.getWidth=function(){return-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget().offsetWidth),this._cachedWidth},e.prototype.getWidthIsFast=function(){return-1!==this._cachedWidth},e.prototype.getVisibleRangesForRange=function(e,t,n){if(null!==this._pixelOffsetCache){var i=this._readPixelOffset(e,n) ;if(-1===i)return null;var o=this._readPixelOffset(t,n);return-1===o?null:[new u.HorizontalRange(i,o-i)]}return this._readVisibleRangesForRange(e,t,n)},e.prototype._readVisibleRangesForRange=function(e,t,n){if(e===t){var i=this._readPixelOffset(e,n);return-1===i?null:[new u.HorizontalRange(i,0)]}return this._readRawVisibleRangesForRange(e,t,n)},e.prototype._readPixelOffset=function(e,t){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth()}if(null!==this._pixelOffsetCache){var n=this._pixelOffsetCache[e];if(-1!==n)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){var n=l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),0,0,0,0,t.clientRectDeltaLeft,t.endNode);return n&&0!==n.length?n[0].left:-1} if(e===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();var i=this._characterMapping.charOffsetToPartData(e-1),o=a.CharacterMapping.getPartIndex(i),r=a.CharacterMapping.getCharIndex(i),s=l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),o,r,o,r,t.clientRectDeltaLeft,t.endNode);return s&&0!==s.length?s[0].left:-1},e.prototype._readRawVisibleRangesForRange=function(e,t,n){if(1===e&&t===this._characterMapping.length)return[new u.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),d=a.CharacterMapping.getPartIndex(s),c=a.CharacterMapping.getCharIndex(s);return l.RangeUtil.readHorizontalRanges(this._getReadingTarget(),o,r,d,c,n.clientRectDeltaLeft,n.endNode)},e.prototype.getColumnOfNodeOffset=function(e,t,n){for(var i=t.textContent.length,o=-1;t;)t=t.previousSibling,o++ ;return this._characterMapping.partDataToCharOffset(o,i,n)+1},e}(),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(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(-1!==r&&-1!==s){var a=r<=s,l=o[o.length-1];a&&l.left=4&&3===e[0]&&7===e[3]},e.isStrictChildOfViewLines=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.isChildOfMinimap=function(e){return e.length>=2&&3===e[0]&&8===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}(),p=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(t){return e.getZoneAtCoord(this._context,t)},e.getZoneAtCoord=function(e,t){ var i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){var o=i.verticalOffset+i.height/2,r=e.model.getLineCount(),s=null,a=void 0,l=null;return i.afterLineNumber!==r&&(l=new n.Position(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new n.Position(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),a=null===l?s:null===s?l:t=e.layoutInfo.glyphMarginLeft, this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,m._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}()),g={isAfterLines:!0},m=function(){function e(e,t){this._context=e,this._viewHelper=t}return e.prototype.mouseTargetIsWidget=function(e){var t=e.target,n=l.PartFingerprints.collect(t,this._viewHelper.viewDomNode);return!(!h.isChildOfContentWidgets(n)&&!h.isChildOfOverflowingContentWidgets(n))||!!h.isChildOfOverlayWidgets(n)},e.prototype.createMouseTarget=function(t,n,i,o){var s=new p(this._context,this._viewHelper,t),a=new f(s,n,i,o);try{return e._createMouseTarget(s,a,!1)}catch(e){return a.fulfill(r.MouseTargetType.UNKNOWN)}},e._createMouseTarget=function(t,n,i){if(null===n.target){if(i)return n.fulfill(r.MouseTargetType.UNKNOWN);var o=e._doHitTest(t,n);return o.position?e.createMouseTargetFromHitTestPosition(t,n,o.position.lineNumber,o.position.column):this._createMouseTarget(t,n.withTarget(o.hitTarget),!0)}var s=null ;return s=s||e._hitTestContentWidget(t,n),s=s||e._hitTestOverlayWidget(t,n),s=s||e._hitTestMinimap(t,n),s=s||e._hitTestScrollbarSlider(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))||n.fulfill(r.MouseTargetType.UNKNOWN)},e._hitTestContentWidget=function(e,t){if(h.isChildOfContentWidgets(t.targetPath)||h.isChildOfOverflowingContentWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(r.MouseTargetType.CONTENT_WIDGET,null,null,n):t.fulfill(r.MouseTargetType.UNKNOWN)}return null},e._hitTestOverlayWidget=function(e,t){if(h.isChildOfOverlayWidgets(t.targetPath)){var n=e.findAttribute(t.target,"widgetId");return n?t.fulfill(r.MouseTargetType.OVERLAY_WIDGET,null,null,n):t.fulfill(r.MouseTargetType.UNKNOWN)}return null},e._hitTestViewCursor=function(e,t){if(t.target)for(var n=0,i=(o=e.lastViewCursorsRenderData).length;nl.contentLeft+l.width)){var u=e.getVerticalOffsetForLineNumber(l.position.lineNumber);if(u<=a&&a<=u+l.height)return t.fulfill(r.MouseTargetType.CONTENT_TEXT,l.position)}}return null},e._hitTestViewZone=function(e,t){var n=e.getZoneAtCoord(t.mouseVerticalOffset);if(n){var i=t.isInContentArea?r.MouseTargetType.CONTENT_VIEW_ZONE:r.MouseTargetType.GUTTER_VIEW_ZONE;return t.fulfill(i,n.position,null,n)}return null},e._hitTestTextArea=function(e,t){return h.isTextArea(t.targetPath)?t.fulfill(r.MouseTargetType.TEXTAREA):null},e._hitTestMargin=function(e,t){if(t.isInMarginArea){var n=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),i=n.range.getStartPosition(),o=Math.abs(t.pos.x-t.editorPos.x),s={isAfterLines:n.isAfterLines, glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return(o-=e.layoutInfo.glyphMarginLeft)<=e.layoutInfo.glyphMarginWidth?t.fulfill(r.MouseTargetType.GUTTER_GLYPH_MARGIN,i,n.range,s):(o-=e.layoutInfo.glyphMarginWidth)<=e.layoutInfo.lineNumbersWidth?t.fulfill(r.MouseTargetType.GUTTER_LINE_NUMBERS,i,n.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(r.MouseTargetType.GUTTER_LINE_DECORATIONS,i,n.range,s))}return null},e._hitTestViewLines=function(t,i,o){if(!h.isChildOfViewLines(i.targetPath))return null;if(t.isAfterLines(i.mouseVerticalOffset)){var s=t.model.getLineCount(),a=t.model.getLineMaxColumn(s);return i.fulfill(r.MouseTargetType.CONTENT_EMPTY,new n.Position(s,a),void 0,g)}if(o){if(h.isStrictChildOfViewLines(i.targetPath)){var l=t.getLineNumberAtVerticalOffset(i.mouseVerticalOffset);if(0===t.model.getLineLength(l)){var u=t.getLineWidth(l),c=d(i.mouseContentHorizontalOffset-u) ;return i.fulfill(r.MouseTargetType.CONTENT_EMPTY,new n.Position(l,1),void 0,c)}}return i.fulfill(r.MouseTargetType.UNKNOWN)}var p=e._doHitTest(t,i);return p.position?e.createMouseTargetFromHitTestPosition(t,i,p.position.lineNumber,p.position.column):this._createMouseTarget(t,i.withTarget(p.hitTarget),!0)},e._hitTestMinimap=function(e,t){if(h.isChildOfMinimap(t.targetPath)){var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(r.MouseTargetType.SCROLLBAR,new n.Position(i,o))}return null},e._hitTestScrollbarSlider=function(e,t){if(h.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){var i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){var o=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.model.getLineMaxColumn(o);return t.fulfill(r.MouseTargetType.SCROLLBAR,new n.Position(o,s))}}return null},e._hitTestScrollbar=function(e,t){if(h.isChildOfScrollableElement(t.targetPath)){ var i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),o=e.model.getLineMaxColumn(i);return t.fulfill(r.MouseTargetType.SCROLLBAR,new n.Position(i,o))}return null},e.prototype.getMouseColumn=function(t,n){var i=this._context.configuration.editor.layoutInfo,o=this._context.viewLayout.getCurrentScrollLeft()+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;return Math.round(e/t)+1},e.createMouseTargetFromHitTestPosition=function(e,t,o,s){var l=new n.Position(o,s),u=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>u){if(a.isEdge&&1===l.column){var c=d(t.mouseContentHorizontalOffset-u);return t.fulfill(r.MouseTargetType.CONTENT_EMPTY,new n.Position(o,e.model.getLineMaxColumn(o)),void 0,c)}var h=d(t.mouseContentHorizontalOffset-u);return t.fulfill(r.MouseTargetType.CONTENT_EMPTY,l,void 0,h)}var p=e.visibleRangeForPosition2(o,s);if(!p)return t.fulfill(r.MouseTargetType.UNKNOWN,l) ;var f=p.left;if(t.mouseContentHorizontalOffset===f)return t.fulfill(r.MouseTargetType.CONTENT_TEXT,l);var g=[];if(g.push({offset:p.left,column:s}),s>1){var m=e.visibleRangeForPosition2(o,s-1);m&&g.push({offset:m.left,column:s-1})}if(s=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1) ;var r=new s.PageCoordinates(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return a.position?a: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 r=(a=(s=o.parentNode)?s.parentNode:null)?a.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===u.ViewLine.CLASS_NAME){return{position:l=e.getPositionFromDOMInfo(s,n.startOffset),hitTarget:null}}i=o.parentNode}else if(o.nodeType===o.ELEMENT_NODE){var s=o.parentNode,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===u.ViewLine.CLASS_NAME){var l=e.getPositionFromDOMInfo(o,o.textContent.length);return{position:l,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,r=o?o.parentNode:null;if((r&&r.nodeType===r.ELEMENT_NODE?r.className:null)===u.ViewLine.CLASS_NAME){return{position:e.getPositionFromDOMInfo(n.offsetNode.parentNode,n.offset),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 r=o?o.parentElement():null,s=r?r.parentNode:null,a=s?s.parentNode:null;if((a&&a.nodeType===a.ELEMENT_NODE?a.className:"")===u.ViewLine.CLASS_NAME){var l=o.duplicate();l.moveToElementText(r),l.setEndPoint("EndToStart",o),n=e.getPositionFromDOMInfo(r,l.text.length),l.moveToElementText(e.viewDomNode)}else i=r;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=m}),define(t[488],n([1,0,2,18,30,7,12,21,80,184,23,14,116,42,98]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g){"use strict";function m(e){return function(t,n){var i=!1;return e&&(i=e.mouseTargetIsWidget(n)),i||n.preventDefault(),n}}Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(n,i,o){var r=e.call(this)||this;r._isFocused=!1,r._context=n,r.viewController=i,r.viewHelper=o,r.mouseTargetFactory=new d.MouseTargetFactory(r._context,o),r._mouseDownOperation=r._register(new _(r._context,r.viewController,r.viewHelper,function(e,t){return r._createMouseTarget(e,t)},function(e){return r._getMouseColumn(e)})), r._asyncFocus=r._register(new h.RunOnceScheduler(function(){return r.viewHelper.focusTextArea()},0)),r.lastMouseLeaveTime=-1;var a=new p.EditorMouseEventFactory(r.viewHelper.viewDomNode);r._register(a.onContextMenu(r.viewHelper.viewDomNode,function(e){return r._onContextMenu(e,!0)})),r._register(a.onMouseMoveThrottled(r.viewHelper.viewDomNode,function(e){return r._onMouseMove(e)},m(r.mouseTargetFactory),t.MOUSE_MOVE_MINIMUM_TIME)),r._register(a.onMouseUp(r.viewHelper.viewDomNode,function(e){return r._onMouseUp(e)})),r._register(a.onMouseLeave(r.viewHelper.viewDomNode,function(e){return r._onMouseLeave(e)})),r._register(a.onMouseDown(r.viewHelper.viewDomNode,function(e){return r._onMouseDown(e)}));var l=function(e){if(r._context.configuration.editor.viewInfo.mouseWheelZoom){var t=new f.StandardMouseWheelEvent(e);if(t.browserEvent.ctrlKey||t.browserEvent.metaKey){var n=g.EditorZoom.getZoomLevel(),i=t.deltaY>0?1:-1;g.EditorZoom.setZoomLevel(n+i),t.preventDefault(),t.stopPropagation()}}} ;return r._register(s.addDisposableListener(r.viewHelper.viewDomNode,"mousewheel",l,!0)),r._register(s.addDisposableListener(r.viewHelper.viewDomNode,"DOMMouseScroll",l,!0)),r._context.addEventHandler(r),r}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),e.prototype.dispose.call(this)},t.prototype.onCursorStateChanged=function(e){return this._mouseDownOperation.onCursorStateChanged(e),!1},t.prototype.onFocusChanged=function(e){return this._isFocused=e.isFocused,!1},t.prototype.onScrollChanged=function(e){return this._mouseDownOperation.onScrollChanged(),!1},t.prototype.getTargetAtClientPoint=function(e,t){var n=new p.ClientCoordinates(e,t).toPageCoordinates(),i=p.createEditorPagePosition(this.viewHelper.viewDomNode);if(n.yi.y+i.height||n.xi.x+i.width)return null;var o=this.viewHelper.getLastViewCursorsRenderData();return this.mouseTargetFactory.createMouseTarget(o,i,n,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()){e.timestampt.y+t.height){var s=i.getCurrentScrollTop()+(e.posy-t.y),l=d.HitTestContext.getZoneAtCoord(this._context,s);if(l){var u=this._helpPositionJumpOverViewZone(l);if(u)return new d.MouseTarget(null,c.MouseTargetType.OUTSIDE_EDITOR,o,u)}var h=i.getLineNumberAtVerticalOffset(s);return new d.MouseTarget(null,c.MouseTargetType.OUTSIDE_EDITOR,o,new a.Position(h,n.getLineMaxColumn(h)))}var p=i.getLineNumberAtVerticalOffset(i.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new d.MouseTarget(null,c.MouseTargetType.OUTSIDE_EDITOR,o,new a.Position(p,n.getLineMaxColumn(p))):null},t.prototype._findMousePosition=function(e,t){var n=this._getPositionOutsideEditor(e);if(n)return n;var i=this._createMouseTarget(e,t);if(!i.position)return null ;if(i.type===c.MouseTargetType.CONTENT_VIEW_ZONE||i.type===c.MouseTargetType.GUTTER_VIEW_ZONE){var o=this._helpPositionJumpOverViewZone(i.detail);if(o)return new d.MouseTarget(i.element,i.type,i.mouseColumn,o,null,i.detail)}return i},t.prototype._helpPositionJumpOverViewZone=function(e){var t=new a.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=e.positionBefore,i=e.positionAfter;return n&&i?n.isBefore(t)?n:i:null},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,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})},t}(n.Disposable),y=function(){function e(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1, this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}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,"leftButton",{get:function(){return this._leftButton},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"middleButton",{get:function(){return this._middleButton},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.setStartButtons=function(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton},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.CLEAR_MOUSE_DOWN_COUNT_TIME=400,e}()}),define(t[489],n([1,0,7,74,488,116]),function(e,t,n,i,r,s){"use strict";function a(e,t){var n={translationY:t.translationY,translationX:t.translationX};return e&&(n.translationY+=e.translationY,n.translationX+=e.translationX),n}Object.defineProperty(t,"__esModule",{value:!0});var l=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;i!==(n.MSPOINTER_TYPE_MOUSE||"mouse")?i===(n.MSPOINTER_TYPE_TOUCH||"touch")?(r._lastPointerType="touch",e.addPointer(n.pointerId)):(r._lastPointerType="pen", t.addPointer(n.pointerId)):r._lastPointerType="mouse"}),r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return r._onGestureChange(e)},a)),r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return r._onCaptureGestureTap(e)},!0))}},100),r._lastPointerType="mouse",r}return o(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 s.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout), e.prototype.dispose.call(this)},t}(r.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;"mouse"!==i?"touch"===i?(r._lastPointerType="touch",e.addPointer(n.pointerId)):(r._lastPointerType="pen",t.addPointer(n.pointerId)):r._lastPointerType="mouse"}),r._register(n.addDisposableThrottledListener(r.viewHelper.linesContentDomNode,"MSGestureChange",function(e){return r._onGestureChange(e)},a)),r._register(n.addDisposableListener(r.viewHelper.linesContentDomNode,"MSGestureTap",function(e){return r._onCaptureGestureTap(e)},!0))}},100),r._lastPointerType="mouse",r}return o(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 s.EditorMouseEvent(e,this.viewHelper.viewDomNode),i=this._createMouseTarget(n,!1);i.position&&this.viewController.moveTo(i.position),n.browserEvent.fromElement?(n.preventDefault(),this.viewHelper.focusTextArea()):setTimeout(function(){t.viewHelper.focusTextArea()})},t.prototype._onGestureChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t.prototype.dispose=function(){window.clearTimeout(this._installGestureHandlerTimeout),e.prototype.dispose.call(this)},t}(r.MouseHandler),d=function(e){function t(t,o,r){var a=e.call(this,t,o,r)||this;return i.Gesture.addTarget(a.viewHelper.linesContentDomNode),a._register(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Tap,function(e){return a.onTap(e)})), a._register(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Change,function(e){return a.onChange(e)})),a._register(n.addDisposableListener(a.viewHelper.linesContentDomNode,i.EventType.Contextmenu,function(e){return a._onContextMenu(new s.EditorMouseEvent(e,a.viewHelper.viewDomNode),!1)})),a}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onTap=function(e){e.preventDefault(),this.viewHelper.focusTextArea();var t=this._createMouseTarget(new s.EditorMouseEvent(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.moveTo(t.position)},t.prototype.onChange=function(e){this._context.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)},t}(r.MouseHandler),c=function(){function e(e,t,n){window.navigator.msPointerEnabled?this.handler=new l(e,t,n):window.TouchEvent?this.handler=new d(e,t,n):window.navigator.pointerEnabled||window.PointerEvent?this.handler=new u(e,t,n):this.handler=new r.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(t[490],n([1,0,2,184]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t){var n=e.call(this)||this;return n.onDidScroll=null,n.onDidGainFocus=null,n.onDidLoseFocus=null,n.onKeyDown=null,n.onKeyUp=null,n.onContextMenu=null,n.onMouseMove=null,n.onMouseLeave=null,n.onMouseUp=null,n.onMouseDown=null,n.onMouseDrag=null,n.onMouseDrop=null,n._viewModel=t,n}return o(t,e),t.prototype.emitScrollChanged=function(e){this.onDidScroll&&this.onDidScroll(e)},t.prototype.emitViewFocusGained=function(){this.onDidGainFocus&&this.onDidGainFocus(void 0)},t.prototype.emitViewFocusLost=function(){this.onDidLoseFocus&&this.onDidLoseFocus(void 0)},t.prototype.emitKeyDown=function(e){this.onKeyDown&&this.onKeyDown(e)},t.prototype.emitKeyUp=function(e){this.onKeyUp&&this.onKeyUp(e)}, t.prototype.emitContextMenu=function(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseMove=function(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseLeave=function(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseUp=function(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDown=function(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrag=function(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))},t.prototype.emitMouseDrop=function(e){this.onMouseDrop&&this.onMouseDrop(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 s(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.coordinatesConverter.convertViewPositionToModelPosition(e)},t.prototype._convertViewToModelRange=function(e){return this._viewModel.coordinatesConverter.convertViewRangeToModelRange(e)},t}(n.Disposable);t.ViewOutgoingEvents=r;var s=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 i.MouseTarget.toString(this)},e}()}),define(t[491],n([1,0,14,3,12,113,183,65,88,36,273]),function(e,t,n,i,r,s,a,l,u,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(){this._currentVisibleRange=new i.Range(1,1,1,1)}return e.prototype.getCurrentVisibleRange=function(){return this._currentVisibleRange}, e.prototype.setCurrentVisibleRange=function(e){this._currentVisibleRange=e},e}(),h=function(){return function(e,t,n,i,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=n,this.startScrollTop=i,this.stopScrollTop=o,this.scrollType=r}}(),p=function(e){function t(t,i){var o=e.call(this,t)||this;o._linesContent=i,o._textRangeRestingSpot=document.createElement("div"),o._visibleLines=new s.VisibleLinesCollection(o),o.domNode=o._visibleLines.domNode;var r=o._context.configuration;return o._lineHeight=r.editor.lineHeight,o._typicalHalfwidthCharacterWidth=r.editor.fontInfo.typicalHalfwidthCharacterWidth,o._isViewportWrapping=r.editor.wrappingInfo.isViewportWrapping,o._revealHorizontalRightPadding=r.editor.viewInfo.revealHorizontalRightPadding,o._canUseLayerHinting=r.editor.canUseLayerHinting,o._viewLineOptions=new a.ViewLineOptions(r,o._context.theme.type),d.PartFingerprints.write(o.domNode,7),o.domNode.setClassName("view-lines"),l.Configuration.applyFontInfo(o.domNode,r.editor.fontInfo),o._maxLineWidth=0, o._asyncUpdateLineWidths=new n.RunOnceScheduler(function(){o._updateLineWidthsSlow()},200),o._lastRenderedData=new c,o._horizontalRevealRequest=null,o}return o(t,e),t.prototype.dispose=function(){this._asyncUpdateLineWidths.dispose(),e.prototype.dispose.call(this)},t.prototype.getDomNode=function(){return this.domNode},t.prototype.createVisibleLine=function(){return new a.ViewLine(this._viewLineOptions)},t.prototype.onConfigurationChanged=function(e){this._visibleLines.onConfigurationChanged(e),e.wrappingInfo&&(this._maxLineWidth=0);var t=this._context.configuration;return e.lineHeight&&(this._lineHeight=t.editor.lineHeight),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=t.editor.fontInfo.typicalHalfwidthCharacterWidth),e.wrappingInfo&&(this._isViewportWrapping=t.editor.wrappingInfo.isViewportWrapping),e.viewInfo&&(this._revealHorizontalRightPadding=t.editor.viewInfo.revealHorizontalRightPadding),e.canUseLayerHinting&&(this._canUseLayerHinting=t.editor.canUseLayerHinting), e.fontInfo&&l.Configuration.applyFontInfo(this.domNode,t.editor.fontInfo),this._onOptionsMaybeChanged(),e.layoutInfo&&(this._maxLineWidth=0),!0},t.prototype._onOptionsMaybeChanged=function(){var e=this._context.configuration,t=new a.ViewLineOptions(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;for(var n=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber(),o=n;o<=i;o++){this._visibleLines.getVisibleLine(o).onOptionsChanged(this._viewLineOptions)}return!0}return!1},t.prototype.onCursorStateChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=!1,o=t;o<=n;o++)i=this._visibleLines.getVisibleLine(o).onSelectionChanged()||i;return i},t.prototype.onDecorationsChanged=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=t;i<=n;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged();return!0},t.prototype.onFlushed=function(e){ var t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t},t.prototype.onLinesChanged=function(e){return this._visibleLines.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._visibleLines.onLinesDeleted(e)},t.prototype.onLinesInserted=function(e){return this._visibleLines.onLinesInserted(e)},t.prototype.onRevealRangeRequest=function(e){var t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.range,e.verticalType),n=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range.startLineNumber!==e.range.endLineNumber?n={scrollTop:n.scrollTop,scrollLeft:0}:this._horizontalRevealRequest=new h(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),n.scrollTop,e.scrollType):this._horizontalRevealRequest=null;var i=Math.abs(this._context.viewLayout.getCurrentScrollTop()-n.scrollTop) ;return 0===e.scrollType&&i>this._lineHeight?this._context.viewLayout.setScrollPositionSmooth(n):this._context.viewLayout.setScrollPositionNow(n),!0},t.prototype.onScrollChanged=function(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){var t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),n=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopn)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0},t.prototype.onTokensChanged=function(e){return this._visibleLines.onTokensChanged(e)},t.prototype.onZonesChanged=function(e){return this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth),this._visibleLines.onZonesChanged(e)},t.prototype.onThemeChanged=function(e){return this._onOptionsMaybeChanged()}, t.prototype.getPositionFromDOMInfo=function(e,t){var n=this._getViewLineDomNode(e);if(null===n)return null;var i=this._getLineNumberFor(n);if(-1===i)return null;if(i<1||i>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(i))return new r.Position(i,1);var o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(is)return null;var a=this._visibleLines.getVisibleLine(i).getColumnOfNodeOffset(i,e,t),l=this._context.model.getLineMinColumn(i);return an?-1:this._visibleLines.getVisibleLine(e).getWidth()},t.prototype.linesVisibleRangesForRange=function(e,t){if(this.shouldRender())return null;var n=e.endLineNumber;if(!(e=i.Range.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange())))return null;var o,s=[],l=0,d=new a.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);t&&(o=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new r.Position(e.startLineNumber,1)).lineNumber);for(var c=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber(),p=e.startLineNumber;p<=e.endLineNumber;p++)if(!(ph)){var f=p===e.startLineNumber?e.startColumn:1,g=p===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(p),m=this._visibleLines.getVisibleLine(p).getVisibleRangesForRange(f,g,d);if(m&&0!==m.length){if(t&&pr)){var l=s===e.startLineNumber?e.startColumn:1,u=s===e.endLineNumber?e.endColumn:this._context.model.getLineMaxColumn(s),d=this._visibleLines.getVisibleLine(s).getVisibleRangesForRange(l,u,n);d&&0!==d.length&&(t=t.concat(d))}return 0===t.length?null:t},t.prototype.updateLineWidths=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidthsFast=function(){ return this._updateLineWidths(!0)},t.prototype._updateLineWidthsSlow=function(){this._updateLineWidths(!1)},t.prototype._updateLineWidths=function(e){for(var t=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber(),i=1,o=!0,r=t;r<=n;r++){var s=this._visibleLines.getVisibleLine(r);!e||s.getWidthIsFast()?i=Math.max(i,s.getWidth()):o=!1}return o&&1===t&&n===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(i),o},t.prototype.prepareRender=function(){throw new Error("Not supported")},t.prototype.render=function(){throw new Error("Not supported")},t.prototype.renderText=function(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){ var t=this._horizontalRevealRequest.lineNumber,n=this._horizontalRevealRequest.startColumn,i=this._horizontalRevealRequest.endColumn,o=this._horizontalRevealRequest.scrollType;if(e.startLineNumber<=t&&t<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();var r=this._computeScrollLeftToRevealRange(t,n,i);this._isViewportWrapping||this._ensureMaxLineWidth(r.maxHorizontalOffset),0===o?this._context.viewLayout.setScrollPositionSmooth({scrollLeft:r.scrollLeft}):this._context.viewLayout.setScrollPositionNow({scrollLeft:r.scrollLeft})}}this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),this._linesContent.setLayerHinting(this._canUseLayerHinting);var s=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())},t.prototype._ensureMaxLineWidth=function(e){var t=Math.ceil(e);this._maxLineWidthc&&(c=p.left+p.width)}r=c,d=Math.max(0,d-t.HORIZONTAL_EXTRA_PX),c+=this._revealHorizontalRightPadding;return{scrollLeft:this._computeMinimumScrolling(a,l,d,c), maxHorizontalOffset:r}},t.prototype._computeMinimumScrolling=function(e,t,n,i,o,r){o=!!o,r=!!r;var s=(t|=0)-(e|=0);return(i|=0)-(n|=0)t?Math.max(0,i-s):e:n},t.HORIZONTAL_EXTRA_PX=30,t}(d.ViewPart);t.ViewLines=p}),define(t[492],n([1,0,36,6,389,7,108,26,113,3,78,73,18,16,22,285]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g){"use strict";function m(e){return 2===e?4:4===e?6:1===e?2:3}function v(e){return 2===e?2:4===e?2:1}Object.defineProperty(t,"__esModule",{value:!0});var _=140,y=function(){function e(e){var t=e.editor.pixelRatio,n=e.editor.layoutInfo,i=e.editor.viewInfo,o=e.editor.fontInfo;this.renderMinimap=0|n.renderMinimap,this.scrollBeyondLastLine=i.scrollBeyondLastLine,this.showSlider=i.minimap.showSlider,this.pixelRatio=t,this.typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this.lineHeight=e.editor.lineHeight,this.minimapLeft=n.minimapLeft,this.minimapWidth=n.minimapWidth,this.minimapHeight=n.height, this.canvasInnerWidth=Math.max(1,Math.floor(t*this.minimapWidth)),this.canvasInnerHeight=Math.max(1,Math.floor(t*this.minimapHeight)),this.canvasOuterWidth=this.canvasInnerWidth/t,this.canvasOuterHeight=this.canvasInnerHeight/t}return e.prototype.equals=function(e){return this.renderMinimap===e.renderMinimap&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight},e}(),C=function(){function e(e,t,n,i,o,r,s){this.scrollTop=e,this.scrollHeight=t,this._computedSliderRatio=n,this.sliderTop=i,this.sliderHeight=o,this.startLineNumber=r,this.endLineNumber=s} return e.prototype.getDesiredScrollTopFromDelta=function(e){var t=this.sliderTop+e;return Math.round(t/this._computedSliderRatio)},e.create=function(t,n,i,o,r,s,a,l,u){var d,c=t.pixelRatio,h=m(t.renderMinimap),p=Math.floor(t.canvasInnerHeight/h),f=t.lineHeight;if(r&&i!==s){var g=i-n+1;d=Math.floor(g*h/c)}else{var v=o/f;d=Math.floor(v*h/c)}var _;_=t.scrollBeyondLastLine?(s-1)*h/c:Math.max(0,s*h/c-d);var y=(_=Math.min(t.minimapHeight-d,_))/(l-o),C=a*y;if(p>=s){return new e(a,l,y,C,d,b=1,S=s)}var b=Math.max(1,Math.floor(n-C*c/h));u&&u.scrollHeight===l&&(u.scrollTop>a&&(b=Math.min(b,u.startLineNumber)),u.scrollTop_)i._context.viewLayout.setScrollPositionNow({scrollTop:o.scrollTop});else{var s=e.posy-t;i._context.viewLayout.setScrollPositionNow({scrollTop:o.getDesiredScrollTopFromDelta(s)})}},function(){i._slider.toggleClassName("active",!1)})}}),i}return o(t,e),t.prototype.dispose=function(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),e.prototype.dispose.call(this)},t.prototype._getMinimapDomNodeClassName=function(){ return"always"===this._options.showSlider?"minimap slider-always":"minimap slider-mouseover"},t.prototype.getDomNode=function(){return this._domNode},t.prototype._applyLayout=function(){this._domNode.setLeft(this._options.minimapLeft),this._domNode.setWidth(this._options.minimapWidth),this._domNode.setHeight(this._options.minimapHeight),this._shadow.setHeight(this._options.minimapHeight),this._canvas.setWidth(this._options.canvasOuterWidth),this._canvas.setHeight(this._options.canvasOuterHeight),this._canvas.domNode.width=this._options.canvasInnerWidth,this._canvas.domNode.height=this._options.canvasInnerHeight,this._slider.setWidth(this._options.minimapWidth)},t.prototype._getBuffer=function(){return this._buffers||(this._buffers=new w(this._canvas.domNode.getContext("2d"),this._options.canvasInnerWidth,this._options.canvasInnerHeight,this._tokensColorTracker.getColor(2))),this._buffers.getBuffer()},t.prototype._onOptionsMaybeChanged=function(){var e=new y(this._context.configuration) ;return!this._options.equals(e)&&(this._options=e,this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName()),!0)},t.prototype.onConfigurationChanged=function(e){return this._onOptionsMaybeChanged()},t.prototype.onFlushed=function(e){return this._lastRenderData=null,!0},t.prototype.onLinesChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e)},t.prototype.onLinesDeleted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e),!0},t.prototype.onLinesInserted=function(e){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e),!0},t.prototype.onScrollChanged=function(e){return!0},t.prototype.onTokensChanged=function(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)},t.prototype.onTokensColorsChanged=function(e){return this._lastRenderData=null,this._buffers=null,!0},t.prototype.onZonesChanged=function(e){return this._lastRenderData=null,!0}, t.prototype.prepareRender=function(e){},t.prototype.render=function(e){if(0===this._options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");var t=C.create(this._options,e.visibleRange.startLineNumber,e.visibleRange.endLineNumber,e.viewportHeight,e.viewportData.whitespaceViewportData.length>0,this._context.model.getLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);var n=e.scrollLeft/this._options.typicalHalfwidthCharacterWidth,i=Math.min(this._options.minimapWidth,Math.round(n*v(this._options.renderMinimap)/this._options.pixelRatio));this._sliderHorizontal.setLeft(i),this._sliderHorizontal.setWidth(this._options.minimapWidth-i), this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this._lastRenderData=this.renderLines(t)},t.prototype.renderLines=function(e){var n=this._options.renderMinimap,i=e.startLineNumber,o=e.endLineNumber,s=m(n);if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){var a=this._lastRenderData._get();return new S(e,a.imageData,a.lines)}for(var l=this._getBuffer(),u=t._renderUntouchedLines(l,i,o,s,this._lastRenderData),d=u[0],c=u[1],h=u[2],p=this._context.model.getMinimapLinesRenderingData(i,o,h),f=p.tabSize,g=this._tokensColorTracker.getColor(2),v=this._tokensColorTracker.backgroundIsLight(),_=0,y=[],C=0,w=o-i+1;C=0&&Lp)return;var w=d.charCodeAt(g);if(9===w){var E=l-(g+m)%l;m+=E-1,f+=E*h }else if(32===w)f+=h;else for(var L=i.isFullWidthCharacter(w)?2:1,x=0;xp)return}},t}(n.ViewPart);t.Minimap=E,f.registerThemingParticipant(function(e,t){var n=e.getColor(g.scrollbarSliderBackground);if(n){var i=n.transparent(.5);t.addRule(".monaco-editor .minimap-slider, .monaco-editor .minimap-slider .minimap-slider-horizontal { background: "+i+"; }")}var o=e.getColor(g.scrollbarSliderHoverBackground);if(o){var r=o.transparent(.5);t.addRule(".monaco-editor .minimap-slider:hover, .monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: "+r+"; }")}var s=e.getColor(g.scrollbarSliderActiveBackground);if(s){var a=s.transparent(.5);t.addRule(".monaco-editor .minimap-slider.active, .monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: "+a+"; }")}var l=e.getColor(g.scrollbarShadow) ;l&&t.addRule(".monaco-editor .minimap-shadow-visible { box-shadow: "+l+" -6px 0 6px -6px inset; }")})}),define(t[493],n([1,0,26,36,16,22,297]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var i=e.call(this,t)||this;return i._scrollTop=0,i._width=0,i._updateWidth(),i._shouldShow=!1,i._useShadows=i._context.configuration.editor.viewInfo.scrollbar.useShadows,i._domNode=n.createFastDomNode(document.createElement("div")),i._domNode.setAttribute("role","presentation"),i._domNode.setAttribute("aria-hidden","true"),i}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},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._updateWidth=function(){var e=this._context.configuration.editor.layoutInfo,t=0 ;return t=0===e.renderMinimap||e.minimapWidth>0&&0===e.minimapLeft?e.width:e.width-e.minimapWidth-e.verticalScrollbarWidth,this._width!==t&&(this._width=t,!0)},t.prototype.onConfigurationChanged=function(e){var t=!1;return e.viewInfo&&(this._useShadows=this._context.configuration.editor.viewInfo.scrollbar.useShadows),e.layoutInfo&&(t=this._updateWidth()),this._updateShouldShow()||t},t.prototype.onScrollChanged=function(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()},t.prototype.prepareRender=function(e){},t.prototype.render=function(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")},t}(i.ViewPart);t.ScrollDecorationViewPart=a,r.registerThemingParticipant(function(e,t){var n=e.getColor(s.scrollbarShadow);n&&t.addRule(".monaco-editor .scroll-decoration { box-shadow: "+n+" 0 6px 6px -6px inset; }")})}),define(t[494],n([1,0,16,22,59,30,333]),function(e,t,n,i,r,s){"use strict";function a(e){return new d(e)}function l(e){ return new c(e.lineNumber,e.ranges.map(a))}function u(e){return e<0?-e:e}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){return function(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}(),c=function(){return function(e,t){this.lineNumber=e,this.ranges=t}}(),h=s.isEdgeOrIE,p=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._typicalHalfwidthCharacterWidth=n._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,n._selections=[],n._renderResult=null,n._context.addEventHandler(n),n}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._selections=null,this._renderResult=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){ return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._roundedSelection=this._context.configuration.editor.viewInfo.roundedSelection),e.fontInfo&&(this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._visibleRangesHaveGaps=function(e){for(var t=0,n=e.length;t1)return!0}return!1},t.prototype._enrichVisibleRangesWithStyle=function(e,t,n){var i=this._typicalHalfwidthCharacterWidth/4,o=null,r=null ;if(n&&n.length>0&&t.length>0){var s=t[0].lineNumber;if(s===e.startLineNumber)for(l=0;!o&&l=0;l--)n[l].lineNumber===a&&(r=n[l].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(var l=0,d=t.length;l0){var m=t[l-1].ranges[0].left,v=t[l-1].ranges[0].left+t[l-1].ranges[0].width;u(h-m)m&&(f.top=1),u(p-v)'},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(),l=o.length>0?o[0].lineNumber:0,u=o.length>0?o[o.length-1].lineNumber:0,d=0,c=o.length;d1,u)}}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.SELECTION_CLASS_NAME="selected-text",t.SELECTION_TOP_LEFT="top-left-radius",t.SELECTION_BOTTOM_LEFT="bottom-left-radius",t.SELECTION_TOP_RIGHT="top-right-radius",t.SELECTION_BOTTOM_RIGHT="bottom-right-radius",t.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",t.ROUNDED_PIECE_WIDTH=10,t}(r.DynamicViewOverlay);t.SelectionsOverlay=p,n.registerThemingParticipant(function(e,t){var n=e.getColor(i.editorSelectionBackground);n&&t.addRule(".monaco-editor .focused .selected-text { background-color: "+n+"; }");var o=e.getColor(i.editorInactiveSelection) ;o&&t.addRule(".monaco-editor .selected-text { background-color: "+o+"; }");var r=e.getColor(i.editorSelectionForeground);r&&t.addRule(".monaco-editor .view-line span.inline-selected-text { color: "+r+"; }")})}),define(t[35],n([1,0,302,22,16,27]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.editorLineHighlight=i.registerColor("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.localize(0,null)),t.editorLineHighlightBorder=i.registerColor("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.localize(1,null)),t.editorRangeHighlight=i.registerColor("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.localize(2,null),!0),t.editorRangeHighlightBorder=i.registerColor("editor.rangeHighlightBorder",{dark:null,light:null,hc:i.activeContrastBorder},n.localize(3,null),!0),t.editorCursorForeground=i.registerColor("editorCursor.foreground",{dark:"#AEAFAD",light:r.Color.black,hc:r.Color.white},n.localize(4,null)), t.editorCursorBackground=i.registerColor("editorCursor.background",null,n.localize(5,null)),t.editorWhitespaces=i.registerColor("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.localize(6,null)),t.editorIndentGuides=i.registerColor("editorIndentGuide.background",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},n.localize(7,null)),t.editorActiveIndentGuides=i.registerColor("editorIndentGuide.activeBackground",{dark:t.editorWhitespaces,light:t.editorWhitespaces,hc:t.editorWhitespaces},n.localize(8,null)),t.editorLineNumbers=i.registerColor("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:r.Color.white},n.localize(9,null));var s=i.registerColor("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:i.activeContrastBorder},n.localize(10,null),!1,n.localize(11,null));t.editorActiveLineNumber=i.registerColor("editorLineNumber.activeForeground",{dark:s,light:s,hc:s},n.localize(12,null)), t.editorRuler=i.registerColor("editorRuler.foreground",{dark:"#5A5A5A",light:r.Color.lightgrey,hc:r.Color.white},n.localize(13,null)),t.editorCodeLensForeground=i.registerColor("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.localize(14,null)),t.editorBracketMatchBackground=i.registerColor("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.localize(15,null)),t.editorBracketMatchBorder=i.registerColor("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:"#fff"},n.localize(16,null)),t.editorOverviewRulerBorder=i.registerColor("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.localize(17,null)),t.editorGutter=i.registerColor("editorGutter.background",{dark:i.editorBackground,light:i.editorBackground,hc:i.editorBackground},n.localize(18,null)),t.editorErrorForeground=i.registerColor("editorError.foreground",{dark:"#ea4646",light:"#d60a0a",hc:null},n.localize(19,null)), t.editorErrorBorder=i.registerColor("editorError.border",{dark:null,light:null,hc:r.Color.fromHex("#E47777").transparent(.8)},n.localize(20,null)),t.editorWarningForeground=i.registerColor("editorWarning.foreground",{dark:"#4d9e4d",light:"#117711",hc:null},n.localize(21,null)),t.editorWarningBorder=i.registerColor("editorWarning.border",{dark:null,light:null,hc:r.Color.fromHex("#71B771").transparent(.8)},n.localize(22,null)),t.editorInfoForeground=i.registerColor("editorInfo.foreground",{dark:"#008000",light:"#008000",hc:null},n.localize(23,null)),t.editorInfoBorder=i.registerColor("editorInfo.border",{dark:null,light:null,hc:r.Color.fromHex("#71B771").transparent(.8)},n.localize(24,null)),t.editorHintForeground=i.registerColor("editorHint.foreground",{dark:r.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},n.localize(25,null)),t.editorHintBorder=i.registerColor("editorHint.border",{dark:null,light:null,hc:r.Color.fromHex("#eeeeee").transparent(.8)},n.localize(26,null)), t.editorUnnecessaryCodeBorder=i.registerColor("editorUnnecessaryCode.border",{dark:null,light:null,hc:r.Color.fromHex("#fff").transparent(.8)},n.localize(27,null)),t.editorUnnecessaryCodeOpacity=i.registerColor("editorUnnecessaryCode.opacity",{dark:r.Color.fromHex("#000a"),light:r.Color.fromHex("#0007"),hc:null},n.localize(28,null)),t.overviewRulerError=i.registerColor("editorOverviewRuler.errorForeground",{dark:new r.Color(new r.RGBA(255,18,18,.7)),light:new r.Color(new r.RGBA(255,18,18,.7)),hc:new r.Color(new r.RGBA(255,50,50,1))},n.localize(29,null)),t.overviewRulerWarning=i.registerColor("editorOverviewRuler.warningForeground",{dark:new r.Color(new r.RGBA(18,136,18,.7)),light:new r.Color(new r.RGBA(18,136,18,.7)),hc:new r.Color(new r.RGBA(50,255,50,1))},n.localize(30,null)),t.overviewRulerInfo=i.registerColor("editorOverviewRuler.infoForeground",{dark:new r.Color(new r.RGBA(18,18,136,.7)),light:new r.Color(new r.RGBA(18,18,136,.7)),hc:new r.Color(new r.RGBA(50,50,255,1))},n.localize(31,null)), o.registerThemingParticipant(function(e,n){var o=e.getColor(i.editorBackground);o&&n.addRule(".monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: "+o+"; }");var r=e.getColor(i.editorForeground);r&&n.addRule(".monaco-editor, .monaco-editor .inputarea.ime-input { color: "+r+"; }");var s=e.getColor(t.editorGutter);s&&n.addRule(".monaco-editor .margin { background-color: "+s+"; }");var a=e.getColor(t.editorRangeHighlight);a&&n.addRule(".monaco-editor .rangeHighlight { background-color: "+a+"; }");var l=e.getColor(t.editorRangeHighlightBorder);l&&n.addRule(".monaco-editor .rangeHighlight { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+l+"; }");var u=e.getColor(t.editorWhitespaces);u&&n.addRule(".vs-whitespace { color: "+u+" !important; }")})}),define(t[496],n([1,0,59,16,35,262]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this)||this;return n._context=t, n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1,n._scrollWidth=0,n._contentWidth=n._context.configuration.editor.layoutInfo.contentWidth,n._context.addEventHandler(n),n}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentWidth=this._context.configuration.editor.layoutInfo.contentWidth),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty() ;return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollWidthChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.prepareRender=function(e){this._scrollWidth=e.scrollWidth},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){if(this._shouldShowCurrentLine()){return'
    '}return""}return""},t.prototype._shouldShowCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t.prototype._willRenderMarginCurrentLine=function(){ return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t}(n.DynamicViewOverlay);t.CurrentLineHighlightOverlay=s,i.registerThemingParticipant(function(e,t){var n=e.getColor(r.editorLineHighlight);if(n&&t.addRule(".monaco-editor .view-overlays .current-line { background-color: "+n+"; }"),!n||n.isTransparent()||e.defines(r.editorLineHighlightBorder)){var i=e.getColor(r.editorLineHighlightBorder);i&&(t.addRule(".monaco-editor .view-overlays .current-line { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"))}})}),define(t[497],n([1,0,59,16,35,263]),function(e,t,n,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._lineHeight=n._context.configuration.editor.lineHeight,n._renderLineHighlight=n._context.configuration.editor.viewInfo.renderLineHighlight,n._selectionIsEmpty=!0,n._primaryCursorLineNumber=1, n._contentLeft=n._context.configuration.editor.layoutInfo.contentLeft,n._context.addEventHandler(n),n}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return e.lineHeight&&(this._lineHeight=this._context.configuration.editor.lineHeight),e.viewInfo&&(this._renderLineHighlight=this._context.configuration.editor.viewInfo.renderLineHighlight),e.layoutInfo&&(this._contentLeft=this._context.configuration.editor.layoutInfo.contentLeft),!0},t.prototype.onCursorStateChanged=function(e){var t=!1,n=e.selections[0].positionLineNumber;this._primaryCursorLineNumber!==n&&(this._primaryCursorLineNumber=n,t=!0);var i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i?(this._selectionIsEmpty=i,t=!0,!0):t},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onZonesChanged=function(e){ return!0},t.prototype.prepareRender=function(e){},t.prototype.render=function(e,t){if(t===this._primaryCursorLineNumber){var n="current-line";if(this._shouldShowCurrentLine()){n="current-line current-line-margin"+(this._willRenderContentCurrentLine()?" current-line-margin-both":"")}return'
    '}return""},t.prototype._shouldShowCurrentLine=function(){return"gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight},t.prototype._willRenderContentCurrentLine=function(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty},t}(n.DynamicViewOverlay);t.CurrentLineMarginHighlightOverlay=s,i.registerThemingParticipant(function(e,t){var n=e.getColor(r.editorLineHighlight);if(n)t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { background-color: "+n+"; border: none; }");else{var i=e.getColor(r.editorLineHighlightBorder) ;i&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid "+i+"; }"),"hc"===e.type&&t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")}})}),define(t[498],n([1,0,59,16,35,12,268]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._primaryLineNumber=0,n._lineHeight=n._context.configuration.editor.lineHeight,n._spaceWidth=n._context.configuration.editor.fontInfo.spaceWidth,n._enabled=n._context.configuration.editor.viewInfo.renderIndentGuides,n._activeIndentEnabled=n._context.configuration.editor.viewInfo.highlightActiveIndentGuide,n._renderResult=null,n._context.addEventHandler(n),n}return o(t,e),t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null,e.prototype.dispose.call(this)},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&&(this._enabled=this._context.configuration.editor.viewInfo.renderIndentGuides,this._activeIndentEnabled=this._context.configuration.editor.viewInfo.highlightActiveIndentGuide),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0],n=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==n&&(this._primaryLineNumber=n,!0)},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype.onLanguageConfigurationChanged=function(e){return!0},t.prototype.prepareRender=function(e){if(this._enabled){ var t=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,i=this._context.model.getTabSize()*this._spaceWidth,o=e.scrollWidth,r=this._lineHeight,a=i,l=this._context.model.getLinesIndentGuides(t,n),u=0,d=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){var h=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,n);u=h.startLineNumber,d=h.endLineNumber,c=h.indent}for(var p=[],f=t;f<=n;f++){for(var g=u<=f&&f<=d,m=f-t,v=l[m],_="",y=e.visibleRangeForPosition(new s.Position(f,1)),C=y?y.left:0,b=1;b<=v;b++){if(_+='
    ',(C+=i)>o)break}p[m]=_}this._renderResult=p}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t}(n.DynamicViewOverlay);t.IndentGuidesOverlay=a,i.registerThemingParticipant(function(e,t){var n=e.getColor(r.editorIndentGuides) ;n&&t.addRule(".monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 "+n+" inset; }");var i=e.getColor(r.editorActiveIndentGuides)||n;i&&t.addRule(".monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 "+i+" inset; }")})}),define(t[186],n([1,0,35,16,18,59,12,270]),function(e,t,n,i,r,s,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(t){var n=e.call(this)||this;return n._context=t,n._readConfig(),n._lastCursorModelPosition=new a.Position(1,1),n._renderResult=null,n._context.addEventHandler(n),n}return o(t,e),t.prototype._readConfig=function(){var e=this._context.configuration.editor;this._lineHeight=e.lineHeight,this._renderLineNumbers=e.viewInfo.renderLineNumbers,this._renderCustomLineNumbers=e.viewInfo.renderCustomLineNumbers,this._lineNumbersLeft=e.layoutInfo.lineNumbersLeft,this._lineNumbersWidth=e.layoutInfo.lineNumbersWidth},t.prototype.dispose=function(){this._context.removeEventHandler(this),this._context=null,this._renderResult=null, e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return this._readConfig(),!0},t.prototype.onCursorStateChanged=function(e){var t=e.selections[0].getPosition();return this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t),2===this._renderLineNumbers||3===this._renderLineNumbers},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return e.scrollTopChanged},t.prototype.onZonesChanged=function(e){return!0},t.prototype._getLineRenderLineNumber=function(e){var t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new a.Position(e,1));if(1!==t.column)return"";var n=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(n);if(2===this._renderLineNumbers){ var i=Math.abs(this._lastCursorModelPosition.lineNumber-n);return 0===i?''+n+"":String(i)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===n?String(n):n%10==0?String(n):"":String(n)},t.prototype.prepareRender=function(e){if(0!==this._renderLineNumbers){for(var n=r.isLinux?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,s='
    ',a=[],l=i;l<=o;l++){var u=l-i,d=this._getLineRenderLineNumber(l);a[u]=d?s+d+"
    ":""}this._renderResult=a}else this._renderResult=null},t.prototype.render=function(e,t){if(!this._renderResult)return"";var n=t-e;return n<0||n>=this._renderResult.length?"":this._renderResult[n]},t.CLASS_NAME="line-numbers",t}(s.DynamicViewOverlay);t.LineNumbersOverlay=l,i.registerThemingParticipant(function(e,t){ var i=e.getColor(n.editorLineNumbers);i&&t.addRule(".monaco-editor .line-numbers { color: "+i+"; }");var o=e.getColor(n.editorActiveLineNumber);o&&t.addRule(".monaco-editor .current-line ~ .line-numbers { color: "+o+"; }")})}),define(t[500],n([1,0,18,30,6,165,164,3,21,12,65,78,26,36,163,186,89,254]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v){"use strict";function _(e,t){var n=document.createElement("canvas").getContext("2d");n.font=function(e){return function(e,t,n,i,o){return e+" normal "+t+" "+n+"px / "+i+"px "+o}("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}(t);var o=n.measureText(e);return i.isFirefox?o.width+2:o.width}Object.defineProperty(t,"__esModule",{value:!0});var y=function(){function e(e,t,n){this.top=e,this.left=t,this.width=n}return e.prototype.setWidth=function(t){return new e(this.top,this.left,t)},e}(),C=i.isEdgeOrIE||i.isFirefox,b=function(){function e(){this._lastState=null}return e.prototype.set=function(e){this._lastState=e},e.prototype.get=function(e){ return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState:(this._lastState=null,null)},e.INSTANCE=new e,e}(),S=function(e){function t(t,o,r){var d=e.call(this,t)||this;d._primaryCursorVisibleRange=null,d._viewController=o,d._viewHelper=r;var c=d._context.configuration.editor;d._accessibilitySupport=c.accessibilitySupport,d._contentLeft=c.layoutInfo.contentLeft,d._contentWidth=c.layoutInfo.contentWidth,d._contentHeight=c.layoutInfo.contentHeight,d._scrollLeft=0,d._scrollTop=0,d._fontInfo=c.fontInfo,d._lineHeight=c.lineHeight,d._emptySelectionClipboard=c.emptySelectionClipboard,d._visibleTextArea=null,d._selections=[new u.Selection(1,1,1,1)],d.textArea=p.createFastDomNode(document.createElement("textarea")),f.PartFingerprints.write(d.textArea,6),d.textArea.setClassName("inputarea"),d.textArea.setAttribute("wrap","off"),d.textArea.setAttribute("autocorrect","off"),d.textArea.setAttribute("autocapitalize","off"),d.textArea.setAttribute("autocomplete","off"), d.textArea.setAttribute("spellcheck","false"),d.textArea.setAttribute("aria-label",c.viewInfo.ariaLabel),d.textArea.setAttribute("role","textbox"),d.textArea.setAttribute("aria-multiline","true"),d.textArea.setAttribute("aria-haspopup","false"),d.textArea.setAttribute("aria-autocomplete","both"),d.textAreaCover=p.createFastDomNode(document.createElement("div")),d.textAreaCover.setPosition("absolute");var g={getLineCount:function(){return d._context.model.getLineCount()},getLineMaxColumn:function(e){return d._context.model.getLineMaxColumn(e)},getValueInRange:function(e,t){return d._context.model.getValueInRange(e,t)}},m={getPlainTextToCopy:function(){var e=d._context.model.getPlainTextToCopy(d._selections,d._emptySelectionClipboard,n.isWindows),t=d._context.model.getEOL(),o=d._emptySelectionClipboard&&1===d._selections.length&&d._selections[0].isEmpty(),r=Array.isArray(e)?e:null,s=Array.isArray(e)?e.join(t):e,a=null;if(o||r){a={lastCopiedValue:i.isFirefox?s.replace(/\r\n/g,"\n"):s, isFromEmptySelection:d._emptySelectionClipboard&&1===d._selections.length&&d._selections[0].isEmpty(),multicursorText:r}}return b.INSTANCE.set(a),s},getHTMLToCopy:function(){return d._context.model.getHTMLToCopy(d._selections,d._emptySelectionClipboard)},getScreenReaderContent:function(e){if(i.isIPad)return a.TextAreaState.EMPTY;if(1===d._accessibilitySupport){if(n.isMacintosh){var t=d._selections[0];if(t.isEmpty()){var o=t.getStartPosition(),r=d._getWordBeforePosition(o);if(0===r.length&&(r=d._getCharacterBeforePosition(o)),r.length>0)return new a.TextAreaState(r,r.length,r.length,o,o)}}return a.TextAreaState.EMPTY}return a.PagedScreenReaderStrategy.fromEditorSelection(e,g,d._selections[0],0===d._accessibilitySupport)},deduceModelPosition:function(e,t,n){return d._context.model.deduceModelPositionRelativeToViewPosition(e,t,n)}};return d._textAreaInput=d._register(new s.TextAreaInput(m,d.textArea)),d._register(d._textAreaInput.onKeyDown(function(e){d._viewController.emitKeyDown(e)})), d._register(d._textAreaInput.onKeyUp(function(e){d._viewController.emitKeyUp(e)})),d._register(d._textAreaInput.onPaste(function(e){var t=b.INSTANCE.get(e.text),n=!1,i=null;t&&(n=d._emptySelectionClipboard&&t.isFromEmptySelection,i=t.multicursorText),d._viewController.paste("keyboard",e.text,n,i)})),d._register(d._textAreaInput.onCut(function(){d._viewController.cut("keyboard")})),d._register(d._textAreaInput.onType(function(e){e.replaceCharCnt?d._viewController.replacePreviousChar("keyboard",e.text,e.replaceCharCnt):d._viewController.type("keyboard",e.text)})),d._register(d._textAreaInput.onSelectionChangeRequest(function(e){d._viewController.setSelection("keyboard",e)})),d._register(d._textAreaInput.onCompositionStart(function(){var e=d._selections[0].startLineNumber,t=d._selections[0].startColumn;d._context.privateViewEventBus.emit(new h.ViewRevealRangeRequestEvent(new l.Range(e,t,e,t),0,!0,1));var n=d._viewHelper.visibleRangeForPositionRelativeToEditor(e,t) ;n&&(d._visibleTextArea=new y(d._context.viewLayout.getVerticalOffsetForLineNumber(e),n.left,C?0:1),d._render()),d.textArea.setClassName("inputarea ime-input"),d._viewController.compositionStart("keyboard")})),d._register(d._textAreaInput.onCompositionUpdate(function(e){i.isEdgeOrIE?d._visibleTextArea=d._visibleTextArea.setWidth(0):d._visibleTextArea=d._visibleTextArea.setWidth(_(e.data,d._fontInfo)),d._render()})),d._register(d._textAreaInput.onCompositionEnd(function(){d._visibleTextArea=null,d._render(),d.textArea.setClassName("inputarea"),d._viewController.compositionEnd("keyboard")})),d._register(d._textAreaInput.onFocus(function(){d._context.privateViewEventBus.emit(new h.ViewFocusChangedEvent(!0))})),d._register(d._textAreaInput.onBlur(function(){d._context.privateViewEventBus.emit(new h.ViewFocusChangedEvent(!1))})),d}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._getWordBeforePosition=function(e){ for(var t=this._context.model.getLineContent(e.lineNumber),n=v.getMapForWordSeparators(this._context.configuration.editor.wordSeparators),i=e.column,o=0;i>1;){var r=t.charCodeAt(i-2);if(0!==n.get(r)||o>50)return t.substring(i-1,e.column-1);o++,i--}return t.substring(0,e.column-1)},t.prototype._getCharacterBeforePosition=function(e){if(e.column>1){var t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!r.isHighSurrogate(t.charCodeAt(0)))return t}return""},t.prototype.onConfigurationChanged=function(e){var t=this._context.configuration.editor;return e.fontInfo&&(this._fontInfo=t.fontInfo),e.viewInfo&&this.textArea.setAttribute("aria-label",t.viewInfo.ariaLabel),e.layoutInfo&&(this._contentLeft=t.layoutInfo.contentLeft,this._contentWidth=t.layoutInfo.contentWidth,this._contentHeight=t.layoutInfo.contentHeight),e.lineHeight&&(this._lineHeight=t.lineHeight),e.accessibilitySupport&&(this._accessibilitySupport=t.accessibilitySupport, this._textAreaInput.writeScreenReaderContent("strategy changed")),e.emptySelectionClipboard&&(this._emptySelectionClipboard=t.emptySelectionClipboard),!0},t.prototype.onCursorStateChanged=function(e){return this._selections=e.selections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0},t.prototype.onDecorationsChanged=function(e){return!0},t.prototype.onFlushed=function(e){return!0},t.prototype.onLinesChanged=function(e){return!0},t.prototype.onLinesDeleted=function(e){return!0},t.prototype.onLinesInserted=function(e){return!0},t.prototype.onScrollChanged=function(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0},t.prototype.onZonesChanged=function(e){return!0},t.prototype.isFocused=function(){return this._textAreaInput.isFocused()},t.prototype.focusTextArea=function(){this._textAreaInput.focusTextArea()},t.prototype.prepareRender=function(e){if(2===this._accessibilitySupport)this._primaryCursorVisibleRange=null;else{ var t=new d.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn);this._primaryCursorVisibleRange=e.visibleRangeForPosition(t)}},t.prototype.render=function(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()},t.prototype._render=function(){if(this._visibleTextArea)this._renderInsideEditor(this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight,!0);else if(this._primaryCursorVisibleRange){var e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)this._renderAtTopLeft();else{var t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():this._renderInsideEditor(t,e,C?0:1,C?0:1,!1)}}else this._renderAtTopLeft()},t.prototype._renderInsideEditor=function(e,t,n,i,o){ var r=this.textArea,s=this.textAreaCover;o?c.Configuration.applyFontInfo(r,this._fontInfo):(r.setFontSize(1),r.setLineHeight(this._fontInfo.lineHeight)),r.setTop(e),r.setLeft(t),r.setWidth(n),r.setHeight(i),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)},t.prototype._renderAtTopLeft=function(){var e=this.textArea,t=this.textAreaCover;if(c.Configuration.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),C)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1),this._context.configuration.editor.viewInfo.glyphMargin?t.setClassName("monaco-editor-background textAreaCover "+g.Margin.OUTER_CLASS_NAME):0!==this._context.configuration.editor.viewInfo.renderLineNumbers?t.setClassName("monaco-editor-background textAreaCover "+m.LineNumbersOverlay.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")},t}(f.ViewPart);t.TextAreaHandler=S}), define(t[501],n([1,0,36,12,17,35,27,26]),function(e,t,n,i,r,s,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){this.lineHeight=e.editor.lineHeight,this.pixelRatio=e.editor.pixelRatio,this.overviewRulerLanes=e.editor.viewInfo.overviewRulerLanes,this.renderBorder=e.editor.viewInfo.overviewRulerBorder;var n=t.getColor(s.editorOverviewRulerBorder);this.borderColor=n?n.toString():null,this.hideCursor=e.editor.viewInfo.hideCursorInOverviewRuler;var i=t.getColor(s.editorCursorForeground);this.cursorColor=i?i.transparent(.7).toString():null,this.themeType=t.type;var o=e.editor.viewInfo.minimap.enabled,l=e.editor.viewInfo.minimap.side,u=o?r.TokenizationRegistry.getDefaultBackground():null;this.backgroundColor=null===u||"left"===l?null:a.Color.Format.CSS.formatHex(u);var d=e.editor.layoutInfo.overviewRuler;this.top=d.top,this.right=d.right,this.domWidth=d.width,this.domHeight=d.height,this.canvasWidth=this.domWidth*this.pixelRatio|0, this.canvasHeight=this.domHeight*this.pixelRatio|0;var c=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes),h=c[0],p=c[1];this.x=h,this.w=p}return e.prototype._initLanes=function(e,t,n){var i=t-e;if(n>=3){var o=i-(s=Math.floor(i/3))-(a=Math.floor(i/3)),r=(l=e)+s;return[[0,l,r,l,u=l+s+o,l,r,l],[0,s,o,s+o,a,s+o+a,o+a,s+o+a]]}if(2===n){var s=Math.floor(i/2),a=i-s,l=e,u=l+s;return[[0,l,l,l,u,l,l,l],[0,s,s,s,a,s+a,s+a,s+a]]}var d=e,c=i;return[[0,d,d,d,d,d,d,d],[0,c,c,c,c,c,c,c]]},e.prototype.equals=function(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight},e }(),d=function(e){function t(t){var n=e.call(this,t)||this;return n._domNode=l.createFastDomNode(document.createElement("canvas")),n._domNode.setClassName("decorationsOverviewRuler"),n._domNode.setPosition("absolute"),n._domNode.setLayerHinting(!0),n._domNode.setAttribute("aria-hidden","true"),n._settings=null,n._updateSettings(!1),n._tokensColorTrackerListener=r.TokenizationRegistry.onDidChange(function(e){e.changedColorMap&&n._updateSettings(!0)}),n._cursorPositions=[],n}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._tokensColorTrackerListener.dispose()},t.prototype._updateSettings=function(e){var t=new u(this._context.configuration,this._context.theme);return(null===this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth, this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)},t.prototype.onConfigurationChanged=function(e){return this._updateSettings(!1)},t.prototype.onCursorStateChanged=function(e){this._cursorPositions=[];for(var t=0,n=e.selections.length;tt&&(D=t-a),E=D-a,T=D+a}E>_+1||b!==m?(0!==y&&l.fillRect(u[m],v,d[m],_-v),m=b,v=E,_=T):T>_&&(_=T)}l.fillRect(u[m],v,d[m],_-v)}if(!this._settings.hideCursor){var L=2*this._settings.pixelRatio|0,x=L/2|0,N=this._settings.x[7],I=this._settings.w[7] ;l.fillStyle=this._settings.cursorColor;for(var v=-100,_=-100,y=0,C=this._cursorPositions.length;yt&&(D=t-x);var T=(E=D-x)+L;E>_+1?(0!==y&&l.fillRect(N,v,I,_-v),v=E,_=T):T>_&&(_=T)}l.fillRect(N,v,I,_-v)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())},t}(n.ViewPart);t.DecorationsOverviewRuler=d}),define(t[502],n([1,0,26,36,16,35,296]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(t){var i=e.call(this,t)||this;return i.domNode=n.createFastDomNode(document.createElement("div")),i.domNode.setAttribute("role","presentation"),i.domNode.setAttribute("aria-hidden","true"),i.domNode.setClassName("view-rulers"),i._renderedRulers=[], i._rulers=i._context.configuration.editor.viewInfo.rulers,i._typicalHalfwidthCharacterWidth=i._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,i}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.onConfigurationChanged=function(e){return!!(e.viewInfo||e.layoutInfo||e.fontInfo)&&(this._rulers=this._context.configuration.editor.viewInfo.rulers,this._typicalHalfwidthCharacterWidth=this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth,!0)},t.prototype.onScrollChanged=function(e){return e.scrollHeightChanged},t.prototype.prepareRender=function(e){},t.prototype._ensureRulersCount=function(){var e=this._renderedRulers.length,t=this._rulers.length;if(e!==t)if(e0;){(s=n.createFastDomNode(document.createElement("div"))).setClassName("view-ruler"),s.setWidth(i),this.domNode.appendChild(s),this._renderedRulers.push(s),o--}else for(var r=e-t;r>0;){var s=this._renderedRulers.pop() ;this.domNode.removeChild(s),r--}},t.prototype.render=function(e){this._ensureRulersCount();for(var t=0,n=this._rulers.length;tt.length)for(var s=this._secondaryCursors.length-t.length,o=0;o1),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._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())},t.prototype._updateFromModel=function(){var e=this._editor.getModel();this._canUndo.set(e&&e.canUndo()),this._canRedo.set(e&&e.canRedo())},t}(l.Disposable),B=function(e){function t(t,n){var i=e.call(this)||this;i._editor=t,i._langId=S.EditorContextKeys.languageId.bindTo(n),i._hasCompletionItemProvider=S.EditorContextKeys.hasCompletionItemProvider.bindTo(n),i._hasCodeActionsProvider=S.EditorContextKeys.hasCodeActionsProvider.bindTo(n),i._hasCodeLensProvider=S.EditorContextKeys.hasCodeLensProvider.bindTo(n), i._hasDefinitionProvider=S.EditorContextKeys.hasDefinitionProvider.bindTo(n),i._hasImplementationProvider=S.EditorContextKeys.hasImplementationProvider.bindTo(n),i._hasTypeDefinitionProvider=S.EditorContextKeys.hasTypeDefinitionProvider.bindTo(n),i._hasHoverProvider=S.EditorContextKeys.hasHoverProvider.bindTo(n),i._hasDocumentHighlightProvider=S.EditorContextKeys.hasDocumentHighlightProvider.bindTo(n),i._hasDocumentSymbolProvider=S.EditorContextKeys.hasDocumentSymbolProvider.bindTo(n),i._hasReferenceProvider=S.EditorContextKeys.hasReferenceProvider.bindTo(n),i._hasRenameProvider=S.EditorContextKeys.hasRenameProvider.bindTo(n),i._hasDocumentFormattingProvider=S.EditorContextKeys.hasDocumentFormattingProvider.bindTo(n),i._hasDocumentSelectionFormattingProvider=S.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(n),i._hasSignatureHelpProvider=S.EditorContextKeys.hasSignatureHelpProvider.bindTo(n),i._isInWalkThrough=S.EditorContextKeys.isInEmbeddedEditor.bindTo(n);var o=function(){return i._update() };return i._register(t.onDidChangeModel(o)),i._register(t.onDidChangeModelLanguage(o)),i._register(w.SuggestRegistry.onDidChange(o)),i._register(w.CodeActionProviderRegistry.onDidChange(o)),i._register(w.CodeLensProviderRegistry.onDidChange(o)),i._register(w.DefinitionProviderRegistry.onDidChange(o)),i._register(w.ImplementationProviderRegistry.onDidChange(o)),i._register(w.TypeDefinitionProviderRegistry.onDidChange(o)),i._register(w.HoverProviderRegistry.onDidChange(o)),i._register(w.DocumentHighlightProviderRegistry.onDidChange(o)),i._register(w.DocumentSymbolProviderRegistry.onDidChange(o)),i._register(w.ReferenceProviderRegistry.onDidChange(o)),i._register(w.RenameProviderRegistry.onDidChange(o)),i._register(w.DocumentFormattingEditProviderRegistry.onDidChange(o)),i._register(w.DocumentRangeFormattingEditProviderRegistry.onDidChange(o)),i._register(w.SignatureHelpProviderRegistry.onDidChange(o)),o(),i}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this)}, t.prototype.reset=function(){this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.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()},t.prototype._update=function(){var e=this._editor.getModel();e?(this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(w.SuggestRegistry.has(e)),this._hasCodeActionsProvider.set(w.CodeActionProviderRegistry.has(e)),this._hasCodeLensProvider.set(w.CodeLensProviderRegistry.has(e)),this._hasDefinitionProvider.set(w.DefinitionProviderRegistry.has(e)), this._hasImplementationProvider.set(w.ImplementationProviderRegistry.has(e)),this._hasTypeDefinitionProvider.set(w.TypeDefinitionProviderRegistry.has(e)),this._hasHoverProvider.set(w.HoverProviderRegistry.has(e)),this._hasDocumentHighlightProvider.set(w.DocumentHighlightProviderRegistry.has(e)),this._hasDocumentSymbolProvider.set(w.DocumentSymbolProviderRegistry.has(e)),this._hasReferenceProvider.set(w.ReferenceProviderRegistry.has(e)),this._hasRenameProvider.set(w.RenameProviderRegistry.has(e)),this._hasSignatureHelpProvider.set(w.SignatureHelpProviderRegistry.has(e)),this._hasDocumentFormattingProvider.set(w.DocumentFormattingEditProviderRegistry.has(e)||w.DocumentRangeFormattingEditProviderRegistry.has(e)),this._hasDocumentSelectionFormattingProvider.set(w.DocumentRangeFormattingEditProviderRegistry.has(e)),this._isInWalkThrough.set(e.uri.scheme===E.Schemas.walkThroughSnippet)):this.reset()},t}(l.Disposable);t.EditorModeContext=B;var H=function(e){function t(t){var n=e.call(this)||this ;return n._onChange=n._register(new s.Emitter),n.onChange=n._onChange.event,n._hasFocus=!1,n._domFocusTracker=n._register(i.trackFocus(t)),n._register(n._domFocusTracker.onDidFocus(function(){n._hasFocus=!0,n._onChange.fire(void 0)})),n._register(n._domFocusTracker.onDidBlur(function(){n._hasFocus=!1,n._onChange.fire(void 0)})),n}return o(t,e),t.prototype.hasFocus=function(){return this._hasFocus},t}(l.Disposable),z=encodeURIComponent(""),U=encodeURIComponent('');M.registerThemingParticipant(function(e,t){var n=e.getColor(R.editorErrorBorder) ;n&&t.addRule(".monaco-editor .squiggly-error { border-bottom: 4px double "+n+"; }");var i=e.getColor(R.editorErrorForeground);i&&t.addRule('.monaco-editor .squiggly-error { background: url("data:image/svg+xml,'+O(i)+'") repeat-x bottom left; }');var o=e.getColor(R.editorWarningBorder);o&&t.addRule(".monaco-editor .squiggly-warning { border-bottom: 4px double "+o+"; }");var r=e.getColor(R.editorWarningForeground);r&&t.addRule('.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,'+O(r)+'") repeat-x bottom left; }');var s=e.getColor(R.editorInfoBorder);s&&t.addRule(".monaco-editor .squiggly-info { border-bottom: 4px double "+s+"; }");var a=e.getColor(R.editorInfoForeground);a&&t.addRule('.monaco-editor .squiggly-info { background: url("data:image/svg+xml,'+O(a)+'") repeat-x bottom left; }');var l=e.getColor(R.editorHintBorder);l&&t.addRule(".monaco-editor .squiggly-hint { border-bottom: 2px dotted "+l+"; }");var u=e.getColor(R.editorHintForeground) ;u&&t.addRule('.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,'+function(e){return U+encodeURIComponent(e.toString())+j}(u)+'") no-repeat bottom left; }');var d=e.getColor(R.editorUnnecessaryCodeOpacity);d&&t.addRule("."+A+" .monaco-editor .squiggly-inline-unnecessary { opacity: "+d.rgba.a+"; will-change: opacity; }");var c=e.getColor(R.editorUnnecessaryCodeBorder);c&&t.addRule("."+A+" .monaco-editor .squiggly-unnecessary { border-bottom: 2px dashed "+c+"; }")})}),define(t[506],n([1,0,293,2,7,26,96,99,65,12,16,22,55,35,69,67,11,19,32,63,362]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y,C){"use strict";function b(e){for(var t=e.get(y.ICodeEditorService).listDiffEditors(),n=0,i=t.length;n0){var _=e[r-1];m=0===_.originalEndLineNumber?_.originalStartLineNumber+1:_.originalEndLineNumber+1,v=0===_.modifiedEndLineNumber?_.modifiedStartLineNumber+1:_.modifiedEndLineNumber+1}var y=f-3+1,C=g-3+1;if(yL){I+=D=L-I,M+=D}if(M>x){var D=x-M;I+=D,M+=D}h[p++]=new S(b,I,E,M),i[o++]=new w(h)} for(var T=i[0].entries,k=[],R=0,r=1,s=i.length;rg)&&(g=b),0!==S&&(0===m||Sv)&&(v=w)}var E=document.createElement("div");E.className="diff-review-row";var L=document.createElement("div");L.className="diff-review-cell diff-review-summary";var x=g-f+1,N=v-m+1;L.appendChild(document.createTextNode(c+1+"/"+this._diffs.length+": @@ -"+f+","+x+" +"+m+","+N+" @@")),E.setAttribute("data-line",String(m));var I=function(e){return 0===e?n.localize(1,null):1===e?n.localize(2,null):n.localize(3,null,e)},M=I(x),D=I(N);E.setAttribute("aria-label",n.localize(4,null,c+1,this._diffs.length,f,M,m,D)),E.appendChild(L), E.setAttribute("role","listitem"),p.appendChild(E);for(var T=m,_=0,y=h.length;_0}function A(e){ return e.originalEndLineNumber>0}Object.defineProperty(t,"__esModule",{value:!0});var F=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;n0?o/n:0;return{height:Math.max(0,Math.floor(e.contentHeight*r)),top:Math.floor(t*r)}},t.prototype._createDataSource=function(){var e=this;return{getWidth:function(){return e._width},getHeight:function(){return e._height-e._reviewHeight},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,e.applyColors(this._themeService.getTheme()),this._lineChanges&&this._updateDecorations(),this._measureDomElement(!0)},t.prototype._getLineChangeAtOrBeforeLineNumber=function(e,t){ if(0===this._lineChanges.length||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.ONE_OVERVIEW_WIDTH=15,t.ENTIRE_DIFF_OVERVIEW_WIDTH=30,t.UPDATE_DIFF_DECORATIONS_DELAY=200,t=a([u(2,v.IEditorWorkerService),u(3,p.IContextKeyService),u(4,h.IInstantiationService),u(5,f.ICodeEditorService),u(6,x.IThemeService),u(7,k.INotificationService)],t)}(r.Disposable);t.DiffEditorWidget=V;var B=function(e){function t(t){var n=e.call(this)||this ;return n._dataSource=t,n}return o(t,e),t.prototype.applyColors=function(e){var t=(e.getColor(N.diffInserted)||N.defaultInsertColor).transparent(2),n=(e.getColor(N.diffRemoved)||N.defaultRemoveColor).transparent(2),i=!t.equals(this._insertColor)||!n.equals(this._removeColor);return this._insertColor=t,this._removeColor=n,i},t.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),l=this._getOriginalEditorDecorations(e,t,n,r,s),u=this._getModifiedEditorDecorations(e,t,n,r,s);return{original:{decorations:l.decorations,overviewZones:l.overviewZones,zones:a.original},modified:{decorations:u.decorations,overviewZones:u.overviewZones,zones:a.modified}}},t}(r.Disposable),H=function(){function e(e){this._source=e,this._index=-1,this.advance()}return e.prototype.advance=function(){this._index++, this._index0){var n=e[e.length-1];if(n.afterLineNumber===t.afterLineNumber&&null===n.domNode)return void(n.heightInLines+=t.heightInLines)}e.push(t)},u=new H(this.modifiedForeignVZ),d=new H(this.originalForeignVZ),c=0,h=this.lineChanges.length;c<=h;c++){var p=c0?-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)):(r=i+=1e7+n,s=o+=1e7+t);for(var f=[],g=[];u.current&&u.current.afterLineNumber<=s;){m=void 0;m=u.current.afterLineNumber<=o?i-o+u.current.afterLineNumber:r,f.push({afterLineNumber:m,heightInLines:u.current.heightInLines,domNode:null}),u.advance()}for(;d.current&&d.current.afterLineNumber<=r;){var m=void 0;m=d.current.afterLineNumber<=i?o-i+d.current.afterLineNumber:s,g.push({afterLineNumber:m,heightInLines:d.current.heightInLines,domNode:null}),d.advance()}if(null!==p&&P(p)){(v=this._produceOriginalFromDiff(p,n,t))&&f.push(v)}if(null!==p&&A(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);_=b.heightInLines?(C.heightInLines-=b.heightInLines,y++):(b.heightInLines-=C.heightInLines,_++)}for(;_2*t.MINIMUM_EDITOR_WIDTH?(in-t.MINIMUM_EDITOR_WIDTH&&(i=n-t.MINIMUM_EDITOR_WIDTH)):i=o,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition},t.prototype.onSashDragStart=function(){this._startSashPosition=this._sashPosition},t.prototype.onSashDrag=function(e){var t=this._dataSource.getWidth()-V.ENTIRE_DIFF_OVERVIEW_WIDTH,n=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=n/t,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){return new j(e,t,n).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=i.getModel(),l=0,u=e.length;lt?{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}(z),q=function(e){function t(t,n){var i=e.call(this,t)||this ;return i.decorationsLeft=t.getOriginalEditor().getLayoutInfo().decorationsLeft,i._register(t.getOriginalEditor().onDidLayoutChange(function(e){i.decorationsLeft!==e.decorationsLeft&&(i.decorationsLeft=e.decorationsLeft,t.relayoutEditors())})),i}return o(t,e),t.prototype.setEnableSplitViewResizing=function(e){},t.prototype._getViewZones=function(e,t,n,i,o,r){return new G(e,t,n,i,o,r).getViewZones()},t.prototype._getOriginalEditorDecorations=function(e,t,n,i,o){for(var r=this._removeColor.toString(),s={decorations:[],overviewZones:[]},a=0,l=e.length;a'])}h+=this.modifiedEditorConfiguration.viewInfo.scrollBeyondLastColumn;var m=document.createElement("div");m.className="view-lines line-delete",m.innerHTML=a.build(),b.Configuration.applyFontInfoSlow(m,this.modifiedEditorConfiguration.fontInfo);var v=document.createElement("div");return v.className="inline-deleted-margin-view-zone",v.innerHTML=l.join(""), b.Configuration.applyFontInfoSlow(v,this.modifiedEditorConfiguration.fontInfo),{shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:h*c,domNode:m,marginDomNode:v}},t.prototype._renderOriginalLine=function(e,t,n,i,o,r,s){var a=t.getLineTokens(o),l=a.getLineContent(),u=_.LineDecoration.filter(r,o,1,l.length+1);s.appendASCIIString('
    ') ;var d=S.ViewLineRenderingData.isBasicASCII(l,t.mightContainNonBasicASCII()),c=S.ViewLineRenderingData.containsRTL(l,d,t.mightContainRTL()),h=y.renderViewLine(new y.RenderLineInput(n.fontInfo.isMonospace&&!n.viewInfo.disableMonospaceOptimizations,l,!1,d,c,0,a,u,i,n.fontInfo.spaceWidth,n.viewInfo.stopRenderingLineAfter,n.viewInfo.renderWhitespace,n.viewInfo.renderControlCharacters,n.viewInfo.fontLigatures),s);s.appendASCIIString("
    ");var p=h.characterMapping.getAbsoluteOffsets();return p.length>0?p[p.length-1]:0},t}(z);x.registerThemingParticipant(function(e,t){var n=e.getColor(N.diffInserted);n&&(t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: "+n+"; }"),t.addRule(".monaco-editor .inline-added-margin-view-zone { background-color: "+n+"; }"));var i=e.getColor(N.diffRemoved) ;i&&(t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: "+i+"; }"),t.addRule(".monaco-editor .inline-deleted-margin-view-zone { background-color: "+i+"; }"));var o=e.getColor(N.diffInsertedOutline);o&&t.addRule(".monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+o+"; }");var r=e.getColor(N.diffRemovedOutline);r&&t.addRule(".monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+r+"; }");var s=e.getColor(N.scrollbarShadow);s&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px "+s+"; }");var a=e.getColor(N.diffBorder);a&&t.addRule(".monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid "+a+"; }")})}),define(t[141],n([1,0,28,15,34,19,32,104,16,37]),function(e,t,n,i,r,s,l,d,c,h){"use strict" ;Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n,i,o,r,s,a,l,u){var d=e.call(this,t,i.getRawConfiguration(),{},o,r,s,a,l,u)||this;return d._parentEditor=i,d._overwriteOptions=n,e.prototype.updateOptions.call(d,d._overwriteOptions),d._register(i.onDidChangeConfiguration(function(e){return d._onParentConfigurationChanged(e)})),d}return o(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([u(3,i.IInstantiationService),u(4,l.ICodeEditorService),u(5,r.ICommandService),u(6,s.IContextKeyService),u(7,c.IThemeService),u(8,h.INotificationService)],t)}(d.CodeEditorWidget);t.EmbeddedCodeEditorWidget=p}), define(t[509],n([1,0,301,61,9,79,2,13,75,3,29,18,51,47,124,16,35,24,25,50]),function(e,t,n,i,o,r,s,l,d,c,h,p,f,g,m,v,_,y,C,b){"use strict";function S(e){return e.toString()}Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e,t,n){this.model=e,this._markerDecorations=[],this._modelEventListeners=[],this._modelEventListeners.push(e.onWillDispose(function(){return t(e)})),this._modelEventListeners.push(e.onDidChangeLanguage(function(t){return n(e,t)}))}return e.prototype.dispose=function(){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,[]),this._modelEventListeners=s.dispose(this._modelEventListeners),this.model=null},e.prototype.acceptMarkerDecorations=function(e){this._markerDecorations=this.model.deltaDecorations(this._markerDecorations,e)},e}(),E=function(){function e(){}return e.setMarkers=function(e,t){var n=this,i=t.read({resource:e.model.uri,take:500}).map(function(t){return{range:n._createDecorationRange(e.model,t), options:n._createDecorationOption(t)}});e.acceptMarkerDecorations(i)},e._createDecorationRange=function(e,t){var n=c.Range.lift(t);if(t.severity===d.MarkerSeverity.Hint&&c.Range.spansMultipleLines(n)&&(n=n.setEndPosition(n.startLineNumber,n.startColumn)),(n=e.validateRange(n)).isEmpty()){var i=e.getWordAtPosition(n.getStartPosition());if(i)n=new c.Range(n.startLineNumber,i.startColumn,n.endLineNumber,i.endColumn);else{var o=e.getLineLastNonWhitespaceColumn(n.startLineNumber)||e.getLineMaxColumn(n.startLineNumber);1===o||(n=n.endColumn>=o?new c.Range(n.startLineNumber,o-1,n.endLineNumber,o):new c.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&n.startLineNumber===n.endLineNumber){var r=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);r=0?"squiggly-unnecessary":"squiggly-hint",s=0;break;case d.MarkerSeverity.Warning:t="squiggly-warning",i=v.themeColorFromId(_.overviewRulerWarning),o=v.themeColorFromId(_.overviewRulerWarning),s=20;break;case d.MarkerSeverity.Info:t="squiggly-info",i=v.themeColorFromId(_.overviewRulerInfo),o=v.themeColorFromId(_.overviewRulerInfo),s=10;break;case d.MarkerSeverity.Error:default:t="squiggly-error",i=v.themeColorFromId(_.overviewRulerError),o=v.themeColorFromId(_.overviewRulerError),s=30}e.tags&&-1!==e.tags.indexOf(d.MarkerTag.Unnecessary)&&(a="squiggly-inline-unnecessary");var l=null,u=e.message,c=e.source,h=e.relatedInformation;if("string"==typeof u&&(u=u.trim(),c&&(u=/\n/g.test(u)?n.localize(0,null,c,u):n.localize(1,null,c,u)),l=(new r.MarkdownString).appendCodeblock("_",u),!C.isFalsyOrEmpty(h))){l.appendMarkdown("\n");for(var p=0,f=h;p0&&(n._decorations=n._editor.deltaDecorations(n._decorations,[])),n._updateBracketsSoon.schedule()})),n}return o(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.jumpToBracket=function(){var e=this._editor.getModel();if(e){var t=this._editor.getSelections().map(function(t){var n=t.getStartPosition(),i=e.matchBracket(n),o=null;if(i)i[0].containsPosition(n)?o=i[1].getStartPosition():i[1].containsPosition(n)&&(o=i[0].getStartPosition());else{var r=e.findNextBracket(n);r&&r.range&&(o=r.range.getStartPosition())}return o?new s.Selection(o.lineNumber,o.column,o.lineNumber,o.column):new s.Selection(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}},t.prototype.selectToBracket=function(){ var e=this._editor.getModel();if(e){var t=[];this._editor.getSelections().forEach(function(n){var i=n.getStartPosition(),o=e.matchBracket(i),r=null,a=null;if(!o){var l=e.findNextBracket(i);l&&l.range&&(o=e.matchBracket(l.range.getStartPosition()))}o&&(o[0].startLineNumber===o[1].startLineNumber?(r=o[1].startColumn0&&(this._editor.setSelections(t),this._editor.revealRange(t[0]))}},t.prototype._updateBrackets=function(){if(this._matchBrackets){this._recomputeBrackets();for(var e=[],n=0,i=0,o=this._lastBracketsData.length;i1&&o.sort(r.Position.compare);for(var d=[],c=0,h=0,p=n.length,a=0,l=o.length;a{1}",n,r),this._commands[n]=o):s=i.format("{0}",r),t.push(s)}this._domNode.innerHTML=t.join(" | "),this._editor.layoutContentWidget(this)}else this._domNode.innerHTML="no commands"},e.prototype.getId=function(){return this._id},e.prototype.getDomNode=function(){return this._domNode},e.prototype.setSymbolRange=function(e){var t=e.startLineNumber,n=this._editor.getModel().getLineFirstNonWhitespaceColumn(t);this._widgetPosition={position:{lineNumber:t,column:n},preference:[s.ContentWidgetPositionPreference.ABOVE] }},e.prototype.getPosition=function(){return this._widgetPosition},e.prototype.isVisible=function(){return this._domNode.hasAttribute("monaco-visible-content-widget")},e._idPool=0,e}(),p=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 a:hover { color: "+i+" !important; }")})}),define(t[512],n([1,0,14,10,2,68,11,17,511,34,37,452]),function(e,t,n,i,o,r,s,l,d,c,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t,n){var i=this;this._editor=e,this._commandService=t,this._notificationService=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(l.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._currentResolveCodeLensSymbolsPromise&&(this._currentResolveCodeLensSymbolsPromise.cancel(),this._currentResolveCodeLensSymbolsPromise=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&&l.CodeLensProviderRegistry.has(t)){for(var s=0,a=l.CodeLensProviderRegistry.all(t);s0&&e._detectVisibleLenses.schedule()})),this._localToDispose.push(this._editor.onDidLayoutChange(function(t){e._detectVisibleLenses.schedule()})),this._localToDispose.push(o.toDisposable(function(){if(e._editor.getModel()){var t=r.StableEditorScrollState.capture(e._editor);e._editor.changeDecorations(function(t){e._editor.changeViewZones(function(n){e._disposeAllLenses(t,n)})}),t.restore(e._editor)}else e._disposeAllLenses(null,null)})),h.schedule()}},e.prototype._disposeAllLenses=function(e,t){var n=new d.CodeLensHelper;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=[],s=0,a=e;si||(n&&n[n.length-1].symbol.range.startLineNumber===u?n.push(l):(n=[l],o.push(n)))}var c=r.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(function(e){t._editor.changeViewZones(function(n){for(var i=0,r=0,s=new d.CodeLensHelper;r=0?t+1:1},e.prototype.getCurrentMatchesPosition=function(t){for(var n=this._editor.getModel().getDecorationsInRange(t),i=0,o=n.length;i1e3){s=e._FIND_MATCH_NO_OVERVIEW_DECORATION ;for(var l=o._editor.getModel().getLineCount(),u=o._editor.getLayoutInfo().height/l,d=Math.max(2,Math.ceil(3/u)),c=t[0].range.startLineNumber,h=t[0].range.endLineNumber,p=1,f=t.length;p=g.startLineNumber?g.endLineNumber>h&&(h=g.endLineNumber):(a.push({range:new n.Range(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),c=g.startLineNumber,h=g.endLineNumber)}a.push({range:new n.Range(c,1,h,1),options:e._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}for(var m=new Array(t.length),p=0,f=t.length;p=0;t--){var n=this._decorations[t],i=this._editor.getModel().getDecorationRange(n);if(i&&!(i.endLineNumber>e.lineNumber)){if(i.endLineNumbere.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])},e.prototype.matchAfterPosition=function(e){if(0===this._decorations.length)return null;for(var t=0,n=this._decorations.length;te.lineNumber)return o;if(!(o.startColumn0},e.prototype._cannotFind=function(){if(!this._hasMatches()){var e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!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,0)}, e.prototype._prevSearchPosition=function(e){var t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel();return t||1===i?(1===n?n=o.getLineCount():n--,i=o.getLineMaxColumn(n)):i--,new s.Position(n,i)},e.prototype._moveToPrevMatch=function(n,i){if(void 0===i&&(i=!1),this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),n=e.lineNumber,i=e.column,o=this._editor.getModel() ;return t||i===o.getLineMaxColumn(n)?(n===o.getLineCount()?n=1:n++,i=1):i++,new s.Position(n,i)},e.prototype._moveToNextMatch=function(e){if(this._decorations.getCount()=t.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}},e.prototype._largeReplaceAll=function(){var e=new c.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getConfiguration().wordSeparators:null).parseSearchRequest();if(e){var t=e.regex;if(!t.multiline){var n="m";t.ignoreCase&&(n+="i"), t.global&&(n+="g"),t=new RegExp(t.source,n)}var i,o=this._editor.getModel(),s=o.getValue(f.EndOfLinePreference.LF),a=o.getFullModelRange(),l=this._getReplacePattern();i=l.hasReplacementPatterns?s.replace(t,function(){return l.buildReplaceString(arguments)}):s.replace(t,l.buildReplaceString(null));var u=new r.ReplaceCommandThatPreservesSelection(a,i,this._editor.getSelection());this._executeEditorCommand("replaceAll",u)}},e.prototype._regularReplaceAll=function(e){for(var t=this._getReplacePattern(),n=this._findMatches(e,t.hasReplacementPatterns,1073741824),i=[],o=0,r=n.length;o=0?this._markers[this._nextIdx]:void 0;this._markers=e||[],this._markers.sort(b.compareMarker),this._nextIdx=t?Math.max(-1,m.binarySearch(this._markers,t,b.compareMarker)):-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;i0?this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length:i=!0),n!==this._nextIdx){var o=this._markers[this._nextIdx];this._onCurrentMarkerChanged.fire(o)}return i},e.prototype.canNavigate=function(){return this._markers.length>0},e.prototype.findMarkerAtPosition=function(e){for(var t=0,n=this._markers;tthis._editor.getModel().getLineCount())return[];var n=g.ColorDetector.get(this._editor),i=this._editor.getModel().getLineMaxColumn(t),o=!1;return this._editor.getLineDecorations(t).map(function(s){ var a=s.range.startLineNumber===t?s.range.startColumn:1,l=s.range.endLineNumber===t?s.range.endColumn:i;if(a>e._range.startColumn||e._range.endColumn>l)return null;var u=new r.Range(e._range.startLineNumber,a,e._range.startLineNumber,l),d=n.getColorData(s.range.getStartPosition());if(!o&&d){o=!0;var h=d.colorInfo,p=h.color,f=h.range;return new b(f,p,d.provider)}if(c.isEmptyMarkdownString(s.options.hoverMessage))return null;var g=void 0;return s.options.hoverMessage&&(g=Array.isArray(s.options.hoverMessage)?s.options.hoverMessage.slice():[s.options.hoverMessage]),{contents:g,range:u}}).filter(function(e){return!!e})},e.prototype.onResult=function(e,t){this._result=t?e.concat(this._result.sort(function(e,t){return e instanceof b?-1:t instanceof b?1:0})):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:[(new c.MarkdownString).appendText(n.localize(0,null))]}},e}(),w=function(e){function t(n,o,r){var s=e.call(this,t.ID,n)||this;return s._themeService=r,s.renderDisposable=v.Disposable.None,s._computer=new S(s._editor),s._highlightDecorations=[],s._isChangingDecorations=!1,s._markdownRenderer=o,s._register(o.onDidRenderCodeBlock(s.onContentsChange,s)),s._hoverOperation=new u.HoverOperation(s._computer,function(e){return s._withResult(e,!0)},null,function(e){return s._withResult(e,!1)}),s._register(i.addStandardDisposableListener(s.getDomNode(),i.EventType.FOCUS,function(){s._colorPicker&&i.addClass(s.getDomNode(),"colorpicker-hover")})),s._register(i.addStandardDisposableListener(s.getDomNode(),i.EventType.BLUR,function(){i.removeClass(s.getDomNode(),"colorpicker-hover")})),s._register(n.onDidChangeConfiguration(function(e){s._hoverOperation.setHoverTime(s._editor.getConfiguration().contribInfo.hover.delay)})),s}return o(t,e),t.prototype.dispose=function(){ this.renderDisposable.dispose(),this.renderDisposable=v.Disposable.None,this._hoverOperation.cancel(),e.prototype.dispose.call(this)},t.prototype.onModelDecorationsChanged=function(){this._isChangingDecorations||this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))},t.prototype.startShowingAt=function(e,t,n){if(!this._lastRange||!this._lastRange.equalsRange(e)){if(this._hoverOperation.cancel(),this.isVisible)if(this._showAtPosition.lineNumber!==e.startLineNumber)this.hide();else{for(var i=[],o=0,r=this._messages.length;o=e.endColumn&&i.push(s)}if(i.length>0){if(function(e,t){if(!e&&t||e&&!t||e.length!==t.length)return!1;for(var n=0;n0?this._renderMessages(this._lastRange,this._messages):t&&this.hide()},t.prototype._renderMessages=function(e,n){var i=this;this.renderDisposable.dispose(),this._colorPicker=null;var o,a=Number.MAX_VALUE,l=n[0].range,u=document.createDocumentFragment(),d=!0,h=!1;n.forEach(function(t){if(t.range)if(a=Math.min(a,t.range.startColumn),l=r.Range.plusRange(l,t.range),t instanceof b){h=!0 ;var n=t.color,g=n.red,S=n.green,w=n.blue,E=n.alpha,L=new m.RGBA(255*g,255*S,255*w,E),x=new m.Color(L),N=i._editor.getModel(),I=new r.Range(t.range.startLineNumber,t.range.startColumn,t.range.endLineNumber,t.range.endColumn),M={range:t.range,color:t.color},D=new p.ColorPickerModel(x,[],0),T=new f.ColorPickerWidget(u,D,i._editor.getConfiguration().pixelRatio,i._themeService);_.getColorPresentations(N,M,t.provider,y.CancellationToken.None).then(function(n){D.colorPresentations=n;var l=i._editor.getModel().getValueInRange(t.range);D.guessColorPresentation(x,l);var d=function(){var e,t;D.presentation.textEdit?(e=[D.presentation.textEdit],t=(t=new r.Range(D.presentation.textEdit.range.startLineNumber,D.presentation.textEdit.range.startColumn,D.presentation.textEdit.range.endLineNumber,D.presentation.textEdit.range.endColumn)).setEndPosition(t.endLineNumber,t.startColumn+D.presentation.textEdit.text.length)):(e=[{identifier:null,range:I,text:D.presentation.label,forceMoveMarkers:!1}], t=I.setEndPosition(I.endLineNumber,I.startColumn+D.presentation.label.length)),i._editor.executeEdits("colorpicker",e),D.presentation.additionalTextEdits&&(e=D.presentation.additionalTextEdits.slice(),i._editor.executeEdits("colorpicker",e),i.hide()),i._editor.pushUndoStop(),I=t},c=function(e){return _.getColorPresentations(N,{range:I,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},t.provider,y.CancellationToken.None).then(function(e){D.colorPresentations=e})},h=D.onColorFlushed(function(e){c(e).then(d)}),p=D.onDidChangeColor(c);i._colorPicker=T,i.showAt(new s.Position(e.startLineNumber,a),i._shouldFocus),i.updateContents(u),i._colorPicker.layout(),i.renderDisposable=v.combinedDisposable([h,p,T,o])})}else t.contents.filter(function(e){return!c.isEmptyMarkdownString(e)}).forEach(function(e){var t=i._markdownRenderer.render(e);o=t,u.appendChild(C("div.hover-row",null,t.element)),d=!1})}),h||d||(this.showAt(new s.Position(e.startLineNumber,a),this._shouldFocus), this.updateContents(u)),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[{range:l,options:t._DECORATION_OPTIONS}]),this._isChangingDecorations=!1},t.ID="editor.contrib.modesContentHoverWidget",t._DECORATION_OPTIONS=h.ModelDecorationOptions.register({className:"hoverHighlight"}),t}(d.ContentHoverWidget);t.ModesContentHoverWidget=w}),define(t[520],n([1,0,320,39,18,62,64,3,11,23,519,255,2,16,22,20,121,378]),function(e,t,n,i,r,s,l,d,c,h,p,f,g,m,v,_,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(){function e(e,t,n,i){var o=this;this._editor=e,this._openerService=t,this._modeService=n,this._themeService=i,this._toUnhook=[],this._isMouseDown=!1,this._hoverClicked=!1,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(function(e){e.contribInfo&&(o._hideWidgets(),o._unhookEvents(),o._hookEvents())})}return Object.defineProperty(e.prototype,"contentWidget",{get:function(){ return this._contentWidget||this._createHoverWidget(),this._contentWidget},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphWidget",{get:function(){return this._glyphWidget||this._createHoverWidget(),this._glyphWidget},enumerable:!0,configurable:!0}),e.get=function(t){return t.getContribution(e.ID)},e.prototype._hookEvents=function(){var e=this,t=function(){return e._hideWidgets()},n=this._editor.getConfiguration().contribInfo.hover;this._isHoverEnabled=n.enabled,this._isHoverSticky=n.sticky,this._isHoverEnabled?(this._toUnhook.push(this._editor.onMouseDown(function(t){return e._onEditorMouseDown(t)})),this._toUnhook.push(this._editor.onMouseUp(function(t){return e._onEditorMouseUp(t)})),this._toUnhook.push(this._editor.onMouseMove(function(t){return e._onEditorMouseMove(t)})),this._toUnhook.push(this._editor.onKeyDown(function(t){return e._onKeyDown(t)})),this._toUnhook.push(this._editor.onDidChangeModelDecorations(function(){return e._onModelDecorationsChanged() }))):this._toUnhook.push(this._editor.onMouseMove(t)),this._toUnhook.push(this._editor.onMouseLeave(t)),this._toUnhook.push(this._editor.onDidChangeModel(t)),this._toUnhook.push(this._editor.onDidScrollChange(function(t){return e._onEditorScrollChanged(t)}))},e.prototype._unhookEvents=function(){this._toUnhook=g.dispose(this._toUnhook)},e.prototype._onModelDecorationsChanged=function(){this.contentWidget.onModelDecorationsChanged(),this.glyphWidget.onModelDecorationsChanged()},e.prototype._onEditorScrollChanged=function(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()},e.prototype._onEditorMouseDown=function(e){this._isMouseDown=!0;var t=e.target.type;t!==h.MouseTargetType.CONTENT_WIDGET||e.target.detail!==p.ModesContentHoverWidget.ID?t===h.MouseTargetType.OVERLAY_WIDGET&&e.target.detail===f.ModesGlyphHoverWidget.ID||(t!==h.MouseTargetType.OVERLAY_WIDGET&&e.target.detail!==f.ModesGlyphHoverWidget.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}, e.prototype._onEditorMouseUp=function(e){this._isMouseDown=!1},e.prototype._onEditorMouseMove=function(e){var t=e.target.type,n=r.isMacintosh?e.event.metaKey:e.event.ctrlKey;if(!(this._isMouseDown&&this._hoverClicked&&this.contentWidget.isColorPickerVisible())&&(!this._isHoverSticky||t!==h.MouseTargetType.CONTENT_WIDGET||e.target.detail!==p.ModesContentHoverWidget.ID||n)&&(!this._isHoverSticky||t!==h.MouseTargetType.OVERLAY_WIDGET||e.target.detail!==f.ModesGlyphHoverWidget.ID||n)){if(t===h.MouseTargetType.CONTENT_EMPTY){var i=this._editor.getConfiguration().fontInfo.typicalHalfwidthCharacterWidth/2,o=e.target.detail;o&&!o.isAfterLines&&"number"==typeof o.horizontalDistanceToText&&o.horizontalDistanceToText1&&(o=new s.Selection(o.startLineNumber,o.startColumn,o.endLineNumber,o.endColumn+d-1));var c=new h.InPlaceReplaceCommand(a,o,n.value);i.editor.pushUndoStop(),i.editor.executeCommand(t,c),i.editor.pushUndoStop(),i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[{range:u,options:e.DECORATION}]),i.decorationRemover&&i.decorationRemover.cancel(),i.decorationRemover=v.timeout(350),i.decorationRemover.then(function(){ return i.decorationIds=i.editor.deltaDecorations(i.decorationIds,[])}).catch(_.onUnexpectedError)}}).catch(_.onUnexpectedError)):void 0},e.ID="editor.contrib.inPlaceReplaceController",e.DECORATION=m.ModelDecorationOptions.register({className:"valueSetReplacement"}),e=a([u(1,c.IEditorWorkerService)],e)}(),C=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.up",label:n.localize(0,null),alias:"Replace with Previous Value",precondition:l.EditorContextKeys.writable,kbOpts:{kbExpr:l.EditorContextKeys.editorTextFocus,primary:3154,weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=y.get(t);if(n)return i.TPromise.wrap(n.run(this.id,!0))},t}(d.EditorAction),b=function(e){function t(){return e.call(this,{id:"editor.action.inPlaceReplace.down",label:n.localize(1,null),alias:"Replace with Next Value",precondition:l.EditorContextKeys.writable,kbOpts:{kbExpr:l.EditorContextKeys.editorTextFocus,primary:3156,weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){ var n=y.get(t);if(n)return i.TPromise.wrap(n.run(this.id,!1))},t}(d.EditorAction);d.registerEditorContribution(y),d.registerEditorAction(C),d.registerEditorAction(b),f.registerThemingParticipant(function(e,t){var n=e.getColor(g.editorBracketMatchBorder);n&&t.addRule(".monaco-editor.vs .valueSetReplacement { outline: solid 2px "+n+"; }")})});var d=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,a)}l((i=i.apply(e,t||[])).next())})},c=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(r=2&n[0]?o.return:n[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,n[1])).done)return r;switch(o=0,r&&(n=[2&n[0],r.value]),n[0]){case 0:case 1:r=n;break;case 4:return a.label++,{value:n[1],done:!1} ;case 5:a.label++,o=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]1;s.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 o=s.append(this.signature,L(".code")),r=t.parameters.length>0,a=this.editor.getConfiguration().fontInfo;if(o.style.fontSize=a.fontSize+"px",o.style.fontFamily=a.fontFamily,r)this.renderParameters(o,t,this.hints.activeParameter);else{s.append(o,L("span")).textContent=t.label}i.dispose(this.renderDisposeables),this.renderDisposeables=[];var u=t.parameters[this.hints.activeParameter];if(u&&u.documentation){var d=L("span.documentation");if("string"==typeof u.documentation)d.textContent=u.documentation;else{c=this.markdownRenderer.render(u.documentation);s.addClass(c.element,"markdown-docs"),this.renderDisposeables.push(c), d.appendChild(c.element)}s.append(this.docs,L("p",null,d))}if(s.toggleClass(this.signature,"has-docs",!!t.documentation),"string"==typeof t.documentation)s.append(this.docs,L("p",null,t.documentation));else{var c=this.markdownRenderer.render(t.documentation);s.addClass(c.element,"markdown-docs"),this.renderDisposeables.push(c),s.append(this.docs,c.element)}var h=String(this.currentSignature+1);if(this.hints.signatures.length<10&&(h+="/"+this.hints.signatures.length),this.overloads.textContent=h,u){var p=u.label;this.announcedLabel!==p&&(l.alert(n.localize(0,null,p)),this.announcedLabel=p)}this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}},e.prototype.renderParameters=function(e,t,n){for(var i,o=t.label.length,r=0,a=t.parameters.length-1;a>=0;a--){var l=t.parameters[a],u=0,d=0;(r=t.label.lastIndexOf(l.label,o-1))>=0&&(u=r,d=r+l.label.length),(i=document.createElement("span")).textContent=t.label.substring(d,o),s.prepend(e,i), (i=document.createElement("span")).className="parameter "+(a===n?"active":""),i.textContent=t.label.substring(u,d),s.prepend(e,i),o=u}(i=document.createElement("span")).textContent=t.label.substring(0,o),s.prepend(e,i)},e.prototype.next=function(){var e=this.hints.signatures.length,t=this.currentSignature%e==e-1;return e<2||t?(this.cancel(),!1):(this.currentSignature++,this.render(),!0)},e.prototype.previous=function(){var e=this.hints.signatures.length,t=0===this.currentSignature;return e<2||t?(this.cancel(),!1):(this.currentSignature--,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.renderDisposeables=i.dispose(this.renderDisposeables),this.model&&(this.model.dispose(),this.model=null)},e.ID="editor.widget.parameterHintsWidget",e=a([u(1,m.IContextKeyService),u(2,S.IOpenerService),u(3,w.IModeService)],e)}();t.ParameterHintsWidget=N,C.registerThemingParticipant(function(e,t){var n=e.getColor(b.editorHoverBorder);if(n){var i=e.type===C.HIGH_CONTRAST?2:1;t.addRule(".monaco-editor .parameter-hints-widget { border: "+i+"px solid "+n+"; }"),t.addRule(".monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid "+n.transparent(.5)+"; }"),t.addRule(".monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid "+n.transparent(.5)+"; }")}var o=e.getColor(b.editorHoverBackground);o&&t.addRule(".monaco-editor .parameter-hints-widget { background-color: "+o+"; }");var r=e.getColor(b.textLinkForeground);r&&t.addRule(".monaco-editor .parameter-hints-widget a { color: "+r+"; }");var s=e.getColor(b.textCodeBlockBackground) ;s&&t.addRule(".monaco-editor .parameter-hints-widget code { background-color: "+s+"; }")})}),define(t[527],n([1,0,327,2,15,20,19,11,526,175]),function(e,t,n,i,r,s,l,d,c,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(){function e(e,t){this.editor=e,this.widget=t.createInstance(c.ParameterHintsWidget,this.editor)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.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.ID="editor.controller.parameterHints",e=a([u(1,r.IInstantiationService)],e)}(),f=function(e){function t(){return e.call(this,{id:"editor.action.triggerParameterHints",label:n.localize(0,null),alias:"Trigger Parameter Hints",precondition:s.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{ kbExpr:s.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=p.get(t);n&&n.trigger()},t}(d.EditorAction);t.TriggerParameterHintsAction=f,d.registerEditorContribution(p),d.registerEditorAction(f);var g=d.EditorCommand.bindToContribution(p.get);d.registerEditorCommand(new g({id:"closeParameterHints",precondition:h.Context.Visible,handler:function(e){return e.cancel()},kbOpts:{weight:175,kbExpr:s.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),d.registerEditorCommand(new g({id:"showPrevParameterHint",precondition:l.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:function(e){return e.previous()},kbOpts:{weight:175,kbExpr:s.EditorContextKeys.editorTextFocus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),d.registerEditorCommand(new g({id:"showNextParameterHint",precondition:l.ContextKeyExpr.and(h.Context.Visible,h.Context.MultipleSignatures),handler:function(e){return e.next()},kbOpts:{ weight:175,kbExpr:s.EditorContextKeys.editorTextFocus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(t[144],n([1,0,329,67,6,28,56,9,7,69,32,192,141,19,27,385]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.inPeekEditor=new f.RawContextKey("inReferenceSearchEditor",!0),e.notInPeekEditor=e.inPeekEditor.toNegated()}(t.PeekContext||(t.PeekContext={})),t.getOuterEditor=function(e){var t=e.get(c.ICodeEditorService).getFocusedCodeEditor();return t instanceof p.EmbeddedCodeEditorWidget?t.getParentEditor():t};var m={headerBackgroundColor:g.Color.white,primaryHeadingColor:g.Color.fromHex("#333333"),secondaryHeadingColor:g.Color.fromHex("#6c6c6cb3")},v=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this,t,n)||this;return i._onDidClose=new l.Emitter,s.mixin(i.options,m,!1),i}return o(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._onDidClose.fire(this)}, Object.defineProperty(t.prototype,"onDidClose",{get:function(){return this._onDidClose.event},enumerable:!0,configurable:!0}),t.prototype.style=function(t){var n=this.options;t.headerBackgroundColor&&(n.headerBackgroundColor=t.headerBackgroundColor),t.primaryHeadingColor&&(n.primaryHeadingColor=t.primaryHeadingColor),t.secondaryHeadingColor&&(n.secondaryHeadingColor=t.secondaryHeadingColor),e.prototype.style.call(this,t)},t.prototype._applyStyles=function(){e.prototype._applyStyles.call(this);var t=this.options;this._headElement&&(this._headElement.style.backgroundColor=t.headerBackgroundColor.toString()),this._primaryHeading&&(this._primaryHeading.style.color=t.primaryHeadingColor.toString()),this._secondaryHeading&&(this._secondaryHeading.style.color=t.secondaryHeadingColor.toString()),this._bodyElement&&(this._bodyElement.style.borderColor=t.frameColor.toString())},t.prototype._fillContainer=function(e){this.setCssClass("peekview-widget"),this._headElement=a.$(".head").getHTMLElement(), this._bodyElement=a.$(".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=a.$(".peekview-title").on(u.EventType.CLICK,function(e){return t._onTitleClick(e)}).appendTo(this._headElement).getHTMLElement();this._primaryHeading=a.$("span.filename").appendTo(o).getHTMLElement(),this._secondaryHeading=a.$("span.dirname").appendTo(o).getHTMLElement(),this._metaHeading=a.$("span.meta").appendTo(o).getHTMLElement();var r=a.$(".peekview-actions").appendTo(this._headElement),s=this._getActionBarOptions();this._actionbarWidget=new d.ActionBar(r.getHTMLElement(),s),this._disposables.push(this._actionbarWidget),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._getActionBarOptions=function(){return{}},t.prototype._onTitleClick=function(e){}, t.prototype.setTitle=function(e,t){a.$(this._primaryHeading).safeInnerHtml(e),this._primaryHeading.setAttribute("aria-label",e),t?a.$(this._secondaryHeading).safeInnerHtml(t):u.clearNode(this._secondaryHeading)},t.prototype.setMetaTitle=function(e){e?a.$(this._metaHeading).safeInnerHtml(e):u.clearNode(this._metaHeading)},t.prototype._doLayout=function(e,t){if(!this._isShowing&&e<0)this.dispose();else{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=r.format("{0}px",e),this._headElement.style.lineHeight=this._headElement.style.height},t.prototype._doLayoutBody=function(e,t){this._bodyElement.style.height=r.format("{0}px",e)},t}(h.ZoneWidget);t.PeekViewWidget=v}),define(t[529],n([1,0,336,2,13,3,23,16,22,12,388]),function(e,t,n,i,o,r,s,l,d,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){var n=this;this.themeService=t, 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&&n.updateFont()})),this._disposables.push(t.onThemeChange(function(e){return n.onThemeChange(e)}))}return e.prototype.onThemeChange=function(e){this.updateStyles(e)},e.prototype.dispose=function(){this._disposables=i.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.updateStyles(this.themeService.getTheme())),this._domNode},e.prototype.updateStyles=function(e){if(this._inputField){var t=e.getColor(d.inputBackground),n=e.getColor(d.inputForeground),i=e.getColor(d.widgetShadow),o=e.getColor(d.inputBorder);this._inputField.style.backgroundColor=t?t.toString():null,this._inputField.style.color=n?n.toString():null,this._inputField.style.borderWidth=o?"1px":"0px",this._inputField.style.borderStyle=o?"solid":"none",this._inputField.style.borderColor=o?o.toString():"none",this._domNode.style.boxShadow=i?" 0 2px 8px "+i:null}},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:[s.ContentWidgetPositionPreference.BELOW,s.ContentWidgetPositionPreference.ABOVE]}:null},e.prototype.acceptInput=function(){this._currentAcceptInput&&this._currentAcceptInput()},e.prototype.cancelInput=function(e){this._currentCancelInput&&this._currentCancelInput(e)},e.prototype.getInput=function(e,t,n,s){var a=this;this._position=new c.Position(e.startLineNumber,e.startColumn),this._inputField.value=t,this._inputField.setAttribute("selectionStart",n.toString()),this._inputField.setAttribute("selectionEnd",s.toString()),this._inputField.size=Math.max(1.1*(e.endColumn-e.startColumn),20);var l,u=[];return l=function(){i.dispose(u),a._hide()},new o.TPromise(function(n){a._currentCancelInput=function(e){return a._currentAcceptInput=null,a._currentCancelInput=null,n(e),!0},a._currentAcceptInput=function(){0!==a._inputField.value.trim().length&&a._inputField.value!==t?(a._currentAcceptInput=null,a._currentCancelInput=null,n(a._inputField.value)):a.cancelInput(!0)} ;u.push(a._editor.onDidChangeCursorSelection(function(){r.Range.containsPosition(e,a._editor.getPosition())||a.cancelInput(!0)})),u.push(a._editor.onDidBlurEditorWidget(function(){return a.cancelInput(!1)})),a._show()},function(){a._currentCancelInput(!0)}).then(function(e){return l(),e},function(e){return l(),o.TPromise.wrapError(e)})},e.prototype._show=function(){var e=this;this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),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")))},100)},e.prototype._hide=function(){this._visible=!1,this._editor.layoutContentWidget(this)},e=a([u(1,l.IThemeService)],e)}();t.default=h}),define(t[530],n([1,0,335,10,13,19,92,11,20,529,16,14,17,12,52,3,143,68,37,127,31,32]),function(e,t,n,i,r,s,l,h,p,f,g,m,v,_,y,C,b,S,w,E,L,x){"use strict";function N(e,t,n){ return d(this,void 0,void 0,function(){return c(this,function(i){return[2,new I(e,t).provideRenameEdits(n)]})})}Object.defineProperty(t,"__esModule",{value:!0});var I=function(){function e(e,t){this.model=e,this.position=t,this._provider=v.RenameProviderRegistry.ordered(e)}return e.prototype.hasProvider=function(){return this._provider.length>0},e.prototype.resolveRenameLocation=function(){return d(this,void 0,void 0,function(){var e,t,n,i=this;return c(this,function(o){switch(o.label){case 0:return(e=this._provider[0]).resolveRenameLocation?[4,m.asWinJsPromise(function(t){return e.resolveRenameLocation(i.model,i.position,t)})]:[3,2];case 1:t=o.sent(),o.label=2;case 2:return t||(n=this.model.getWordAtPosition(this.position))&&(t={range:new C.Range(this.position.lineNumber,n.startColumn,this.position.lineNumber,n.endColumn),text:n.word}),[2,t]}})})},e.prototype.provideRenameEdits=function(e,t,i,o){return void 0===t&&(t=0),void 0===i&&(i=[]),void 0===o&&(o=this.position),d(this,void 0,void 0,function(){ var o,r,s=this;return c(this,function(a){switch(a.label){case 0:return t>=this._provider.length?[2,{edits:void 0,rejectReason:i.join("\n")}]:(o=this._provider[t],[4,m.asWinJsPromise(function(t){return o.provideRenameEdits(s.model,s.position,e,t)})]);case 1:return(r=a.sent())?r.rejectReason?[2,this.provideRenameEdits(e,t+1,i.concat(r.rejectReason))]:[2,r]:[2,this.provideRenameEdits(e,t+1,i.concat(n.localize(0,null)))]}})})},e}();t.rename=N;var M=new s.RawContextKey("renameInputVisible",!1),D=function(){function e(e,t,n,i,o,r){this.editor=e,this._notificationService=t,this._bulkEditService=n,this._progressService=i,this._renameInputField=new f.default(e,r),this._renameInputVisible=M.bindTo(o)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.dispose=function(){this._renameInputField.dispose()},e.prototype.getId=function(){return e.ID},e.prototype.run=function(){return d(this,void 0,void 0,function(){var e,t,i,o,s,a,l,u=this;return c(this,function(d){switch(d.label){case 0: if(e=this.editor.getPosition(),!(t=new I(this.editor.getModel(),e)).hasProvider())return[2,void 0];d.label=1;case 1:return d.trys.push([1,3,,4]),[4,t.resolveRenameLocation()];case 2:return i=d.sent(),[3,4];case 3:return o=d.sent(),b.MessageController.get(this.editor).showMessage(o,e),[2,void 0];case 4:return i?(s=this.editor.getSelection(),a=0,l=i.text.length,C.Range.isEmpty(s)||C.Range.spansMultipleLines(s)||!C.Range.containsRange(i.range,s)||(a=Math.max(0,s.startColumn-i.range.startColumn),l=Math.min(i.range.endColumn,s.endColumn)-i.range.startColumn),this._renameInputVisible.set(!0),[2,this._renameInputField.getInput(i.range,i.text,a,l).then(function(e){u._renameInputVisible.reset();if("boolean"!=typeof e){u.editor.focus();var o=new S.EditorState(u.editor,15),s=r.TPromise.wrap(t.provideRenameEdits(e,0,[],C.Range.lift(i.range).getStartPosition()).then(function(t){if(!t.rejectReason)return u._bulkEditService.apply(t,{editor:u.editor}).then(function(t){ t.ariaSummary&&y.alert(n.localize(1,null,i.text,e,t.ariaSummary))});o.validate(u.editor)?b.MessageController.get(u.editor).showMessage(t.rejectReason,u.editor.getPosition()):u._notificationService.info(t.rejectReason)},function(e){return u._notificationService.error(n.localize(2,null)),r.TPromise.wrapError(e)}));return u._progressService.showWhile(s,250),s}e&&u.editor.focus()},function(e){return u._renameInputVisible.reset(),r.TPromise.wrapError(e)})]):[2,void 0]}})})},e.prototype.acceptRenameInput=function(){this._renameInputField.acceptInput()},e.prototype.cancelRenameInput=function(){this._renameInputField.cancelInput(!0)},e.ID="editor.contrib.renameController",e=a([u(1,w.INotificationService),u(2,E.IBulkEditService),u(3,l.IProgressService),u(4,s.IContextKeyService),u(5,g.IThemeService)],e)}(),T=function(e){function t(){return e.call(this,{id:"editor.action.rename",label:n.localize(3,null),alias:"Rename Symbol", precondition:s.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:60,weight:100},menuOpts:{group:"1_modification",order:1.1}})||this}return o(t,e),t.prototype.runCommand=function(t,n){var o=this,r=t.get(x.ICodeEditorService),s=n||[void 0,void 0],a=s[0],l=s[1];return L.default.isUri(a)&&_.Position.isIPosition(l)?r.openCodeEditor({resource:a},r.getActiveCodeEditor()).then(function(e){e.setPosition(l),e.invokeWithinContext(function(t){return o.reportTelemetry(t,e),o.run(t,e)})},i.onUnexpectedError):e.prototype.runCommand.call(this,t,n)},t.prototype.run=function(e,t){var n=D.get(t);if(n)return r.TPromise.wrap(n.run())},t}(h.EditorAction);t.RenameAction=T,h.registerEditorContribution(D),h.registerEditorAction(T);var k=h.EditorCommand.bindToContribution(D.get);h.registerEditorCommand(new k({id:"acceptRenameInput",precondition:M,handler:function(e){return e.acceptRenameInput()},kbOpts:{weight:199, kbExpr:p.EditorContextKeys.focus,primary:3}})),h.registerEditorCommand(new k({id:"cancelRenameInput",precondition:M,handler:function(e){return e.cancelRenameInput()},kbOpts:{weight:199,kbExpr:p.EditorContextKeys.focus,primary:9,secondary:[1033]}})),h.registerDefaultLanguageCommand("_executeDocumentRenameProvider",function(e,t,n){var o=n.newName;if("string"!=typeof o)throw i.illegalArgument("newName");return N(e,t,o)})}),define(t[531],n([1,0,341,102,6,9,10,2,7,138,278,55,49,19,23,101,52,86,103,16,22,72,121,64,62,14,40,398]),function(e,t,n,i,o,r,s,d,c,h,p,f,g,m,v,_,y,C,b,S,w,E,L,x,N,I,M){"use strict";function D(e){return e&&e.match(R)?e:null}function T(e){if(!e)return!1;var t=e.suggestion;return!!t.documentation||t.detail&&t.detail!==t.label}Object.defineProperty(t,"__esModule",{value:!0});var k=!1;t.editorSuggestWidgetBackground=w.registerColor("editorSuggestWidget.background",{dark:w.editorWidgetBackground,light:w.editorWidgetBackground,hc:w.editorWidgetBackground},n.localize(0,null)), t.editorSuggestWidgetBorder=w.registerColor("editorSuggestWidget.border",{dark:w.editorWidgetBorder,light:w.editorWidgetBorder,hc:w.editorWidgetBorder},n.localize(1,null)),t.editorSuggestWidgetForeground=w.registerColor("editorSuggestWidget.foreground",{dark:w.editorForeground,light:w.editorForeground,hc:w.editorForeground},n.localize(2,null)),t.editorSuggestWidgetSelectedBackground=w.registerColor("editorSuggestWidget.selectedBackground",{dark:w.listFocusBackground,light:w.listFocusBackground,hc:w.listFocusBackground},n.localize(3,null)),t.editorSuggestWidgetHighlightForeground=w.registerColor("editorSuggestWidget.highlightForeground",{dark:w.listHighlightForeground,light:w.listHighlightForeground,hc:w.listHighlightForeground},n.localize(4,null));var R=/^(#([\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,O=function(){function e(e,t,n){this.widget=e,this.editor=t,this.triggerKeybindingLabel=n} 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=c.append(e,c.$(".icon")),i.colorspan=c.append(i.icon,c.$("span.colorspan"));var o=c.append(e,c.$(".contents")),s=c.append(o,c.$(".main"));i.highlightedLabel=new h.HighlightedLabel(s),i.disposables.push(i.highlightedLabel),i.typeLabel=c.append(s,c.$("span.type-label")),i.readMore=c.append(s,c.$("span.readMore")),i.readMore.title=n.localize(5,null,this.triggerKeybindingLabel);var a=function(){var e=t.editor.getConfiguration(),n=e.fontInfo.fontFamily,o=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",r=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px";i.root.style.fontSize=o,s.style.fontFamily=n,s.style.lineHeight=r,i.icon.style.height=r,i.icon.style.width=r,i.readMore.style.height=r,i.readMore.style.width=r};return a(), r.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo||e.contribInfo}).on(a,null,i.disposables),i},e.prototype.renderElement=function(e,t,o){var r=this,s=o,a=e.suggestion;if(T(e)?s.root.setAttribute("aria-label",n.localize(6,null,a.label)):s.root.setAttribute("aria-label",n.localize(7,null,a.label)),s.icon.className="icon "+a.type,s.colorspan.style.backgroundColor="","color"===a.type){var l=D(a.label)||"string"==typeof a.documentation&&D(a.documentation);l&&(s.icon.className="icon customcolor",s.colorspan.style.backgroundColor=l)}s.highlightedLabel.set(a.label,i.createMatches(e.matches),"",!0),s.typeLabel.textContent=(a.detail||"").replace(/\n.*$/m,""),T(e)?(c.show(s.readMore),s.readMore.onmousedown=function(e){e.stopPropagation(),e.preventDefault()},s.readMore.onclick=function(e){e.stopPropagation(),e.preventDefault(),r.widget.toggleDetails()}):(c.hide(s.readMore),s.readMore.onmousedown=null,s.readMore.onclick=null)},e.prototype.disposeElement=function(){}, e.prototype.disposeTemplate=function(e){e.disposables=d.dispose(e.disposables)},e}(),P=function(){function e(e,t,i,o,s){var a=this;this.widget=t,this.editor=i,this.markdownRenderer=o,this.triggerKeybindingLabel=s,this.borderWidth=1,this.disposables=[],this.el=c.append(e,c.$(".details")),this.disposables.push(d.toDisposable(function(){return e.removeChild(a.el)})),this.body=c.$(".body"),this.scrollbar=new f.DomScrollableElement(this.body,{}),c.append(this.el,this.scrollbar.getDomNode()),this.disposables.push(this.scrollbar),this.header=c.append(this.body,c.$(".header")),this.close=c.append(this.header,c.$("span.close")),this.close.title=n.localize(8,null,this.triggerKeybindingLabel),this.type=c.append(this.header,c.$("p.type")),this.docs=c.append(this.body,c.$("p.docs")),this.ariaLabel=null,this.configureFont(),r.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(function(e){return e.fontInfo}).on(this.configureFont,this,this.disposables),o.onDidRenderCodeBlock(function(){ return a.scrollbar.scanDomNode()},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;if(this.renderDisposeable=d.dispose(this.renderDisposeable),!e||!T(e))return this.type.textContent="",this.docs.textContent="",c.addClass(this.el,"no-docs"),void(this.ariaLabel=null);if(c.removeClass(this.el,"no-docs"),"string"==typeof e.suggestion.documentation)c.removeClass(this.docs,"markdown-docs"),this.docs.textContent=e.suggestion.documentation;else{c.addClass(this.docs,"markdown-docs"),this.docs.innerHTML="";var n=this.markdownRenderer.render(e.suggestion.documentation);this.renderDisposeable=n,this.docs.appendChild(n.element)}e.suggestion.detail?(this.type.innerText=e.suggestion.detail,c.show(this.type)):(this.type.innerText="",c.hide(this.type)),this.el.style.height=this.header.offsetHeight+this.docs.offsetHeight+2*this.borderWidth+"px",this.close.onmousedown=function(e){e.preventDefault(), e.stopPropagation()},this.close.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.widget.toggleDetails()},this.body.scrollTop=0,this.scrollbar.scanDomNode(),this.ariaLabel=o.format("{0}\n{1}\n{2}",e.suggestion.label||"",e.suggestion.detail||"",e.suggestion.documentation||"")},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.scrollTop=function(){this.body.scrollTop=0},e.prototype.scrollBottom=function(){this.body.scrollTop=this.body.scrollHeight},e.prototype.pageDown=function(){this.scrollDown(80)},e.prototype.pageUp=function(){this.scrollUp(80)},e.prototype.setBorderWidth=function(e){this.borderWidth=e},e.prototype.configureFont=function(){var e=this.editor.getConfiguration(),t=e.fontInfo.fontFamily,n=(e.contribInfo.suggestFontSize||e.fontInfo.fontSize)+"px",i=(e.contribInfo.suggestLineHeight||e.fontInfo.lineHeight)+"px" ;this.el.style.fontSize=n,this.type.style.fontFamily=t,this.close.style.height=i,this.close.style.width=i},e.prototype.dispose=function(){this.disposables=d.dispose(this.disposables),this.renderDisposeable=d.dispose(this.renderDisposeable)},e}(),A=function(){function e(e,n,i,o,s,a,l,u){var d=this;this.editor=e,this.telemetryService=n,this.allowEditorOverflow=!0,this.ignoreFocusEvents=!1,this.editorBlurTimeout=new I.TimeoutTimer,this.showTimeout=new I.TimeoutTimer,this.onDidSelectEmitter=new r.Emitter,this.onDidFocusEmitter=new r.Emitter,this.onDidHideEmitter=new r.Emitter,this.onDidShowEmitter=new r.Emitter,this.onDidSelect=this.onDidSelectEmitter.event,this.onDidFocus=this.onDidFocusEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDidShow=this.onDidShowEmitter.event,this.maxWidgetWidth=660,this.listWidth=330,this.storageServiceAvailable=!0,this.expandSuggestionDocs=!1,this.firstFocusInCurrentList=!1 ;var h=a.lookupKeybinding("editor.action.triggerSuggest"),f=h?" ("+h.getLabel()+")":"",g=new L.MarkdownRenderer(e,l,u);this.isAuto=!1,this.focusedItem=null,this.storageService=s,void 0===this.expandDocsSettingFromStorage()&&(this.storageService.store("expandSuggestionDocs",k,E.StorageScope.GLOBAL),void 0===this.expandDocsSettingFromStorage()&&(this.storageServiceAvailable=!1)),this.element=c.$(".editor-widget.suggest-widget"),this.editor.getConfiguration().contribInfo.iconsInSuggestions||c.addClass(this.element,"no-icons"),this.messageElement=c.append(this.element,c.$(".message")),this.listElement=c.append(this.element,c.$(".tree")),this.details=new P(this.element,this,this.editor,g,f);var m=new O(this,this.editor,f);this.list=new p.List(this.listElement,this,[m],{useShadows:!1,selectOnMouseDown:!0,focusOnMouseDown:!1,openController:{shouldOpen:function(){return!1}}}),this.toDispose=[b.attachListStyler(this.list,o,{listInactiveFocusBackground:t.editorSuggestWidgetSelectedBackground, listInactiveFocusOutline:w.activeContrastBorder}),o.onThemeChange(function(e){return d.onThemeChange(e)}),e.onDidBlurEditorText(function(){return d.onEditorBlur()}),e.onDidLayoutChange(function(){return d.onEditorLayoutChange()}),this.list.onSelectionChange(function(e){return d.onListSelection(e)}),this.list.onFocusChange(function(e){return d.onListFocus(e)}),this.editor.onDidChangeCursorSelection(function(){return d.onCursorSelectionChanged()})],this.suggestWidgetVisible=_.Context.Visible.bindTo(i),this.suggestWidgetMultipleSuggestions=_.Context.MultipleSuggestions.bindTo(i),this.suggestionSupportsAutoAccept=_.Context.AcceptOnKey.bindTo(i),this.editor.addContentWidget(this),this.setState(0),this.onThemeChange(o.getTheme())}return e.prototype.onCursorSelectionChanged=function(){0!==this.state&&this.editor.layoutContentWidget(this)},e.prototype.onEditorBlur=function(){var e=this;this.editorBlurTimeout.cancelAndSet(function(){e.editor.hasTextFocus()||e.setState(0)},150)}, e.prototype.onEditorLayoutChange=function(){3!==this.state&&5!==this.state||!this.expandDocsSettingFromStorage()||this.expandSideOrBelow()},e.prototype.onListSelection=function(e){var t=this;if(e.elements.length){var i=e.elements[0],o=e.indexes[0];i.resolve(M.CancellationToken.None).then(function(){t.onDidSelectEmitter.fire({item:i,index:o,model:t.completionModel}),y.alert(n.localize(11,null,i.suggestion.label)),t.editor.focus()})}},e.prototype._getSuggestionAriaAlertLabel=function(e){return T(e)?n.localize(12,null,e.suggestion.label):n.localize(13,null,e.suggestion.label)},e.prototype._ariaAlert=function(e){this._lastAriaAlertLabel!==e&&(this._lastAriaAlertLabel=e,this._lastAriaAlertLabel&&y.alert(this._lastAriaAlertLabel))},e.prototype.onThemeChange=function(e){var n=e.getColor(t.editorSuggestWidgetBackground);n&&(this.listElement.style.backgroundColor=n.toString(),this.details.element.style.backgroundColor=n.toString(),this.messageElement.style.backgroundColor=n.toString()) ;var i=e.getColor(t.editorSuggestWidgetBorder);i&&(this.listElement.style.borderColor=i.toString(),this.details.element.style.borderColor=i.toString(),this.messageElement.style.borderColor=i.toString(),this.detailsBorderColor=i.toString());var o=e.getColor(w.focusBorder);o&&(this.detailsFocusBorderColor=o.toString()),this.details.setBorderWidth("hc"===e.type?2:1)},e.prototype.onListFocus=function(e){var t=this;if(!this.ignoreFocusEvents){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)),this.firstFocusInCurrentList=!this.focusedItem,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.list.reveal(i), this.currentSuggestionDetails=I.createCancelablePromise(function(e){return n.resolve(e)}),this.currentSuggestionDetails.then(function(){t.ignoreFocusEvents=!0,t.list.splice(i,1,[n]),t.list.setFocus([i]),t.ignoreFocusEvents=!1,t.expandDocsSettingFromStorage()?t.showDetails():c.removeClass(t.element,"docs-side")}).catch(s.onUnexpectedError).then(function(){t.focusedItem===n&&(t.currentSuggestionDetails=null)}),this.onDidFocusEmitter.fire({item:n,index:i,model:this.completionModel})}}},e.prototype.setState=function(t){if(this.element){var n=this.state!==t;switch(this.state=t,c.toggleClass(this.element,"frozen",4===t),t){case 0:c.hide(this.messageElement,this.details.element,this.listElement),this.hide(),this.listHeight=0,n&&this.list.splice(0,this.list.length),this.focusedItem=null;break;case 1:this.messageElement.textContent=e.LOADING_MESSAGE,c.hide(this.listElement,this.details.element),c.show(this.messageElement),c.removeClass(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 2: this.messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,c.hide(this.listElement,this.details.element),c.show(this.messageElement),c.removeClass(this.element,"docs-side"),this.show(),this.focusedItem=null;break;case 3:case 4:c.hide(this.messageElement),c.show(this.listElement),this.show();break;case 5:c.hide(this.messageElement),c.show(this.details.element,this.listElement),this.show(),this._ariaAlert(this.details.getAriaLabel())}}},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,i){if(this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.completionModel!==e&&(this.completionModel=e),n&&2!==this.state&&0!==this.state)this.setState(4);else{var o=this.completionModel.items.length,r=0===o;if(this.suggestWidgetMultipleSuggestions.set(o>1),r)i?this.setState(0):this.setState(2),this.completionModel=null;else{ var s=this.completionModel.stats;s.wasAutomaticallyTriggered=!!i,this.telemetryService.publicLog("suggestWidget",l({},s,this.editor.getTelemetryData())),this.list.splice(0,this.list.length,this.completionModel.items),n?this.setState(4):this.setState(3),this.list.reveal(t,t),this.list.setFocus([t]),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)}}},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 1:return!this.isAuto;default:return this.list.focusNext(1,!0),!0}},e.prototype.selectLast=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollBottom(),!0;case 1:return!this.isAuto;default:return this.list.focusLast(),!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 1:return!this.isAuto;default:return this.list.focusPrevious(1,!0),!1}},e.prototype.selectFirst=function(){switch(this.state){case 0:return!1;case 5:return this.details.scrollTop(),!0;case 1:return!this.isAuto;default:return this.list.focusFirst(),!0}},e.prototype.getFocusedItem=function(){if(0!==this.state&&2!==this.state&&1!==this.state)return{item:this.list.getFocusedElements()[0],index:this.list.getFocus()[0],model:this.completionModel}},e.prototype.toggleDetailsFocus=function(){5===this.state?(this.setState(3),this.detailsBorderColor&&(this.details.element.style.borderColor=this.detailsBorderColor)):3===this.state&&this.expandDocsSettingFromStorage()&&(this.setState(5),this.detailsFocusBorderColor&&(this.details.element.style.borderColor=this.detailsFocusBorderColor)), this.telemetryService.publicLog("suggestWidget:toggleDetailsFocus",this.editor.getTelemetryData())},e.prototype.toggleDetails=function(){if(T(this.list.getFocusedElements()[0]))if(this.expandDocsSettingFromStorage())this.updateExpandDocsSetting(!1),c.hide(this.details.element),c.removeClass(this.element,"docs-side"),c.removeClass(this.element,"docs-below"),this.editor.layoutContentWidget(this),this.telemetryService.publicLog("suggestWidget:collapseDetails",this.editor.getTelemetryData());else{if(3!==this.state&&5!==this.state&&4!==this.state)return;this.updateExpandDocsSetting(!0),this.showDetails(),this.telemetryService.publicLog("suggestWidget:expandDetails",this.editor.getTelemetryData())}},e.prototype.showDetails=function(){this.expandSideOrBelow(),c.show(this.details.element),this.details.render(this.list.getFocusedElements()[0]),this.details.element.style.maxHeight=this.maxWidgetHeight+"px",this.listElement.style.marginTop="0px",this.editor.layoutContentWidget(this),this.adjustDocsPosition(), this.editor.focus(),this._ariaAlert(this.details.getAriaLabel())},e.prototype.show=function(){var e=this,t=this.updateListHeight();t!==this.listHeight&&(this.editor.layoutContentWidget(this),this.listHeight=t),this.suggestWidgetVisible.set(!0),this.showTimeout.cancelAndSet(function(){c.addClass(e.element,"visible"),e.onDidShowEmitter.fire(e)},100)},e.prototype.hide=function(){this.suggestWidgetVisible.reset(),this.suggestWidgetMultipleSuggestions.reset(),c.removeClass(this.element,"visible")},e.prototype.hideWidget=function(){clearTimeout(this.loadingTimeout),this.setState(0),this.onDidHideEmitter.fire(this)},e.prototype.getPosition=function(){return 0===this.state?null:{position:this.editor.getPosition(),preference:[v.ContentWidgetPositionPreference.BELOW,v.ContentWidgetPositionPreference.ABOVE]}},e.prototype.getDomNode=function(){return this.element},e.prototype.getId=function(){return e.ID},e.prototype.updateListHeight=function(){var e=0;if(2===this.state||1===this.state)e=this.unfocusedHeight;else{ var t=this.list.contentHeight/this.unfocusedHeight;e=Math.min(t,12)*this.unfocusedHeight}return this.element.style.lineHeight=this.unfocusedHeight+"px",this.listElement.style.height=e+"px",this.list.layout(e),e},e.prototype.adjustDocsPosition=function(){var e=this.editor.getConfiguration().fontInfo.lineHeight,t=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),n=c.getDomNodePagePosition(this.editor.getDomNode()),i=n.left+t.left,o=n.top+t.top+t.height,r=c.getDomNodePagePosition(this.element),s=r.left,a=r.top;sa&&this.details.element.offsetHeight>this.listElement.offsetHeight&&(this.listElement.style.marginTop=this.details.element.offsetHeight-this.listElement.offsetHeight+"px")},e.prototype.expandSideOrBelow=function(){if(!T(this.focusedItem)&&this.firstFocusInCurrentList)return c.removeClass(this.element,"docs-side"), void c.removeClass(this.element,"docs-below");var e=this.element.style.maxWidth.match(/(\d+)px/);!e||Number(e[1])0&&this._activeAcceptCharacters.add(i[0])}}else this.reset()},e.prototype.reset=function(){this._activeItem=void 0},e.prototype.dispose=function(){s.dispose(this._disposables)},e}(),E=function(){function e(e,t,n,i){var o=this;this._editor=e,this._commandService=t,this._contextKeyService=n,this._instantiationService=i,this._toDispose=[],this._model=new C.SuggestModel(this._editor),this._memory=i.createInstance(S.SuggestMemories,this._editor.getConfiguration().contribInfo.suggestSelection),this._toDispose.push(this._model.onDidTrigger(function(e){o._widget||o._createSuggestWidget(),o._widget.showTriggered(e.auto)})), this._toDispose.push(this._model.onDidSuggest(function(e){var t=o._memory.select(o._editor.getModel(),o._editor.getPosition(),e.completionModel.items);o._widget.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)})),this._toDispose.push(this._model.onDidCancel(function(e){o._widget&&!e.retrigger&&o._widget.hideWidget()}));var r=y.Context.AcceptSuggestionsOnEnter.bindTo(n),s=function(){var e=o._editor.getConfiguration().contribInfo,t=e.acceptSuggestionOnEnter,n=e.suggestSelection;r.set("on"===t||"smart"===t),o._memory.setMode(n)};this._toDispose.push(this._editor.onDidChangeConfiguration(function(e){return s()})),s()}return e.get=function(t){return t.getContribution(e.ID)},e.prototype._createSuggestWidget=function(){var e=this;this._widget=this._instantiationService.createInstance(b.SuggestWidget,this._editor),this._toDispose.push(this._widget.onDidSelect(this._onDidSelectItem,this));var t=new w(this._editor,this._widget,function(t){return e._onDidSelectItem(t)}) ;this._toDispose.push(t,this._model.onDidSuggest(function(e){0===e.completionModel.items.length&&t.reset()}));var n=y.Context.MakesTextEdit.bindTo(this._contextKeyService);this._toDispose.push(this._widget.onDidFocus(function(t){var i=t.item,o=e._editor.getPosition(),r=i.position.column-i.suggestion.overwriteBefore,s=o.column,a=!0;if("smart"===e._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter&&2===e._model.state&&!i.suggestion.command&&!i.suggestion.additionalTextEdits&&"textmate"!==i.suggestion.snippetType&&s-r===i.suggestion.insertText.length){a=e._editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:r,endLineNumber:o.lineNumber,endColumn:s})!==i.suggestion.insertText}n.set(a)})),this._toDispose.push({dispose:function(){n.reset()}})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._toDispose=s.dispose(this._toDispose),this._widget&&(this._widget.dispose(),this._widget=null),this._model&&(this._model.dispose(),this._model=null)}, e.prototype._onDidSelectItem=function(e){var t;if(e&&e.item){var n=e.item,o=n.suggestion,r=n.position,s=this._editor.getPosition().column-r.column;this._editor.pushUndoStop(),Array.isArray(o.additionalTextEdits)&&this._editor.executeEdits("suggestController.additionalTextEdits",o.additionalTextEdits.map(function(e){return g.EditOperation.replace(m.Range.lift(e.range),e.text)})),this._memory.memorize(this._editor.getModel(),this._editor.getPosition(),e.item);var a=o.insertText;"textmate"!==o.snippetType&&(a=v.SnippetParser.escape(a)),_.SnippetController2.get(this._editor).insert(a,o.overwriteBefore+s,o.overwriteAfter,!1,!1),this._editor.pushUndoStop(),o.command?o.command.id===L.id?this._model.trigger({auto:!0},!0):((t=this._commandService).executeCommand.apply(t,[o.command.id].concat(o.command.arguments)).done(void 0,i.onUnexpectedError),this._model.cancel()):this._model.cancel(),this._alertCompletionItem(e.item)}else this._model.cancel()},e.prototype._alertCompletionItem=function(e){ var t=e.suggestion,i=n.localize(0,null,t.label,t.insertText);f.alert(i)},e.prototype.triggerSuggest=function(e){this._model.trigger({auto:!1},!1,e),this._editor.revealLine(this._editor.getPosition().lineNumber,0),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.hideWidget())},e.prototype.selectNextSuggestion=function(){this._widget&&this._widget.selectNext()},e.prototype.selectNextPageSuggestion=function(){this._widget&&this._widget.selectNextPage()},e.prototype.selectLastSuggestion=function(){this._widget&&this._widget.selectLast()},e.prototype.selectPrevSuggestion=function(){this._widget&&this._widget.selectPrevious()},e.prototype.selectPrevPageSuggestion=function(){this._widget&&this._widget.selectPreviousPage()},e.prototype.selectFirstSuggestion=function(){this._widget&&this._widget.selectFirst()}, e.prototype.toggleSuggestionDetails=function(){this._widget&&this._widget.toggleDetails()},e.prototype.toggleSuggestionFocus=function(){this._widget&&this._widget.toggleDetailsFocus()},e.ID="editor.contrib.suggestController",e=a([u(1,c.ICommandService),u(2,d.IContextKeyService),u(3,l.IInstantiationService)],e)}();t.SuggestController=E;var L=function(e){function t(){return e.call(this,{id:t.id,label:n.localize(1,null),alias:"Trigger Suggest",precondition:d.ContextKeyExpr.and(h.EditorContextKeys.writable,h.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:h.EditorContextKeys.textInputFocus,primary:2058,mac:{primary:266},weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=E.get(t);n&&n.triggerSuggest()},t.id="editor.action.triggerSuggest",t}(p.EditorAction);t.TriggerSuggestAction=L,p.registerEditorContribution(E),p.registerEditorAction(L);var x=p.EditorCommand.bindToContribution(E.get);p.registerEditorCommand(new x({id:"acceptSelectedSuggestion",precondition:y.Context.Visible, handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:2}})),p.registerEditorCommand(new x({id:"acceptSelectedSuggestionOnEnter",precondition:y.Context.Visible,handler:function(e){return e.acceptSelectedSuggestion()},kbOpts:{weight:190,kbExpr:d.ContextKeyExpr.and(h.EditorContextKeys.textInputFocus,y.Context.AcceptSuggestionsOnEnter,y.Context.MakesTextEdit),primary:3}})),p.registerEditorCommand(new x({id:"hideSuggestWidget",precondition:y.Context.Visible,handler:function(e){return e.cancelSuggestWidget()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),p.registerEditorCommand(new x({id:"selectNextSuggestion",precondition:d.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:function(e){return e.selectNextSuggestion()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})), p.registerEditorCommand(new x({id:"selectNextPageSuggestion",precondition:d.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:function(e){return e.selectNextPageSuggestion()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),p.registerEditorCommand(new x({id:"selectLastSuggestion",precondition:d.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:function(e){return e.selectLastSuggestion()}})),p.registerEditorCommand(new x({id:"selectPrevSuggestion",precondition:d.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:function(e){return e.selectPrevSuggestion()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),p.registerEditorCommand(new x({id:"selectPrevPageSuggestion",precondition:d.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:function(e){return e.selectPrevPageSuggestion()},kbOpts:{ weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),p.registerEditorCommand(new x({id:"selectFirstSuggestion",precondition:d.ContextKeyExpr.and(y.Context.Visible,y.Context.MultipleSuggestions),handler:function(e){return e.selectFirstSuggestion()}})),p.registerEditorCommand(new x({id:"toggleSuggestionDetails",precondition:y.Context.Visible,handler:function(e){return e.toggleSuggestionDetails()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:2058,mac:{primary:266}}})),p.registerEditorCommand(new x({id:"toggleSuggestionFocus",precondition:y.Context.Visible,handler:function(e){return e.toggleSuggestionFocus()},kbOpts:{weight:190,kbExpr:h.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}}))}),define(t[533],n([1,0,343,14,10,3,11,17,2,22,16,54,29,19,20,25,24,40]),function(e,t,n,i,r,s,l,d,c,h,p,f,g,m,v,_,y,C){"use strict";function b(e,t,n){var o=d.DocumentHighlightProviderRegistry.ordered(e);return i.first2(o.map(function(i){return function(){ return Promise.resolve(i.provideDocumentHighlights(e,t,n)).then(void 0,r.onUnexpectedExternalError)}}),function(e){return!_.isFalsyOrEmpty(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.editorWordHighlight=h.registerColor("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},n.localize(0,null),!0),t.editorWordHighlightStrong=h.registerColor("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},n.localize(1,null),!0),t.editorWordHighlightBorder=h.registerColor("editor.wordHighlightBorder",{light:null,dark:null,hc:h.activeContrastBorder},n.localize(2,null)),t.editorWordHighlightStrongBorder=h.registerColor("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:h.activeContrastBorder},n.localize(3,null)),t.overviewRulerWordHighlightForeground=h.registerColor("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},n.localize(4,null),!0), t.overviewRulerWordHighlightStrongForeground=h.registerColor("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},n.localize(5,null),!0),t.ctxHasWordHighlights=new m.RawContextKey("hasWordHighlights",!1),t.getOccurrencesAtPosition=b,l.registerDefaultLanguageCommand("_executeDocumentHighlights",function(e,t){return b(e,t,C.CancellationToken.None)});var S=function(){function e(e,n){var i=this;this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=t.ctxHasWordHighlights.bindTo(n),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getConfiguration().contribInfo.occurrencesHighlight,this.model=this.editor.getModel(),this.toUnhook=[],this.toUnhook.push(e.onDidChangeCursorPosition(function(e){i._ignorePositionChangeEvent||i.occurrencesHighlight&&i._onPositionChanged(e)})), this.toUnhook.push(e.onDidChangeModel(function(e){i._stopAll(),i.model=i.editor.getModel()})),this.toUnhook.push(e.onDidChangeModelContent(function(e){i._stopAll()})),this.toUnhook.push(e.onDidChangeConfiguration(function(e){var t=i.editor.getConfiguration().contribInfo.occurrencesHighlight;i.occurrencesHighlight!==t&&(i.occurrencesHighlight=t,i._stopAll())})),this._lastWordRange=null,this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}return e.prototype.hasDecorations=function(){return this._decorationIds.length>0},e.prototype.restore=function(){this.occurrencesHighlight&&this._run()},e.prototype._getSortedHighlights=function(){var e=this;return this._decorationIds.map(function(t){return e.model.getDecorationRange(t)}).sort(s.Range.compareRangesUsingStarts)},e.prototype.moveNext=function(){var e=this,t=this._getSortedHighlights(),n=t[(_.firstIndex(t,function(t){ return t.containsPosition(e.editor.getPosition())})+1)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype.moveBack=function(){var e=this,t=this._getSortedHighlights(),n=t[(_.firstIndex(t,function(t){return t.containsPosition(e.editor.getPosition())})-1+t.length)%t.length];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n)}finally{this._ignorePositionChangeEvent=!1}},e.prototype._removeDecorations=function(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))},e.prototype._stopAll=function(){this._lastWordRange=null,this._removeDecorations(),-1!==this.renderDecorationsTimer&&(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){this.occurrencesHighlight&&e.reason===f.CursorChangeReason.Explicit?this._run():this._stopAll()},e.prototype._run=function(){var e=this;if(d.DocumentHighlightProviderRegistry.has(this.model)){var t=this.editor.getSelection();if(t.startLineNumber===t.endLineNumber){var n=t.startLineNumber,o=t.startColumn,a=t.endColumn,l=this.model.getWordAtPosition({lineNumber:n,column:o});if(!l||l.startColumn>o||l.endColumn=a&&(c=!0)}if(this.lastCursorPositionChangeTime=(new Date).getTime(), c)this.workerRequestCompleted&&-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();var g=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=i.createCancelablePromise(function(t){return b(e.model,e.editor.getPosition(),t)}),this.workerRequest.then(function(t){g===e.workerRequestTokenId&&(e.workerRequestCompleted=!0,e.workerRequestValue=t||[],e._beginRenderDecorations())},r.onUnexpectedError)}this._lastWordRange=u}}else this._stopAll()}else this._stopAll()},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 t=[],n=0,i=this.workerRequestValue.length;n0?r.format(T,e.length):null:N}(t,i);switch(e.wrappingInfo.inDiffEditor?e.readOnly?s+=n.localize(7,null):s+=n.localize(8,null):e.readOnly?s+=n.localize(9,null):s+=n.localize(10,null),e.accessibilitySupport){case 0:var a=C.isMacintosh?n.localize(11,null):n.localize(12,null);s+="\n\n - "+a;break;case 2:s+="\n\n - "+n.localize(13,null);break;case 1:s+="\n\n - "+n.localize(14,null),s+=" "+a}var u=n.localize(15,null),d=n.localize(16,null),c=n.localize(17,null),h=n.localize(18,null);e.tabFocusMode?s+="\n\n - "+this._descriptionForCommand(v.ToggleTabFocusModeAction.ID,u,d):s+="\n\n - "+this._descriptionForCommand(v.ToggleTabFocusModeAction.ID,c,h);s+="\n\n - "+(C.isMacintosh?n.localize(19,null):n.localize(20,null)), s+="\n\n"+n.localize(21,null),this._contentDomNode.domNode.appendChild(l.renderFormattedText(s)),this._contentDomNode.domNode.setAttribute("aria-label",s)},t.prototype.hide=function(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,s.clearNode(this._contentDomNode.domNode),this._editor.focus())},t.prototype._layout=function(){var e=this._editor.getLayoutInfo(),n=Math.max(5,Math.min(t.WIDTH,e.width-40)),i=Math.max(5,Math.min(t.HEIGHT,e.height-40));this._domNode.setWidth(n),this._domNode.setHeight(i);var o=Math.round((e.height-i)/2);this._domNode.setTop(o);var r=Math.round((e.width-n)/2);this._domNode.setLeft(r)},t.ID="editor.contrib.accessibilityHelpWidget",t.WIDTH=500,t.HEIGHT=300,t=a([u(1,f.IContextKeyService),u(2,p.IKeybindingService),u(3,S.IOpenerService)],t)}(c.Widget),R=function(e){function t(){return e.call(this,{id:"editor.action.showAccessibilityHelp", label:n.localize(22,null),alias:"Show Accessibility Help",precondition:null,kbOpts:{kbExpr:g.EditorContextKeys.focus,primary:E.isIE?2107:571,weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=x.get(t);n&&n.show()},t}(m.EditorAction);m.registerEditorContribution(x),m.registerEditorAction(R);var O=m.EditorCommand.bindToContribution(x.get);m.registerEditorCommand(new O({id:"closeAccessibilityHelp",precondition:L,handler:function(e){return e.hide()},kbOpts:{weight:200,kbExpr:g.EditorContextKeys.focus,primary:9,secondary:[1033]}})),_.registerThemingParticipant(function(e,t){var n=e.getColor(y.editorWidgetBackground);n&&t.addRule(".monaco-editor .accessibilityHelpWidget { background-color: "+n+"; }");var i=e.getColor(y.widgetShadow);i&&t.addRule(".monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(y.contrastBorder);o&&t.addRule(".monaco-editor .accessibilityHelpWidget { border: 2px solid "+o+"; }")})}), define(t[535],n([1,0,345,2,6,11,23,64,17,84,60,27,16,22,406]),function(e,t,n,i,r,s,l,d,c,h,p,f,g,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t,n,i){var o=e.call(this)||this;return o._editor=t,o._standaloneThemeService=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 o(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.getId=function(){return t.ID},t.prototype.dispose=function(){this.stop(),e.prototype.dispose.call(this)},t.prototype.launch=function(){this._widget||this._editor.getModel()&&(this._widget=new y(this._editor,this._standaloneThemeService,this._modeService))},t.prototype.stop=function(){this._widget&&(this._widget.dispose(),this._widget=null)},t.ID="editor.contrib.inspectTokens", t=a([u(1,h.IStandaloneThemeService),u(2,d.IModeService)],t)}(i.Disposable),_=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 o(t,e),t.prototype.run=function(e,t){var n=v.get(t);n&&n.launch()},t}(s.EditorAction),y=function(e){function t(t,n,i){var o=e.call(this)||this;return o.allowEditorOverflow=!0,o._editor=t,o._modeService=i,o._model=o._editor.getModel(),o._domNode=document.createElement("div"),o._domNode.className="tokens-inspect-widget",o._tokenizationSupport=function(e){var t=c.TokenizationRegistry.get(e.language);return t||{getInitialState:function(){return p.NULL_STATE},tokenize:function(t,n,i){return p.nullTokenize(e.language,t,n,i)},tokenize2:function(t,n,i){return p.nullTokenize2(e.id,t,n,i)}}}(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 o(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 o=t.tokens1[i];if(e.column-1>=o.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="",l=this._model.getLineContent(e.lineNumber),u="";if(n'+function(e){for(var t="",n=0,i=e.length;n('+u.length+" "+(1===u.length?"char":"chars")+")", a+='
    ';var h=this._decodeMetadata(t.tokens2[1+(s<<1)]);a+='',a+='",a+='",a+='",a+='",a+='",a+="",a+='
    ',n'+r.escape(t.tokens1[n].type)+""),this._domNode.innerHTML=a, this._editor.layoutContentWidget(this)},t.prototype._decodeMetadata=function(e){var t=c.TokenizationRegistry.getColorMap(),n=c.TokenMetadata.getLanguageId(e),i=c.TokenMetadata.getTokenType(e),o=c.TokenMetadata.getFontStyle(e),r=c.TokenMetadata.getForeground(e),s=c.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;n1?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:s,label:r}}, 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===r.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,0),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,0),this.decorator.decorateLine(e,this.editor),!1},t.prototype.toSelection=function(){return new c.Range(this._parseResult.position.lineNumber,this._parseResult.position.column,this._parseResult.position.lineNumber,this._parseResult.position.column)},t}(i.QuickOpenEntry);t.GotoLineEntry=h;var p=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:s.EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=this;this._show(this.getController(t),{getModel:function(e){return new i.QuickOpenModel([new h(e,t,n.getController(t))])},getAutoFocus:function(e){return{autoFocusFirstEntry:e.length>0}}})},t}(l.BaseEditorQuickOpenAction);t.GotoLineAction=p,u.registerEditorAction(p)}),define(t[538],n([1,0,347,10,102,13,119,93,49,20,145,11,30]),function(e,t,n,i,r,s,a,l,u,d,c,h,p){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var f=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 o(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===l.Mode.OPEN&&(s.TPromise.timeout(50).done(function(){n.editor.focus();try{(n.action.run()||s.TPromise.as(null)).done(null,i.onUnexpectedError)}catch(e){i.onUnexpectedError(e)}},i.onUnexpectedError),!0)},t}(a.QuickOpenEntryGroup);t.EditorActionCommandEntry=f;var g=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:d.EditorContextKeys.focus,primary:p.isIE?571:59,weight:100},menuOpts:{group:"z_commands",order:1}})||this}return o(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 a.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(),o=[],s=0;s0&&0===o.indexOf(":")){ for(var f=null,g=null,m=0,v=0;v0)):m++}g&&g.setGroupLabel(this.typeToLabel(f,m))}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(":".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(),l=s.localeCompare(a);if(0!==l)return l}var u=t.getRange(),d=n.getRange();return u.startLineNumber-d.startLineNumber},t}(d.BaseEditorQuickOpenAction);t.QuickOutlineAction=g,h.registerEditorAction(g)}),define(t[540],n([1,0,13,484,7,61]),function(e,t,n,i,r,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getActiveCodeEditor=function(){return null},t.prototype.openCodeEditor=function(e,t,i){return t?n.TPromise.as(this.doOpenEditor(t,e)):n.TPromise.as(null)},t.prototype.doOpenEditor=function(e,t){if(!this.findModel(e,t.resource)){if(t.resource){var n=t.resource.scheme;if(n===s.Schemas.http||n===s.Schemas.https)return r.windowOpenNoOpener(t.resource.toString()),e}return null}var i=t.options.selection ;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{var o={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(o),e.revealPositionInCenter(o,1)}return e},t.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.toString()?null:n},t}(i.CodeEditorServiceImpl);t.StandaloneCodeEditorServiceImpl=a}),define(t[541],n([1,0,22,35]),function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r,s;t.vs={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{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.pug",foreground:"4F76AC"},{token:"tag.class.pug",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"}],colors:(o={},o[n.editorBackground]="#FFFFFE",o[n.editorForeground]="#000000",o[n.editorInactiveSelection]="#E5EBF1",o[i.editorIndentGuides]="#D3D3D3",o[i.editorActiveIndentGuides]="#939393",o[n.editorSelectionHighlight]="#ADD6FF4D",o)},t.vs_dark={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{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.pug",foreground:"4F76AC"},{token:"tag.class.pug",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"}],colors:(r={},r[n.editorBackground]="#1E1E1E",r[n.editorForeground]="#D4D4D4",r[n.editorInactiveSelection]="#3A3D41",r[i.editorIndentGuides]="#404040",r[i.editorActiveIndentGuides]="#707070",r[n.editorSelectionHighlight]="#ADD6FF26",r)},t.hc_black={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{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.pug",foreground:"4F76AC"},{token:"tag.class.pug",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"}],colors:(s={},s[n.editorBackground]="#000000",s[n.editorForeground]="#FFFFFF",s[i.editorIndentGuides]="#FFFFFF",s[i.editorActiveIndentGuides]="#FFFFFF",s)}}),define(t[542],n([1,0,204,541,7,17,27,22,16,45,9]),function(e,t,n,i,o,r,s,a,l,u,d){"use strict";function c(e){return e===f||e===g||e===m}function h(e){switch(e){case f:return i.vs;case g:return i.vs_dark;case m:return i.hc_black}}function p(e){var t=h(e);return new y(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var f="vs",g="vs-dark",m="hc-black",v=u.Registry.as(a.Extensions.ColorContribution),_=u.Registry.as(l.Extensions.ThemingContribution),y=function(){function e(e,t){ this.themeData=t;var n=t.base;e.length>0?(this.id=n+" "+e,this.themeName=e):(this.id=n,this.themeName=n),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}return Object.defineProperty(e.prototype,"base",{get:function(){return this.themeData.base},enumerable:!0,configurable:!0}),e.prototype.notifyBaseUpdated=function(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)},e.prototype.getColors=function(){if(!this.colors){var e=Object.create(null);for(var t in this.themeData.colors)e[t]=s.Color.fromHex(this.themeData.colors[t]);if(this.themeData.inherit){var n=h(this.themeData.base);for(var t in n.colors)e[t]||(e[t]=s.Color.fromHex(n.colors[t]))}this.colors=e}return this.colors},e.prototype.getColor=function(e,t){var n=this.getColors()[e];return n||(!1!==t?this.getDefault(e):null)},e.prototype.getDefault=function(e){var t=this.defaultColors[e];return t||(t=v.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)},e.prototype.defines=function(e){ return Object.prototype.hasOwnProperty.call(this.getColors(),e)},Object.defineProperty(e.prototype,"type",{get:function(){switch(this.base){case f:return"light";case m:return"hc";default:return"dark"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tokenTheme",{get:function(){if(!this._tokenTheme){var e=[],t=[];if(this.themeData.inherit){var i=h(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=n.TokenTheme.createFromRawTokenTheme(e,t)}return this._tokenTheme},enumerable:!0,configurable:!0}),e}(),C=function(){function e(){this.environment=Object.create(null),this._onThemeChange=new d.Emitter,this._knownThemes=new Map,this._knownThemes.set(f,p(f)),this._knownThemes.set(g,p(g)),this._knownThemes.set(m,p(m)),this._styleElement=o.createStyleSheet(),this._styleElement.className="monaco-colors",this.setTheme(f)} return Object.defineProperty(e.prototype,"onThemeChange",{get:function(){return this._onThemeChange.event},enumerable:!0,configurable:!0}),e.prototype.defineTheme=function(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!c(t.base)&&!c(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new y(e,t)),c(e)&&this._knownThemes.forEach(function(t){t.base===e&&t.notifyBaseUpdated()}),this._theme&&this._theme.themeName===e&&this.setTheme(e)},e.prototype.getTheme=function(){return this._theme},e.prototype.setTheme=function(e){var t,i=this;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(f),this._theme=t;var o=[],s={},a={addRule:function(e){s[e]||(o.push(e),s[e]=!0)}};_.getThemingParticipants().forEach(function(e){return e(t,a,i.environment)});var l=t.tokenTheme.getColorMap();return a.addRule(n.generateTokensCSSForColorMap(l)),this._styleElement.innerHTML=o.join("\n"),r.TokenizationRegistry.setColorMap(l),this._onThemeChange.fire(t),t.id},e}() ;t.StandaloneThemeServiceImpl=C}),define(t[146],n([1,0,15,2,19,155,103,16,51,354,45,82,81,33,7,43]),function(e,t,n,i,r,s,d,c,h,p,f,g,m,v,_,y){"use strict";function C(e){return"alt"===e.getValue(t.multiSelectModifierSettingKey)}function b(e){return"doubleClick"!==e.getValue(t.openModeSettingKey)}function S(e,t){return e.controller||(e.controller=t.createInstance(I,{})),e.styler||(e.styler=new m.DefaultTreestyler((x||(x=_.createStyleSheet()),x))),e}Object.defineProperty(t,"__esModule",{value:!0});var w;t.IListService=n.createDecorator("listService");var E=function(){function e(e){this.lists=[],this._lastFocusedWidget=void 0}return Object.defineProperty(e.prototype,"lastFocusedList",{get:function(){return this._lastFocusedWidget},enumerable:!0,configurable:!0}),e.prototype.register=function(e,t){var n=this;if(this.lists.some(function(t){return t.widget===e}))throw new Error("Cannot register the same widget multiple times");var o={widget:e,extraContextKeys:t};this.lists.push(o), e.isDOMFocused()&&(this._lastFocusedWidget=e);return i.combinedDisposable([e.onDidFocus(function(){return n._lastFocusedWidget=e}),i.toDisposable(function(){return n.lists.splice(n.lists.indexOf(o),1)}),e.onDidDispose(function(){n.lists=n.lists.filter(function(e){return e!==o}),n._lastFocusedWidget===e&&(n._lastFocusedWidget=void 0)})])},e=a([u(0,r.IContextKeyService)],e)}();t.ListService=E;var L=new r.RawContextKey("listFocus",!0);t.WorkbenchListSupportsMultiSelectContextKey=new r.RawContextKey("listSupportsMultiselect",!0),t.WorkbenchListHasSelectionOrFocus=new r.RawContextKey("listHasSelectionOrFocus",!1),t.WorkbenchListDoubleSelection=new r.RawContextKey("listDoubleSelection",!1),t.WorkbenchListMultiSelection=new r.RawContextKey("listMultiSelection",!1),t.multiSelectModifierSettingKey="workbench.list.multiSelectModifier",t.openModeSettingKey="workbench.list.openMode",t.horizontalScrollingKey="workbench.tree.horizontalScrolling";var x,N=function(e){function s(n,i,o,r,s,a,u,c){ var h=this,p=S(i,u),f=c.getValue(t.horizontalScrollingKey)?y.ScrollbarVisibility.Auto:y.ScrollbarVisibility.Hidden,g=l({horizontalScrollMode:f,keyboardSupport:!1},d.computeStyles(a.getTheme(),d.defaultListStyles),o);return h=e.call(this,n,p,g)||this,h.disposables=[],h.contextKeyService=function(e,t){var n=e.createScoped(t.getHTMLElement());return L.bindTo(n),n}(r,h),t.WorkbenchListSupportsMultiSelectContextKey.bindTo(h.contextKeyService),h.listHasSelectionOrFocus=t.WorkbenchListHasSelectionOrFocus.bindTo(h.contextKeyService),h.listDoubleSelection=t.WorkbenchListDoubleSelection.bindTo(h.contextKeyService),h.listMultiSelection=t.WorkbenchListMultiSelection.bindTo(h.contextKeyService),h._openOnSingleClick=b(c),h._useAltAsMultipleSelectionModifier=C(c),h.disposables.push(h.contextKeyService,s.register(h),d.attachListStyler(h,a)),h.disposables.push(h.onDidChangeSelection(function(){var e=h.getSelection(),t=h.getFocus();h.listHasSelectionOrFocus.set(e&&e.length>0||!!t),h.listDoubleSelection.set(e&&2===e.length), h.listMultiSelection.set(e&&e.length>1)})),h.disposables.push(h.onDidChangeFocus(function(){var e=h.getSelection(),t=h.getFocus();h.listHasSelectionOrFocus.set(e&&e.length>0||!!t)})),h.disposables.push(c.onDidChangeConfiguration(function(e){e.affectsConfiguration(t.openModeSettingKey)&&(h._openOnSingleClick=b(c)),e.affectsConfiguration(t.multiSelectModifierSettingKey)&&(h._useAltAsMultipleSelectionModifier=C(c))})),h}return o(s,e),s.prototype.dispose=function(){e.prototype.dispose.call(this),this.disposables=i.dispose(this.disposables)},s=a([u(3,r.IContextKeyService),u(4,t.IListService),u(5,c.IThemeService),u(6,n.IInstantiationService),u(7,h.IConfigurationService)],s)}(s.Tree);t.WorkbenchTree=N;var I=function(e){function n(t,n){var i=e.call(this,function(e){return"boolean"!=typeof e.keyboardSupport&&(e.keyboardSupport=!1),"number"!=typeof e.clickBehavior&&(e.clickBehavior=m.ClickBehavior.ON_MOUSE_DOWN),e}(t))||this;return i.configurationService=n,i.disposables=[], v.isUndefinedOrNull(t.openMode)&&(i.setOpenMode(i.getOpenModeSetting()),i.registerListeners()),i}return o(n,e),n.prototype.registerListeners=function(){var e=this;this.disposables.push(this.configurationService.onDidChangeConfiguration(function(n){n.affectsConfiguration(t.openModeSettingKey)&&e.setOpenMode(e.getOpenModeSetting())}))},n.prototype.getOpenModeSetting=function(){return b(this.configurationService)?m.OpenMode.SINGLE_CLICK:m.OpenMode.DOUBLE_CLICK},n.prototype.dispose=function(){this.disposables=i.dispose(this.disposables)},n=a([u(1,h.IConfigurationService)],n)}(m.DefaultController);t.WorkbenchTreeController=I;f.Registry.as(g.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:p.localize(0,null),type:"object",properties:(w={},w[t.multiSelectModifierSettingKey]={type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[p.localize(1,null),p.localize(2,null)],default:"ctrlCmd",description:p.localize(3,null)},w[t.openModeSettingKey]={type:"string", enum:["singleClick","doubleClick"],default:"singleClick",description:p.localize(4,null)},w[t.horizontalScrollingKey]={type:"boolean",default:!1,description:p.localize(5,null)},w)})}),define(t[195],n([1,0,15]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IUriDisplayService=n.createDecorator("uriDisplay")}),define(t[545],n([1,0,19]),function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindContextScopedWidget=function(e,t,i){new n.RawContextKey(i,t).bindTo(e)},t.createWidgetScopedContextKeyService=function(e,t){return e.createScoped(t.target)},t.getContextScopedWidget=function(e,t){return e.getContext(document.activeElement).getValue(t)}}),define(t[546],n([1,0,19,115,276,545,97]),function(e,t,n,i,r,s,l){"use strict";function d(e,i){var o=s.createWidgetScopedContextKeyService(e,i);s.bindContextScopedWidget(o,i,t.HistoryNavigationWidgetContext);return{scopedContextKeyService:o, historyNavigationEnablement:new n.RawContextKey(t.HistoryNavigationEnablementContext,!0).bindTo(o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.HistoryNavigationWidgetContext="historyNavigationWidget",t.HistoryNavigationEnablementContext="historyNavigationEnabled",t.createAndBindHistoryNavigationWidgetScopedContextKeyService=d;var c=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._register(d(o,{target:r.element,historyNavigator:r}).scopedContextKeyService),r}return o(t,e),t=a([u(3,n.IContextKeyService)],t)}(i.HistoryInputBox);t.ContextScopedHistoryInputBox=c;var h=function(e){function t(t,n,i,o){var r=e.call(this,t,n,i)||this;return r._register(d(o,{target:r.inputBox.element,historyNavigator:r.inputBox}).scopedContextKeyService),r}return o(t,e),t=a([u(3,n.IContextKeyService)],t)}(r.FindInput);t.ContextScopedFindInput=h,l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200, when:n.ContextKeyExpr.and(new n.ContextKeyDefinedExpr(t.HistoryNavigationWidgetContext),new n.ContextKeyEqualsExpr(t.HistoryNavigationEnablementContext,!0)),primary:16,secondary:[528],handler:function(e,i){s.getContextScopedWidget(e.get(n.IContextKeyService),t.HistoryNavigationWidgetContext).historyNavigator.showPreviousValue()}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:new n.ContextKeyAndExpr([new n.ContextKeyDefinedExpr(t.HistoryNavigationWidgetContext),new n.ContextKeyEqualsExpr(t.HistoryNavigationEnablementContext,!0)]),primary:18,secondary:[530],handler:function(e,i){s.getContextScopedWidget(e.get(n.IContextKeyService),t.HistoryNavigationWidgetContext).historyNavigator.showNextValue()}})}),define(t[547],n([1,0,312,10,18,6,14,7,46,90,23,142,3,16,22,546,373]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m){"use strict";Object.defineProperty(t,"__esModule",{value:!0}) ;var v=n.localize(0,null),_=n.localize(1,null),y=n.localize(2,null),C=n.localize(3,null),b=n.localize(4,null),S=n.localize(5,null),w=n.localize(6,null),E=n.localize(7,null),L=n.localize(8,null),x=n.localize(9,null),N=n.localize(10,null),I=n.localize(11,null,h.MATCHES_LIMIT),M=n.localize(12,null),D=n.localize(13,null),T=69,k=17+(T+3+1)+92+2,R=34,O=function(){return function(e){this.afterLineNumber=e,this.heightInPx=R,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}();t.FindWidgetViewZone=O;var P=function(e){function t(t,n,i,o,r,s,u){var d=e.call(this)||this;return d._codeEditor=t,d._controller=n,d._state=i,d._contextViewProvider=o,d._keybindingService=r,d._contextKeyService=s,d._isVisible=!1,d._isReplaceVisible=!1,d._updateHistoryDelayer=new a.Delayer(500),d._register(d._state.onFindReplaceStateChange(function(e){return d._onStateChanged(e)})),d._buildDomNode(),d._updateButtons(),d._tryUpdateWidgetWidth(), d._register(d._codeEditor.onDidChangeConfiguration(function(e){e.readOnly&&(d._codeEditor.getConfiguration().readOnly&&d._state.change({isReplaceRevealed:!1},!1),d._updateButtons()),e.layoutInfo&&d._tryUpdateWidgetWidth()})),d._register(d._codeEditor.onDidChangeCursorSelection(function(){d._isVisible&&d._updateToggleSelectionFindButton()})),d._register(d._codeEditor.onDidFocusEditorWidget(function(){if(d._isVisible){var e=d._controller.getGlobalBufferTerm();e&&e!==d._state.searchString&&(d._state.change({searchString:e},!0),d._findInput.select())}})),d._findInputFocused=h.CONTEXT_FIND_INPUT_FOCUSED.bindTo(s),d._findFocusTracker=d._register(l.trackFocus(d._findInput.inputBox.inputElement)),d._register(d._findFocusTracker.onDidFocus(function(){d._findInputFocused.set(!0),d._updateSearchScope()})),d._register(d._findFocusTracker.onDidBlur(function(){d._findInputFocused.set(!1)})),d._replaceInputFocused=h.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(s), d._replaceFocusTracker=d._register(l.trackFocus(d._replaceInputBox.inputElement)),d._register(d._replaceFocusTracker.onDidFocus(function(){d._replaceInputFocused.set(!0),d._updateSearchScope()})),d._register(d._replaceFocusTracker.onDidBlur(function(){d._replaceInputFocused.set(!1)})),d._codeEditor.addOverlayWidget(d),d._viewZone=new O(0),d._applyTheme(u.getTheme()),d._register(u.onThemeChange(d._applyTheme.bind(d))),d._register(d._codeEditor.onDidChangeModel(function(e){d._isVisible&&void 0!==d._viewZoneId&&d._codeEditor.changeViewZones(function(e){e.removeZone(d._viewZoneId),d._viewZoneId=void 0})})),d._register(d._codeEditor.onDidScrollChange(function(e){e.scrollTopChanged?d._layoutViewZone():setTimeout(function(){d._layoutViewZone()},0)})),d}return o(t,e),t.prototype.getId=function(){return t.ID},t.prototype.getDomNode=function(){return this._domNode},t.prototype.getPosition=function(){return this._isVisible?{preference:c.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._replaceInputBox.width=this._findInput.inputBox.width,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;l.toggleClass(this._domNode,"no-results",t),this._updateMatchesCount()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory()},t.prototype._delayedUpdateHistory=function(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this))},t.prototype._updateHistory=function(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInputBox.addToHistory()},t.prototype._updateMatchesCount=function(){this._matchesCount.style.minWidth=T+"px",this._state.matchesCount>=h.MATCHES_LIMIT?this._matchesCount.title=I: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>=h.MATCHES_LIMIT&&(t+="+");var n=String(this._state.matchesPosition);"0"===n&&(n="?"),e=s.format(M,n,t)}else e=D ;this._matchesCount.appendChild(document.createTextNode(e)),T=Math.max(T,this._matchesCount.clientWidth)},t.prototype._updateToggleSelectionFindButton=function(){var e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),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),l.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;if(!this._isVisible){this._isVisible=!0;var n=this._codeEditor.getSelection();!!n&&(n.startLineNumber!==n.endLineNumber||n.startColumn!==n.endColumn)&&this._codeEditor.getConfiguration().contribInfo.find.autoFindInSelection?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._tryUpdateWidgetWidth(),this._updateButtons(),setTimeout(function(){l.addClass(t._domNode,"visible"),t._domNode.setAttribute("aria-hidden","false")},0),this._codeEditor.layoutOverlayWidget(this);var i=!0;if(this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection&&n){ var o=l.getDomNodePagePosition(this._codeEditor.getDomNode()),r=this._codeEditor.getScrolledVisiblePosition(n.getStartPosition()),s=o.left+r.left;if(r.topn.startLineNumber&&(i=!1);var a=l.getTopLeftOffset(this._domNode).left;s>a&&(i=!1);var u=this._codeEditor.getScrolledVisiblePosition(n.getEndPosition());o.left+u.left>a&&(i=!1)}}this._showViewZone(i)}},t.prototype._hide=function(e){var t=this;this._isVisible&&(this._isVisible=!1,this._updateButtons(),l.removeClass(this._domNode,"visible"),this._domNode.setAttribute("aria-hidden","true"),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._codeEditor.changeViewZones(function(e){void 0!==t._viewZoneId&&(e.removeZone(t._viewZoneId),t._viewZoneId=void 0,t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()-t._viewZone.heightInPx))}))},t.prototype._layoutViewZone=function(){var e=this;this._isVisible&&void 0===this._viewZoneId&&this._codeEditor.changeViewZones(function(t){ e._state.isReplaceRevealed?e._viewZone.heightInPx=64:e._viewZone.heightInPx=R,e._viewZoneId=t.addZone(e._viewZone),e._codeEditor.setScrollTop(e._codeEditor.getScrollTop()+e._viewZone.heightInPx)})},t.prototype._showViewZone=function(e){var t=this;void 0===e&&(e=!0),this._isVisible&&this._codeEditor.changeViewZones(function(n){var i=R;void 0!==t._viewZoneId?(t._state.isReplaceRevealed?(t._viewZone.heightInPx=64,i=64-R):(t._viewZone.heightInPx=R,i=R-64),n.removeZone(t._viewZoneId)):t._viewZone.heightInPx=R,t._viewZoneId=n.addZone(t._viewZone),e&&t._codeEditor.setScrollTop(t._codeEditor.getScrollTop()+i)})},t.prototype._applyTheme=function(e){var t={inputActiveOptionBorder:e.getColor(g.inputActiveOptionBorder),inputBackground:e.getColor(g.inputBackground),inputForeground:e.getColor(g.inputForeground),inputBorder:e.getColor(g.inputBorder),inputValidationInfoBackground:e.getColor(g.inputValidationInfoBackground),inputValidationInfoBorder:e.getColor(g.inputValidationInfoBorder), inputValidationWarningBackground:e.getColor(g.inputValidationWarningBackground),inputValidationWarningBorder:e.getColor(g.inputValidationWarningBorder),inputValidationErrorBackground:e.getColor(g.inputValidationErrorBackground),inputValidationErrorBorder:e.getColor(g.inputValidationErrorBorder)};this._findInput.style(t),this._replaceInputBox.style(t)},t.prototype._tryUpdateWidgetWidth=function(){if(this._isVisible){var e=this._codeEditor.getConfiguration().layoutInfo.width,t=this._codeEditor.getConfiguration().layoutInfo.minimapWidth,n=!1,i=!1,o=!1;if(this._resized){if(l.getTotalWidth(this._domNode)>411)return this._domNode.style.maxWidth=e-28-t-15+"px",void(this._replaceInputBox.inputElement.style.width=l.getTotalWidth(this._findInput.inputBox.inputElement)+"px")}if(439+t>=e&&(i=!0),439+t-T>=e&&(o=!0),439+t-T>=e+50&&(n=!0),l.toggleClass(this._domNode,"collapsed-find-widget",n),l.toggleClass(this._domNode,"narrow-find-widget",o),l.toggleClass(this._domNode,"reduced-find-widget",i), o||n||(this._domNode.style.maxWidth=e-28-t-15+"px"),this._resized){var r=l.getTotalWidth(this._findInput.inputBox.inputElement);r>0&&(this._replaceInputBox.inputElement.style.width=r+"px")}}},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._updateSearchScope=function(){if(this._toggleSelectionFind.checked){var e=this._codeEditor.getSelection();1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1));var t=this._state.currentMatch;e.startLineNumber!==e.endLineNumber&&(p.Range.equalsRange(e,t)||this._state.change({searchScope:e},!0))}},t.prototype._onFindInputMouseDown=function(e){e.middleButton&&e.stopPropagation()},t.prototype._onFindInputKeyDown=function(e){ return e.equals(3)?(this._codeEditor.getAction(h.FIND_IDS.NextMatchFindAction).run().done(null,i.onUnexpectedError),void e.preventDefault()):e.equals(1027)?(this._codeEditor.getAction(h.FIND_IDS.PreviousMatchFindAction).run().done(null,i.onUnexpectedError),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInputBox.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype._onReplaceInputKeyDown=function(e){return e.equals(3)?(this._controller.replace(),void e.preventDefault()):e.equals(2051)?(this._controller.replaceAll(),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):void 0},t.prototype.getHorizontalSashTop=function(e){return 0},t.prototype.getHorizontalSashLeft=function(e){return 0}, t.prototype.getHorizontalSashWidth=function(e){return 500},t.prototype._keybindingLabelFor=function(e){var t=this._keybindingService.lookupKeybinding(e);return t?" ("+t.getLabel()+")":""},t.prototype._buildFindPart=function(){var e=this;this._findInput=this._register(new m.ContextScopedFindInput(null,this._contextViewProvider,{width:221,label:v,placeholder:_,appendCaseSensitiveLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(h.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(h.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._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(function(t){ return e._onFindInputKeyDown(t)})),this._register(this._findInput.inputBox.onDidChange(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())})),r.isLinux&&this._register(this._findInput.onMouseDown(function(t){return e._onFindInputMouseDown(t)})),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new F({label:y+this._keybindingLabelFor(h.FIND_IDS.PreviousMatchFindAction),className:"previous",onTrigger:function(){e._codeEditor.getAction(h.FIND_IDS.PreviousMatchFindAction).run().done(null,i.onUnexpectedError)}})),this._nextBtn=this._register(new F({ label:C+this._keybindingLabelFor(h.FIND_IDS.NextMatchFindAction),className:"next",onTrigger:function(){e._codeEditor.getAction(h.FIND_IDS.NextMatchFindAction).run().done(null,i.onUnexpectedError)}}));var t=document.createElement("div");return t.className="find-part",t.appendChild(this._findInput.domNode),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new A({parent:t,title:b+this._keybindingLabelFor(h.FIND_IDS.ToggleSearchScopeCommand),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 F({label:S+this._keybindingLabelFor(h.FIND_IDS.CloseFindWidgetCommand),className:"close-fw",onTrigger:function(){e._state.change({isRevealed:!1,searchScope:null},!1)}, onKeyDown:function(t){t.equals(2)&&e._isReplaceVisible&&(e._replaceBtn.isEnabled()?e._replaceBtn.focus():e._codeEditor.focus(),t.preventDefault())}})),t.appendChild(this._closeBtn.domNode),t},t.prototype._buildReplacePart=function(){var e=this,t=document.createElement("div");t.className="replace-input",t.style.width="221px",this._replaceInputBox=this._register(new m.ContextScopedHistoryInputBox(t,null,{ariaLabel:w,placeholder:E,history:[]},this._contextKeyService)),this._register(l.addStandardDisposableListener(this._replaceInputBox.inputElement,"keydown",function(t){return e._onReplaceInputKeyDown(t)})),this._register(l.addStandardDisposableListener(this._replaceInputBox.inputElement,"input",function(t){e._state.change({replaceString:e._replaceInputBox.value},!1)})),this._replaceBtn=this._register(new F({label:L+this._keybindingLabelFor(h.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 F({label:x+this._keybindingLabelFor(h.FIND_IDS.ReplaceAllAction),className:"replace-all",onTrigger:function(){e._controller.replaceAll()}}));var n=document.createElement("div");return n.className="replace-part",n.appendChild(t),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),n},t.prototype._buildDomNode=function(){var e=this,t=this._buildFindPart(),n=this._buildReplacePart();this._toggleReplaceBtn=this._register(new F({label:N,className:"toggle left",onTrigger:function(){e._state.change({isReplaceRevealed:!e._isReplaceVisible},!1),e._isReplaceVisible&&(e._replaceInputBox.width=e._findInput.inputBox.width),e._showViewZone()}})),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","true"),this._domNode.style.width="411px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(t),this._domNode.appendChild(n),this._buildSash()},t.prototype._buildSash=function(){var e=this;this._resizeSash=new d.Sash(this._domNode,this,{orientation:d.Orientation.VERTICAL}),this._resized=!1;var t=411;this._register(this._resizeSash.onDidStart(function(n){t=l.getTotalWidth(e._domNode)})),this._register(this._resizeSash.onDidChange(function(n){e._resized=!0;var i=t+n.startX-n.currentX;if(!(i<411)){var o=i-k;i>(parseFloat(l.getComputedStyle(e._domNode).maxWidth)||0)||(e._domNode.style.width=i+"px",e._isReplaceVisible&&(e._replaceInputBox.width=o))}}))},t.ID="editor.contrib.findWidget",t}(u.Widget);t.FindWidget=P;var A=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._domNode.tabIndex=0, i._checkbox=document.createElement("input"),i._checkbox.type="checkbox",i._checkbox.className="checkbox",i._checkbox.id="checkbox-"+t._COUNTER++,i._checkbox.tabIndex=-1,i._label=document.createElement("label"),i._label.className="label",i._label.htmlFor=i._checkbox.id,i._label.tabIndex=-1,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 o(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.enable=function(){this._checkbox.removeAttribute("disabled")},t.prototype.disable=function(){this._checkbox.disabled=!0},t.prototype.setEnabled=function(e){e?(this.enable(),this.domNode.tabIndex=0):(this.disable(),this.domNode.tabIndex=-1)},t._COUNTER=0,t }(u.Widget),F=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){if(e.equals(10)||e.equals(3))return n._opts.onTrigger(),void e.preventDefault();n._opts.onKeyDown&&n._opts.onKeyDown(e)}),n}return o(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){l.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){l.toggleClass(this._domNode,e,t)},t}(u.Widget);t.SimpleButton=F,f.registerThemingParticipant(function(e,t){var n=function(e,n){n&&t.addRule(".monaco-editor "+e+" { background-color: "+n+"; }")};n(".findMatch",e.getColor(g.editorFindMatchHighlight)),n(".currentFindMatch",e.getColor(g.editorFindMatch)),n(".findScope",e.getColor(g.editorFindRangeHighlight));n(".find-widget",e.getColor(g.editorWidgetBackground));var i=e.getColor(g.widgetShadow);i&&t.addRule(".monaco-editor .find-widget { box-shadow: 0 2px 8px "+i+"; }");var o=e.getColor(g.editorFindMatchHighlightBorder);o&&t.addRule(".monaco-editor .findMatch { border: 1px "+("hc"===e.type?"dotted":"solid")+" "+o+"; box-sizing: border-box; }");var r=e.getColor(g.editorFindMatchBorder);r&&t.addRule(".monaco-editor .currentFindMatch { border: 2px solid "+r+"; padding: 1px; box-sizing: border-box; }");var s=e.getColor(g.editorFindRangeHighlightBorder) ;s&&t.addRule(".monaco-editor .findScope { border: 1px "+("hc"===e.type?"dashed":"solid")+" "+s+"; }");var a=e.getColor(g.contrastBorder);a&&t.addRule(".monaco-editor .find-widget { border: 2px solid "+a+"; }");var l=e.getColor(g.errorForeground);l&&t.addRule(".monaco-editor .find-widget.no-results .matchesCount { color: "+l+"; }");var u=e.getColor(g.editorWidgetResizeBorder);if(u)t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+u+"; width: 3px !important; margin-left: -4px;}");else{var d=e.getColor(g.editorWidgetBorder);d&&t.addRule(".monaco-editor .find-widget .monaco-sash { background-color: "+d+"; width: 3px !important; margin-left: -4px;}")}})}),define(t[196],n([1,0,311,2,19,6,11,142,243,14,20,72,194,77,49,547,516,16,15,44]),function(e,t,n,i,r,s,l,d,c,h,p,f,g,m,v,_,y,C,b,S){"use strict";function w(e){var t=e.getSelection();if(t.startLineNumber===t.endLineNumber){if(!t.isEmpty())return e.getModel().getValueInRange(t);var n=e.getModel().getWordAtPosition(t.getStartPosition()) ;if(n)return n.word}return null}Object.defineProperty(t,"__esModule",{value:!0}),t.getSelectionSearchString=w;var E=function(e){function t(t,n,i,o){var r=e.call(this)||this;return r._editor=t,r._findWidgetVisible=d.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(n),r._storageService=i,r._clipboardService=o,r._updateHistoryDelayer=new h.Delayer(500),r._state=r._register(new c.FindReplaceState),r.loadQueryState(),r._register(r._state.onFindReplaceStateChange(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,matchCase:r._storageService.getBoolean("editor.matchCase",f.StorageScope.WORKSPACE,!1),wholeWord:r._storageService.getBoolean("editor.wholeWord",f.StorageScope.WORKSPACE,!1),isRegex:r._storageService.getBoolean("editor.isRegex",f.StorageScope.WORKSPACE,!1)},!1),e&&r._start({forceRevealReplace:!1,seedSearchStringFromSelection:!1,seedSearchStringFromGlobalClipboard:!1, shouldFocus:0,shouldAnimate:!1})})),r}return o(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this.disposeModel(),e.prototype.dispose.call(this)},t.prototype.disposeModel=function(){this._model&&(this._model.dispose(),this._model=null)},t.prototype.getId=function(){return t.ID},t.prototype._onStateChanged=function(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)},t.prototype.saveQueryState=function(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,f.StorageScope.WORKSPACE),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,f.StorageScope.WORKSPACE),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,f.StorageScope.WORKSPACE)},t.prototype.loadQueryState=function(){this._state.change({ matchCase:this._storageService.getBoolean("editor.matchCase",f.StorageScope.WORKSPACE,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",f.StorageScope.WORKSPACE,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",f.StorageScope.WORKSPACE,this._state.isRegex)},!1)},t.prototype.getState=function(){return this._state},t.prototype.closeFindWidget=function(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()},t.prototype.toggleCaseSensitive=function(){this._state.change({matchCase:!this._state.matchCase},!1)},t.prototype.toggleWholeWords=function(){this._state.change({wholeWord:!this._state.wholeWord},!1)},t.prototype.toggleRegex=function(){this._state.change({isRegex:!this._state.isRegex},!1)},t.prototype.toggleSearchScope=function(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else{var e=this._editor.getSelection() ;1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,1)),e.isEmpty()||this._state.change({searchScope:e},!0)}},t.prototype.setSearchString=function(e){this._state.isRegex&&(e=s.escapeRegExpCharacters(e)),this._state.change({searchString:e},!1)},t.prototype.highlightFindOptions=function(){},t.prototype._start=function(e){if(this.disposeModel(),this._editor.getModel()){var t={isRevealed:!0};if(e.seedSearchStringFromSelection){(n=w(this._editor))&&(this._state.isRegex?t.searchString=s.escapeRegExpCharacters(n):t.searchString=n)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){var n=this.getGlobalBufferTerm();n&&(t.searchString=n)}e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),this._state.change(t,!1),this._model||(this._model=new d.FindModelBoundToEditorModel(this._editor,this._state))}},t.prototype.start=function(e){this._start(e)},t.prototype.moveToNextMatch=function(){ return!!this._model&&(this._model.moveToNextMatch(),!0)},t.prototype.moveToPrevMatch=function(){return!!this._model&&(this._model.moveToPrevMatch(),!0)},t.prototype.replace=function(){return!!this._model&&(this._model.replace(),!0)},t.prototype.replaceAll=function(){return!!this._model&&(this._model.replaceAll(),!0)},t.prototype.selectAllMatches=function(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)},t.prototype.getGlobalBufferTerm=function(){return this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""},t.prototype.setGlobalBufferTerm=function(e){this._editor.getConfiguration().contribInfo.find.globalFindClipboard&&this._clipboardService&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)},t.ID="editor.contrib.findController",t=a([u(1,r.IContextKeyService),u(2,f.IStorageService),u(3,g.IClipboardService)],t) }(i.Disposable);t.CommonFindController=E;var L=function(e){function t(t,n,i,o,r,s,a){var l=e.call(this,t,i,s,a)||this;return l._contextViewService=n,l._contextKeyService=i,l._keybindingService=o,l._themeService=r,l}return o(t,e),t.prototype._start=function(t){this._widget||this._createFindWidget(),e.prototype._start.call(this,t),2===t.shouldFocus?this._widget.focusReplaceInput():1===t.shouldFocus&&this._widget.focusFindInput()},t.prototype.highlightFindOptions=function(){this._widget||this._createFindWidget(),this._state.isRevealed?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()},t.prototype._createFindWidget=function(){this._widget=this._register(new _.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService)),this._findOptionsWidget=this._register(new y.FindOptionsWidget(this._editor,this._state,this._keybindingService,this._themeService))}, t=a([u(1,m.IContextViewService),u(2,r.IContextKeyService),u(3,v.IKeybindingService),u(4,C.IThemeService),u(5,f.IStorageService),u(6,b.optional(g.IClipboardService))],t)}(E);t.FindController=L;var x=function(e){function t(){return e.call(this,{id:d.FIND_IDS.StartFindAction,label:n.localize(0,null),alias:"Find",precondition:null,kbOpts:{kbExpr:null,primary:2084,weight:100},menubarOpts:{menuId:S.MenuId.MenubarEditMenu,group:"3_find",title:n.localize(1,null),order:1}})||this}return o(t,e),t.prototype.run=function(e,t){var n=E.get(t);n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.globalFindClipboard,shouldFocus:1,shouldAnimate:!0})},t}(l.EditorAction);t.StartFindAction=x;var N=function(e){function t(){return e.call(this,{id:d.FIND_IDS.StartFindWithSelection,label:n.localize(2,null),alias:"Find With Selection",precondition:null,kbOpts:{kbExpr:null, primary:null,mac:{primary:2083},weight:100}})||this}return o(t,e),t.prototype.run=function(e,t){var n=E.get(t);n&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:!0,seedSearchStringFromGlobalClipboard:!1,shouldFocus:1,shouldAnimate:!0}),n.setGlobalBufferTerm(n.getState().searchString))},t}(l.EditorAction);t.StartFindWithSelectionAction=N;var I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(e,t){var n=E.get(t);n&&!this._run(n)&&(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===n.getState().searchString.length&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0}),this._run(n))},t}(l.EditorAction);t.MatchFindAction=I;var M=function(e){function t(){return e.call(this,{id:d.FIND_IDS.NextMatchFindAction,label:n.localize(3,null),alias:"Find Next",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:61,mac:{primary:2085, secondary:[61]},weight:100}})||this}return o(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(I);t.NextMatchFindAction=M;var D=function(e){function t(){return e.call(this,{id:d.FIND_IDS.PreviousMatchFindAction,label:n.localize(4,null),alias:"Find Previous",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})||this}return o(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(I);t.PreviousMatchFindAction=D;var T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(e,t){var n=E.get(t);if(n){var i=w(t);i&&n.setSearchString(i),this._run(n)||(n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0}),this._run(n))}},t}(l.EditorAction);t.SelectionMatchFindAction=T;var k=function(e){function t(){return e.call(this,{ id:d.FIND_IDS.NextSelectionMatchFindAction,label:n.localize(5,null),alias:"Find Next Selection",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:2109,weight:100}})||this}return o(t,e),t.prototype._run=function(e){return e.moveToNextMatch()},t}(T);t.NextSelectionMatchFindAction=k;var R=function(e){function t(){return e.call(this,{id:d.FIND_IDS.PreviousSelectionMatchFindAction,label:n.localize(6,null),alias:"Find Previous Selection",precondition:null,kbOpts:{kbExpr:p.EditorContextKeys.focus,primary:3133,weight:100}})||this}return o(t,e),t.prototype._run=function(e){return e.moveToPrevMatch()},t}(T);t.PreviousSelectionMatchFindAction=R;var O=function(e){function t(){return e.call(this,{id:d.FIND_IDS.StartFindReplaceAction,label:n.localize(7,null),alias:"Replace",precondition:null,kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menubarOpts:{menuId:S.MenuId.MenubarEditMenu,group:"3_find",title:n.localize(8,null),order:2}})||this}return o(t,e),t.prototype.run=function(e,t){ if(!t.getConfiguration().readOnly){var n=E.get(t),i=t.getSelection(),o=!i.isEmpty()&&i.startLineNumber===i.endLineNumber&&t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,r=n.getState().searchString||o?2:1;n&&n.start({forceRevealReplace:!0,seedSearchStringFromSelection:o,seedSearchStringFromGlobalClipboard:t.getConfiguration().contribInfo.find.seedSearchStringFromSelection,shouldFocus:r,shouldAnimate:!0})}},t}(l.EditorAction);t.StartFindReplaceAction=O,l.registerEditorContribution(L),l.registerEditorAction(x),l.registerEditorAction(N),l.registerEditorAction(M),l.registerEditorAction(D),l.registerEditorAction(k),l.registerEditorAction(R),l.registerEditorAction(O);var P=l.EditorCommand.bindToContribution(E.get);l.registerEditorCommand(new P({id:d.FIND_IDS.CloseFindWidgetCommand,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.closeFindWidget()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:9,secondary:[1033]}})),l.registerEditorCommand(new P({ id:d.FIND_IDS.ToggleCaseSensitiveCommand,precondition:null,handler:function(e){return e.toggleCaseSensitive()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:d.ToggleCaseSensitiveKeybinding.primary,mac:d.ToggleCaseSensitiveKeybinding.mac,win:d.ToggleCaseSensitiveKeybinding.win,linux:d.ToggleCaseSensitiveKeybinding.linux}})),l.registerEditorCommand(new P({id:d.FIND_IDS.ToggleWholeWordCommand,precondition:null,handler:function(e){return e.toggleWholeWords()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:d.ToggleWholeWordKeybinding.primary,mac:d.ToggleWholeWordKeybinding.mac,win:d.ToggleWholeWordKeybinding.win,linux:d.ToggleWholeWordKeybinding.linux}})),l.registerEditorCommand(new P({id:d.FIND_IDS.ToggleRegexCommand,precondition:null,handler:function(e){return e.toggleRegex()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:d.ToggleRegexKeybinding.primary,mac:d.ToggleRegexKeybinding.mac,win:d.ToggleRegexKeybinding.win,linux:d.ToggleRegexKeybinding.linux}})), l.registerEditorCommand(new P({id:d.FIND_IDS.ToggleSearchScopeCommand,precondition:null,handler:function(e){return e.toggleSearchScope()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:d.ToggleSearchScopeKeybinding.primary,mac:d.ToggleSearchScopeKeybinding.mac,win:d.ToggleSearchScopeKeybinding.win,linux:d.ToggleSearchScopeKeybinding.linux}})),l.registerEditorCommand(new P({id:d.FIND_IDS.ReplaceOneAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replace()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:3094}})),l.registerEditorCommand(new P({id:d.FIND_IDS.ReplaceAllAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.replaceAll()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:2563}})),l.registerEditorCommand(new P({id:d.FIND_IDS.SelectAllMatchesAction,precondition:d.CONTEXT_FIND_WIDGET_VISIBLE,handler:function(e){return e.selectAllMatches()},kbOpts:{weight:105,kbExpr:p.EditorContextKeys.focus,primary:515}}))}), define(t[549],n([1,0,326,2,39,14,24,20,11,3,21,54,181,17,196,29,22,16,44]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y){"use strict";function C(e,t,n){for(var i=b(e,t[0],!n),o=1,r=t.length;o1&&n.push(new c.Selection(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}},t.prototype.run=function(e,t){var n=this,i=t.getModel(),o=[];t.getSelections().forEach(function(e){return n.getCursorsForSelection(e,i,o)}),o.length>0&&t.setSelections(o)},t}(u.EditorAction),L=function(){return function(e,t,n){this.selections=e,this.revealRange=t,this.revealScrollType=n}}();t.MultiCursorSessionResult=L;var x=function(){function e(e,t,n,i,o,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=n,this.searchText=i,this.wholeWord=o,this.matchCase=r,this.currentMatch=s}return e.create=function(t,n){var i=n.getState() ;if(!t.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new e(t,n,!1,i.searchString,i.wholeWord,i.matchCase,null);var o,r,s=!1,a=t.getSelections();1===a.length&&a[0].isEmpty()?(s=!0,o=!0,r=!0):(o=i.wholeWord,r=i.matchCase);var l,u=t.getSelection(),d=null;if(u.isEmpty()){var h=t.getModel().getWordAtPosition(u.getStartPosition());if(!h)return null;l=h.word,d=new c.Selection(u.startLineNumber,h.startColumn,u.startLineNumber,h.endColumn)}else l=t.getModel().getValueInRange(u).replace(/\r\n/g,"\n");return new e(t,n,s,l,o,r,d)},e.prototype.addSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new L(t.concat(e),e,0)},e.prototype.moveSelectionToNextFindMatch=function(){var e=this._getNextMatch();if(!e)return null;var t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getNextMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e} this.findController.highlightFindOptions();var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findNextMatch(this.searchText,n.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new c.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.addSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new L(t.concat(e),e,0)},e.prototype.moveSelectionToPreviousFindMatch=function(){var e=this._getPreviousMatch();if(!e)return null;var t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)},e.prototype._getPreviousMatch=function(){if(this.currentMatch){var e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions() ;var t=this._editor.getSelections(),n=t[t.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,n.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1);return i?new c.Selection(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null},e.prototype.selectAll=function(){return this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824)},e}();t.MultiCursorSession=x;var N=function(e){function t(t){var n=e.call(this)||this;return n._editor=t,n._ignoreSelectionChange=!1,n._session=null,n._sessionDispose=[],n}return o(t,e),t.get=function(e){return e.getContribution(t.ID)},t.prototype.dispose=function(){this._endSession(),e.prototype.dispose.call(this)},t.prototype.getId=function(){return t.ID},t.prototype._beginSessionIfNeeded=function(e){var t=this;if(!this._session){ var n=x.create(this._editor,e);if(!n)return;this._session=n;var i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose=[this._editor.onDidChangeCursorSelection(function(e){t._ignoreSelectionChange||t._endSession()}),this._editor.onDidBlurEditorText(function(){t._endSession()}),e.getState().onFindReplaceStateChange(function(e){(e.matchCase||e.wholeWord)&&t._endSession()})]}},t.prototype._endSession=function(){if(this._sessionDispose=i.dispose(this._sessionDispose),this._session&&this._session.isDisconnectedFromFindController){var e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null},t.prototype._setSelections=function(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1},t.prototype._expandEmptyToWord=function(e,t){if(!t.isEmpty())return t ;var n=e.getWordAtPosition(t.getStartPosition());return n?new c.Selection(t.startLineNumber,n.startColumn,t.startLineNumber,n.endColumn):t},t.prototype._applySessionResult=function(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))},t.prototype.getSession=function(e){return this._session},t.prototype.addSelectionToNextFindMatch=function(e){if(!this._session){var t=this._editor.getSelections();if(t.length>1){var n=e.getState().matchCase;if(!C(this._editor.getModel(),t,n)){for(var i=this._editor.getModel(),o=[],r=0,s=t.length;r0&&n.isRegex)t=this._editor.getModel().findMatches(n.searchString,!0,n.isRegex,n.matchCase,n.wholeWord?this._editor.getConfiguration().wordSeparators:null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(t.length>0){for(var i=this._editor.getSelection(),o=0,r=t.length;o1){var l=r.getState().matchCase;if(!C(t.getModel(),a,l))return null}s=x.create(t,r)}if(!s)return null;var u=null,d=f.DocumentHighlightProviderRegistry.has(n);if(s.currentMatch){if(d)return null;if(!t.getConfiguration().contribInfo.occurrencesHighlight)return null;u=s.currentMatch}if(/^[ \t]+$/.test(s.searchText))return null;if(s.searchText.length>200)return null;var c=r.getState(),h=c.matchCase;if(c.isRevealed){var p=c.searchString;h||(p=p.toLowerCase());var m=s.searchText;if(h||(m=m.toLowerCase()), p===m&&s.matchCase===c.matchCase&&s.wholeWord===c.wholeWord&&!c.isRegex)return null}return new P(u,s.searchText,s.matchCase,s.wholeWord?t.getConfiguration().wordSeparators:null)},t.prototype._setState=function(e){if(P.softEquals(this.state,e))this.state=e;else if(this.state=e,this.state){var n=this.editor.getModel();if(!n.isTooLargeForTokenization()){var i=f.DocumentHighlightProviderRegistry.has(n),o=n.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(function(e){return e.range});o.sort(d.Range.compareRangesUsingStarts);var r=this.editor.getSelections();r.sort(d.Range.compareRangesUsingStarts);for(var s=[],a=0,l=0,u=o.length,c=r.length;a=c)s.push(h),a++;else{var p=d.Range.compareRangesUsingStarts(h,r[l]);p<0?(!r[l].isEmpty()&&d.Range.areIntersecting(h,r[l])||s.push(h),a++):p>0?l++:(a++,l++)}}var g=s.map(function(e){return{range:e,options:i?t._SELECTION_HIGHLIGHT:t._SELECTION_HIGHLIGHT_OVERVIEW}}) ;this.decorations=this.editor.deltaDecorations(this.decorations,g)}}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},t.prototype.dispose=function(){this._setState(null),e.prototype.dispose.call(this)},t.ID="editor.contrib.selectionHighlighter",t._SELECTION_HIGHLIGHT_OVERVIEW=m.ModelDecorationOptions.register({stickiness:a.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight",overviewRuler:{color:_.themeColorFromId(v.overviewRulerSelectionHighlightForeground),darkColor:_.themeColorFromId(v.overviewRulerSelectionHighlightForeground),position:a.OverviewRulerLane.Center}}),t._SELECTION_HIGHLIGHT=m.ModelDecorationOptions.register({stickiness:a.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges,className:"selectionHighlight"}),t}(i.Disposable);t.SelectionHighlighter=A,u.registerEditorContribution(N),u.registerEditorContribution(A),u.registerEditorAction(S),u.registerEditorAction(w),u.registerEditorAction(E),u.registerEditorAction(M),u.registerEditorAction(D), u.registerEditorAction(T),u.registerEditorAction(k),u.registerEditorAction(R),u.registerEditorAction(O)}),define(t[147],n([1,0,31,50,15,70]),function(e,t,n,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWorkspaceContextService=o.createDecorator("contextService");!function(e){e.isIWorkspace=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&"string"==typeof e.name&&Array.isArray(e.folders)}}(t.IWorkspace||(t.IWorkspace={}));!function(e){e.isIWorkspaceFolder=function(e){return e&&"object"==typeof e&&n.default.isUri(e.uri)&&"string"==typeof e.name&&"function"==typeof e.toResource}}(t.IWorkspaceFolder||(t.IWorkspaceFolder={}));var s=function(){function e(e,t,n,i,o){void 0===t&&(t=""),void 0===n&&(n=[]),void 0===i&&(i=null),this._id=e,this._name=t,this._configuration=i,this._ctime=o,this._foldersMap=r.TernarySearchTree.forPaths(),this.folders=n}return Object.defineProperty(e.prototype,"folders",{get:function(){return this._folders},set:function(e){this._folders=e, this.updateFoldersMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"configuration",{get:function(){return this._configuration},set:function(e){this._configuration=e},enumerable:!0,configurable:!0}),e.prototype.getFolder=function(e){return e?this._foldersMap.findSubstr(e.toString()):null},e.prototype.updateFoldersMap=function(){this._foldersMap=r.TernarySearchTree.forPaths();for(var e=0,t=this.folders;e1?this.badge.setTitleFormat(n.localize(1,null,t)):this.badge.setTitleFormat(n.localize(2,null,t))},e=a([u(1,b.IWorkspaceContextService),u(2,C.optional(T.IEnvironmentService)),u(3,M.IThemeService)],e)}(),K=function(){function e(e){var t=document.createElement("div");this.before=document.createElement("span"),this.inside=document.createElement("span"),this.after=document.createElement("span"),m.addClass(this.inside,"referenceMatch"),m.addClass(t,"reference"),t.appendChild(this.before),t.appendChild(this.inside),t.appendChild(this.after),e.appendChild(t)}return e.prototype.set=function(e){var t=e.parent.preview.preview(e.range),n=t.before,i=t.inside,o=t.after;this.before.innerHTML=h.escape(n), this.inside.innerHTML=h.escape(i),this.after.innerHTML=h.escape(o)},e}(),U=function(){function e(e,t,n){this._contextService=e,this._themeService=t,this._environmentService=n}return e.prototype.getHeight=function(e,t){return 23},e.prototype.getTemplateId=function(t,n){if(n instanceof x.FileReferences)return e._ids.FileReferences;if(n instanceof x.OneReference)return e._ids.OneReference;throw n},e.prototype.renderTemplate=function(t,n,i){if(n===e._ids.FileReferences)return new z(i,this._contextService,this._environmentService,this._themeService);if(n===e._ids.OneReference)return new K(i);throw n},e.prototype.renderElement=function(e,t,n,i){if(t instanceof x.FileReferences)i.set(t);else{if(!(t instanceof x.OneReference))throw n;i.set(t)}},e.prototype.disposeTemplate=function(e,t,n){n instanceof z&&n.dispose()},e._ids={FileReferences:"FileReferences",OneReference:"OneReference"},e=a([u(0,b.IWorkspaceContextService),u(1,M.IThemeService),u(2,C.optional(T.IEnvironmentService))],e)}(),j=function(){function e(){} return e.prototype.getAriaLabel=function(e,t){return t instanceof x.FileReferences?t.getAriaMessage():t instanceof x.OneReference?t.getAriaMessage():void 0},e}(),q=function(){function e(e,t){var n=this;this._disposables=[],this._onDidChangePercentages=new r.Emitter,this._ratio=t,this._sash=new v.Sash(e,{getVerticalSashLeft:function(){return n._width*n._ratio},getVerticalSashHeight:function(){return n._height}});var i;this._disposables.push(this._sash.onDidStart(function(e){i=e.startX-n._width*n.ratio})),this._disposables.push(this._sash.onDidChange(function(e){var t=e.currentX-i;t>20&&t+200?e.children[0]:void 0},h.prototype._revealReference=function(e,t){return d(this,void 0,void 0,function(){var o,r=this;return c(this,function(a){switch(a.label){case 0:return e.uri.scheme!==l.Schemas.inMemory?this.setTitle(W.basenameOrAuthority(e.uri),this._uriDisplay.getLabel(W.dirname(e.uri),!1)):this.setTitle(n.localize(6,null)),o=this._textModelResolverService.createModelReference(e.uri),t?[4,this._tree.reveal(e.parent)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2,p.TPromise.join([o,this._tree.reveal(e)]).then(function(t){var n=t[0];if(r._model){s.dispose(r._previewModelReference);var i=n.object;if(i){r._previewModelReference=n;var o=r._preview.getModel()===i.textEditorModel;r._preview.setModel(i.textEditorModel) ;var a=S.Range.lift(e.range).collapseToStart();r._preview.setSelection(a),r._preview.revealRangeInCenter(a,o?0:1)}else r._preview.setModel(r._previewNotAvailableMessage),n.dispose()}else n.dispose()},i.onUnexpectedError)]}})})},h=a([u(3,M.IThemeService),u(4,N.ITextModelService),u(5,C.IInstantiationService),u(6,F.IUriDisplayService)],h)}(L.PeekViewWidget);t.ReferenceWidget=G,t.peekViewTitleBackground=I.registerColor("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},n.localize(7,null)),t.peekViewTitleForeground=I.registerColor("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},n.localize(8,null)),t.peekViewTitleInfoForeground=I.registerColor("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#6c6c6cb3",hc:"#FFFFFF99"},n.localize(9,null)),t.peekViewBorder=I.registerColor("peekView.border",{dark:"#007acc",light:"#007acc",hc:I.contrastBorder},n.localize(10,null)),t.peekViewResultsBackground=I.registerColor("peekViewResult.background",{dark:"#252526", light:"#F3F3F3",hc:f.Color.black},n.localize(11,null)),t.peekViewResultsMatchForeground=I.registerColor("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:f.Color.white},n.localize(12,null)),t.peekViewResultsFileForeground=I.registerColor("peekViewResult.fileForeground",{dark:f.Color.white,light:"#1E1E1E",hc:f.Color.white},n.localize(13,null)),t.peekViewResultsSelectionBackground=I.registerColor("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},n.localize(14,null)),t.peekViewResultsSelectionForeground=I.registerColor("peekViewResult.selectionForeground",{dark:f.Color.white,light:"#6C6C6C",hc:f.Color.white},n.localize(15,null)),t.peekViewEditorBackground=I.registerColor("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:f.Color.black},n.localize(16,null)),t.peekViewEditorGutterBackground=I.registerColor("peekViewEditorGutter.background",{dark:t.peekViewEditorBackground,light:t.peekViewEditorBackground,hc:t.peekViewEditorBackground },n.localize(17,null)),t.peekViewResultsMatchHighlight=I.registerColor("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},n.localize(18,null)),t.peekViewEditorMatchHighlight=I.registerColor("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},n.localize(19,null)),t.peekViewEditorMatchHighlightBorder=I.registerColor("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:I.activeContrastBorder},n.localize(20,null)),M.registerThemingParticipant(function(e,n){var i=e.getColor(t.peekViewResultsMatchHighlight);i&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: "+i+"; }");var o=e.getColor(t.peekViewEditorMatchHighlight);o&&n.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: "+o+"; }");var r=e.getColor(t.peekViewEditorMatchHighlightBorder) ;r&&n.addRule(".monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid "+r+"; box-sizing: border-box; }");var s=e.getColor(I.activeContrastBorder);s&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted "+s+"; box-sizing: border-box; }");var a=e.getColor(t.peekViewResultsBackground);a&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree { background-color: "+a+"; }");var l=e.getColor(t.peekViewResultsMatchForeground);l&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree { color: "+l+"; }");var u=e.getColor(t.peekViewResultsFileForeground);u&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .reference-file { color: "+u+"; }");var d=e.getColor(t.peekViewResultsSelectionBackground);d&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: "+d+"; }");var c=e.getColor(t.peekViewResultsSelectionForeground) ;c&&n.addRule(".monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: "+c+" !important; }");var h=e.getColor(t.peekViewEditorBackground);h&&n.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: "+h+";}");var p=e.getColor(t.peekViewEditorGutterBackground);p&&n.addRule(".monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: "+p+";}")})}),define(t[148],n([1,0,331,10,2,32,15,19,51,72,198,3,12,37]),function(e,t,n,i,o,r,s,l,h,p,f,g,m,v){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ctxReferenceSearchVisible=new l.RawContextKey("referenceSearchVisible",!1);var _=function(){function e(e,n,i,o,r,s,a,l){this._defaultTreeKeyboardSupport=e,this._editorService=o,this._notificationService=r,this._instantiationService=s, this._storageService=a,this._configurationService=l,this._requestIdPool=0,this._disposables=[],this._ignoreModelChangeEvent=!1,this._editor=n,this._referenceSearchVisible=t.ctxReferenceSearchVisible.bindTo(i)}return e.get=function(t){return t.getContribution(e.ID)},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this._referenceSearchVisible.reset(),o.dispose(this._disposables),o.dispose(this._widget),o.dispose(this._model),this._widget=null,this._model=null,this._editor=null},e.prototype.toggleWidget=function(e,t,i){var o,r=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(){r.closeWidget()})),this._disposables.push(this._editor.onDidChangeModel(function(){r._ignoreModelChangeEvent||r.closeWidget()}));var s=JSON.parse(this._storageService.get("peekViewLayout",void 0,"{}")) ;this._widget=this._instantiationService.createInstance(f.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(n.localize(0,null)),this._widget.show(e),this._disposables.push(this._widget.onDidClose(function(){t.cancel(),r._storageService.store("peekViewLayout",JSON.stringify(r._widget.layoutData)),r._widget=null,r.closeWidget()})),this._disposables.push(this._widget.onDidSelectReference(function(e){var t=e.element,n=e.kind;switch(n){case"open":if("editor"===e.source&&r._configurationService.getValue("editor.stablePeek"))break;case"side":r.openReference(t,"side"===n);break;case"goto":i.onGoto?i.onGoto(t):r._gotoReference(t)}}));var a=++this._requestIdPool;t.then(function(t){if(a===r._requestIdPool&&r._widget)return r._model&&r._model.dispose(),r._model=t,r._widget.setModel(r._model).then(function(){if(r._widget){r._widget.setMetaTitle(i.getMetaTitle(r._model));var t=r._editor.getModel().uri,n=new m.Position(e.startLineNumber,e.startColumn),o=r._model.nearestReference(t,n) ;if(o)return r._widget.setSelection(o)}})},function(e){r._notificationService.error(e)})},e.prototype.goToNextOrPreviousReference=function(e){return d(this,void 0,void 0,function(){var t,n,i;return c(this,function(o){switch(o.label){case 0:return this._model?(t=this._model.nearestReference(this._editor.getModel().uri,this._widget.position),n=this._model.nextOrPreviousReference(t,e),i=this._editor.hasTextFocus(),[4,this._widget.setSelection(n)]):[3,3];case 1:return o.sent(),[4,this._gotoReference(n)];case 2:o.sent(),i&&this._editor.focus(),o.label=3;case 3:return[2]}})})},e.prototype.closeWidget=function(){o.dispose(this._widget),this._widget=null,this._referenceSearchVisible.reset(),this._disposables=o.dispose(this._disposables),o.dispose(this._model),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=g.Range.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({ resource:e.uri,options:{selection:n}},this._editor).then(function(e){t._ignoreModelChangeEvent=!1,e&&e===t._editor?(t._widget.show(n),t._widget.focus()):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.openCodeEditor({resource:n,options:{selection:i}},this._editor,t),t||this.closeWidget()},e.ID="editor.contrib.referencesController",e=a([u(2,l.IContextKeyService),u(3,r.ICodeEditorService),u(4,v.INotificationService),u(5,s.IInstantiationService),u(6,p.IStorageService),u(7,h.IConfigurationService)],e)}();t.ReferencesController=_}),define(t[200],n([1,0,316,52,39,18,32,3,11,174,148,123,144,19,143,20,92,37,14]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var C=function(){return function(e,t,n,i){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),this.openToSide=e,this.openInPeek=t,this.filterCurrent=n, this.showMessage=i}}();t.DefinitionActionConfig=C;var b=function(e){function t(t,n){var i=e.call(this,n)||this;return i._configuration=t,i}return o(t,e),t.prototype.run=function(e,t){var n=this,i=e.get(_.INotificationService),o=e.get(a.ICodeEditorService),r=e.get(v.IProgressService),s=t.getModel(),u=t.getPosition(),d=this._getDeclarationsAtPosition(s,u).then(function(e){if(!s.isDisposed()&&t.getModel()===s){for(var i=-1,r=[],a=0;a1&&n.localize(2,null,e.references.length)},t.prototype._onResult=function(e,t,n){var o=this,r=n.getAriaMessage();if(i.alert(r),this._configuration.openInPeek)this._openInPeek(e,t,n);else{var s=n.nearestReference(t.getModel().uri,t.getPosition());this._openReference(t,e,s,this._configuration.openToSide).then(function(t){t&&n.references.length>1?o._openInPeek(e,t,n):n.dispose()})}},t.prototype._openReference=function(e,t,n,i){var o=n.uri,r=n.range;return t.openCodeEditor({resource:o,options:{selection:l.Range.collapseToStart(r),revealIfOpened:!0,revealInCenterIfOutsideViewport:!0}},e,i)},t.prototype._openInPeek=function(e,t,n){var i=this,o=c.ReferencesController.get(t);o?o.toggleWidget(t.getSelection(),y.createCancelablePromise(function(e){return Promise.resolve(n)}),{getMetaTitle:function(e){ return i._getMetaTitle(e)},onGoto:function(n){return o.closeWidget(),i._openReference(t,e,n,!1)}}):n.dispose()},t}(u.EditorAction);t.DefinitionAction=b;var S=s.isWeb?2118:70,w=function(e){function t(){return e.call(this,new C,{id:t.ID,label:n.localize(3,null),alias:"Go to Definition",precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:S,weight:100},menuOpts:{group:"navigation",order:1.1}})||this}return o(t,e),t.ID="editor.action.goToDeclaration",t}(b);t.GoToDefinitionAction=w;var E=function(e){function t(){return e.call(this,new C(!0),{id:t.ID,label:n.localize(4,null),alias:"Open Definition to the Side",precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:r.KeyChord(2089,S),weight:100}})||this}return o(t,e), t.ID="editor.action.openDeclarationToTheSide",t}(b);t.OpenDefinitionToSideAction=E;var L=function(e){function t(){return e.call(this,new C(void 0,!0,!1),{id:"editor.action.previewDeclaration",label:n.localize(5,null),alias:"Peek Definition",precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasDefinitionProvider,p.PeekContext.notInPeekEditor,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menuOpts:{group:"navigation",order:1.2}})||this}return o(t,e),t}(b);t.PeekDefinitionAction=L;var x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype._getDeclarationsAtPosition=function(e,t){return d.getImplementationsAtPosition(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?n.localize(6,null,e.word):n.localize(7,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&n.localize(8,null,e.references.length)},t}(b) ;t.ImplementationAction=x;var N=function(e){function t(){return e.call(this,new C,{id:t.ID,label:n.localize(9,null),alias:"Go to Implementation",precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasImplementationProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:2118,weight:100}})||this}return o(t,e),t.ID="editor.action.goToImplementation",t}(x);t.GoToImplementationAction=N;var I=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:n.localize(10,null),alias:"Peek Implementation",precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasImplementationProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:3142,weight:100}})||this}return o(t,e),t.ID="editor.action.peekImplementation",t}(x);t.PeekImplementationAction=I;var M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e), t.prototype._getDeclarationsAtPosition=function(e,t){return d.getTypeDefinitionsAtPosition(e,t)},t.prototype._getNoResultFoundMessage=function(e){return e&&e.word?n.localize(11,null,e.word):n.localize(12,null)},t.prototype._getMetaTitle=function(e){return e.references.length>1&&n.localize(13,null,e.references.length)},t}(b);t.TypeDefinitionAction=M;var D=function(e){function t(){return e.call(this,new C,{id:t.ID,label:n.localize(14,null),alias:"Go to Type Definition",precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasTypeDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:0,weight:100},menuOpts:{group:"navigation",order:1.4}})||this}return o(t,e),t.ID="editor.action.goToTypeDefinition",t}(M);t.GoToTypeDefinitionAction=D;var T=function(e){function t(){return e.call(this,new C(!1,!0,!1),{id:t.ID,label:n.localize(15,null),alias:"Peek Type Definition", precondition:f.ContextKeyExpr.and(m.EditorContextKeys.hasTypeDefinitionProvider,m.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:0,weight:100}})||this}return o(t,e),t.ID="editor.action.peekTypeDefinition",t}(M);t.PeekTypeDefinitionAction=T,u.registerEditorAction(w),u.registerEditorAction(E),u.registerEditorAction(L),u.registerEditorAction(N),u.registerEditorAction(I),u.registerEditorAction(D),u.registerEditorAction(T)}),define(t[554],n([1,0,317,14,10,79,13,64,3,17,23,11,174,2,107,16,22,68,200,169,12,156]),function(e,t,n,i,o,r,s,l,d,c,h,p,f,g,m,v,_,y,C,b,S){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var w=function(){function e(e,t,n){var r=this;this.textModelResolverService=t,this.modeService=n,this.toUnhook=[],this.decorations=[],this.editor=e,this.throttler=new i.Throttler;var s=new b.ClickLinkGesture(e);this.toUnhook.push(s),this.toUnhook.push(s.onMouseMoveOrRelevantKeyDown(function(e){var t=e[0],n=e[1] ;r.startFindDefinition(t,n)})),this.toUnhook.push(s.onExecute(function(e){r.isEnabled(e)&&r.gotoDefinition(e.target,e.hasSideBySideModifier).done(function(){r.removeDecorations()},function(e){r.removeDecorations(),o.onUnexpectedError(e)})})),this.toUnhook.push(s.onCancel(function(){r.removeDecorations(),r.currentWordUnderMouse=null}))}return e.prototype.startFindDefinition=function(e,t){var i=this;if(!this.isEnabled(e,t))return this.currentWordUnderMouse=null,void this.removeDecorations();var a=e.target.position,l=a?this.editor.getModel().getWordAtPosition(a):null;if(!l)return this.currentWordUnderMouse=null,void this.removeDecorations();if(!this.currentWordUnderMouse||this.currentWordUnderMouse.startColumn!==l.startColumn||this.currentWordUnderMouse.endColumn!==l.endColumn||this.currentWordUnderMouse.word!==l.word){this.currentWordUnderMouse=l;var u=new y.EditorState(this.editor,15);this.throttler.queue(function(){return u.validate(i.editor)?i.findDefinition(e.target):s.TPromise.wrap(null) }).then(function(e){if(e&&e.length&&u.validate(i.editor))if(e.length>1)i.addDecoration(new d.Range(a.lineNumber,l.startColumn,a.lineNumber,l.endColumn),(new r.MarkdownString).appendText(n.localize(0,null,e.length)));else{var t=e[0];if(!t.uri)return;i.textModelResolverService.createModelReference(t.uri).then(function(e){if(e.object&&e.object.textEditorModel){var n=e.object.textEditorModel,o=t.range.startLineNumber;if(0!==n.getLineMaxColumn(o)){var s,u=i.getPreviewValue(n,o);s=t.origin?d.Range.lift(t.origin):new d.Range(a.lineNumber,l.startColumn,a.lineNumber,l.endColumn),i.addDecoration(s,(new r.MarkdownString).appendCodeblock(i.modeService.getModeIdByFilenameOrFirstLine(n.uri.fsPath),u)),e.dispose()}else e.dispose()}else e.dispose()})}else i.removeDecorations()}).done(void 0,o.onUnexpectedError)}},e.prototype.getPreviewValue=function(t,n){var i=this.getPreviewRangeBasedOnBrackets(t,n);i.endLineNumber-i.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(i=this.getPreviewRangeBasedOnIndentation(t,n)) ;return this.stripIndentationFromPreviewRange(t,n,i)},e.prototype.stripIndentationFromPreviewRange=function(e,t,n){for(var i=e.getLineFirstNonWhitespaceColumn(t),o=t+1;oi)return new d.Range(n,1,i+1,1);s=t.findNextBracket(new S.Position(u,c))}return new d.Range(n,1,i+1,1)},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.isEnabled=function(e,t){return this.editor.getModel()&&e.isNoneOrSingleMouseDown&&e.target.type===h.MouseTargetType.CONTENT_TEXT&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey)&&c.DefinitionProviderRegistry.has(this.editor.getModel())},e.prototype.findDefinition=function(e){var t=this.editor.getModel();return t?f.getDefinitionsAtPosition(t,e.position):s.TPromise.as(null)},e.prototype.gotoDefinition=function(e,t){var n=this;this.editor.setPosition(e.position) ;var i=new C.DefinitionAction(new C.DefinitionActionConfig(t,!1,!0,!1),{alias:void 0,label:void 0,id:void 0,precondition:void 0});return this.editor.invokeWithinContext(function(e){return i.run(e,n.editor)})},e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.toUnhook=g.dispose(this.toUnhook)},e.ID="editor.contrib.gotodefinitionwithmouse",e.MAX_SOURCE_PREVIEW_LINES=8,e=a([u(1,m.ITextModelService),u(2,l.IModeService)],e)}();p.registerEditorContribution(w),v.registerThemingParticipant(function(e,t){var n=e.getColor(_.editorActiveLinkForeground);n&&t.addRule(".monaco-editor .goto-definition-link { color: "+n+" !important; }")})}),define(t[555],n([1,0,330,13,19,97,12,11,17,3,144,148,123,14,10,20,141,23,146,198,34,31,32,40]),function(e,t,n,i,r,s,l,d,c,h,p,f,g,m,v,_,y,C,b,S,w,E,L,x){"use strict";function N(e,t){I(e,function(e){return e.closeWidget()})}function I(e,t){var n=p.getOuterEditor(e);if(n){var i=f.ReferencesController.get(n);i&&t(i)}}function M(e,t,n){ var i=c.ReferenceProviderRegistry.ordered(e).map(function(n){return m.asWinJsPromise(function(i){return n.provideReferences(e,t,{includeDeclaration:!0},i)}).then(function(e){if(Array.isArray(e))return e},function(e){v.onUnexpectedExternalError(e)})});return Promise.all(i).then(function(e){for(var t=[],n=0,i=e;n1&&n.localize(0,null,e.references.length)}};var D=function(){function e(e,t){e instanceof y.EmbeddedCodeEditorWidget&&p.PeekContext.inPeekEditor.bindTo(t)}return e.prototype.dispose=function(){},e.prototype.getId=function(){return e.ID},e.ID="editor.contrib.referenceController",e=a([u(1,r.IContextKeyService)],e)}();t.ReferenceController=D;var T=function(e){function i(){return e.call(this,{id:"editor.action.referenceSearch.trigger",label:n.localize(1,null),alias:"Find All References", precondition:r.ContextKeyExpr.and(_.EditorContextKeys.hasReferenceProvider,p.PeekContext.notInPeekEditor,_.EditorContextKeys.isInEmbeddedEditor.toNegated()),kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menuOpts:{group:"navigation",order:1.5}})||this}return o(i,e),i.prototype.run=function(e,n){var i=f.ReferencesController.get(n);if(i){var o=n.getSelection(),r=n.getModel(),s=m.createCancelablePromise(function(e){return M(r,o.getStartPosition()).then(function(e){return new g.ReferencesModel(e)})});i.toggleWidget(o,s,t.defaultReferenceSearchOptions)}},i}(d.EditorAction);t.ReferenceAction=T,d.registerEditorContribution(D),d.registerEditorAction(T);w.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:function(e,n,o){if(!(n instanceof E.default))throw new Error("illegal argument, uri");if(!o)throw new Error("illegal argument, position");var r=e.get(L.ICodeEditorService);return r.openCodeEditor({resource:n},r.getFocusedCodeEditor()).then(function(e){ if(C.isCodeEditor(e)){var n=f.ReferencesController.get(e);if(n){var r=m.createCancelablePromise(function(t){return M(e.getModel(),l.Position.lift(o)).then(function(e){return new g.ReferencesModel(e)})}),s=new h.Range(o.lineNumber,o.column,o.lineNumber,o.column);return i.TPromise.as(n.toggleWidget(s,r,t.defaultReferenceSearchOptions))}}})}}),w.CommandsRegistry.registerCommand({id:"editor.action.showReferences",handler:function(e,n,o,r){if(!(n instanceof E.default))throw new Error("illegal argument, uri expected");var s=e.get(L.ICodeEditorService);return s.openCodeEditor({resource:n},s.getFocusedCodeEditor()).then(function(e){if(C.isCodeEditor(e)){var n=f.ReferencesController.get(e);if(n)return i.TPromise.as(n.toggleWidget(new h.Range(o.lineNumber,o.column,o.lineNumber,o.column),m.createCancelablePromise(function(e){return Promise.resolve(new g.ReferencesModel(r))}),t.defaultReferenceSearchOptions)).then(function(){return!0})}})},description:{description:"Show references at a position in a file",args:[{ name:"uri",description:"The text document in which to show references",constraint:E.default},{name:"position",description:"The position at which to show",constraint:l.Position.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array}]}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:250,primary:62,when:f.ctxReferenceSearchVisible,handler:function(e){I(e,function(e){e.goToNextOrPreviousReference(!0)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReferenceFromEmbeddedEditor",weight:150,primary:62,when:p.PeekContext.inPeekEditor,handler:function(e){I(e,function(e){e.goToNextOrPreviousReference(!0)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:250,primary:1086,when:f.ctxReferenceSearchVisible,handler:function(e){I(e,function(e){e.goToNextOrPreviousReference(!1)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReferenceFromEmbeddedEditor", weight:150,primary:1086,when:p.PeekContext.inPeekEditor,handler:function(e){I(e,function(e){e.goToNextOrPreviousReference(!1)})}}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:r.ContextKeyExpr.and(f.ctxReferenceSearchVisible,r.ContextKeyExpr.not("config.editor.stablePeek")),handler:N}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeReferenceSearchEditor",weight:-1,primary:9,secondary:[1033],when:r.ContextKeyExpr.and(p.PeekContext.inPeekEditor,r.ContextKeyExpr.not("config.editor.stablePeek")),handler:N}),s.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:r.ContextKeyExpr.and(f.ctxReferenceSearchVisible,S.ctxReferenceWidgetSearchTreeFocused),handler:function(e,t){var n=e.get(b.IListService),i=n.lastFocusedList&&n.lastFocusedList.getFocus();i instanceof g.OneReference&&I(e,function(e){return e.openReference(i,!0)})}}),t.provideReferences=M, d.registerDefaultLanguageCommand("_executeReferenceProvider",function(e,t){return M(e,t,x.CancellationToken.None)})}),define(t[556],n([1,0,133,104,188,185,510,447,448,449,512,173,455,456,457,458,196,459,460,462,200,554,518,520,521,465,522,549,527,525,555,530,468,135,532,178,533,179,474]),function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}),define(t[557],n([1,0,32,15,19,51,72,11,37,148]),function(e,t,n,i,r,s,l,d,c,h){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(t,n,i,o,r,s,a){return e.call(this,!0,t,n,i,o,r,s,a)||this}return o(t,e),t=a([u(1,r.IContextKeyService),u(2,n.ICodeEditorService),u(3,c.INotificationService),u(4,i.IInstantiationService),u(5,l.IStorageService),u(6,s.IConfigurationService)],t)}(h.ReferencesController);t.StandaloneReferencesController=p,d.registerEditorContribution(p)}), define(t[128],n([1,0,118,31,13,34,415,419,154,49,147,23,9,438,2,7,57,97,409,39,418,18,3,37,12,126,17,53,349]),function(e,t,n,i,r,s,a,l,u,d,c,h,p,f,g,m,v,_,y,C,b,S,w,E,L,x,N,I,M){"use strict";function D(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof i.default)}Object.defineProperty(t,"__esModule",{value:!0});var T=function(){function e(e){this.model=e,this._onDispose=new p.Emitter}return Object.defineProperty(e.prototype,"textEditorModel",{get:function(){return this.model},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this._onDispose.fire()},e}();t.SimpleModel=T;var k=function(){function e(){}return e.prototype.setEditor=function(e){this.editor=e},e.prototype.createModelReference=function(e){var t,n=this;return(t=function(e,t,n){return h.isCodeEditor(e)?t(e):n(e)}(this.editor,function(t){return n.findModel(t,e)},function(t){return n.findModel(t.getOriginalEditor(),e)||n.findModel(t.getModifiedEditor(),e) }))?r.TPromise.as(new g.ImmortalReference(new T(t))):r.TPromise.as(new g.ImmortalReference(null))},e.prototype.findModel=function(e,t){var n=e.getModel();return n.uri.toString()!==t.toString()?null:n},e}();t.SimpleEditorModelResolverService=k;var R=function(){function e(){}return e.prototype.showWhile=function(e,t){return null},e}();t.SimpleProgressService=R;var O=function(){return function(){}}();t.SimpleDialogService=O;var P=function(){function e(){}return e.prototype.info=function(e){return this.notify({severity:n.default.Info,message:e})},e.prototype.warn=function(e){return this.notify({severity:n.default.Warning,message:e})},e.prototype.error=function(e){return this.notify({severity:n.default.Error,message:e})},e.prototype.notify=function(t){switch(t.severity){case n.default.Error:console.error(t.message);break;case n.default.Warning:console.warn(t.message);break;default:console.log(t.message)}return e.NO_OP},e.NO_OP=new E.NoOpNotification,e}();t.SimpleNotificationService=P;var A=function(){ function e(e){this._onWillExecuteCommand=new p.Emitter,this._instantiationService=e,this._dynamicCommands=Object.create(null)}return e.prototype.addCommand=function(e){var t=this,n=e.id;return this._dynamicCommands[n]=e,g.toDisposable(function(){delete t._dynamicCommands[n]})},e.prototype.executeCommand=function(e){for(var t=[],n=1;n0&&o[r-1]===d)){var c=u.startIndex;0===a?c=0:c